rt_gccstream/gcc/testsuite/gcc.dg/noncompile/scope.c

20 lines
212 B
C

extern void abort (void);
extern void exit (int);
static int v = 3;
f ()
{
int v = 4;
{
extern int v; /* { dg-error "static" } */
if (v != 3)
abort ();
}
}
main ()
{
f ();
exit (0);
}