summaryrefslogtreecommitdiff
path: root/gcc/c-gimplify.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-25 21:14:24 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-25 21:14:24 +0000
commite6b3b120a11d5e06cd7e1dc9dfd26a956af8e9f8 (patch)
treec74edb98c64859323c9f5142edde85870356053a /gcc/c-gimplify.c
parent4d5ac30e9f47263ee5925a85e0a4e6c531a4981e (diff)
downloadgcc-e6b3b120a11d5e06cd7e1dc9dfd26a956af8e9f8.tar.gz
2006-08-25 Fariborz Jahanian <fjahanian@apple.com>
PR c/28418 * c-gimplify.c (gimplify_compound_literal_expr): Don't add variable again if DECL_SEEN_IN_BIND_EXPR_P. 2006-08-25 Joseph S. Myers <joseph@codesourcery.com> * gcc.c-torture/compile/compound-literal-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116436 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-gimplify.c')
-rw-r--r--gcc/c-gimplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-gimplify.c b/gcc/c-gimplify.c
index 60ef914159f..7ddc88cf4ea 100644
--- a/gcc/c-gimplify.c
+++ b/gcc/c-gimplify.c
@@ -187,7 +187,7 @@ gimplify_compound_literal_expr (tree *expr_p, tree *pre_p)
/* This decl isn't mentioned in the enclosing block, so add it to the
list of temps. FIXME it seems a bit of a kludge to say that
anonymous artificial vars aren't pushed, but everything else is. */
- if (DECL_NAME (decl) == NULL_TREE)
+ if (DECL_NAME (decl) == NULL_TREE && !DECL_SEEN_IN_BIND_EXPR_P (decl))
gimple_add_tmp_var (decl);
gimplify_and_add (decl_s, pre_p);