[Issue 3736] corrupted struct returned by function with optimizations (-O)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 24 23:53:24 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3736
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
Version|2.030 |1.020
Severity|regression |critical
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-01-24 23:53:23 PST ---
This isn't actually a regression. It fails on D2.00, and D1.020, 1.041, 1.055
as well.
Reduced test case:
---------------
struct Foo
{
int x;
}
Foo getFoo(Foo irrelevant)
{
Foo p = Foo(400);
if ( p.x > p.x )
return irrelevant;
else
return p;
}
void main()
{
assert(getFoo( Foo(0) ).x == 400);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list