re PR c/82340 (volatile ignored in compound literal)
authorJakub Jelinek <jakub@redhat.com>
Fri, 29 Sep 2017 07:35:37 +0000 (09:35 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 29 Sep 2017 07:35:37 +0000 (09:35 +0200)
commit2a38995899548c685e8bd794f79c5aad80fc6ef0
treeb1e36017321030a3f615e14cf3f81963936cc82f
parent2891beff1aa8e627ba27b35d28d6a8e6198a0625
re PR c/82340 (volatile ignored in compound literal)

PR c/82340
* c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
instead of trying to set just TREE_READONLY manually.

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

From-SVN: r253280
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr82340.c [new file with mode: 0644]