1 /* Diagnostics for bad references to static objects and functions from
2    inline definitions must take account of declarations after the
3    definition which make it not an inline definition.  PR 39556.  */
4 /* { dg-do compile } */
5 /* { dg-options "-std=c99 -pedantic-errors" } */
6 
7 static int a1;
f1(void)8 inline int f1 (void) { return a1; }
9 int f1 (void);
10 
11 static int a2;
f2(void)12 inline int f2 (void) { return a2; }
13 extern inline int f2 (void);
14 
f3(void)15 inline void f3 (void) { static int a3; }
16 void f3 (void);
17 
f4(void)18 inline void f4 (void) { static int a4; }
19 extern inline void f4 (void);
20