re PR middle-end/45310 (ICE: verify_stmts failed: Dead STMT in EH table with -O1 -fnon-call-exceptions)
gcc/ PR middle-end/45310 * tree-ssa-phiprop.c (propagate_with_phi): Remove statement completely from the function, including EH traces. testsuite/ PR middle-end/45310 * g++.dg/pr45310.C: New test. From-SVN: r168120
This commit is contained in:
parent
df0820da97
commit
b1193f619b
|
@ -0,0 +1,31 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fnon-call-exceptions" } */
|
||||
|
||||
static inline const int &
|
||||
max (const int &a, const int &b)
|
||||
{
|
||||
return a ? a : b;
|
||||
}
|
||||
|
||||
static inline int
|
||||
baz ()
|
||||
{
|
||||
return max (0, 0);
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
~S ()
|
||||
{
|
||||
baz ();
|
||||
}
|
||||
};
|
||||
|
||||
void bar ();
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
S s;
|
||||
bar ();
|
||||
}
|
||||
|
|
@ -352,7 +352,7 @@ propagate_with_phi (basic_block bb, gimple phi, struct phiprop_d *phivn,
|
|||
want to delete it here we also have to delete all intermediate
|
||||
copies. */
|
||||
gsi = gsi_for_stmt (use_stmt);
|
||||
gsi_remove (&gsi, false);
|
||||
gsi_remove (&gsi, true);
|
||||
|
||||
phi_inserted = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue