Debian Codegraph @

gcc/testsuite/c-c++-common/strub-all2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fstrub=all -fdump-ipa-strubm -fdump-ipa-strub" } */
3 /* { dg-require-effective-target strub } */
4
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() {
11 }
12
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();
18 }
19
20 /* { dg-final { scan-ipa-dump-times "strub \[(\]" 2 "strubm" } } */
21 /* { dg-final { scan-ipa-dump-times "strub \[(\]internal\[)\]" 2 "strubm" } } */
22
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" } } */