111
|
1 /* { dg-do compile { target fpic } } */
|
|
2 /* { dg-options "-O2 -fPIC" } */
|
|
3
|
|
4 #define define_func(type) \
|
|
5 void f_ ## type (type b) { f_ ## type (0); } \
|
|
6 void __attribute__((noinline, noclone)) f_noinline_ ## type (type b) \
|
|
7 { f_noinline_ ## type (0); }
|
|
8
|
|
9 define_func(char)
|
|
10 define_func(short)
|
|
11 define_func(int)
|
|
12 define_func(long)
|
|
13
|
|
14 int foo(int n)
|
|
15 {
|
|
16 return (n == 1 || n == 2) ? 1 : foo(n-1) * foo(n-2);
|
|
17 }
|
|
18
|
|
19 int __attribute__((noinline, noclone)) foo_noinline(int n)
|
|
20 {
|
|
21 return (n == 1 || n == 2) ? 1 : foo_noinline(n-1) * foo_noinline(n-2);
|
|
22 }
|
131
|
23
|
|
24 /* { dg-final { scan-assembler-not "@(PLT|plt)" { target i?86-*-* x86_64-*-* } } } */
|
|
25 /* { dg-final { scan-assembler-not "@(PLT|plt)" { target { powerpc*-*-* && ilp32 } } } } */
|
|
26 /* { dg-final { scan-assembler-not "bl \[a-z_\]*\n\\s*nop" { target { powerpc*-*-* && lp64 } } } } */
|