diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-25 01:56:14 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-25 01:56:14 +0000 |
commit | e557e5850b3200b0dd00123f4e77ed23a9184aa2 (patch) | |
tree | b58b5ccee1b1558b4d717318e5580b0ffeb360a2 /gcc/tree-sra.c | |
parent | 521f3adaa1baeaf00caf66ecb1761b845c1bcea7 (diff) | |
download | gcc-e557e5850b3200b0dd00123f4e77ed23a9184aa2.tar.gz |
PR tree-opt/20127
* tree-sra.c (instantiate_element): Copy TREE_THIS_VOLATILE from
the type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95530 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 15109045375..267655d4bdf 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1116,6 +1116,12 @@ instantiate_element (struct sra_elt *elt) DECL_SOURCE_LOCATION (var) = DECL_SOURCE_LOCATION (base); DECL_ARTIFICIAL (var) = 1; + if (TREE_THIS_VOLATILE (elt->type)) + { + TREE_THIS_VOLATILE (var) = 1; + TREE_SIDE_EFFECTS (var) = 1; + } + if (DECL_NAME (base) && !DECL_IGNORED_P (base)) { char *pretty_name = build_element_name (elt); |