[Issue 5672] ICE(cod2.c): incorrect optimization of (long &1) == 1

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 1 17:09:09 PST 2011


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE(cod2.c): if ((long &1)  |ICE(cod2.c): incorrect
                   |== 1) with -O               |optimization of (long &1)
                   |                            |== 1


--- Comment #2 from Don <clugdbug at yahoo.com.au> 2011-03-01 17:06:17 PST ---
Completely reduced test case:
----
bool bug5672(long v)
{    
    return  (v & 1) == 1;
}
----
It's happening because in cgelem.c, elcmp(), around line 3350, 
  bool  = (long & 1) == 1; 
gets optimized into 
  bool = long & 1;
Setting the new size of the long expression isn't done correctly.

-- 
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