aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-10-27 11:47:52 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-10-27 11:47:52 -0400
commit221925596f5c3422e705713567d5a480f07e5585 (patch)
tree5068293f80517db513a36bef4add4f7f6bb14714 /gcc/gimplify.c
parent84fabdde098daf8f6b6397a8549e520bcd1454ee (diff)
downloadgcc-221925596f5c3422e705713567d5a480f07e5585.zip
gcc-221925596f5c3422e705713567d5a480f07e5585.tar.gz
gcc-221925596f5c3422e705713567d5a480f07e5585.tar.bz2
gimplify.c (gimplify_decl_expr): Handle anonymous artificial variables sooner.
* gimplify.c (gimplify_decl_expr): Handle anonymous artificial variables sooner. From-SVN: r166004
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 542c223..87b57f0 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1372,6 +1372,14 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
STACK_CHECK_MAX_VAR_SIZE) > 0))
gimplify_vla_decl (decl, seq_p);
+ /* Some front ends do not explicitly declare all anonymous
+ artificial variables. We compensate here by declaring the
+ variables, though it would be better if the front ends would
+ explicitly declare them. */
+ if (!DECL_SEEN_IN_BIND_EXPR_P (decl)
+ && DECL_ARTIFICIAL (decl) && DECL_NAME (decl) == NULL_TREE)
+ gimple_add_tmp_var (decl);
+
if (init && init != error_mark_node)
{
if (!TREE_STATIC (decl))
@@ -1386,14 +1394,6 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
as they may contain a label address. */
walk_tree (&init, force_labels_r, NULL, NULL);
}
-
- /* Some front ends do not explicitly declare all anonymous
- artificial variables. We compensate here by declaring the
- variables, though it would be better if the front ends would
- explicitly declare them. */
- if (!DECL_SEEN_IN_BIND_EXPR_P (decl)
- && DECL_ARTIFICIAL (decl) && DECL_NAME (decl) == NULL_TREE)
- gimple_add_tmp_var (decl);
}
return GS_ALL_DONE;