strub: enable conditional support
[official-gcc.git] / gcc / testsuite / c-c++-common / strub-tail-O2.c
blob043813b1de467c02197bca001f208256287267c6
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fstrub=strict -fno-exceptions -fdump-ipa-strub" } */
3 /* { dg-require-effective-target strub } */
5 /* Check that the expected strub calls are issued.
6 Tail calls are short-circuited at -O2+. */
8 int __attribute__ ((__strub__))
9 g (int i, int j) {
10 return g (i, j);
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" } } */