strub: enable conditional support
[official-gcc.git] / gcc / testsuite / c-c++-common / strub-all2.c
blobc026e7d9d289b251261d5fb8458d7b5ef14ec34e
1 /* { dg-do compile } */
2 /* { dg-options "-fstrub=all -fdump-ipa-strubm -fdump-ipa-strub" } */
3 /* { dg-require-effective-target strub } */
5 /* g becomes STRUB_INTERNAL, because of the flag. Without inline, force_output
6 is set for static non-inline functions when not optimizing, and that keeps
7 only_called_directly_p from returning true, which makes STRUB_AT_CALLS
8 non-viable. */
9 static void
10 g() {
13 /* f becomes STRUB_INTERNAL because of the flag, and gets split into
14 STRUB_WRAPPER and STRUB_WRAPPED. */
15 void
16 f() {
17 g();
20 /* { dg-final { scan-ipa-dump-times "strub \[(\]" 2 "strubm" } } */
21 /* { dg-final { scan-ipa-dump-times "strub \[(\]internal\[)\]" 2 "strubm" } } */
23 /* { dg-final { scan-ipa-dump-times "strub \[(\]" 4 "strub" } } */
24 /* { dg-final { scan-ipa-dump-times "strub \[(\]wrapped\[)\]" 2 "strub" } } */
25 /* { dg-final { scan-ipa-dump-times "strub \[(\]wrapper\[)\]" 2 "strub" } } */