mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-12 05:13:50 +08:00
re PR c/43211 (ICE with incomplete type in function argument)
2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com> PR C/43211 * c-decl.c (grokparms): Set arg_types to NULL_TREE if there was an error. 2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com> PR C/43211 * gcc.dg/pr43211.c: New test. * gcc.dg/pr18809-1.c: Don't expect an error when calling foo. From-SVN: r157585
This commit is contained in:
parent
fdb2c6841d
commit
e49a760f33
@ -1,3 +1,8 @@
|
||||
2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com>
|
||||
|
||||
PR C/43211
|
||||
* c-decl.c (grokparms): Set arg_types to NULL_TREE if there was an error.
|
||||
|
||||
2010-03-19 Bernd Schmidt <bernd.schmidt@codesourcery.com>
|
||||
|
||||
PR rtl-optimization/42258
|
||||
|
@ -6118,6 +6118,7 @@ grokparms (struct c_arg_info *arg_info, bool funcdef_flag)
|
||||
|
||||
TREE_VALUE (typelt) = error_mark_node;
|
||||
TREE_TYPE (parm) = error_mark_node;
|
||||
arg_types = NULL_TREE;
|
||||
}
|
||||
else if (VOID_TYPE_P (type))
|
||||
{
|
||||
@ -6138,6 +6139,7 @@ grokparms (struct c_arg_info *arg_info, bool funcdef_flag)
|
||||
error (errmsg);
|
||||
TREE_VALUE (typelt) = error_mark_node;
|
||||
TREE_TYPE (parm) = error_mark_node;
|
||||
arg_types = NULL_TREE;
|
||||
}
|
||||
|
||||
if (DECL_NAME (parm) && TREE_USED (parm))
|
||||
|
@ -1,3 +1,9 @@
|
||||
2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com>
|
||||
|
||||
PR C/43211
|
||||
* gcc.dg/pr43211.c: New test.
|
||||
* gcc.dg/pr18809-1.c: Don't expect an error when calling foo.
|
||||
|
||||
2010-03-19 Bernd Schmidt <bernd.schmidt@codesourcery.com>
|
||||
|
||||
PR rtl-optimization/42258
|
||||
|
@ -7,4 +7,4 @@ void foo(enum E e) {} /* { dg-error "forward ref" "forward" } */
|
||||
/* { dg-warning "declared" "declared" { target *-*-* } 6 } */
|
||||
/* { dg-warning "scope" "scope" { target *-*-* } 6 } */
|
||||
/* { dg-error "incomplete" "incomplete" { target *-*-* } 6 } */
|
||||
void bar() { foo(0); } /* { dg-error "formal" } */
|
||||
void bar() { foo(0); }
|
||||
|
15
gcc/testsuite/gcc.dg/pr43211.c
Normal file
15
gcc/testsuite/gcc.dg/pr43211.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
struct T;
|
||||
|
||||
struct S {
|
||||
void (*bar)(struct S);
|
||||
};
|
||||
|
||||
void bar(struct T t) {} /* { dg-error "" } */
|
||||
|
||||
void foo(struct S *s)
|
||||
{
|
||||
s->bar = bar;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user