This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/58515] New: Loop optimized away when it should not


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]