From 686e2237f31bd26851e3c8f9a528ab30aef16c54 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 1 Mar 2016 19:27:21 +0100 Subject: re PR c/69796 (ICE on invalid code in useless_type_conversion_p, at gimple-expr.c:83) PR c/69796 PR c/69974 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE of incomplete decls to error_mark_node. * gcc.dg/pr69796.c: New test. * gcc.dg/pr69974.c: New test. From-SVN: r233861 --- gcc/c/c-parser.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gcc/c/c-parser.c') diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 82c1d61..bb508b7 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -1436,10 +1436,7 @@ c_parser_translation_unit (c_parser *parser) tree decl; FOR_EACH_VEC_ELT (incomplete_record_decls, i, decl) if (DECL_SIZE (decl) == NULL_TREE && TREE_TYPE (decl) != error_mark_node) - { - error ("storage size of %q+D isn%'t known", decl); - TREE_TYPE (decl) = error_mark_node; - } + error ("storage size of %q+D isn%'t known", decl); } /* Parse an external declaration (C90 6.7, C99 6.9). -- cgit v1.1