Commit f01da1a5 by Volker Reichelt Committed by Volker Reichelt

re PR c/25875 (ICE: segmentation fault)

	PR c/25875
	* c-typeck.c (digest_init): Robustify.

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

From-SVN: r113153
parent 5d5e98dc
2006-04-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-04-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/25875
* c-typeck.c (digest_init): Robustify.
* c-typeck.c (pop_init_level): Simplify. * c-typeck.c (pop_init_level): Simplify.
2006-04-21 Steve Ellcey <sje@cup.hp.com> 2006-04-21 Steve Ellcey <sje@cup.hp.com>
......
...@@ -4495,6 +4495,7 @@ digest_init (tree type, tree init, bool strict_string, int require_constant) ...@@ -4495,6 +4495,7 @@ digest_init (tree type, tree init, bool strict_string, int require_constant)
tree inside_init = init; tree inside_init = init;
if (type == error_mark_node if (type == error_mark_node
|| !init
|| init == error_mark_node || init == error_mark_node
|| TREE_TYPE (init) == error_mark_node) || TREE_TYPE (init) == error_mark_node)
return error_mark_node; return error_mark_node;
......
2006-04-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/25875
* gcc.dg/init-bad-4.c: New test.
2006-04-21 Paul Brook <paul@codesourcery.com> 2006-04-21 Paul Brook <paul@codesourcery.com>
* gcc.dg/arm-vfp1.c: Skip on iWMMXt cpus. * gcc.dg/arm-vfp1.c: Skip on iWMMXt cpus.
/* PR c/25875 */
/* Origin: Richard Guenther <rguenth@gcc.gnu.org> */
/* { dg-do compile } */
struct A { } a = (struct A) {{ (X)0 }}; /* { dg-error "no members|extra brace|near|undeclared|constant|compound" } */
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