diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/apple-altivec-7.C')
-rw-r--r-- | gcc/testsuite/g++.dg/apple-altivec-7.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/apple-altivec-7.C b/gcc/testsuite/g++.dg/apple-altivec-7.C new file mode 100644 index 00000000000..c5f2cd51933 --- /dev/null +++ b/gcc/testsuite/g++.dg/apple-altivec-7.C @@ -0,0 +1,21 @@ +/* APPLE LOCAL file */ +/* { dg-do run { target powerpc*-*-* } } */ +/* { dg-options "-faltivec" } */ + +typedef __vector unsigned int vui; // 1 +typedef __vector float vf; // 2 + +template <int i> vui do2 () // 3 +{ + vui v; return v; +} + +template <int j> vf do1 () +{ + static_cast <vf> (do2 <j> ()); // 4 +} + +int main () +{ + do1 <12> (); // 5 +} |