diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-11-09 20:31:45 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-11-09 20:31:45 +0100 |
commit | 9b999dc5ea45237cc7accead90a33e9c4a6893f5 (patch) | |
tree | d0452c9d439eb92c86bdb032f5caa94bb5be505c /gcc/cfgexpand.c | |
parent | 0104d6c71a694c717617dfc4c847641825ca094c (diff) | |
download | gcc-9b999dc5ea45237cc7accead90a33e9c4a6893f5.zip gcc-9b999dc5ea45237cc7accead90a33e9c4a6893f5.tar.gz gcc-9b999dc5ea45237cc7accead90a33e9c4a6893f5.tar.bz2 |
re PR target/43808 (-fipa-reference -fschedule-insns -fstrict-aliasing causes two gfortran check failures)
PR target/43808
* cfgexpand.c (partition_stack_vars): Call
update_alias_info_with_stack_vars unconditionally.
(update_alias_info_with_stack_vars): Allow unused
unreferenced vars when not optimizing.
* gfortran.dg/pr43808.f90: New test.
From-SVN: r166509
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index c44649e..784639d 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -516,9 +516,11 @@ update_alias_info_with_stack_vars (void) unsigned int uid = DECL_PT_UID (decl); /* We should never end up partitioning SSA names (though they may end up on the stack). Neither should we allocate stack - space to something that is unused and thus unreferenced. */ + space to something that is unused and thus unreferenced, except + for -O0 where we are preserving even unreferenced variables. */ gcc_assert (DECL_P (decl) - && referenced_var_lookup (DECL_UID (decl))); + && (!optimize + || referenced_var_lookup (DECL_UID (decl)))); bitmap_set_bit (part, uid); *((bitmap *) pointer_map_insert (decls_to_partitions, (void *)(size_t) uid)) = part; @@ -684,8 +686,7 @@ partition_stack_vars (void) } } - if (optimize) - update_alias_info_with_stack_vars (); + update_alias_info_with_stack_vars (); } /* A debugging aid for expand_used_vars. Dump the generated partitions. */ |