diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-03-01 19:27:21 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-03-01 19:27:21 +0100 |
commit | 686e2237f31bd26851e3c8f9a528ab30aef16c54 (patch) | |
tree | 1a91ba6e3c49bf4883cb532528943c10ee28f01d /gcc/c/c-parser.c | |
parent | f8e4188cae89ff679d23534601759b5c38a41c6f (diff) | |
download | gcc-686e2237f31bd26851e3c8f9a528ab30aef16c54.zip gcc-686e2237f31bd26851e3c8f9a528ab30aef16c54.tar.gz gcc-686e2237f31bd26851e3c8f9a528ab30aef16c54.tar.bz2 |
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
Diffstat (limited to 'gcc/c/c-parser.c')
-rw-r--r-- | gcc/c/c-parser.c | 5 |
1 files changed, 1 insertions, 4 deletions
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). |