[Issue 3558] Optimizer bug results in false if condition being taken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 30 17:15:13 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3558


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2009-11-30 17:15:12 PST ---
Reduced test case only requires -O. It's a bit peculiar.

int main()
{
    long[1] c = [0]; // must be long

    int [1] d = [1];
    int k = 0;    
    if (!d[0]) 
       k = 1;       
    k = d[0] + k + k;

    if (c[0]) assert(c[0]);

    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