| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fstrub=strict -fdump-ipa-strubm" } */ |
| 3 |
/* { dg-require-effective-target strub } */ |
| 4 |
|
| 5 |
/* Check that implicit enabling of strub mode selects internal strub when the |
| 6 |
function uses __builtin_apply_args, that prevents the optimization to |
| 7 |
at-calls mode. */ |
| 8 |
|
| 9 |
int __attribute__ ((__strub__)) var; |
| 10 |
|
| 11 |
static inline void |
| 12 |
apply_args (int i, int j, double d) |
| 13 |
{ |
| 14 |
var++; |
| 15 |
__builtin_apply_args (); |
| 16 |
} |
| 17 |
|
| 18 |
void f() { |
| 19 |
apply_args (1, 2, 3); |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-final { scan-ipa-dump-times "strub \[(\]internal\[)\]" 1 "strubm" } } */ |