aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/altivec-2.C
blob: 6a404b266d8798c887659ca7f02e797d3f90a533 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -Wall" } */

/* This test checks if AltiVec builtins accept const-qualified
   arguments.  */

#include <altivec.h>
#include "altivec_check.h"

int main (int argc, const char * argv[])
{
  int i;
  const float cf = 1.0;
  vector float v;
  const vector float cv = (vector float){1.0, 2.0, 3.0, 4.0};

  altivec_check ();

  vec_dst(&cv, i, 0);
  v = vec_ld(0, &cv);	
  v = vec_lde(0, &cf);
  vec_lvsl(0, &cf);
  
  return 0;
}