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] testsuite (committed): expect warnings in ppc vector tests


GCC recently started warning about passing by reference vector types that
don't map to hardware vectors on 32-bit powerpc*-linux.  This patch fixes
some tests to expect those warnings.  Target lists for dg-warning use
newly-supported selector expressions.

Checked in on mainline.

2005-02-01  Janis Johnson  <janis187@us.ibm.com>

	* g++.dg/conversion/simd1.C: Expect warning.
	* g++.dg/ext/attribute-test-1.C: Ditto.
	* g++.dg/ext/attribute-test-2.C: Ditto.
	* g++.dg/ext/attribute-test-3.C: Ditto.
	* g++.dg/ext/attribute-test-4.C: Ditto.

Index: gcc/testsuite/g++.dg/conversion/simd1.C
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/g++.dg/conversion/simd1.C,v
retrieving revision 1.1
diff -u -p -r1.1 simd1.C
--- gcc/testsuite/g++.dg/conversion/simd1.C	24 Nov 2004 10:06:54 -0000	1.1
+++ gcc/testsuite/g++.dg/conversion/simd1.C	27 Jan 2005 23:49:06 -0000
@@ -6,6 +6,7 @@
 #define vector __attribute__((vector_size(16)))
 
 vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-error "near match" } */
+/* { dg-warning "vector returned by ref" "" { target { powerpc*-*-linux* && ilp32 } }  8 } */
 vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-error "near match" } */
 
 extern int i;
Index: gcc/testsuite/g++.dg/ext/attribute-test-1.C
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/g++.dg/ext/attribute-test-1.C,v
retrieving revision 1.2
diff -u -p -r1.2 attribute-test-1.C
--- gcc/testsuite/g++.dg/ext/attribute-test-1.C	23 Sep 2004 21:50:36 -0000	1.2
+++ gcc/testsuite/g++.dg/ext/attribute-test-1.C	21 Jan 2005 22:36:52 -0000
@@ -7,7 +7,7 @@ extern "C" void abort();
 #define vector __attribute__((vector_size(16)))
 
 struct Constants {
-   inline vector unsigned int deadbeef(void) const {
+   inline vector unsigned int deadbeef(void) const { // { dg-warning "vector returned by ref" "" { target { powerpc*-*-linux* && ilp32 } } }
        return (vector unsigned int){0xdeadbeef, 0xabababab, 0x55555555, 0x12345678};
    };
 };
Index: gcc/testsuite/g++.dg/ext/attribute-test-2.C
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/g++.dg/ext/attribute-test-2.C,v
retrieving revision 1.2
diff -u -p -r1.2 attribute-test-2.C
--- gcc/testsuite/g++.dg/ext/attribute-test-2.C	23 Sep 2004 21:50:36 -0000	1.2
+++ gcc/testsuite/g++.dg/ext/attribute-test-2.C	21 Jan 2005 22:34:19 -0000
@@ -11,7 +11,7 @@ class vector_holder
    char __attribute__((vector_size(16))) vec;
    char __attribute__((vector_size(16))) vec1;
 public:
-   operator __attribute__((vector_size(16))) short (void) {
+   operator __attribute__((vector_size(16))) short (void) { // { dg-warning "vector returned by ref" "" { target { powerpc*-*-linux* && ilp32 } } }
      return (__attribute__((vector_size(16))) short) vec;
    }
 
Index: gcc/testsuite/g++.dg/ext/attribute-test-3.C
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/g++.dg/ext/attribute-test-3.C,v
retrieving revision 1.1
diff -u -p -r1.1 attribute-test-3.C
--- gcc/testsuite/g++.dg/ext/attribute-test-3.C	23 Sep 2004 18:22:25 -0000	1.1
+++ gcc/testsuite/g++.dg/ext/attribute-test-3.C	21 Jan 2005 22:35:10 -0000
@@ -23,7 +23,7 @@ class Star
 	friend vector float fTest(const Star &);
 };
 
-vector float Star::foo() const
+vector float Star::foo() const  // { dg-warning "vector returned by ref" "" { target { powerpc*-*-linux* && ilp32 } } }
 {
     return data.v;
 }
Index: gcc/testsuite/g++.dg/ext/attribute-test-4.C
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/g++.dg/ext/attribute-test-4.C,v
retrieving revision 1.1
diff -u -p -r1.1 attribute-test-4.C
--- gcc/testsuite/g++.dg/ext/attribute-test-4.C	23 Sep 2004 18:22:25 -0000	1.1
+++ gcc/testsuite/g++.dg/ext/attribute-test-4.C	21 Jan 2005 22:38:13 -0000
@@ -23,7 +23,7 @@ class Star
 	friend vector float fTest();
 };
 
-vector float Star::foo() 
+vector float Star::foo()   // { dg-warning "vector returned by ref" "" { target { powerpc*-*-linux* && ilp32 } } }
 {
     return data.v;
 }


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