* [Bug c++/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
@ 2013-09-02 8:14 ` mpolacek at gcc dot gnu.org
2013-09-02 9:24 ` [Bug tree-optimization/58294] " mpolacek at gcc dot gnu.org
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-02 8:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-09-02
CC| |mpolacek at gcc dot gnu.org
Known to work| |4.8.1
Target Milestone|--- |4.9.0
Summary|ice in |[4.9 Regression] ice in
|update_ssa_across_abnormal_ |update_ssa_across_abnormal_
|edges, at |edges, at
|tree-inline.c:1892 |tree-inline.c:1892
Ever confirmed|0 |1
Known to fail| |4.9.0
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
2013-09-02 8:14 ` [Bug c++/58294] [4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2013-09-02 9:24 ` mpolacek at gcc dot gnu.org
2013-09-02 10:37 ` markus at trippelsdorf dot de
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-02 9:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r202145.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
2013-09-02 8:14 ` [Bug c++/58294] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-09-02 9:24 ` [Bug tree-optimization/58294] " mpolacek at gcc dot gnu.org
@ 2013-09-02 10:37 ` markus at trippelsdorf dot de
2013-09-06 8:20 ` kcc at gcc dot gnu.org
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: markus at trippelsdorf dot de @ 2013-09-02 10:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markus at trippelsdorf dot de
--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> ---
Reduced:
struct A {
virtual ~A();
virtual void m_fn1() { delete this; }
void m_fn2() { m_fn1(); }
};
struct B {
A *pi_;
B() { pi_->m_fn2(); }
};
struct C {
B pn;
};
void _setjmp();
int png_decode() {
_setjmp();
C a;
return 0;
}
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (2 preceding siblings ...)
2013-09-02 10:37 ` markus at trippelsdorf dot de
@ 2013-09-06 8:20 ` kcc at gcc dot gnu.org
2013-09-06 9:53 ` hubicka at gcc dot gnu.org
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: kcc at gcc dot gnu.org @ 2013-09-06 8:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
Kostya Serebryany <kcc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kcc at gcc dot gnu.org
--- Comment #4 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
we see this while building chromium
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (3 preceding siblings ...)
2013-09-06 8:20 ` kcc at gcc dot gnu.org
@ 2013-09-06 9:53 ` hubicka at gcc dot gnu.org
2013-09-06 10:20 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-09-06 9:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Thanks, I saw this problem too while compiling chromium but then it went away
and we didn't really managed to simplify it to a testcase.
The problem here is that there is PHI sitting on a EH receiver (from setjmp)
and we are inlining speculatively inlined call that may throw while original
call didn't. It seems to be bug that is there for years. I am not quite sure
what to do in this scenario sort of going out of SSA for this particular symbol
and back to SSA again (that probably would go with markin it for update)
Curiously enough your patch does not contain any calls that ipa-devirt would
change.
I am looking into it
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (4 preceding siblings ...)
2013-09-06 9:53 ` hubicka at gcc dot gnu.org
@ 2013-09-06 10:20 ` rguenth at gcc dot gnu.org
2013-09-06 10:23 ` hubicka at ucw dot cz
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-06 10:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #5)
> Thanks, I saw this problem too while compiling chromium but then it went
> away and we didn't really managed to simplify it to a testcase.
>
> The problem here is that there is PHI sitting on a EH receiver (from setjmp)
> and we are inlining speculatively inlined call that may throw while original
> call didn't. It seems to be bug that is there for years. I am not quite sure
> what to do in this scenario sort of going out of SSA for this particular
> symbol and back to SSA again (that probably would go with markin it for
> update)
>
> Curiously enough your patch does not contain any calls that ipa-devirt would
> change.
>
> I am looking into it
The fix is to preserve this "nonthrowing". That's how I made it work
for the abnormal edge case. Thus, wrap it in a NOTHROW region?
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (5 preceding siblings ...)
2013-09-06 10:20 ` rguenth at gcc dot gnu.org
@ 2013-09-06 10:23 ` hubicka at ucw dot cz
2013-09-06 10:42 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at ucw dot cz @ 2013-09-06 10:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #7 from Jan Hubicka <hubicka at ucw dot cz> ---
> The fix is to preserve this "nonthrowing". That's how I made it work
Yes, this was my first tought, too.
> for the abnormal edge case. Thus, wrap it in a NOTHROW region?
I think we would have to invent it, since we have only must_not_throw.
Let me analyze this a bit furhter.
Honza
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (6 preceding siblings ...)
2013-09-06 10:23 ` hubicka at ucw dot cz
@ 2013-09-06 10:42 ` rguenth at gcc dot gnu.org
2013-09-06 10:44 ` hubicka at ucw dot cz
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-06 10:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #7)
> > The fix is to preserve this "nonthrowing". That's how I made it work
>
> Yes, this was my first tought, too.
>
> > for the abnormal edge case. Thus, wrap it in a NOTHROW region?
>
> I think we would have to invent it, since we have only must_not_throw.
> Let me analyze this a bit furhter.
Well, must_not_throw would work, too.
Richard.
> Honza
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (7 preceding siblings ...)
2013-09-06 10:42 ` rguenth at gcc dot gnu.org
@ 2013-09-06 10:44 ` hubicka at ucw dot cz
2013-09-06 10:58 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at ucw dot cz @ 2013-09-06 10:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #9 from Jan Hubicka <hubicka at ucw dot cz> ---
> Well, must_not_throw would work, too.
It will wind up in producing EH receiver with terminate, probably not what we
want.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (8 preceding siblings ...)
2013-09-06 10:44 ` hubicka at ucw dot cz
@ 2013-09-06 10:58 ` rguenth at gcc dot gnu.org
2013-09-06 12:03 ` hubicka at ucw dot cz
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-06 10:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #9)
> > Well, must_not_throw would work, too.
> It will wind up in producing EH receiver with terminate, probably not what
> we want.
I think it is. Because if you have
try
{
.....
try
{
bogously-nothrow-call ();
}
catch
{
}
...
}
catch
{
... verify not from bogously-nothrow-call
}
we'll optimize away the inner try/catch and get into the wrong handler
if we try to wire things up after inlining bogously-nothrow-call.
Better terminate if the region indeed did throw (usually it's just
not optimized good enough).
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (9 preceding siblings ...)
2013-09-06 10:58 ` rguenth at gcc dot gnu.org
@ 2013-09-06 12:03 ` hubicka at ucw dot cz
2013-09-09 9:45 ` hubicka at gcc dot gnu.org
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at ucw dot cz @ 2013-09-06 12:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #11 from Jan Hubicka <hubicka at ucw dot cz> ---
> Better terminate if the region indeed did throw (usually it's just
> not optimized good enough).
I tihnk that is difference in between throw() and nothrow attribute.
The first produce must not throw region and has thus code size&runtime
overhead, nothrow should avoid that. (plus there is new standard way
of doing nothrow now, right?)
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (10 preceding siblings ...)
2013-09-06 12:03 ` hubicka at ucw dot cz
@ 2013-09-09 9:45 ` hubicka at gcc dot gnu.org
2013-09-09 9:46 ` hubicka at gcc dot gnu.org
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-09-09 9:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 30770
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30770&action=edit
proposed fix
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (11 preceding siblings ...)
2013-09-09 9:45 ` hubicka at gcc dot gnu.org
@ 2013-09-09 9:46 ` hubicka at gcc dot gnu.org
2013-09-09 9:47 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-09-09 9:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #13 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The problem here is the abnormal edge of setjmp not being copied around by
gimple_ic. This bug is there since earlytimes of tree-ssa ;)
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (12 preceding siblings ...)
2013-09-09 9:46 ` hubicka at gcc dot gnu.org
@ 2013-09-09 9:47 ` jakub at gcc dot gnu.org
2013-09-09 10:17 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-09-09 9:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The abnormal edges for setjmp were introduced just in 4.9, not in the early
times of tree-ssa.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (13 preceding siblings ...)
2013-09-09 9:47 ` jakub at gcc dot gnu.org
@ 2013-09-09 10:17 ` hubicka at gcc dot gnu.org
2013-09-09 10:18 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-09-09 10:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #15 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Your fault then. I suppose one can reproduce same problem with non-local gotos
by inlining C++ function into one with nested function...
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (14 preceding siblings ...)
2013-09-09 10:17 ` hubicka at gcc dot gnu.org
@ 2013-09-09 10:18 ` jakub at gcc dot gnu.org
2013-09-09 12:09 ` hubicka at gcc dot gnu.org
2013-09-17 15:24 ` hubicka at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-09-09 10:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
richi has introduced them, not me, but that is just a detail ;).
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (15 preceding siblings ...)
2013-09-09 10:18 ` jakub at gcc dot gnu.org
@ 2013-09-09 12:09 ` hubicka at gcc dot gnu.org
2013-09-17 15:24 ` hubicka at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-09-09 12:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
--- Comment #17 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Mon Sep 9 12:09:50 2013
New Revision: 202389
URL: http://gcc.gnu.org/viewcvs?rev=202389&root=gcc&view=rev
Log:
PR middle-end/58294
* value-prof.c (gimple_ic): Copy also abnormal edges.
* g++.dg/torture/PR58294.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/PR58294.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/value-prof.c
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug tree-optimization/58294] [4.9 Regression] ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892
2013-09-02 8:05 [Bug c++/58294] New: ice in update_ssa_across_abnormal_edges, at tree-inline.c:1892 dcb314 at hotmail dot com
` (16 preceding siblings ...)
2013-09-09 12:09 ` hubicka at gcc dot gnu.org
@ 2013-09-17 15:24 ` hubicka at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-09-17 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58294
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #18 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 19+ messages in thread