| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fstrub=strict -fno-exceptions -fdump-ipa-strub" } */ |
| 3 |
/* { dg-require-effective-target strub } */ |
| 4 |
|
| 5 |
/* Check that the expected strub calls are issued. |
| 6 |
Tail calls are short-circuited at -O2+. */ |
| 7 |
|
| 8 |
int __attribute__ ((__strub__)) |
| 9 |
g (int i, int j) { |
| 10 |
return g (i, j); |
| 11 |
} |
| 12 |
|
| 13 |
/* { dg-final { scan-ipa-dump-times "strub_enter" 0 "strub" } } */ |
| 14 |
/* { dg-final { scan-ipa-dump-times "strub_update" 2 "strub" } } */ |
| 15 |
/* { dg-final { scan-ipa-dump-times "strub_leave" 0 "strub" } } */ |