1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-options "-mcpu=power8" } */
5 
6 #include <stddef.h>
7 #include <altivec.h>
8 
9 signed int
fetch_data(unsigned int offset,vector signed int * datap)10 fetch_data (unsigned int offset, vector signed int *datap)
11 {
12   vector signed int data = *datap;
13 
14   return __builtin_vec_vextulx (offset, data);	/* { dg-error "builtin function '__builtin_altivec_vextuwlx' requires" } */
15 }
16