2008-03-21 Janne Blomqvist <jb@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / funcdef-var-2.c
blob744987ebf3b1c7e7e3cba1310d6546579f56c70d
1 /* Test ICE on defining function with a name previously declared as a
2 nonfunction. Bug 28299 from Bernhard Fischer <aldot@gcc.gnu.org>.
3 Reduced testcase from Volker Reichelt <reichelt@gcc.gnu.org>. */
5 /* { dg-do compile } */
6 /* { dg-options "-Wmissing-prototypes" } */
8 int foo;
9 /* { dg-error "previous declaration" "previous declaration" { target *-*-* } 8 } */
10 void foo () {} /* { dg-error "redeclared as different kind of symbol" } */
11 /* { dg-warning "no previous prototype" "no previous prototype" { target *-*-* } 10 } */