re PR c/89872 (GCC does not generate read access to volatile compound literal)
authorJakub Jelinek <jakub@redhat.com>
Fri, 29 Mar 2019 19:32:20 +0000 (20:32 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 29 Mar 2019 19:32:20 +0000 (20:32 +0100)
commit77527d8ac499e55ff609ce112e0c68ebd8836704
tree8e23034ccb567298fa80d06f1ade4bea3437fb49
parent7ad99f7d21983de63725701832e03d095842b3ae
re PR c/89872 (GCC does not generate read access to volatile compound literal)

PR c/89872
* gimplify.c (gimplify_compound_literal_expr): Don't optimize a
non-addressable complit into its initializer if it is volatile.

* gcc.dg/tree-ssa/pr89872.c: New test.

From-SVN: r270023
gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr89872.c [new file with mode: 0644]