* [Bug driver/54563] [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
@ 2012-09-13 9:27 ` rguenth at gcc dot gnu.org
2012-09-13 9:39 ` [Bug middle-end/54563] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-13 9:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-09-13
Ever Confirmed|0 |1
Known to fail| |4.7.0, 4.7.2, 4.8.0
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-13 09:27:30 UTC ---
Confirmed, ICEs this way at -O1. Reducing.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
2012-09-13 9:27 ` [Bug driver/54563] " rguenth at gcc dot gnu.org
@ 2012-09-13 9:39 ` rguenth at gcc dot gnu.org
2012-09-13 12:40 ` hjl.tools at gmail dot com
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-13 9:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Priority|P3 |P2
Component|driver |middle-end
Known to work| |4.6.3
Target Milestone|--- |4.7.2
Summary|[4.7][C++11] MacOS 10.8, |[4.7/4.8 Regression] ICE in
|ICE in redirect_eh_edge_1, |redirect_eh_edge_1, at
|at tree-eh.c:2215 |tree-eh.c:2215
Severity|major |normal
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-13 09:39:10 UTC ---
Reduced testcase:
struct vector
{
~vector();
};
extern "C" float powf(float, float);
double getSomeDouble();
double x;
void dummyFunction()
{
vector vals;
x = powf(getSomeDouble(), 2.);
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
2012-09-13 9:27 ` [Bug driver/54563] " rguenth at gcc dot gnu.org
2012-09-13 9:39 ` [Bug middle-end/54563] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-09-13 12:40 ` hjl.tools at gmail dot com
2012-09-14 15:42 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2012-09-13 12:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wschmidt at gcc dot gnu.org
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-13 12:40:26 UTC ---
It is caused by revision 174196:
http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00977.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (2 preceding siblings ...)
2012-09-13 12:40 ` hjl.tools at gmail dot com
@ 2012-09-14 15:42 ` jakub at gcc dot gnu.org
2012-09-14 16:18 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 15:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 15:41:48 UTC ---
Apple headers are broken then, powf isn't marked throw (). Of course, we
shouldn't ICE on it though.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (3 preceding siblings ...)
2012-09-14 15:42 ` jakub at gcc dot gnu.org
@ 2012-09-14 16:18 ` jakub at gcc dot gnu.org
2012-09-14 18:26 ` wschmidt at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 16:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 16:17:38 UTC ---
I'd say the bug is somewhere on the C++ FE side, this is a
DEF_C99_C90_RES_BUILTIN, in -std=c++03 -O2 we don't ICE on it, but with -O2
(-std=gnu++03 or -std=c++11 or -std=gnu++11) somehow it is marked as builtin,
but doesn't inherit throw () from the builtin.
IMHO that doesn't make sense. Either it is not builtin and we therefore
shouldn't treat it as such, or it is builtin and then we should know that it
never throws.
Sure, tree-ssa-math-opts.c could have added lots of
maybe_clean_or_replace_eh_stmt and gimple_purge_all_dead_eh_edges calls just in
case or give up optimizing if the calls can throw, but none of those builtins
really ever throw, so my preference would be to fix this there. Jason?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (4 preceding siblings ...)
2012-09-14 16:18 ` jakub at gcc dot gnu.org
@ 2012-09-14 18:26 ` wschmidt at gcc dot gnu.org
2012-09-14 18:30 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-09-14 18:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
--- Comment #6 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-09-14 18:25:52 UTC ---
I tend to agree; this isn't the only place in the middle-end this could cause
trouble. The handling of pow/powf in reassociation comes to mind as another
place where this could cause trouble.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (5 preceding siblings ...)
2012-09-14 18:26 ` wschmidt at gcc dot gnu.org
@ 2012-09-14 18:30 ` jakub at gcc dot gnu.org
2012-09-14 19:10 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 18:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 18:30:18 UTC ---
Seems the C++ FE ignores the nothrow attribute from builtins and instead just
uses its own cfns.gperf. pow is in there, but powf/powl is not (as C++03 is
based in C90). Even in C++11 powf/powl isn't considered throw().
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (6 preceding siblings ...)
2012-09-14 18:30 ` jakub at gcc dot gnu.org
@ 2012-09-14 19:10 ` jakub at gcc dot gnu.org
2012-09-17 9:19 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-14 19:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-14 19:09:51 UTC ---
Created attachment 28192
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28192
gcc48-pr54563.patch
Actually it doesn't seem to be too hard to handle it in execute_cse_sincos, the
gsi_replace calls already pass true as last argument, so no need to call
maybe_cleanup_eh_stmt, just gimple_purge_dead_eh_edges needs to be called if
we've changed the last stmt in a bb. Untested yet.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (7 preceding siblings ...)
2012-09-14 19:10 ` jakub at gcc dot gnu.org
@ 2012-09-17 9:19 ` jakub at gcc dot gnu.org
2012-09-17 9:26 ` [Bug middle-end/54563] [4.7 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-17 9:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-17 09:18:44 UTC ---
Author: jakub
Date: Mon Sep 17 09:18:35 2012
New Revision: 191378
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191378
Log:
PR tree-optimization/54563
* tree-ssa-math-opts.c (execute_cse_sincos): Call
gimple_purge_dead_eh_edges if last call has been changed.
* g++.dg/torture/pr54563.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr54563.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-math-opts.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (8 preceding siblings ...)
2012-09-17 9:19 ` jakub at gcc dot gnu.org
@ 2012-09-17 9:26 ` jakub at gcc dot gnu.org
2012-09-20 10:26 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-17 9:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.8.0
Summary|[4.7/4.8 Regression] ICE in |[4.7 Regression] ICE in
|redirect_eh_edge_1, at |redirect_eh_edge_1, at
|tree-eh.c:2215 |tree-eh.c:2215
Known to fail|4.8.0 |
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-17 09:25:51 UTC ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (9 preceding siblings ...)
2012-09-17 9:26 ` [Bug middle-end/54563] [4.7 " jakub at gcc dot gnu.org
@ 2012-09-20 10:26 ` jakub at gcc dot gnu.org
2012-09-20 15:59 ` jakub at gcc dot gnu.org
2013-03-25 13:31 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-20 10:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.7.2 |4.7.3
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-20 10:20:37 UTC ---
GCC 4.7.2 has been released.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (10 preceding siblings ...)
2012-09-20 10:26 ` jakub at gcc dot gnu.org
@ 2012-09-20 15:59 ` jakub at gcc dot gnu.org
2013-03-25 13:31 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-20 15:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-20 15:58:56 UTC ---
Author: jakub
Date: Thu Sep 20 15:58:51 2012
New Revision: 191571
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191571
Log:
Backported from mainline
2012-09-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54563
* tree-ssa-math-opts.c (execute_cse_sincos): Call
gimple_purge_dead_eh_edges if last call has been changed.
* g++.dg/torture/pr54563.C: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/torture/pr54563.C
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-ssa-math-opts.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215
2012-09-13 8:58 [Bug driver/54563] New: [4.7][C++11] MacOS 10.8, ICE in redirect_eh_edge_1, at tree-eh.c:2215 david.abdurachmanov at gmail dot com
` (11 preceding siblings ...)
2012-09-20 15:59 ` jakub at gcc dot gnu.org
@ 2013-03-25 13:31 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-03-25 13:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-25 13:30:57 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread