public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
@ 2010-11-18 10:33 ` rguenth at gcc dot gnu.org
  2010-11-18 11:16 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-18 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-18 10:32:38 UTC ---
Created attachment 22440
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22440
testcase


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

* [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining
@ 2010-11-18 10:33 rguenth at gcc dot gnu.org
  2010-11-18 10:33 ` [Bug tree-optimization/46535] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-18 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] Endless loop during inlining
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
                CC: hubicka@gcc.gnu.org


Reducing PR46523 I run into

> gdb --args ./cc1plus -quiet -O2 -m32 -w -std=c++0x -o /dev/null 9793.ii
...
Program received signal SIGINT, Interrupt.
0x0000000000f9a39c in cgraph_decide_inlining_of_small_functions ()
    at /space/rguenther/src/svn/trunk/gcc/ipa-inline.c:1178
1178                  where = where->callers->caller;
(gdb) l
1173              where = edge->caller;
1174              while (where->global.inlined_to)
1175                {
1176                  if (where->decl == edge->callee->decl)
1177                    break;
1178                  where = where->callers->caller;
1179                }
1180              if (where->global.inlined_to)
1181                {
1182                  edge->inline_failed
(gdb) p where->callers->caller
$1 = (struct cgraph_node *) 0x7ffff4f99420
(gdb) p where
$2 = (struct cgraph_node *) 0x7ffff4f99420
(gdb) p where->global.inlined_to
$3 = (struct cgraph_node *) 0x7ffff4fb3420

thus, an endless loop.  Maybe related to the original PR of course.

I will try to reduce this one as well as soon as reducing the other
one finished.


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
  2010-11-18 10:33 ` [Bug tree-optimization/46535] " rguenth at gcc dot gnu.org
@ 2010-11-18 11:16 ` rguenth at gcc dot gnu.org
  2010-11-18 14:05 ` hjl.tools at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-18 11:16 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
  2010-11-18 10:33 ` [Bug tree-optimization/46535] " rguenth at gcc dot gnu.org
  2010-11-18 11:16 ` rguenth at gcc dot gnu.org
@ 2010-11-18 14:05 ` hjl.tools at gmail dot com
  2010-11-19 10:18 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-18 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.18 14:02:15
                 CC|                            |jason at redhat dot com
     Ever Confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-18 14:02:15 UTC ---
It is triggered by revision 166167:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00053.html


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-11-18 14:05 ` hjl.tools at gmail dot com
@ 2010-11-19 10:18 ` rguenth at gcc dot gnu.org
  2010-11-19 10:24 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-19 10:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-19 10:17:03 UTC ---
Created attachment 22455
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22455
reduced testcase

Reduced with

Index: gcc/ipa-inline.c
===================================================================
--- gcc/ipa-inline.c    (revision 166907)
+++ gcc/ipa-inline.c    (working copy)
@@ -1175,6 +1175,7 @@ cgraph_decide_inlining_of_small_function
            {
              if (where->decl == edge->callee->decl)
                break;
+             gcc_assert (where != where->callers->caller);
              where = where->callers->caller;
            }
          if (where->global.inlined_to)


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-11-19 10:18 ` rguenth at gcc dot gnu.org
@ 2010-11-19 10:24 ` rguenth at gcc dot gnu.org
  2011-01-03 20:05 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-19 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-19 10:18:02 UTC ---
It looks like we are inlining a recursive virtual call and get confused in
that process.


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-11-19 10:24 ` rguenth at gcc dot gnu.org
@ 2011-01-03 20:05 ` rguenth at gcc dot gnu.org
  2011-01-06 18:00 ` aoliva at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-03 20:05 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-01-03 20:05 ` rguenth at gcc dot gnu.org
@ 2011-01-06 18:00 ` aoliva at gcc dot gnu.org
  2011-01-07 18:39 ` hubicka at gcc dot gnu.org
  2011-01-12  7:47 ` aoliva at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: aoliva at gcc dot gnu.org @ 2011-01-06 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |aoliva at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |aoliva at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-01-06 17:50:25 UTC ---
Mine


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-01-06 18:00 ` aoliva at gcc dot gnu.org
@ 2011-01-07 18:39 ` hubicka at gcc dot gnu.org
  2011-01-12  7:47 ` aoliva at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-01-07 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-07 18:36:13 UTC ---
Also no longer reproduces.
Function obviously should never be inlined into itself....


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

* [Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining
  2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-01-07 18:39 ` hubicka at gcc dot gnu.org
@ 2011-01-12  7:47 ` aoliva at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: aoliva at gcc dot gnu.org @ 2011-01-12  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |FIXED

--- Comment #7 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-01-12 05:03:37 UTC ---
This was fixed by revision 168271.  If we fail to bring in the vtbl ptr
assignment from the cleanup stmt into the constexpr ctor, the inliner gets
thoroughly confused as expectations as to indirect calls are unmet.  I couldn't
determine exactly why the inliner ends up thinking it inlined a function into
itself, but I've already spend enough time getting acquainted with constexprs
and the cgraph inliner for now, and the fix is definitely good, so I'll leave
it at that.


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

end of thread, other threads:[~2011-01-12  5:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 10:33 [Bug tree-optimization/46535] New: [4.6 Regression] Endless loop during inlining rguenth at gcc dot gnu.org
2010-11-18 10:33 ` [Bug tree-optimization/46535] " rguenth at gcc dot gnu.org
2010-11-18 11:16 ` rguenth at gcc dot gnu.org
2010-11-18 14:05 ` hjl.tools at gmail dot com
2010-11-19 10:18 ` rguenth at gcc dot gnu.org
2010-11-19 10:24 ` rguenth at gcc dot gnu.org
2011-01-03 20:05 ` rguenth at gcc dot gnu.org
2011-01-06 18:00 ` aoliva at gcc dot gnu.org
2011-01-07 18:39 ` hubicka at gcc dot gnu.org
2011-01-12  7:47 ` aoliva 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).