OSDN Git Service

20c6935ecbbfd1cd4b76cfed2fa04523fe120112
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / ext / altivec-17.C
1 // { dg-do compile { target powerpc*-*-* } }
2 // { dg-require-effective-target powerpc_altivec_ok }
3 // { dg-options "-maltivec" }
4
5 // Make sure that bool vectors have distinct names to int vectors
6
7 #define vector__ __attribute__((altivec (vector__)))
8 #define bool__ __attribute__((altivec(bool__)))
9
10 typedef vector__ unsigned int simd_type;
11 typedef vector__ bool__ int bool_simd_type;
12
13 void Foo (bool_simd_type const &a)
14 {
15   simd_type const &v = a; // { dg-error "'const unsigned int __vector\\\[4\\\]&' from expression of type 'const __bool int __vector\\\[4\\\]'" }
16 }