aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/testsuite/g++.dg/ext/altivec-17.C
blob: 54eff8a24ede35b6ddd54b1c6e05ac568db16672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile { target powerpc*-*-* } }
// { dg-require-effective-target powerpc_altivec_ok }
// { dg-options "-maltivec" }

// Make sure that bool vectors have distinct names to int vectors

#define vector__ __attribute__((altivec (vector__)))
#define bool__ __attribute__((altivec(bool__)))

typedef vector__ unsigned int simd_type;
typedef vector__ bool__ int bool_simd_type;

void Foo (bool_simd_type const &a)
{
  simd_type const &v = a; // { dg-error "'const simd_type&' from expression of type 'const bool_simd_type'" }
}