From 16d5ffec52cbe1c4e6d10ca67656fec7eb6badcd Mon Sep 17 00:00:00 2001 From: Simon Martin Date: Tue, 7 Oct 2008 20:56:53 +0000 Subject: re PR c/35437 (ICE with struct containing incomplete type) gcc/ 2008-10-07 Simon Martin PR c/35437 * expr.c (count_type_elements): Handle ERROR_MARK. gcc/testsuite/ 2008-01-07 Simon Martin PR c/35437 * gcc.dg/struct-parse-2.c: New test. * g++.dg/parse/struct-4.C: New test. From-SVN: r140953 --- gcc/expr.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index 32c8d01..277a6e1 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5021,6 +5021,9 @@ count_type_elements (const_tree type, bool allow_flexarr) case REFERENCE_TYPE: return 1; + case ERROR_MARK: + return 0; + case VOID_TYPE: case METHOD_TYPE: case FUNCTION_TYPE: -- cgit v1.1