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