re PR c/35437 (ICE with struct containing incomplete type)
gcc/ 2008-10-07 Simon Martin <simartin@users.sourceforge.net> PR c/35437 * expr.c (count_type_elements): Handle ERROR_MARK. gcc/testsuite/ 2008-01-07 Simon Martin <simartin@users.sourceforge.net> PR c/35437 * gcc.dg/struct-parse-2.c: New test. * g++.dg/parse/struct-4.C: New test. From-SVN: r140953
This commit is contained in:
parent
3b14bb3928
commit
16d5ffec52
@ -1,3 +1,8 @@
|
||||
2008-10-07 Simon Martin <simartin@users.sourceforge.net>
|
||||
|
||||
PR c/35437
|
||||
* expr.c (count_type_elements): Handle ERROR_MARK.
|
||||
|
||||
2008-10-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/29609
|
||||
|
@ -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:
|
||||
|
@ -1,3 +1,9 @@
|
||||
2008-10-07 Simon Martin <simartin@users.sourceforge.net>
|
||||
|
||||
PR c/35437
|
||||
* gcc.dg/struct-parse-2.c: New test.
|
||||
* g++.dg/parse/struct-4.C: New test.
|
||||
|
||||
2008-10-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/29609
|
||||
|
13
gcc/testsuite/g++.dg/parse/struct-4.C
Normal file
13
gcc/testsuite/g++.dg/parse/struct-4.C
Normal file
@ -0,0 +1,13 @@
|
||||
/* PR c/35437 */
|
||||
/* { dg-do "compile" } */
|
||||
|
||||
struct A
|
||||
{
|
||||
int i;
|
||||
struct A a; /* { dg-error "has incomplete type" } */
|
||||
};
|
||||
|
||||
void foo()
|
||||
{
|
||||
struct A b = { 0 };
|
||||
}
|
13
gcc/testsuite/gcc.dg/struct-parse-2.c
Normal file
13
gcc/testsuite/gcc.dg/struct-parse-2.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* PR c/35437 */
|
||||
/* { dg-do "compile" } */
|
||||
|
||||
struct A
|
||||
{
|
||||
int i;
|
||||
struct A a; /* { dg-error "has incomplete type" } */
|
||||
};
|
||||
|
||||
void foo()
|
||||
{
|
||||
struct A b = { 0 };
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user