]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/19312 (ICE in stabilize_call when throwing a copy)
authorJason Merrill <jason@redhat.com>
Wed, 6 Apr 2005 15:35:30 +0000 (11:35 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 6 Apr 2005 15:35:30 +0000 (11:35 -0400)
        PR c++/19312
        * tree.c (stabilize_init): Don't bother trying to stabilize
        something with no side-effects.

From-SVN: r97721

gcc/cp/ChangeLog
gcc/cp/tree.c

index 9a1876d68da66e8b0f907b029b6dae6db29f7e8e..f78e00e8bd7efac96a31871828f27398779bdaec 100644 (file)
@@ -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-04  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/20679
index 351467c79a008d19e744de3a9555a932fc3e63a5..2f078d145b4855079418383a52bacaf5c1560482 100644 (file)
@@ -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;