strub: enable conditional support
[official-gcc.git] / gcc / testsuite / c-c++-common / strub-all1.c
blob2037f681f2973a3186f17f3f80a744e0ae05e05a
1 /* { dg-do compile } */
2 /* { dg-options "-fstrub=all -fdump-ipa-strubm -fdump-ipa-strub" } */
3 /* { dg-require-effective-target strub } */
5 /* h becomes STRUB_CALLABLE, rather than STRUB_INLINABLE, because of the
6 strub-enabling -fstrub flag, and gets inlined before pass_ipa_strub. */
7 static inline void
8 __attribute__ ((__always_inline__))
9 h() {
12 /* g becomes STRUB_AT_CALLS, because of the flag. */
13 static inline void
14 g() {
15 h();
18 /* f becomes STRUB_INTERNAL because of the flag, and gets split into
19 STRUB_WRAPPER and STRUB_WRAPPED. */
20 void
21 f() {
22 g();
25 /* { dg-final { scan-ipa-dump-times "strub \[(\]" 3 "strubm" } } */
26 /* { dg-final { scan-ipa-dump-times "strub \[(\]callable\[)\]" 1 "strubm" } } */
27 /* { dg-final { scan-ipa-dump-times "strub \[(\]at-calls\[)\]" 1 "strubm" } } */
28 /* { dg-final { scan-ipa-dump-times "strub \[(\]internal\[)\]" 1 "strubm" } } */
30 /* { dg-final { scan-ipa-dump-times "strub \[(\]" 3 "strub" } } */
31 /* { dg-final { scan-ipa-dump-times "strub \[(\]at-calls\[)\]" 1 "strub" } } */
32 /* { dg-final { scan-ipa-dump-times "strub \[(\]wrapped\[)\]" 1 "strub" } } */
33 /* { dg-final { scan-ipa-dump-times "strub \[(\]wrapper\[)\]" 1 "strub" } } */