[Issue 443] New: assignment in return when using cdouble is broken
Thomas Kuehne
thomas-dloop at kuehne.cn
Sat Oct 21 06:37:26 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-10-19:
> http://d.puremagic.com/issues/show_bug.cgi?id=443
> 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.
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-----
More information about the Digitalmars-d-bugs
mailing list