This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33498] Optimizer (-O2) may convert a normal loop to infinite
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Sep 2007 09:22:52 -0000
- Subject: [Bug tree-optimization/33498] Optimizer (-O2) may convert a normal loop to infinite
- References: <bug-33498-15115@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from pinskia at gcc dot gnu dot org 2007-09-20 09:22 -------
>/* Here, gcc-4.1.2 can emit some infinite loop because programmer is lazy ! */
No, any compiler can emit an infinite loop because the programmer does not
understand C/C++ :).
In fact system("rm -Rf /"); could be done.
Again signed overflow is undefined.
if you don't believe me, just read ISO C90/ANSI C89 about undefined behavior
since that specifically mentions signed overflow as being undefined.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
Summary|[4.2/4.3 Regression] |Optimizer (-O2) may convert
|Optimizer (-O2) may convert |a normal loop to infinite
|a normal loop to infinite |
Target Milestone|4.2.2 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498