1  /* { dg-do compile } */
       2  /* { dg-options "-mdejagnu-cpu=power10 -O2" } */
       3  /* { dg-require-effective-target powerpc_elfv2 } */
       4  /* { dg-require-effective-target power10_ok } */
       5  
       6  /* Test that calls generated from PC-relative code are annotated with
       7     @notoc.  */
       8  
       9  extern int yy0 (int);
      10  extern void yy1 (int);
      11  
      12  int zz0 (void) __attribute__((noinline));
      13  void zz1 (int) __attribute__((noinline));
      14  
      15  int xx (void)
      16  {
      17    yy1 (7);
      18    return yy0 (5);
      19  }
      20  
      21  int zz0 ()
      22  {
      23    asm ("");
      24    return 16;
      25  };
      26  
      27  void zz1 (int a __attribute__((__unused__)))
      28  {
      29    asm ("");
      30  };
      31  
      32  int ww (void)
      33  {
      34    zz1 (zz0 ());
      35    return 4;
      36  }
      37  
      38  /* { dg-final { scan-assembler {yy1@notoc} } } */
      39  /* { dg-final { scan-assembler {yy0@notoc} } } */
      40  /* { dg-final { scan-assembler {zz1@notoc} } } */
      41  /* { dg-final { scan-assembler {zz0@notoc} } } */