digitalmars.D.bugs - [Issue 443] New: assignment in return when using cdouble is broken
- d-bugmail puremagic.com (33/33) Oct 19 2006 http://d.puremagic.com/issues/show_bug.cgi?id=443
- Thomas Kuehne (13/33) Oct 21 2006 -----BEGIN PGP SIGNED MESSAGE-----
- d-bugmail puremagic.com (9/9) Nov 25 2006 http://d.puremagic.com/issues/show_bug.cgi?id=443
http://d.puremagic.com/issues/show_bug.cgi?id=443
Summary: assignment in return when using cdouble is broken
Product: D
Version: 0.172
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: baryluk mpi.int.pl
Minimal test case:
-----------
cdouble y;
cdouble f(cdouble x) {
return (y = x);
}
void main() {
f(1.0+2.0i);
assert(y == 1.0+2.0i); // asseration fails on dmd 0.166-0.172
}
----------
If I'm using double instand of cdouble, or rewrite f as:
---------
cdouble f(cdouble x) {
y = x;
return x;
}
---------
then it's working ok.
--
Oct 19 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-10-19:http://d.puremagic.com/issues/show_bug.cgi?id=443Minimal test case: ----------- cdouble y; cdouble f(cdouble x) { return (y = x); } void main() { f(1.0+2.0i); assert(y == 1.0+2.0i); // asseration fails on dmd 0.166-0.172 } ---------- If I'm using double instand of cdouble, or rewrite f as: --------- cdouble f(cdouble x) { y = x; return x; } --------- then it's working ok.Added to DStress as http://dstress.kuehne.cn/run/r/return_09_A.d http://dstress.kuehne.cn/run/r/return_09_B.d http://dstress.kuehne.cn/run/r/return_09_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFOiGHLK5blCcjpWoRAvHiAJ96EdS4Je7lh12Yj0S1cKtdFZCm/wCfSkMk LsCGKiauS27L3oLjOnOXayQ= =iCoI -----END PGP SIGNATURE-----
Oct 21 2006
http://d.puremagic.com/issues/show_bug.cgi?id=443
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed DMD 0.175
--
Nov 25 2006









Thomas Kuehne <thomas-dloop kuehne.cn> 