Commit bf7d31c1 by Jason Merrill Committed by Jason Merrill

re PR c++/19312 (ICE in stabilize_call when throwing a copy)

        PR c++/19312
        * tree.c (stabilize_init): Don't bother trying to stabilize
        something with no side-effects.

From-SVN: r97691
parent d34a464a
2005-04-06 Jason Merrill <jason@redhat.com>
PR c++/19312
* tree.c (stabilize_init): Don't bother trying to stabilize
something with no side-effects.
2005-04-05 Mark Mitchell <mark@codesourcery.com>
PR c++/20763
......
......@@ -2257,7 +2257,10 @@ stabilize_init (tree init, tree *initp)
if (TREE_CODE (t) == COND_EXPR)
return false;
stabilize_call (t, initp);
/* The TARGET_EXPR might be initializing via bitwise copy from
another variable; leave that alone. */
if (TREE_SIDE_EFFECTS (t))
stabilize_call (t, initp);
}
return true;
......
// PR c++/19312
struct A {};
void foo(A a)
{
throw (A)a;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment