aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/noncompile/scope.c
blob: 67e136fd97daa5f1b6ac6318189a63c761e599c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
extern void abort (void);
extern void exit (int);
static int v = 3;

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

int
main ()
{
  f ();
  exit (0);
}