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/55216] [4.8 Regression] Infinite loop generated on non-infinite code


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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |amonakov at gcc dot gnu.org
         Resolution|                            |INVALID

--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> 2012-11-06 15:05:40 UTC ---
The code invokes undefined behavior and is invalid: accessing d[++k] implies
that modified k is less than 16 (because maximum valid index of d is 15), and
therefore loop test (k < 16) is always true.

Enhancement request to produce a warning is filed as PR 52365.


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