diff options
author | Diego Novillo <dnovillo@redhat.com> | 2004-09-22 23:33:20 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2004-09-22 19:33:20 -0400 |
commit | c04f07f4cfe0621ab2b707ae7691b52747b9ce44 (patch) | |
tree | d729fab0bca584700b3abb9898aff081a36e46f9 /gcc/tree-ssa-alias.c | |
parent | ba652ba92560c4aca703d809ff2b535fdb3215cc (diff) | |
download | gcc-c04f07f4cfe0621ab2b707ae7691b52747b9ce44.zip gcc-c04f07f4cfe0621ab2b707ae7691b52747b9ce44.tar.gz gcc-c04f07f4cfe0621ab2b707ae7691b52747b9ce44.tar.bz2 |
re PR tree-optimization/16721 (Accesses to volatile objects optimized away)
PR tree-optimization/16721
* tree-dfa.c (dump_variable): Show TREE_THIS_VOLATILE.
* tree-ssa-alias.c (create_memory_tag): Move setting of
TREE_THIS_VOLATILE ...
(get_tmt_for): ... here.
testsuite/ChangeLog
PR tree-optimization/16721
* testsuite/gcc.dg/tree-ssa/pr16721.c: New test.
From-SVN: r87895
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index baf5ff2..3d99d94 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2025,9 +2025,6 @@ create_memory_tag (tree type, bool is_type_tag) determine whether they should be considered globals. */ DECL_CONTEXT (tag) = current_function_decl; - /* If the pointed-to type is volatile, so is the tag. */ - TREE_THIS_VOLATILE (tag) = TREE_THIS_VOLATILE (type); - /* Memory tags are by definition addressable. This also prevents is_gimple_ref frome confusing memory tags with optimizable variables. */ @@ -2126,6 +2123,9 @@ get_tmt_for (tree ptr, struct alias_info *ai) ai->pointers[ai->num_pointers++] = alias_map; } + /* If the pointed-to type is volatile, so is the tag. */ + TREE_THIS_VOLATILE (tag) = TREE_THIS_VOLATILE (tag_type); + /* Make sure that the type tag has the same alias set as the pointed-to type. */ gcc_assert (tag_set == get_alias_set (tag)); |