PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / inline-34.c
blobf257792c73cc51c4aabaa98a97257f7cdc8078dd
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" } */
7 static int a1;
8 inline int f1 (void) { return a1; }
9 int f1 (void);
11 static int a2;
12 inline int f2 (void) { return a2; }
13 extern inline int f2 (void);
15 inline void f3 (void) { static int a3; }
16 void f3 (void);
18 inline void f4 (void) { static int a4; }
19 extern inline void f4 (void);