summaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-29 14:41:53 +0000
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-29 14:41:53 +0000
commit7843e4bcb63ff8966e40b3498c00cb4a4c5783e1 (patch)
tree5534a3c29342dd48c087ead51be0face86e90762 /gcc/gimple-fold.c
parent87c952b895ebe6126c0c908e52d15dac3230678e (diff)
downloadgcc-7843e4bcb63ff8966e40b3498c00cb4a4c5783e1.tar.gz
* expr.c (expand_expr_real_1 <normal_inner_ref>): Don't allocate
a kept temp. (expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Make unreachable. * gimple-fold.c (canonicalize_constructor_val): Canonicalize COMPOUND_LITERAL_EXPR. * function.c (expand_function_start): Don't call expand_decl, instead assert that we have RTL assigned. * tree-ssa-live.c (remove_unused_locals): Clear nonlocal_goto_save_area if its backing variable is removed. * stmt.c (expand_asm_operands): Remove handling of non-lvalues as mem inputs. (expand_decl): Assert that this does nothing. * calls.c (expand_call): Don't call mark_temp_addr_taken. * c-tree.h (c_expand_decl): Remove prototype. c-family/ * c-common.h (c_expand_decl): Remove prototype. ada/ * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187962 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 8bcc13e1a41..b2bd3378802 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -154,6 +154,12 @@ canonicalize_constructor_val (tree cval, tree from_decl)
if (TREE_CODE (cval) == ADDR_EXPR)
{
tree base = get_base_address (TREE_OPERAND (cval, 0));
+ if (!base && TREE_CODE (TREE_OPERAND (cval, 0)) == COMPOUND_LITERAL_EXPR)
+ {
+ base = COMPOUND_LITERAL_EXPR_DECL (TREE_OPERAND (cval, 0));
+ if (base)
+ TREE_OPERAND (cval, 0) = base;
+ }
if (!base)
return NULL_TREE;