This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36862] Optimization O2 causes infinite loop
- From: "brian at dessent dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jul 2008 10:21:21 -0000
- Subject: [Bug c/36862] Optimization O2 causes infinite loop
- References: <bug-36862-4575@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from brian at dessent dot net 2008-07-17 10:21 -------
Subject: Re: New: Optimization O2 causes infinite loop
Yes, this code is broken as indeed overflow of signed integers is
undefined, so transforming this to an infinite loop is legitimate. Here
are some links to read:
http://gcc.gnu.org/gcc-4.2/changes.html
http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fwrapv-1854
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fstrict_002doverflow-698
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstrict_002doverflow-316
http://www.gnu.org/software/autoconf/manual/html_node/Integer-Overflow.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36862