summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wunused-var-5.c
blob: 747f58d04c090b1a432d9907d0d825308e583f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* { dg-do compile } */
/* { dg-options "-Wunused" } */

void
f1 (void)
{
  extern int extvari;
  extvari = 1;
}

int extvarj;

void
f2 (void)
{
  extern int extvarj;
  extvarj = 1;
}

static int extvark;

void
f3 (void)
{
  extern int extvark;
  extvark = 1;
}

int
f4 (void)
{
  return extvark;
}