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 tree-optimization/50865] Invalid code generation for INT64_MIN % 1 on x86_64


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

--- Comment #9 from Jaak Ristioja <jaak at ristioja dot ee> 2011-10-25 16:37:48 UTC ---
(In reply to comment #8)
> Well, they are equivalent where they are both defined, or if you apply C99 
> rules to infinite-precision integers.  The problem here is that INT_MIN % 
> -1 is undefined (explicitly in C1X) and so a transformation of INT_MIN % 1 
> into INT_MIN % -1 is unsafe (the other way round, transforming undefined 
> behavior to defined, is fine at least in the absence of -ftrapv).

But INT_MIN % 1 is still defined to be zero?


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