summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr18596-1.c
blob: dc34f444e5de47bd3563eed66781e29dc2ffe2bd (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
34
35
36
37
38
39
/* { dg-do compile } */
/* { dg-options "-fno-unit-at-a-time" } */

int f(int i)
{
  static int g(); /* { dg-error "invalid storage class" } */
  static int g() { return i; } /* { dg-error "invalid storage class" } */
  return g();
}

int k (int i)
{
  static int g (); /* { dg-error "invalid storage class" } */
  int g () {
	return i;
  }

  return g ();
}

int l (int i)
{
  auto int g ();
  static int g () { /* { dg-error "invalid storage class" } */
    return i;
  }

  static int h () { /* { dg-error "invalid storage class" } */
    return 3;
  }
  return g () + h ();
}

int m (int i)
{
  static g ();  /* { dg-error "invalid storage class" } */
  static g () { return i; } /* { dg-error "invalid storage class" } */
  return g ();
}