Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / s390 / nobp-return-reg-nothunk.c
blob4ea14e379f50ad0f5e5e4ad8d248d710617c7aaf
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -march=z10 --save-temps -mfunction-return-reg=thunk-extern -mindirect-branch-table" } */
4 int gl = 0;
6 int __attribute__((noinline,noclone))
7 bar (int a)
9 return a + 2;
12 void __attribute__((noinline,noclone))
13 foo (int a)
15 int i;
17 if (a == 42)
18 return;
20 for (i = 0; i < a; i++)
21 gl += bar (i);
24 int
25 main ()
27 foo (3);
28 if (gl != 9)
29 __builtin_abort ();
31 return 0;
34 /* 1 x bar
35 /* { dg-final { scan-assembler-times "jg\t__s390_indirect_jump" 1 } } */
37 /* No thunks due to thunk-extern. */
38 /* { dg-final { scan-assembler-not "exrl" } } */
39 /* { dg-final { scan-assembler-not ".globl __s390_indirect_jump" } } */
41 /* { dg-final { scan-assembler-not "section\t.s390_indirect_jump" } } */
42 /* { dg-final { scan-assembler-not "section\t.s390_indirect_call" } } */
43 /* { dg-final { scan-assembler "section\t.s390_return_reg" } } */
44 /* { dg-final { scan-assembler-not "section\t.s390_return_mem" } } */