comparison gcc/testsuite/g++.dg/ext/altivec-2.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-require-effective-target powerpc_altivec_ok } */
3 /* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
4
5 /* This test checks if AltiVec builtins accept const-qualified
6 arguments. */
7
8 #include <altivec.h>
9
10 vector unsigned char use_lvsl;
11
12 int main (int argc, const char * argv[])
13 {
14 int i = 0;
15 const float cf = 1.0;
16 vector float v;
17 const vector float cv = (vector float){1.0, 2.0, 3.0, 4.0};
18
19 vec_dst(&cv, i, 0);
20 v = vec_ld(0, &cv);
21 v = vec_lde(0, &cf);
22 use_lvsl = vec_lvsl(0, &cf);
23
24 return 0;
25 }