2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr56727-1.c
blobffc133545e7973c62713659cab6eafe0046a547d
1 /* { dg-do compile { target fpic } } */
2 /* { dg-options "-O2 -fPIC" } */
3 /* { dg-final { scan-assembler-not "@(PLT|plt)" { target i?86-*-* x86_64-*-* powerpc*-*-* } } } */
5 #define define_func(type) \
6 void f_ ## type (type b) { f_ ## type (0); } \
7 void __attribute__((noinline, noclone)) f_noinline_ ## type (type b) \
8 { f_noinline_ ## type (0); }
10 define_func(char)
11 define_func(short)
12 define_func(int)
13 define_func(long)
15 int foo(int n)
17 return (n == 1 || n == 2) ? 1 : foo(n-1) * foo(n-2);
20 int __attribute__((noinline, noclone)) foo_noinline(int n)
22 return (n == 1 || n == 2) ? 1 : foo_noinline(n-1) * foo_noinline(n-2);