From: Janis Johnson Date: Thu, 12 Aug 2004 18:09:44 +0000 (+0000) Subject: altivec-2.C: Check for hardware support before executing any VMX instructions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4951f98d315e04235f40ff6e7d81e063ed92cb3b;p=gcc.git altivec-2.C: Check for hardware support before executing any VMX instructions. 2004-08-12 Janis Johnson * g++.dg/ext/altivec-2.C: Check for hardware support before executing any VMX instructions. From-SVN: r85890 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3bbc46ac0c7..2400d1dd16c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2004-08-12 Janis Johnson + * g++.dg/ext/altivec-2.C: Check for hardware support before + executing any VMX instructions. + * gcc.dg/vmx/ops-long-2.c: Add dg-error directives. 2004-08-12 Jakub Jelinek diff --git a/gcc/testsuite/g++.dg/ext/altivec-2.C b/gcc/testsuite/g++.dg/ext/altivec-2.C index c162291c681..82d2078dd83 100644 --- a/gcc/testsuite/g++.dg/ext/altivec-2.C +++ b/gcc/testsuite/g++.dg/ext/altivec-2.C @@ -8,15 +8,13 @@ #include #include "altivec_check.h" -int main (int argc, const char * argv[]) +int main1 (void) { 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); @@ -24,3 +22,9 @@ int main (int argc, const char * argv[]) return 0; } + +int main (int argc, const char * argv[]) +{ + altivec_check (); + return main1 (); +}