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]

[PATCH, committed] Powerpc testsuite/51702, pass -mabi=altivec on 32-bit powerpc-linux to avoid warning message


Several of the gcc.dg tests were failing on 32-bit powerpc-linux since the
tests test the machine independent vector support, and the powerpc backend
issues a warning on passing vectors if -mabi=altivec was not used (it is on by
default for 64-bit).  I committed the following patch as obvious to add the
-mabi=altivec option in this case.

2011-12-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR testsuite/51702
	* gcc.dg/scal-to-vec1.c: If 32-bit powerpc-linux, add the
	-mabi=altivec option, which suppresses a warning message about
	passing vectors by reference.  The extra warning causes some tests
	to fail.
	* gcc.dg/scal-to-vec2.c: Likewise.
	* gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c: Likewise.
	* gcc.dg/pr35442.c: Likewise.
	* gcc.dg/vector-compare-1.c: Likewise.
	* gcc.dg/vector-compare-2.c: Likewise.
	* gcc.dg/torture/pr36891.c: Likewise.

Index: gcc/testsuite/gcc.dg/scal-to-vec1.c
===================================================================
--- gcc/testsuite/gcc.dg/scal-to-vec1.c	(revision 182725)
+++ gcc/testsuite/gcc.dg/scal-to-vec1.c	(working copy)
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-Wno-long-long" } */
+/* { dg-options "-Wno-long-long -mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
+
 #define vector(elcount, type)  \
 __attribute__((vector_size((elcount)*sizeof(type)))) type
 
Index: gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c
===================================================================
--- gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c	(revision 182725)
+++ gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wall" } */
+/* { dg-options "-O2 -Wall -mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
 
 typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
 
Index: gcc/testsuite/gcc.dg/scal-to-vec2.c
===================================================================
--- gcc/testsuite/gcc.dg/scal-to-vec2.c	(revision 182725)
+++ gcc/testsuite/gcc.dg/scal-to-vec2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */   
 /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
+/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
 
 /* Test for C_MAYBE_CONST are folded correctly when 
    expanding an expression to vector.  */
Index: gcc/testsuite/gcc.dg/pr35442.c
===================================================================
--- gcc/testsuite/gcc.dg/pr35442.c	(revision 182725)
+++ gcc/testsuite/gcc.dg/pr35442.c	(working copy)
@@ -1,5 +1,6 @@
 /* PR c/35442 */
 /* { dg-bogus "not supported by" "" { target *-*-* } 0 } */
+/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
 
 typedef char A __attribute__ ((vector_size (64)));
 typedef int B __attribute__ ((vector_size (64)));
Index: gcc/testsuite/gcc.dg/vector-compare-1.c
===================================================================
--- gcc/testsuite/gcc.dg/vector-compare-1.c	(revision 182725)
+++ gcc/testsuite/gcc.dg/vector-compare-1.c	(working copy)
@@ -1,4 +1,6 @@
 /* { dg-do compile } */
+/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
+
 #define vector(elcount, type)  \
 __attribute__((vector_size((elcount)*sizeof(type)))) type
 
Index: gcc/testsuite/gcc.dg/torture/pr36891.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr36891.c	(revision 182725)
+++ gcc/testsuite/gcc.dg/torture/pr36891.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-options "-ffast-math" } */
 /* { dg-options "-ffast-math -msse" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 /* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+/* { dg-options "-ffast-math -mabi=altivec" { target { { powerpc*-*-linux* } && ia32 } } } */
 
 #define __vector __attribute__((vector_size(16) ))
 __vector float f(void);
Index: gcc/testsuite/gcc.dg/vector-compare-2.c
===================================================================
--- gcc/testsuite/gcc.dg/vector-compare-2.c	(revision 182725)
+++ gcc/testsuite/gcc.dg/vector-compare-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */   
 /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
+/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
 
 /* Test if C_MAYBE_CONST are folded correctly when 
    creating VEC_COND_EXPR.  */


-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com	fax +1 (978) 399-6899


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