diff options
author | Diego Novillo <dnovillo@google.com> | 2009-07-06 13:07:32 -0400 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2009-07-06 13:07:32 -0400 |
commit | 6635078124694847c65a9533b37b096b13100fcb (patch) | |
tree | 3fd08a19ff017856522a9200af499b2eb6d0f0d9 /gcc/tree-dfa.c | |
parent | d251bfca1967ec494827ba26f009f7623eea2975 (diff) | |
download | gcc-6635078124694847c65a9533b37b096b13100fcb.zip gcc-6635078124694847c65a9533b37b096b13100fcb.tar.gz gcc-6635078124694847c65a9533b37b096b13100fcb.tar.bz2 |
tree-dfa.c (dump_variable): Write DECL_INITIAL for VAR if it has one.
* tree-dfa.c (dump_variable): Write DECL_INITIAL for VAR
if it has one. Handle cases where VAR does not have an
annotation or cfun is NULL.
From-SVN: r149291
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r-- | gcc/tree-dfa.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index 4fecd01..64c5e26 100644 --- a/gcc/tree-dfa.c +++ b/gcc/tree-dfa.c @@ -275,20 +275,26 @@ dump_variable (FILE *file, tree var) else if (is_call_used (var)) fprintf (file, ", call used"); - if (ann->noalias_state == NO_ALIAS) + if (ann && ann->noalias_state == NO_ALIAS) fprintf (file, ", NO_ALIAS (does not alias other NO_ALIAS symbols)"); - else if (ann->noalias_state == NO_ALIAS_GLOBAL) + else if (ann && ann->noalias_state == NO_ALIAS_GLOBAL) fprintf (file, ", NO_ALIAS_GLOBAL (does not alias other NO_ALIAS symbols" " and global vars)"); - else if (ann->noalias_state == NO_ALIAS_ANYTHING) + else if (ann && ann->noalias_state == NO_ALIAS_ANYTHING) fprintf (file, ", NO_ALIAS_ANYTHING (does not alias any other symbols)"); - if (gimple_default_def (cfun, var)) + if (cfun && gimple_default_def (cfun, var)) { fprintf (file, ", default def: "); print_generic_expr (file, gimple_default_def (cfun, var), dump_flags); } + if (DECL_INITIAL (var)) + { + fprintf (file, ", initial: "); + print_generic_expr (file, DECL_INITIAL (var), dump_flags); + } + fprintf (file, "\n"); } |