diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-05-17 08:51:48 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-05-17 08:51:48 +0200 |
commit | f23b8501183a7c4645e59d5d6ae9e0e1c0d925d5 (patch) | |
tree | cb6a423cab6f20bd29a10111bcc2caa8bdbdb13b /gcc/cp/decl.c | |
parent | 7cbd12b88f5749676e888502453056fcc48cd61e (diff) | |
download | gcc-f23b8501183a7c4645e59d5d6ae9e0e1c0d925d5.zip gcc-f23b8501183a7c4645e59d5d6ae9e0e1c0d925d5.tar.gz gcc-f23b8501183a7c4645e59d5d6ae9e0e1c0d925d5.tar.bz2 |
re PR c++/21454 (const array doesn't live in the rodata section in C++)
PR c++/21454
* decl.c (maybe_deduce_size_from_array_init): Call
cp_apply_type_quals_to_decl after completing array type.
* g++.dg/opt/const4.C: New test.
From-SVN: r99817
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index c110d9f..ac7608b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3939,6 +3939,8 @@ maybe_deduce_size_from_array_init (tree decl, tree init) if (failure == 3) error ("zero-size array %qD", decl); + cp_apply_type_quals_to_decl (cp_type_quals (TREE_TYPE (decl)), decl); + layout_decl (decl, 0); } } |