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/53265] Warn when undefined behavior implies smaller iteration count


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

--- Comment #28 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-30 06:07:23 UTC ---
The warning is only printed if the loop has a single exit and known constant
iteration count without the undefined behavior analysis, and when the warning
is printed, we don't apply the aggressive analysis anyway.

It is hard to warn in all cases, but what exactly would be the cases anyway,
the amount of surprise on undefined behavior varies a lot.

The point of the warning was to warn about the easy cases, for the rest applies
what we write in bugs.html - if a suspicious program behaviour goes away with
-fno-aggressive-loop-optimizations, most likely it is a fault of the compiled
code, not the compiler.


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