aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-08-10 11:54:55 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-08-10 11:54:55 +0000
commite28b8a605478ae7303fb7afa78a67f2052ba2c2d (patch)
tree880bede64966577ecf51d94eb842d8774688a97f /gcc
parent580b2c2ef693302c29afd3f494269b238745ec6d (diff)
downloadgcc-e28b8a605478ae7303fb7afa78a67f2052ba2c2d.zip
gcc-e28b8a605478ae7303fb7afa78a67f2052ba2c2d.tar.gz
gcc-e28b8a605478ae7303fb7afa78a67f2052ba2c2d.tar.bz2
tree-cfg.c (dump_function_to_file): Make sure to dump anonymous SSA names when there are no local decls.
2012-08-10 Richard Guenther <rguenther@suse.de> * tree-cfg.c (dump_function_to_file): Make sure to dump anonymous SSA names when there are no local decls. From-SVN: r190290
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-cfg.c21
2 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0ecb3c9..d19a9dc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ * tree-cfg.c (dump_function_to_file): Make sure to dump
+ anonymous SSA names when there are no local decls.
+
2012-08-10 Steven Bosscher <steven@gcc.gnu.org>
* tree-ssa-pre.c (alloc_expression_id): Fix use of VEC_reserve.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index daa0b44..a91b433 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -6677,21 +6677,22 @@ dump_function_to_file (tree fn, FILE *file, int flags)
/* When GIMPLE is lowered, the variables are no longer available in
BIND_EXPRs, so display them separately. */
- if (cfun && cfun->decl == fn && !VEC_empty (tree, cfun->local_decls))
+ if (cfun && cfun->decl == fn && (cfun->curr_properties & PROP_gimple_lcf))
{
unsigned ix;
ignore_topmost_bind = true;
fprintf (file, "{\n");
- FOR_EACH_LOCAL_DECL (cfun, ix, var)
- {
- print_generic_decl (file, var, flags);
- if (flags & TDF_VERBOSE)
- print_node (file, "", var, 4);
- fprintf (file, "\n");
+ if (!VEC_empty (tree, cfun->local_decls))
+ FOR_EACH_LOCAL_DECL (cfun, ix, var)
+ {
+ print_generic_decl (file, var, flags);
+ if (flags & TDF_VERBOSE)
+ print_node (file, "", var, 4);
+ fprintf (file, "\n");
- any_var = true;
- }
+ any_var = true;
+ }
if (gimple_in_ssa_p (cfun))
for (ix = 1; ix < num_ssa_names; ++ix)
{
@@ -6703,6 +6704,8 @@ dump_function_to_file (tree fn, FILE *file, int flags)
fprintf (file, " ");
print_generic_expr (file, name, flags);
fprintf (file, ";\n");
+
+ any_var = true;
}
}
}