From: Jason Merrill Date: Wed, 6 Apr 2005 15:35:30 +0000 (-0400) Subject: re PR c++/19312 (ICE in stabilize_call when throwing a copy) X-Git-Tag: releases/gcc-3.4.4~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8507254b37b4b8375c5e0d396badad2db34c7fea;p=thirdparty%2Fgcc.git 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: r97721 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9a1876d68da6..f78e00e8bd7e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-04-06 Jason Merrill + + PR c++/19312 + * tree.c (stabilize_init): Don't bother trying to stabilize + something with no side-effects. + 2005-04-04 Mark Mitchell PR c++/20679 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 351467c79a00..2f078d145b48 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2517,7 +2517,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;