call.c (extend_ref_init_temps_1): Recompute TREE_CONSTANT for the ADDR_EXPR.
authorJason Merrill <jason@redhat.com>
Thu, 22 Nov 2012 14:41:52 +0000 (09:41 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 22 Nov 2012 14:41:52 +0000 (09:41 -0500)
* call.c (extend_ref_init_temps_1): Recompute TREE_CONSTANT for
the ADDR_EXPR.

From-SVN: r193726

gcc/cp/ChangeLog
gcc/cp/call.c

index edcc81f..53fe814 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-22  Jason Merrill  <jason@redhat.com>
+
+       * call.c (extend_ref_init_temps_1): Recompute TREE_CONSTANT for
+       the ADDR_EXPR.
+
 2012-11-20  Diego Novillo  <dnovillo@google.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index 35a3f91..bba5d9f 100644 (file)
@@ -9188,6 +9188,7 @@ extend_ref_init_temps_1 (tree decl, tree init, vec<tree, va_gc> **cleanups)
       *p = set_up_extended_ref_temp (decl, *p, cleanups, &subinit);
       if (subinit)
        init = build2 (COMPOUND_EXPR, TREE_TYPE (init), subinit, init);
+      recompute_tree_invariant_for_addr_expr (sub);
     }
   return init;
 }