This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/58515] New: Loop optimized away when it should not
- From: "manus at eiffel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Sep 2013 21:21:34 +0000
- Subject: [Bug c/58515] New: Loop optimized away when it should not
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58515
Bug ID: 58515
Summary: Loop optimized away when it should not
Product: gcc
Version: 4.7.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: manus at eiffel dot com
Created attachment 30885
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30885&action=edit
To reproduce code generation issue
If you compile the attached code with -O3 the `slow' function becomes a no-op
which is incorrect. Older version of GCC I've tried generated proper code. I
could not try newer version.
To reproduce compile with -O3 the attached file.
I found this while fixing the warning that GCC raises when compiling the `fast'
function.