https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71528
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Jun 14 19:55:08 2016 New Revision: 237458 URL: https://gcc.gnu.org/viewcvs?rev=237458&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/g++.dg/opt/pr71528.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/testsuite/ChangeLog