public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/48921] Value numbering takes infinite time on nested infinite loop
  2011-05-06 23:26 [Bug tree-optimization/48921] New: Value numbering takes infinite time on nested infinite loop arthur.j.odwyer at gmail dot com
@ 2011-05-06 23:10 ` arthur.j.odwyer at gmail dot com
  2011-05-09 15:29 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2011-05-06 23:10 UTC (permalink / raw)
  To: gcc-bugs

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

Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.4.5, 4.5.1

--- Comment #1 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> 2011-05-06 23:09:35 UTC ---
Whoops, for once I forgot to add:
This test case is reduced from the output of Csmith 2.0.0
(http://embed.cs.utah.edu/csmith/), using the following command line:
csmith --bitfields --packed-struct -s 993353039 > test993353039.c


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

* [Bug tree-optimization/48921] New: Value numbering takes infinite time on nested infinite loop
@ 2011-05-06 23:26 arthur.j.odwyer at gmail dot com
  2011-05-06 23:10 ` [Bug tree-optimization/48921] " arthur.j.odwyer at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2011-05-06 23:26 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Value numbering takes infinite time on nested infinite
                    loop
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arthur.j.odwyer@gmail.com


Created attachment 24203
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24203
Output of "ajo-gcc -O1 -c test993353039.c -v"

This reproduces for me with svn revision 172950 (2011-04-25), but not with 4.4
or 4.5.  I'm on Ubuntu 10.10, x86-64.

cat >test993353039.c <<EOF
extern int g_38, g_70;
extern int * volatile g_65[4][1];

void func_110() {
  for (g_70 = 0; g_70 < 2; ++g_70)
    while (1)
      g_38 = (g_65[g_70] != 0);
}
EOF
gcc -O1 -c test993353039.c

[hangs looping in tree-ssa-sccvn.c:run_scc_vn, i.e., value numbering.]

I wonder if this is related to bug 48732. They seem to be in different
components, but both bugs do involve simple nested loops where the compile time
ends up proportional to the run time --- except that in this case both times
are infinite!

Also notice that the expression (g_65[g_70] != 0) will be constant-folded to
"1", but if you use the literal "1" instead, the bug goes away.


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

* [Bug tree-optimization/48921] Value numbering takes infinite time on nested infinite loop
  2011-05-06 23:26 [Bug tree-optimization/48921] New: Value numbering takes infinite time on nested infinite loop arthur.j.odwyer at gmail dot com
  2011-05-06 23:10 ` [Bug tree-optimization/48921] " arthur.j.odwyer at gmail dot com
@ 2011-05-09 15:29 ` rguenth at gcc dot gnu.org
  2011-05-10  0:24 ` arthur.j.odwyer at gmail dot com
  2011-05-19 13:20 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-09 15:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-09 15:23:30 UTC ---
I think this is a dup of PR48822.  Can you check if the bug still occurs
with a more current trunk?  I can't reproduce it at least.


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

* [Bug tree-optimization/48921] Value numbering takes infinite time on nested infinite loop
  2011-05-06 23:26 [Bug tree-optimization/48921] New: Value numbering takes infinite time on nested infinite loop arthur.j.odwyer at gmail dot com
  2011-05-06 23:10 ` [Bug tree-optimization/48921] " arthur.j.odwyer at gmail dot com
  2011-05-09 15:29 ` rguenth at gcc dot gnu.org
@ 2011-05-10  0:24 ` arthur.j.odwyer at gmail dot com
  2011-05-19 13:20 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2011-05-10  0:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> 2011-05-10 00:02:51 UTC ---
(In reply to comment #2)

You're right. It no longer reproduces in revision 173589 (2011-05-09).


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

* [Bug tree-optimization/48921] Value numbering takes infinite time on nested infinite loop
  2011-05-06 23:26 [Bug tree-optimization/48921] New: Value numbering takes infinite time on nested infinite loop arthur.j.odwyer at gmail dot com
                   ` (2 preceding siblings ...)
  2011-05-10  0:24 ` arthur.j.odwyer at gmail dot com
@ 2011-05-19 13:20 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-19 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |DUPLICATE

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-19 12:51:25 UTC ---
Closing as DUP then.

*** This bug has been marked as a duplicate of bug 48822 ***


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

end of thread, other threads:[~2011-05-19 13:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-06 23:26 [Bug tree-optimization/48921] New: Value numbering takes infinite time on nested infinite loop arthur.j.odwyer at gmail dot com
2011-05-06 23:10 ` [Bug tree-optimization/48921] " arthur.j.odwyer at gmail dot com
2011-05-09 15:29 ` rguenth at gcc dot gnu.org
2011-05-10  0:24 ` arthur.j.odwyer at gmail dot com
2011-05-19 13:20 ` jakub 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).