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: PR testsuite/35621: gcc.target/i386/ssse3-*.c violates C/C++ aliasing rules


SSSE3 tests are testing SSSE3 intrinsics. This patch adds
-fno-strict-aliasing to avoid posible aliasing problem without
affecting tests for SSSE3 intrinsic implementation.  Tested on
Linux/Intel64. OK to install?


H.J.
----
2008-03-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/35621
	* gcc.target/i386/ssse3-pabsb.c: Add -fno-strict-aliasing.
	* gcc.target/i386/ssse3-pabsd.c: Likewise.
	* gcc.target/i386/ssse3-pabsw.c: Likewise.
	* gcc.target/i386/ssse3-palignr.c: Likewise.
	* gcc.target/i386/ssse3-phaddd.c: Likewise.
	* gcc.target/i386/ssse3-phaddsw.c: Likewise.
	* gcc.target/i386/ssse3-phaddw.c: Likewise.
	* gcc.target/i386/ssse3-phsubd.c: Likewise.
	* gcc.target/i386/ssse3-phsubsw.c: Likewise.
	* gcc.target/i386/ssse3-phsubw.c: Likewise.
	* gcc.target/i386/ssse3-pmaddubsw.c: Likewise.
	* gcc.target/i386/ssse3-pmulhrsw.c: Likewise.
	* gcc.target/i386/ssse3-pshufb.c: Likewise.
	* gcc.target/i386/ssse3-psignb.c: Likewise.
	* gcc.target/i386/ssse3-psignd.c: Likewise.
	* gcc.target/i386/ssse3-psignw.c: Likewise.

Index: testsuite/gcc.target/i386/ssse3-phsubw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-phsubw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-phsubw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-phaddd.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-phaddd.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-phaddd.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-pabsb.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-pabsb.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-pabsb.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-psignb.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-psignb.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-psignb.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-phaddsw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-phaddsw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-phaddsw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-pabsd.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-pabsd.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-pabsd.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-psignd.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-psignd.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-psignd.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-pmaddubsw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-pmaddubsw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-pmaddubsw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-pmulhrsw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-pmulhrsw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-pmulhrsw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-phaddw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-phaddw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-phaddw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-phsubd.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-phsubd.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-phsubd.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-pabsw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-pabsw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-pabsw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-psignw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-psignw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-psignw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-pshufb.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-pshufb.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-pshufb.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-phsubsw.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-phsubsw.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-phsubsw.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"
Index: testsuite/gcc.target/i386/ssse3-palignr.c
===================================================================
--- testsuite/gcc.target/i386/ssse3-palignr.c	(revision 1871)
+++ testsuite/gcc.target/i386/ssse3-palignr.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ssse3 } */
-/* { dg-options "-O2 -mssse3" } */
+/* { dg-options "-O2 -fno-strict-aliasing -mssse3" } */
 
 #include "ssse3-check.h"
 #include "ssse3-vals.h"


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