public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49218] New: Incorrect optimization of a 'for' loop creates an infinite loop
@ 2011-05-29  2:14 personal@e-maxx.ru
  2011-05-29 10:23 ` [Bug tree-optimization/49218] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: personal@e-maxx.ru @ 2011-05-29  2:14 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Incorrect optimization of a 'for' loop creates an
                    infinite loop
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: personal@e-maxx.ru


Created attachment 24388
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24388
The program reads a number, and then it should output it back. After incorrect
optimization, however, the program hangs up

The following small program hangs up if compiled under gcc 4.6 with -O2.

The program reads a number (it can be any number, '5' for example), and then it
performs some silly for-loop, and then it should output the same number.

In gcc 4.6 with -O2, however, the program hangs up without outputting anything.
It looks like the loop (which can be doing less that 10 operations in reality)
is 'optimized' into an infinite loop.


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

end of thread, other threads:[~2011-05-30 11:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-29  2:14 [Bug tree-optimization/49218] New: Incorrect optimization of a 'for' loop creates an infinite loop personal@e-maxx.ru
2011-05-29 10:23 ` [Bug tree-optimization/49218] " rguenth at gcc dot gnu.org
2011-05-29 11:47 ` mikpe at it dot uu.se
2011-05-29 16:38 ` rguenth at gcc dot gnu.org
2011-05-29 17:20 ` rguenth at gcc dot gnu.org
2011-05-29 17:43 ` rguenth at gcc dot gnu.org
2011-05-29 17:50 ` rguenth at gcc dot gnu.org
2011-05-30  8:36 ` jakub at gcc dot gnu.org
2011-05-30  9:03 ` mikpe at it dot uu.se
2011-05-30  9:14 ` rguenth at gcc dot gnu.org
2011-05-30 11:18 ` rguenth at gcc dot gnu.org
2011-05-30 11:19 ` rguenth at gcc dot gnu.org
2011-05-30 11:27 ` rguenth at gcc dot gnu.org

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).