diff options
author | reichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-16 21:35:18 +0000 |
---|---|---|
committer | reichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-16 21:35:18 +0000 |
commit | d5307e787d71af256cb8e1e6878a29d9bd4c2a03 (patch) | |
tree | 449eefe1360003191dff39367b17bd7897623c48 /gcc/cp/init.c | |
parent | f50cf978f0efa41e44ed18b5d6caf6d5510cba51 (diff) | |
download | gcc-d5307e787d71af256cb8e1e6878a29d9bd4c2a03.tar.gz |
PR c++/28593
* init.c (build_new): Return early on invalid placement.
* g++.dg/parse/new3.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116191 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index c785308699f..ff6de3360e5 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2063,7 +2063,7 @@ build_new (tree placement, tree type, tree nelts, tree init, tree orig_nelts; tree orig_init; - if (type == error_mark_node) + if (placement == error_mark_node || type == error_mark_node) return error_mark_node; orig_placement = placement; |