2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / inline-17.c
blob235ad8b001e725f3a9eb9884100996beead02bc3
1 /* Test __attribute__((gnu_inline)). */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c99" } */
4 /* { dg-final { scan-assembler "func1" } } */
5 /* { dg-final { scan-assembler-not "func2" } } */
6 /* { dg-final { scan-assembler "func3" } } */
7 /* { dg-final { scan-assembler "func4" } } */
9 #if __STDC_VERSION__ >= 199901L
10 # define inline __attribute__((gnu_inline)) inline
11 #endif
13 extern inline int func1 (void) { return 0; }
14 inline int func1 (void) { return 1; }
16 extern int func2 (void);
17 extern inline int func2 (void) { return 2; }
19 inline int func3 (void);
20 inline int func3 (void) { return 3; }
22 extern int func4 (void);
23 extern inline int func4 (void) { return 4; }
24 int func4 (void) { return 5; }