Commit 95fb85c6 by Volker Reichelt Committed by Volker Reichelt

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
parent 36a43def
2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/29291
* init.c (build_new): Check for invalid init.
2006-10-02 Mark Mitchell <mark@codesourcery.com> 2006-10-02 Mark Mitchell <mark@codesourcery.com>
PR c++/29226 PR c++/29226
......
...@@ -2075,7 +2075,8 @@ build_new (tree placement, tree type, tree nelts, tree init, ...@@ -2075,7 +2075,8 @@ build_new (tree placement, tree type, tree nelts, tree init,
tree orig_nelts; tree orig_nelts;
tree orig_init; 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; return error_mark_node;
orig_placement = placement; orig_placement = placement;
......
2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/29291
* g++.dg/parse/new4.C: New test.
2006-10-03 Uros Bizjak <uros@kss-loka.si> 2006-10-03 Uros Bizjak <uros@kss-loka.si>
* gcc-dg/pthread-init-common.h: Define _GNU_SOURCE. Add tests for * gcc-dg/pthread-init-common.h: Define _GNU_SOURCE. Add tests for
// PR c++/29291
// { dg-do compile }
template<int> void foo()
{
new int(; // { dg-error "before" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment