From 6b1db06ffd30a38480ac32a12ee9b665721ac147 Mon Sep 17 00:00:00 2001 From: Ziemowit Laski Date: Fri, 28 May 2004 22:19:05 +0000 Subject: [PATCH] altivec-15.c: New test. 2004-05-28 Ziemowit Laski * gcc.dg/altivec-15.c: New test. From-SVN: r82387 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/altivec-15.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/altivec-15.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 22afe941604..12f43fbd251 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-05-28 Ziemowit Laski + + * gcc.dg/altivec-15.c: New test. + 2004-05-28 Mark Mitchell PR c++/14668 diff --git a/gcc/testsuite/gcc.dg/altivec-15.c b/gcc/testsuite/gcc.dg/altivec-15.c new file mode 100644 index 00000000000..daecbf96e88 --- /dev/null +++ b/gcc/testsuite/gcc.dg/altivec-15.c @@ -0,0 +1,29 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-options "-maltivec" } */ + +#include + +/* Test whether the C front-end is not excessively picky about + the integral types and literals that AltiVec instrinsics will + accept. */ + +vector int vi = { 1, 2, 3, 4 }; + +int +main (void) +{ + unsigned long ul = 2; + signed long sl = 2; + unsigned int ui = 2; + signed int si = 2; + float fl = 2.0; + + vec_dst (&vi, ul, '\0'); + vec_dst (&vi, sl, 0); + vec_dst (&vi, ui, '\0'); + vec_dst (&vi, si, 0); + vec_dstst (&vi, (short)fl, '\0'); + + return 0; +} + -- 2.30.2