Commit 22192559 by Jason Merrill Committed by Jason Merrill

gimplify.c (gimplify_decl_expr): Handle anonymous artificial variables sooner.

	* gimplify.c (gimplify_decl_expr): Handle anonymous artificial
	variables sooner.

From-SVN: r166004
parent 84fabdde
2010-10-27 Jason Merrill <jason@redhat.com>
* gimplify.c (gimplify_decl_expr): Handle anonymous artificial
variables sooner.
2010-10-27 Jie Zhang <jie@codesourcery.com>
Maxim Kuvyrkov <maxim@codesourcery.com>
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment