1  /* { dg-do compile { target { powerpc*-*-* } } } */
       2  /* { dg-require-effective-target powerpc_p8vector_ok } */
       3  /* { dg-skip-if "" { powerpc_p9vector_ok } } */
       4  /* { dg-skip-if "" { powerpc*-*-aix* } } */
       5  /* { dg-options "-mdejagnu-cpu=power8" } */
       6  
       7  /* This test should succeed on both 32- and 64-bit configurations.  */
       8  #include <altivec.h>
       9  
      10  /* Though the command line specifies power8 target, this function is
      11     to support power9. Expect an error message here because this target
      12     does not support power9.  */
      13  __attribute__((target("cpu=power9")))
      14  int get_random ()
      15  { /* { dg-warning "lacks power9 support" } */
      16    return __builtin_darn_32 (); /* { dg-warning "implicit declaration" } */
      17  }
      18