re PR c++/20073 (ICE initializing const array)
authorMark Mitchell <mark@codesourcery.com>
Wed, 23 Feb 2005 06:52:08 +0000 (06:52 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 23 Feb 2005 06:52:08 +0000 (06:52 +0000)
commit67935995351da151a966dfcaf804293be54d9617
tree9a11503ef0327d6e92a1bee2233d9b9330f316b0
parentbba6afa6ac6703bde83f9c6b5f4a926ff107dd6d
re PR c++/20073 (ICE initializing const array)

PR c++/20073
* decl.c (start_decl_1): Don't clear TREE_READONLY.
(cp_finish_decl): Likewise.
(complete_vars): Call cp_apply_type_quals_to_decl.
* typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
cases where that's not valid.

PR c++/20073
* g++.dg/init/const1.C: New test.

From-SVN: r95441
gcc/cp/decl.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/const1.C [new file with mode: 0644]