This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/55216] [4.8 Regression] Infinite loop generated on non-infinite code
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Nov 2012 15:05:40 +0000
- Subject: [Bug tree-optimization/55216] [4.8 Regression] Infinite loop generated on non-infinite code
- Auto-submitted: auto-generated
- References: <bug-55216-4@http.gcc.gnu.org/bugzilla/>
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.