https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93033

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
This patch fixes the testcase, but I am not familiar enough with the code to
say if that is correct fix :)

Index: ../../gcc/cp/cp-gimplify.c
===================================================================
--- ../../gcc/cp/cp-gimplify.c  (revision 279724)
+++ ../../gcc/cp/cp-gimplify.c  (working copy)
@@ -534,7 +534,7 @@ cp_gimplify_init_expr (tree *expr_p, gim
     {
       gimplify_expr (&to, pre_p, NULL, is_gimple_lvalue, fb_lvalue);
       replace_placeholders (from, to);
-      from = split_nonconstant_init (to, from);
+      from = unshare_expr (split_nonconstant_init (to, from));
       cp_genericize_tree (&from, false);
       *expr_p = from;
       return;

Reply via email to