This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/48793] Optimization -O2 Incorrectly Removes Logic


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48793

--- Comment #2 from Chris DUrso <chris at durso dot org> 2011-04-27 22:36:16 UTC ---
Hi Andreas,

Are you saying that 

myInteger = -myInteger;


or 

if( myInteger < 0 ) 


is undefined for the integer MIN_INT?


Read a little closer, the overflow/underflow/abs are just examples.  The
problem is that the second if-statement is apparently optimized away.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]