diff mbox

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

Message ID 20111229174832.GA6357@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner Dec. 29, 2011, 5:48 p.m. UTC
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.
diff mbox

Patch

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.  */