gcc/testsuite/gcc.target/powerpc/pr102059-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -mdejagnu-cpu=power8 -mno-power8-fusion -fdump-tree-einline-optimized" } */ |
| 3 | |
| 4 | /* Like pr102059-1.c, to verify the inlining still happens |
| 5 | even without always_inline attribute. */ |
| 6 | |
| 7 | int foo (int *b) |
| 8 | { |
| 9 | *b += 10; |
| 10 | return *b; |
| 11 | } |
| 12 | |
| 13 | #pragma GCC target "cpu=power10" |
| 14 | int |
| 15 | bar (int *a) |
| 16 | { |
| 17 | *a = foo (a); |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | /* { dg-final { scan-tree-dump-times {Inlining foo/[0-9]* } 1 "einline"} } */ |