blob: 7915b33a39a0a93fc7b79c979576e15c42b9540f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* { dg-do compile } */
/* { dg-options "-fstrub=at-calls -fdump-ipa-strubm -fdump-ipa-strub" } */
/* { dg-require-effective-target strub } */
/* g does NOT become STRUB_AT_CALLS because it's not viable. Without inline,
force_output is set for static non-inline functions when not optimizing, and
that keeps only_called_directly_p from returning true, which makes
STRUB_AT_CALLS non-viable. It becomes STRUB_CALLABLE instead. */
static void
g() {
}
/* f does NOT become STRUB_AT_CALLS because it is visible; it becomes
STRUB_CALLABLE. */
void
f() {
g();
}
/* { dg-final { scan-ipa-dump-times "strub \[(\]" 2 "strubm" } } */
/* { dg-final { scan-ipa-dump-times "strub \[(\]callable\[)\]" 2 "strubm" } } */
/* { dg-final { scan-ipa-dump-times "strub \[(\]" 2 "strub" } } */
/* { dg-final { scan-ipa-dump-times "strub \[(\]callable\[)\]" 2 "strub" } } */
|