public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/58515] New: Loop optimized away when it should not
@ 2013-09-23 21:21 manus at eiffel dot com
  2013-09-23 21:24 ` [Bug c/58515] " manus at eiffel dot com
  0 siblings, 1 reply; 2+ messages in thread
From: manus at eiffel dot com @ 2013-09-23 21:21 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/58515] Loop optimized away when it should not
  2013-09-23 21:21 [Bug c/58515] New: Loop optimized away when it should not manus at eiffel dot com
@ 2013-09-23 21:24 ` manus at eiffel dot com
  0 siblings, 0 replies; 2+ messages in thread
From: manus at eiffel dot com @ 2013-09-23 21:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58515

Emmanuel Stapf <manus at eiffel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Emmanuel Stapf <manus at eiffel dot com> ---
Sorry the test code was not the proper one I intended to use since it seems
legitimate that gcc optimizes this away due to the absence of side effects.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-23 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-23 21:21 [Bug c/58515] New: Loop optimized away when it should not manus at eiffel dot com
2013-09-23 21:24 ` [Bug c/58515] " manus at eiffel dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).