[Issue 3558] Optimizer bug results in false if condition being taken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 10 01:25:38 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3558
--- Comment #4 from Don <clugdbug at yahoo.com.au> 2010-02-10 01:25:37 PST ---
Test case for DMC 8.42n. Hits the breakpoint when compiled with -O.
=======================================
const static int d[1] = {1};
const static long long c[1] = {0};
void crash()
{
_asm int 3;
}
int main()
{
int k = 1;
if (d[0])
k = 0;
k = 2*d[0] + k;
if (c[0]) crash();
return k;
}
=======================================
--
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