[Issue 443] New: assignment in return when using cdouble is broken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 19 14:50:27 PDT 2006
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 at digitalmars.com
ReportedBy: baryluk at 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.
--
More information about the Digitalmars-d-bugs
mailing list