re PR c++/71528 (multiple extern reference declarations produce uninitialized access)
authorJakub Jelinek <jakub@redhat.com>
Tue, 14 Jun 2016 19:55:08 +0000 (21:55 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 14 Jun 2016 19:55:08 +0000 (21:55 +0200)
commita09c81b4ba40aac99fd4c37654e1231f4836f891
treec8460492a50fc58991906faba6ea819144b06b7d
parent5618c53ff334bff75cad40cf9ac03cbaf32da218
re PR c++/71528 (multiple extern reference declarations produce uninitialized access)

PR c++/71528
* decl.c (duplicate_decls): For DECL_INITIALIZED_P non-external
olddecl vars, preserve their TREE_READONLY bit.

* g++.dg/opt/pr71528.C: New test.

From-SVN: r237458
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr71528.C [new file with mode: 0644]