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 4/4] NetWare: AVX-specific testsuite adjustments


For targets defaulting to packed structures, the packed attribute on
the two ieee754 unions defined in m128-check.h result in unexpected
compiler warnings in many SSE and AVX tests. Very few of them actually
need these unions, so rather than fixing a few hundred test cases,
simply hide these declarations when not needed.

Jan

2009-07-23  Jan Beulich  <jbeulich@novell.com>

	* gcc.target/i386/avx-vtestpd-1.c: Add -DNEED_IEEE754_DOUBLE.
	* gcc.target/i386/avx-vtestpd-2.c: Likewise.
	* gcc.target/i386/avx-vtestpd-256-1.c: Likewise.
	* gcc.target/i386/avx-vtestpd-256-2.c: Likewise.
	* gcc.target/i386/avx-vtestpd-256-3.c: Likewise.
	* gcc.target/i386/avx-vtestpd-3.c: Likewise.
	* gcc.target/i386/avx-vtestps-1.c: Add -DNEED_IEEE754_FLOAT.
	* gcc.target/i386/avx-vtestps-2.c: Likewise.
	* gcc.target/i386/avx-vtestps-256-1.c: Likewise.
	* gcc.target/i386/avx-vtestps-256-2.c: Likewise.
	* gcc.target/i386/avx-vtestps-256-3.c: Likewise.
	* gcc.target/i386/avx-vtestps-3.c: Likewise.
	* gcc.target/i386/m128-check.h (union ieee754_float):  Put into
	#ifdef NEED_IEEE754_FLOAT conditional.
	(union ieee754_double):  Put into #ifdef NEED_IEEE754_DOUBLE
	conditional.

--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-1.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-1.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-2.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-2.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-1.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-1.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-2.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-2.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-3.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-3.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-3.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestpd-3.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-1.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-1.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-2.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-2.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-256-1.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-256-1.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-256-2.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-256-2.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-256-3.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-256-3.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-3.c
+++ trunk/gcc/testsuite/gcc.target/i386/avx-vtestps-3.c
@@ -1,6 +1,8 @@
 /* { dg-do run } */
 /* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
+/* { dg-message " from " "include chain" { target default_packed } 0 } */
 
 #include "avx-check.h"
 
--- trunk/gcc/testsuite/gcc.target/i386/m128-check.h
+++ trunk/gcc/testsuite/gcc.target/i386/m128-check.h
@@ -138,6 +138,7 @@ checkV##ARRAY (const TYPE *v, const TYPE
 CHECK_FP_ARRAY (d, double, ESP_DOUBLE, "%f")
 CHECK_FP_ARRAY (f, float, ESP_FLOAT, "%f")
 
+#ifdef NEED_IEEE754_FLOAT
 union ieee754_float
 {
    float d;
@@ -148,7 +149,9 @@ union ieee754_float
       unsigned sign : 1;
    } bits __attribute__((packed));
 };
+#endif
 
+#ifdef NEED_IEEE754_DOUBLE
 union ieee754_double
 {
    double d;
@@ -160,3 +163,4 @@ union ieee754_double
       unsigned sign : 1;
    } bits __attribute__((packed));
 };
+#endif



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