summaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-21 02:46:27 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-21 02:46:27 +0000
commit4206bfac538b8498b0db386ea864bfa3ffc5b3c9 (patch)
tree3bf2667ea8d10c10fa1897efd1197b476ab8dfa2 /gcc/ipa.c
parent17611fd90a4b5a192d6b9a05381a3b76c8d95103 (diff)
downloadgcc-4206bfac538b8498b0db386ea864bfa3ffc5b3c9.tar.gz
* ipa.c (ipa_discover_readonly_nonaddressable_var): Fix dumping;
set writeonly flag only for vars actually written to. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index a4e9b227330..d0beefe214c 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -737,7 +737,7 @@ ipa_discover_readonly_nonaddressable_vars (void)
if (!address_taken)
{
if (TREE_ADDRESSABLE (vnode->decl) && dump_file)
- fprintf (dump_file, " %s (addressable)", vnode->name ());
+ fprintf (dump_file, " %s (non-addressable)", vnode->name ());
varpool_for_node_and_aliases (vnode, clear_addressable_bit, NULL, true);
}
if (!address_taken && !written
@@ -750,7 +750,7 @@ ipa_discover_readonly_nonaddressable_vars (void)
fprintf (dump_file, " %s (read-only)", vnode->name ());
varpool_for_node_and_aliases (vnode, set_readonly_bit, NULL, true);
}
- if (!vnode->writeonly && !read && !address_taken)
+ if (!vnode->writeonly && !read && !address_taken && written)
{
if (dump_file)
fprintf (dump_file, " %s (write-only)", vnode->name ());