aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr104894.c
blob: f46fe88168f0a2d229a34413dd7ab6631ee1beec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* 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 an
   indirect sibcall, with r12 and CTR containing the function address.  */

void foo (void);

void
bar (void)
{
  foo ();
}

/* { dg-final { scan-assembler-times {\mmtctr 12\M} 1 } } */
/* { dg-final { scan-assembler-times {\mbctr\M} 1 } } */
/* { dg-final { scan-assembler-not {\mbl\M} } } */
/* { dg-final { scan-assembler-not {\mbctrl\M} } } */