aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2006-10-03 10:08:22 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2006-10-03 10:08:22 +0000
commit95fb85c625c7f820207784f4c5f2c30c3796778d (patch)
tree8ce8a0c433520229898faf5fad93463a2588a179 /gcc/cp/init.c
parent36a43def8aa3af3d1b6b8656f19d3629f4ef68d2 (diff)
downloadgcc-95fb85c625c7f820207784f4c5f2c30c3796778d.zip
gcc-95fb85c625c7f820207784f4c5f2c30c3796778d.tar.gz
gcc-95fb85c625c7f820207784f4c5f2c30c3796778d.tar.bz2
re PR c++/29291 (ICE on invalid use of new)
PR c++/29291 * init.c (build_new): Check for invalid init. * g++.dg/parse/new4.C: New test. From-SVN: r117393
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 8faa03d..0c85c0f 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -2075,7 +2075,8 @@ build_new (tree placement, tree type, tree nelts, tree init,
tree orig_nelts;
tree orig_init;
- if (placement == error_mark_node || type == error_mark_node)
+ if (placement == error_mark_node || type == error_mark_node
+ || init == error_mark_node)
return error_mark_node;
orig_placement = placement;