From 0c0cba54e8c87f02ee4ff2bea9b746f09ef1c8ba Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 22 Nov 2012 09:41:52 -0500 Subject: [PATCH] call.c (extend_ref_init_temps_1): Recompute TREE_CONSTANT for the ADDR_EXPR. * call.c (extend_ref_init_temps_1): Recompute TREE_CONSTANT for the ADDR_EXPR. From-SVN: r193726 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/call.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index edcc81f499e..53fe814d348 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-11-22 Jason Merrill + + * call.c (extend_ref_init_temps_1): Recompute TREE_CONSTANT for + the ADDR_EXPR. + 2012-11-20 Diego Novillo Jakub Jelinek diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 35a3f919997..bba5d9fdba5 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -9188,6 +9188,7 @@ extend_ref_init_temps_1 (tree decl, tree init, vec **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; }