* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
@ 2006-06-03 10:18 ` tbm at cyrius dot com
2006-06-03 10:19 ` tbm at cyrius dot com
` (30 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-03 10:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tbm at cyrius dot com 2006-06-03 10:18 -------
Created an attachment (id=11587)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11587&action=view)
test case
test case... still fairly large but I've been running delta for 24 hours now
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
2006-06-03 10:18 ` [Bug tree-optimization/27882] " tbm at cyrius dot com
@ 2006-06-03 10:19 ` tbm at cyrius dot com
2006-06-03 16:11 ` pinskia at gcc dot gnu dot org
` (29 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-03 10:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tbm at cyrius dot com 2006-06-03 10:19 -------
Janis, do you think you can do a regression hunt on this bug?
--
tbm at cyrius dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
2006-06-03 10:18 ` [Bug tree-optimization/27882] " tbm at cyrius dot com
2006-06-03 10:19 ` tbm at cyrius dot com
@ 2006-06-03 16:11 ` pinskia at gcc dot gnu dot org
2006-06-03 20:37 ` rguenth at gcc dot gnu dot org
` (28 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-03 16:11 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (2 preceding siblings ...)
2006-06-03 16:11 ` pinskia at gcc dot gnu dot org
@ 2006-06-03 20:37 ` rguenth at gcc dot gnu dot org
2006-06-03 20:47 ` tbm at cyrius dot com
` (27 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-06-03 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2006-06-03 20:36 -------
Works for me with r114332 on i686.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (3 preceding siblings ...)
2006-06-03 20:37 ` rguenth at gcc dot gnu dot org
@ 2006-06-03 20:47 ` tbm at cyrius dot com
2006-06-03 20:52 ` rguenther at suse dot de
` (26 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-03 20:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tbm at cyrius dot com 2006-06-03 20:47 -------
I was using revision 114238. Do you know if there has been a change that might
have fixed this?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (4 preceding siblings ...)
2006-06-03 20:47 ` tbm at cyrius dot com
@ 2006-06-03 20:52 ` rguenther at suse dot de
2006-06-03 21:20 ` tbm at cyrius dot com
` (25 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenther at suse dot de @ 2006-06-03 20:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenther at suse dot de 2006-06-03 20:52 -------
Subject: Re: [4.2 regression] segfault in
ipa-inline.c, if (e->callee->local.disregard_inline_limits
On Sat, 3 Jun 2006, tbm at cyrius dot com wrote:
> I was using revision 114238. Do you know if there has been a change that might
> have fixed this?
I don't see anything obvious.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (5 preceding siblings ...)
2006-06-03 20:52 ` rguenther at suse dot de
@ 2006-06-03 21:20 ` tbm at cyrius dot com
2006-06-04 19:50 ` mmitchel at gcc dot gnu dot org
` (24 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-03 21:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from tbm at cyrius dot com 2006-06-03 21:20 -------
Created an attachment (id=11591)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11591&action=view)
less reduced test case
This (less reduced) test case still shows the segfault with current SVN. It
takes fairly long though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (6 preceding siblings ...)
2006-06-03 21:20 ` tbm at cyrius dot com
@ 2006-06-04 19:50 ` mmitchel at gcc dot gnu dot org
2006-06-05 19:59 ` janis at gcc dot gnu dot org
` (23 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:50 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (7 preceding siblings ...)
2006-06-04 19:50 ` mmitchel at gcc dot gnu dot org
@ 2006-06-05 19:59 ` janis at gcc dot gnu dot org
2006-06-06 6:13 ` pinskia at gcc dot gnu dot org
` (22 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-06-05 19:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from janis at gcc dot gnu dot org 2006-06-05 19:45 -------
A regression hunt on powerpc-linux using the less-reduced test case with the
options "-O2 --param ggc-min-expand=0 --param ggc-min-heapsize=0" identified
this patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=112753
r112753 | hubicka | 2006-04-07 15:24:39 +0000 (Fri, 07 Apr 2006)
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (8 preceding siblings ...)
2006-06-05 19:59 ` janis at gcc dot gnu dot org
@ 2006-06-06 6:13 ` pinskia at gcc dot gnu dot org
2006-06-07 5:31 ` pinskia at gcc dot gnu dot org
` (21 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-06 6:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2006-06-06 05:38 -------
I am going to reduce this further.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (9 preceding siblings ...)
2006-06-06 6:13 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 5:31 ` pinskia at gcc dot gnu dot org
2006-06-07 5:50 ` pinskia at gcc dot gnu dot org
` (20 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 5:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2006-06-07 05:19 -------
Created an attachment (id=11620)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11620&action=view)
shorest testcase I can reduce to
This is the shorest testcase I could reduce this to, I did it on powerpc-darwin
but I found removing some templates causes this to go "right" which seems
wrong.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (10 preceding siblings ...)
2006-06-07 5:31 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 5:50 ` pinskia at gcc dot gnu dot org
2006-06-07 6:01 ` pinskia at gcc dot gnu dot org
` (19 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 5:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pinskia at gcc dot gnu dot org 2006-06-07 05:30 -------
The last time I ran into this was back in 2005, and I had committed the
following patch:
2005-08-29 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23408
* ipa-inline.c (cgraph_decide_inlining_incrementally): Remove the
call to ggc_collect.
So I had almost thought the gc problem would be an issue again :(.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |23408
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (11 preceding siblings ...)
2006-06-07 5:50 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 6:01 ` pinskia at gcc dot gnu dot org
2006-06-07 6:19 ` pinskia at gcc dot gnu dot org
` (18 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 6:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2006-06-07 05:50 -------
The dtor for "Ref<std::vector<Ref<Node>, std::allocator<Ref<Node> > > >" is the
node which has been freed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (12 preceding siblings ...)
2006-06-07 6:01 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 6:19 ` pinskia at gcc dot gnu dot org
2006-06-07 7:02 ` pinskia at gcc dot gnu dot org
` (17 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 6:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2006-06-07 06:00 -------
Wait in tree-inline.c, we do:
/* Update callgraph if needed. */
cgraph_remove_node (cg_edge->callee);
Isn't that wrong as we could inline the callee a couple of times?
Don't we want to do:
/* Update callgraph if needed. */
cgraph_remove_edge (cg_edge);
???
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (13 preceding siblings ...)
2006-06-07 6:19 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 7:02 ` pinskia at gcc dot gnu dot org
2006-06-07 12:25 ` hubicka at ucw dot cz
` (16 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 7:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from pinskia at gcc dot gnu dot org 2006-06-07 06:37 -------
Nothing I have tried so far has worked and I don't understand how we could
remove a node from here.
Oh, I see remove node is correct, we duplicate the nodes which I did not know
about until now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (14 preceding siblings ...)
2006-06-07 7:02 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 12:25 ` hubicka at ucw dot cz
2006-06-07 15:04 ` rguenth at gcc dot gnu dot org
` (15 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: hubicka at ucw dot cz @ 2006-06-07 12:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from hubicka at ucw dot cz 2006-06-07 12:18 -------
Subject: Re: [4.2 regression] segfault in ipa-inline.c, if
(e->callee->local.disregard_inline_limits
>
>
> ------- Comment #12 from pinskia at gcc dot gnu dot org 2006-06-07 06:00 -------
> Wait in tree-inline.c, we do:
> /* Update callgraph if needed. */
> cgraph_remove_node (cg_edge->callee);
>
> Isn't that wrong as we could inline the callee a couple of times?
It should be OK - if we inline multiple times, we create multiple nodes.
I will look into this.
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (15 preceding siblings ...)
2006-06-07 12:25 ` hubicka at ucw dot cz
@ 2006-06-07 15:04 ` rguenth at gcc dot gnu dot org
2006-06-07 16:16 ` tbm at cyrius dot com
` (14 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-06-07 15:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2006-06-07 14:54 -------
Note the problem is possibly at least latent on the 4.1 branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (16 preceding siblings ...)
2006-06-07 15:04 ` rguenth at gcc dot gnu dot org
@ 2006-06-07 16:16 ` tbm at cyrius dot com
2006-06-08 14:12 ` tbm at cyrius dot com
` (13 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-07 16:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from tbm at cyrius dot com 2006-06-07 16:12 -------
I just got this segfault with when compiling another application. Should I
attach the preprocessed source to this PR or do you have enough information
already to fix it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (17 preceding siblings ...)
2006-06-07 16:16 ` tbm at cyrius dot com
@ 2006-06-08 14:12 ` tbm at cyrius dot com
2006-06-11 8:39 ` steven at gcc dot gnu dot org
` (12 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-08 14:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from tbm at cyrius dot com 2006-06-08 13:54 -------
This segfault also shows up when compiling the Linux kernel (compiling file
net/tipc/net.c).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (18 preceding siblings ...)
2006-06-08 14:12 ` tbm at cyrius dot com
@ 2006-06-11 8:39 ` steven at gcc dot gnu dot org
2006-06-12 18:05 ` tbm at cyrius dot com
` (11 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-06-11 8:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from steven at gcc dot gnu dot org 2006-06-11 08:36 -------
A pre-processed C test case would be nice.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (19 preceding siblings ...)
2006-06-11 8:39 ` steven at gcc dot gnu dot org
@ 2006-06-12 18:05 ` tbm at cyrius dot com
2006-06-12 20:51 ` tbm at cyrius dot com
` (10 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-12 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from tbm at cyrius dot com 2006-06-12 18:03 -------
Created an attachment (id=11654)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11654&action=view)
C test case
Here's a C test case (from the Linux kernel).
5289:tbm@reyes: ~] /usr/local/bin/gcc -c -O2 --param ggc-min-expand=0 --param
ggc-min-heapsize=0 net.i
net/tipc/net.c:311: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
zsh: exit 1 /usr/local/bin/gcc -c -O2 --param ggc-min-expand=0 --param
ggc-min-heapsize=0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (20 preceding siblings ...)
2006-06-12 18:05 ` tbm at cyrius dot com
@ 2006-06-12 20:51 ` tbm at cyrius dot com
2006-07-19 12:44 ` [Bug tree-optimization/27882] [4.1/4.2 " reichelt at gcc dot gnu dot org
` (9 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tbm at cyrius dot com @ 2006-06-12 20:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from tbm at cyrius dot com 2006-06-12 20:18 -------
Finally, a *small* test case.
5336:tbm@reyes: ~/tmp/delta/bin] /usr/local/bin/gcc -c -O1 --param
ggc-min-expand=0 --param ggc-min-heapsize=0 mini.c
mini.c:27: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
5337:tbm@reyes: ~/tmp/delta/bin] /usr/local/bin/gcc -c --param ggc-min-expand=0
--param ggc-min-heapsize=0 mini.c
5338:tbm@reyes: ~/tmp/delta/bin] cat mini.c
struct sk_buff
{
}
raw_hdlc_proto;
struct tipc_msg *buf_msg (struct sk_buff *skb)
{
}
void buf_discard (struct sk_buff *skb)
{
}
void tipc_net_route_msg (struct sk_buff *buf);
static inline __attribute__ ((always_inline))
tipc_port_recv_msg (struct sk_buff *buf)
{
{
tipc_net_route_msg (buf);
}
}
void
tipc_net_route_msg (struct sk_buff *buf)
{
{
{
tipc_port_recv_msg (buf);
}
}
}
5339:tbm@reyes: ~/tmp/delta/bin]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (21 preceding siblings ...)
2006-06-12 20:51 ` tbm at cyrius dot com
@ 2006-07-19 12:44 ` reichelt at gcc dot gnu dot org
2006-07-19 13:19 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-19 12:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from reichelt at gcc dot gnu dot org 2006-07-19 12:44 -------
I cannot reproduce the ICE with the original testcase.
I can reproduce it with the testcase from comment #19 and #20, though.
Here's an even shorter version:
=======================
void foo();
static inline bar()
{
foo();
}
void foo()
{
bar();
}
=======================
In addition I can only reproduce the problem on the 4.1 branch, starting
with GCC 4.1.1, but not on mainline (probably latent, though).
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-07-19 12:44:48
date| |
Summary|[4.2 regression] segfault in|[4.1/4.2 regression]
|ipa-inline.c, if (e->callee-|segfault in ipa-inline.c, if
|>local.disregard_inline_limi|(e->callee-
|ts |>local.disregard_inline_limi
| |ts
Target Milestone|4.2.0 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (22 preceding siblings ...)
2006-07-19 12:44 ` [Bug tree-optimization/27882] [4.1/4.2 " reichelt at gcc dot gnu dot org
@ 2006-07-19 13:19 ` rguenth at gcc dot gnu dot org
2006-07-19 13:32 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-19 13:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from rguenth at gcc dot gnu dot org 2006-07-19 13:19 -------
I see what the problem is. cgraph_postorder doesn't help us if we're having a
cycle like here, so
nnodes = cgraph_postorder (order);
for (i = nnodes - 1; i >= 0; i--)
{
node = order[i];
if (node->analyzed && node->local.inlinable
&& (node->needed || node->reachable)
&& node->callers)
{
if (cgraph_decide_inlining_incrementally (node, true))
ggc_collect ();
}
}
after inlining into foo, which we do first, bar is no longer referenced
and is collected. We still reference it from order[0] though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (23 preceding siblings ...)
2006-07-19 13:19 ` rguenth at gcc dot gnu dot org
@ 2006-07-19 13:32 ` rguenth at gcc dot gnu dot org
2006-07-19 13:59 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-19 13:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from rguenth at gcc dot gnu dot org 2006-07-19 13:31 -------
I have a patch:
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 115554)
+++ ipa-inline.c (working copy)
@@ -1133,6 +1133,7 @@ cgraph_early_inlining (void)
struct cgraph_node **order =
xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
int i;
+ htab_t cycles;
if (sorrycount || errorcount)
return;
@@ -1142,6 +1143,8 @@ cgraph_early_inlining (void)
#endif
nnodes = cgraph_postorder (order);
+ cycles = htab_create (7, htab_hash_pointer, htab_eq_pointer, NULL);
+ cgraph_find_cycles (cgraph_nodes, cycles);
for (i = nnodes - 1; i >= 0; i--)
{
node = order[i];
@@ -1149,10 +1152,13 @@ cgraph_early_inlining (void)
&& (node->needed || node->reachable)
&& node->callers)
{
- if (cgraph_decide_inlining_incrementally (node, true))
+ if (cgraph_decide_inlining_incrementally (node, true)
+ /* Avoid collecting if inlining in a cycle. */
+ && !htab_find (cycles, node))
ggc_collect ();
}
}
+ htab_delete (cycles);
cgraph_remove_unreachable_nodes (true, dump_file);
#ifdef ENABLE_CHECKING
for (node = cgraph_nodes; node; node = node->next)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (24 preceding siblings ...)
2006-07-19 13:32 ` rguenth at gcc dot gnu dot org
@ 2006-07-19 13:59 ` rguenth at gcc dot gnu dot org
2006-07-19 14:07 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-19 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #24 from rguenth at gcc dot gnu dot org 2006-07-19 13:59 -------
Hmm, it needs to find the root of the callgraph first. Or all root nodes, and
find cycles starting from there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (25 preceding siblings ...)
2006-07-19 13:59 ` rguenth at gcc dot gnu dot org
@ 2006-07-19 14:07 ` rguenth at gcc dot gnu dot org
2006-07-19 17:29 ` hubicka at gcc dot gnu dot org
` (4 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-19 14:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #25 from rguenth at gcc dot gnu dot org 2006-07-19 14:06 -------
Simpler one goes along
@@ -1148,9 +1149,13 @@ cgraph_early_inlining (void)
if (node->analyzed && node->local.inlinable
&& (node->needed || node->reachable)
&& node->callers)
+ inlined |= cgraph_decide_inlining_incrementally (node, true);
+ /* Collect at cgraph roots, which avoid collecting inside cycles. */
+ if (inlined
+ && !node->callers)
{
- if (cgraph_decide_inlining_incrementally (node, true))
- ggc_collect ();
+ ggc_collect ();
+ inlined = false;
}
}
cgraph_remove_unreachable_nodes (true, dump_file);
but also has a greater impact on when we collect and when not possibly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (26 preceding siblings ...)
2006-07-19 14:07 ` rguenth at gcc dot gnu dot org
@ 2006-07-19 17:29 ` hubicka at gcc dot gnu dot org
2006-07-20 8:29 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2006-07-19 17:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #26 from hubicka at gcc dot gnu dot org 2006-07-19 17:29 -------
Well, I don't like much the limiting of inlining in recursive functions (where
it is rather interesting)
and I can't convince myself that the second patch is safe (ie the cycle don't
have to be in consetuctive entries in the postorder I would say).
I will test patch that simply make the array GGC root....
Thanks for looking into this,
Honza
--
hubicka at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |hubicka at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (27 preceding siblings ...)
2006-07-19 17:29 ` hubicka at gcc dot gnu dot org
@ 2006-07-20 8:29 ` rguenth at gcc dot gnu dot org
2006-07-26 20:17 ` hubicka at gcc dot gnu dot org
` (2 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-20 8:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #27 from rguenth at gcc dot gnu dot org 2006-07-20 08:29 -------
I guess the patch format made it hard to see what the result is. It looks like
nnodes = cgraph_postorder (order);
for (i = nnodes - 1; i >= 0; i--)
{
node = order[i];
if (node->analyzed && node->local.inlinable
&& (node->needed || node->reachable)
&& node->callers)
inlined |= cgraph_decide_inlining_incrementally (node, true);
/* Collect at cgraph roots, which avoids collecting inside cycles. */
if (inlined
&& !node->callers)
{
ggc_collect ();
inlined = false;
}
}
i.e. inlining is unchanged, only collection is done at a different point.
(for pure luck this saves some kB of peak memory usage and compile-time on
tramp3d). For the postorder I assumed that inlining for cgraph roots
(nodes with no callers) is decided not during deciding for inlining inside
a cycle. One could extend this to also collect for cgraph tails, I think,
making it !node->callers || !node->callees.
Anyway, the patch gcac tested for C and C++ on x86_64-unknown-linux-gnu.
And I suspect that if you make 'order' gc allocated you'll loose the
ability to effectively collect garbage here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (28 preceding siblings ...)
2006-07-20 8:29 ` rguenth at gcc dot gnu dot org
@ 2006-07-26 20:17 ` hubicka at gcc dot gnu dot org
2007-02-14 9:12 ` [Bug tree-optimization/27882] [4.1 " mmitchel at gcc dot gnu dot org
2008-07-04 15:35 ` jsm28 at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2006-07-26 20:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #28 from hubicka at gcc dot gnu dot org 2006-07-26 20:17 -------
Subject: Bug 27882
Author: hubicka
Date: Wed Jul 26 20:17:32 2006
New Revision: 115763
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115763
Log:
PR tree-optimization/27882
* cgraph.c (cgraph_remove_node): Clear needed, reachable, next,
previous
and decl fields.
* cgraphunit.c (cgraph_reset_node): Expect cgraph_remove_node to kill
next pointer
(cgraph_analyze_compilation_unit): Likewise.
* ipa.c (cgraph_remove_unreachable_nodes): Likewise.
* ipa-inline.c (cgraph_decide_recursive_inlining): Likewise.
(cgraph_early_inlinine): Make order garbage collected.
* Makefile.in (gt-ipa-inline): New garbagecollected file.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in
trunk/gcc/cgraph.c
trunk/gcc/cgraphunit.c
trunk/gcc/ipa-inline.c
trunk/gcc/ipa.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (29 preceding siblings ...)
2006-07-26 20:17 ` hubicka at gcc dot gnu dot org
@ 2007-02-14 9:12 ` mmitchel at gcc dot gnu dot org
2008-07-04 15:35 ` jsm28 at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:12 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/27882] [4.1 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits
2006-06-03 10:14 [Bug tree-optimization/27882] New: [4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits tbm at cyrius dot com
` (30 preceding siblings ...)
2007-02-14 9:12 ` [Bug tree-optimization/27882] [4.1 " mmitchel at gcc dot gnu dot org
@ 2008-07-04 15:35 ` jsm28 at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 15:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #29 from jsm28 at gcc dot gnu dot org 2008-07-04 15:34 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail| |4.1.3
Known to work| |4.2.0
Resolution| |FIXED
Target Milestone|4.1.3 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882
^ permalink raw reply [flat|nested] 33+ messages in thread