(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
cmpb-2.c
       1  /* { dg-do compile { target { powerpc*-*-* } } } */
       2  /* { dg-require-effective-target lp64 } */
       3  /* { dg-require-effective-target powerpc_popcntb_ok } */
       4  /* { dg-options "-mdejagnu-cpu=power5" } */
       5  
       6  void abort ();
       7  
       8  unsigned long long int
       9  do_compare (unsigned long long int a, unsigned long long int b)
      10  {
      11    return __builtin_cmpb (a, b);	/* { dg-error "'__builtin_p6_cmpb' requires the '-mcpu=power6' option" } */
      12  }
      13  
      14  void
      15  expect (unsigned long long int pattern, unsigned long long int value)
      16  {
      17    if (pattern != value)
      18      abort ();
      19  }
      20  
      21  int
      22  main (int argc, char *argv[])
      23  {
      24    expect (0xff00000000000000LL,
      25  	  do_compare (0x0123456789abcdefLL, 0x0100000000000000LL));
      26    expect (0x00ffffffffffffff,
      27  	  do_compare (0x0123456789abcdefLL, 0x0023456789abcdefLL));
      28    expect (0x00000000000000ff,
      29  	  do_compare (0x00000000000000efLL, 0x0123456789abcdefLL));
      30  }