]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR c++/71528 (multiple extern reference declarations produce uninitializ...
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Jul 2016 12:45:44 +0000 (14:45 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Jul 2016 12:45:44 +0000 (14:45 +0200)
commite604e4e89670192f01deefa900a5eb11893d06b1
tree90b6a2a5afd08629ff927b8e0ed994cfe8ade48c
parent0da68630d9b6bff37a7863079f7660d8588bb094
backport: re PR c++/71528 (multiple extern reference declarations produce uninitialized access)

Backported from mainline
2016-06-14  Jakub Jelinek  <jakub@redhat.com>

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: r238098
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr71528.C [new file with mode: 0644]