This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Avoid -maltivec in vect.exp if not powerpc_altivec_ok


gcc.dg/vect/vect.exp uses -maltivec on PowerPC.  It should check the
powerpc_altivec_ok effective target first to avoid running the tests
on targets for which this option doesn't work.  OK to commit?

(In principle maybe some of the tests could run with SPE vectors -
i.e. with no special options on such targets - but that would require
all the effective targets to distinguish different forms of PowerPC
vectors, which seems like clearly a separate project.)

2006-11-29  Joseph Myers  <joseph@codesourcery.com>

	* gcc.dg/vect/vect.exp: Skip PowerPC targets not supporting
	-maltivec.

Index: gcc.dg/vect/vect.exp
===================================================================
--- gcc.dg/vect/vect.exp	(revision 119337)
+++ gcc.dg/vect/vect.exp	(working copy)
@@ -37,7 +37,10 @@
 # code.  Set additional target-dependent vector flags, which can be
 # overridden by using dg-options in individual tests.
 if [istarget "powerpc*-*-*"] {
-    # If there are powerpc targets to skip, do it here.
+    # Skip targets not supporting -maltivec.
+    if ![is-effective-target powerpc_altivec_ok] {
+	return
+    }
 
     lappend DEFAULT_VECTCFLAGS "-maltivec"
     if [check_vmx_hw_available] {

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]