re PR c++/31743 (ICE with invalid use of new)
authorDave Brolley <brolley@redhat.com>
Wed, 4 Jul 2007 00:21:33 +0000 (20:21 -0400)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 4 Jul 2007 00:21:33 +0000 (00:21 +0000)
commit39fb9d7250581a22c2d773457255dc61a51e0099
tree8c59baf94a71413e1d59612c1d7bbe72c890bd64
parent61087eb3c459a7c729ded6e0cdf10edc1d8d7d76
re PR c++/31743 (ICE with invalid use of new)

PR c++/31743
* parser.c (cp_parser_new_type_id): Don't reduce a named array
type to its base type and number of elements here.
* init.c (build_new): Call complete_type_or_else to ensure that the
type is complete and to issue a diagnostic if it is not.
(build_new_1): Don't call complete_type_or_else here.

PR c++/31743
* g++.dg/init/new20.C: New test.

From-SVN: r126292
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/new20.C [new file with mode: 0755]