re PR c++/31809 (sometimes TREE_READONLY is still set for non read only variables...
authorJakub Jelinek <jakub@redhat.com>
Wed, 30 May 2007 21:24:24 +0000 (23:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 30 May 2007 21:24:24 +0000 (23:24 +0200)
commit27edb5482d77d61a5adafd1851d61f4ecefe6361
tree0ed92a1a3aff4ea3d5338fbf1e0e864a44e01eb7
parent859fa3b87467cae9c74cfaf353732052bc426758
re PR c++/31809 (sometimes TREE_READONLY is still set for non read only variables causing wrong code)

PR c++/31809
* decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
variables that need runtime initialization.

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

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