diff options
author | Jason Merrill <jason@redhat.com> | 2005-04-06 00:57:39 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2005-04-06 00:57:39 -0400 |
commit | bf7d31c1a6719fbf1e36d6dde187245636d8d558 (patch) | |
tree | 8a8e23c9a2ea1880b10a8aaf178ecc288ad75b63 /gcc/cp | |
parent | d34a464a99763e137ca4ad7ef30f3fe360ca708e (diff) | |
download | gcc-bf7d31c1a6719fbf1e36d6dde187245636d8d558.zip gcc-bf7d31c1a6719fbf1e36d6dde187245636d8d558.tar.gz gcc-bf7d31c1a6719fbf1e36d6dde187245636d8d558.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/tree.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f37530d..aec7681 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 8b0d9aa..5d80d59 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -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; |