diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/g++.dg/ext/altivec-13.C | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/altivec-13.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/altivec-13.C | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/altivec-13.C b/gcc/testsuite/g++.dg/ext/altivec-13.C new file mode 100644 index 000000000..abc05af62 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/altivec-13.C @@ -0,0 +1,59 @@ +/* Check that vec_step can be used with const vector types. This + test is derived from parts of gcc.dg/vmx/8-02.c from Motorola's + AltiVec testsuite. */ + +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec" } */ + +#include <altivec.h> + +extern vector unsigned char vuc; +extern vector signed char vsc; +extern vector bool char vbc; +extern vector unsigned short vus; +extern vector signed short vss; +extern vector bool short vbs; +extern vector unsigned int vui; +extern vector signed int vsi; +extern vector bool int vbi; +extern vector pixel vp; +extern vector float vf; +extern const vector unsigned char cvuc; +extern const vector signed char cvsc; +extern const vector bool char cvbc; +extern const vector unsigned short cvus; +extern const vector signed short cvss; +extern const vector bool short cvbs; +extern const vector unsigned int cvui; +extern const vector signed int cvsi; +extern const vector bool int cvbi; +extern const vector pixel cvp; +extern const vector float cvf; + +void +foo (void) +{ + int i_vuc = vec_step (vuc); + int i_vsc = vec_step (vsc); + int i_vbc = vec_step (vbc); + int i_vus = vec_step (vus); + int i_vss = vec_step (vss); + int i_vbs = vec_step (vbs); + int i_vui = vec_step (vui); + int i_vsi = vec_step (vsi); + int i_vbi = vec_step (vbi); + int i_vp = vec_step (vp); + int i_vf = vec_step (vf); + int i_cvuc = vec_step (cvuc); + int i_cvsc = vec_step (cvsc); + int i_cvbc = vec_step (cvbc); + int i_cvus = vec_step (cvus); + int i_cvss = vec_step (cvss); + int i_cvbs = vec_step (cvbs); + int i_cvui = vec_step (cvui); + int i_cvsi = vec_step (cvsi); + int i_cvbi = vec_step (cvbi); + int i_cvp = vec_step (cvp); + int i_cvf = vec_step (cvf); +} |