OSDN Git Service

* gcc.dg/tls/tls.exp: Remove temporary file.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / inline-1.c
1 /* Verify that DECL_INLINE gets copied between DECLs properly.  */
2 /* { dg-do compile } */
3 /* { dg-options "-O1" } */
4 /* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "xyzzy?,%r" } else { scan-assembler-not "xyzzy" } } } */
5
6 /* Test that declaration followed by definition inlines.  */
7 static inline int xyzzy0 (int);
8 static int xyzzy0 (int x) { return x; }
9 int test0 (void)
10 {
11   return xyzzy0 (5);
12 }
13
14 /* Test that definition following declaration inlines.  */
15 static int xyzzy1 (int);
16 static inline int xyzzy1 (int x) { return x; }
17 int test1 (void)
18 {
19   return xyzzy1 (5);
20 }
21
22 /* Test that redeclaration inside a function body inlines.  */
23 extern inline int xyzzy2 (int x) { return x; }
24 int test2 (void)
25 {
26   extern int xyzzy2 (int);
27   return xyzzy2 (5);
28 }