This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37067] gcc creating wrong code with -O2
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2008 18:01:51 -0000
- Subject: [Bug c/37067] gcc creating wrong code with -O2
- References: <bug-37067-15593@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-08-09 18:01 -------
This works for me as far as I can see (you didn't specify the expected
output, and certainly if the loop doesn't run as often as you want you
may print uninitialized memory). Anyway, if it doesn't work then it is
because d_phase overflows and so invokes undefined behavior.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37067