re PR c/28136 (ICE with incomplete array type)

PR c/28136
	* c-parser.c (c_parser_postfix_expression_after_paren_type): Robustify.

	* gcc.dg/init-bad-5.c: New test.

From-SVN: r115952
This commit is contained in:
Volker Reichelt 2006-08-05 23:08:54 +00:00
parent fd517dc661
commit 85cad37c81
4 changed files with 22 additions and 7 deletions

View File

@ -1,8 +1,14 @@
2006-08-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/28136
* c-parser.c (c_parser_postfix_expression_after_paren_type): Robustify.
2006-08-04 Jan Hubicka <jh@suse.cz>
PR target/26655
PR target/28270
* reload.c (push_reload): Patch out the mismathcing instruction; return early.
* reload.c (push_reload): Patch out the mismatching instruction;
return early.
(find_reload): Bail out if the instruction was patched out.
2006-08-04 Jan Hubicka <jh@suse.cz>

View File

@ -5432,7 +5432,7 @@ c_parser_postfix_expression_after_paren_type (c_parser *parser,
struct c_expr expr;
start_init (NULL_TREE, NULL, 0);
type = groktypename (type_name);
if (C_TYPE_VARIABLE_SIZE (type))
if (type != error_mark_node && C_TYPE_VARIABLE_SIZE (type))
{
error ("compound literal has variable size");
type = error_mark_node;

View File

@ -1,10 +1,14 @@
2006-08-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/28136
* gcc.dg/init-bad-5.c: New test.
2006-08-03 Lee Millward <lee.millward@codesourcery.com>
PR c++/28347
* g++.dg/ext/typedef-init.C: Add new test for typedef
initialization inside templates. Adjust existing
error markers.
PR c++/28347
* g++.dg/ext/typedef-init.C: Add new test for typedef
initialization inside templates. Adjust existing error markers.
2006-08-03 Mark Mitchell <mark@codesourcery.com>
PR c++/28148

View File

@ -0,0 +1,5 @@
/* PR c/28136 */
/* { dg-do compile } */
/* { dg-options "" } */
int i = (struct A[]) {}; /* { dg-error "incomplete|empty|initialization" } */