diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/pr104894-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr104894-2.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/pr104894-2.c b/gcc/testsuite/gcc.target/powerpc/pr104894-2.c new file mode 100644 index 0000000..d1a011e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr104894-2.c @@ -0,0 +1,22 @@ +/* PR target/104894 */ +/* { dg-require-effective-target powerpc_elfv2 } */ +/* { dg-require-effective-target power10_ok } */ +/* { dg-options "-O2 -mdejagnu-cpu=power10 -fno-plt" } */ + +/* Verify we do not ICE on the following test case and that we emit one + indirect call and one indirect sibcall, with r12 and CTR containing + the function addresses. */ + +void foo (void); + +void +bar (void) +{ + foo (); + foo (); +} + +/* { dg-final { scan-assembler-times {\mmtctr 12\M} 2 } } */ +/* { dg-final { scan-assembler-times {\mbctrl\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mbctr\M} 1 } } */ +/* { dg-final { scan-assembler-not {\mbl\M} } } */ |