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]

Run some more tests on x86_64 with -m32


We have a number of testcases that only run on i?86 platforms - but
x86_64 platforms using -m32 are the same.  I've changed the testcase
so that the tests are now run there as well.

Tested on Linux/x86-64 with/without -m32 runs.  Ok to commit?

This one fixes partially PR 20772.

Andreas

2005-05-26  Andreas Jaeger  <aj@suse.de>

        PR testsuite/20772
	* gfortran.dg/promotion.f90, gcc.misc-tests/i386-pf-3dnow-1.c,
	gcc.misc-tests/i386-pf-athlon-1.c,
	gcc.misc-tests/i386-pf-none-1.c, gcc.misc-tests/i386-pf-sse-1.c,
	g++.dg/opt/mmx1.C, g++.dg/other/big-struct.C,
	g++.dg/abi/bitfield3.C, g++.dg/abi/bitfield8.C,
	g++.dg/abi/bitfield9.C, g++.dg/abi/empty7.C, g++.dg/abi/empty9.C,
	g++.dg/abi/layout4.C, g++.dg/abi/thunk1.C, g++.dg/abi/thunk2.C,
	g++.dg/abi/vbase11.C, g++.dg/abi/vthunk2.C, g++.dg/abi/vthunk3.C,
	g++.dg/ext/attrib8.C: Run also on x86_64 compiling 32-bit x86
	programs.

	* g++.dg/opt/reg-stack4.C,g++.dg/eh/simd-1.C, g++.dg/eh/simd-1.C,
	gcc.dg/setjmp-2.c, gcc.dg/short-compare-1.c,
	gcc.dg/short-compare-2.c, gcc.target/i386/asm-1.c: Handle 32-bit
	x86-64 compilation.

	* g++.dg/warn/register-var-1.C, g++.dg/charset/asm2.c: Run also on
	x86_64.

	* gcc.dg/i386-pentium4-not-mull.c: Change option handling to use
	effective-target ilp32.

============================================================
Index: gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c
--- gcc.misc-tests/i386-pf-sse-1.c	17 Nov 2004 17:21:46 -0000	1.4
+++ gcc.misc-tests/i386-pf-sse-1.c	26 May 2005 15:12:56 -0000
@@ -1,8 +1,8 @@
 /* Test that the correct data prefetch instructions are generated for i386
    variants that use SSE prefetch instructions.  */
 
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ilp32 } */
 
 extern void exit (int);
 
============================================================
Index: gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c
--- gcc.misc-tests/i386-pf-none-1.c	17 Nov 2004 17:21:46 -0000	1.4
+++ gcc.misc-tests/i386-pf-none-1.c	26 May 2005 15:12:56 -0000
@@ -1,8 +1,8 @@
 /* Test that data prefetch instructions are not generated for i386 variants
    that do not support those instructions.  */
 
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ilp32 } */
 
 extern void exit (int);
 
============================================================
Index: gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c
--- gcc.misc-tests/i386-pf-athlon-1.c	17 Nov 2004 17:21:45 -0000	1.4
+++ gcc.misc-tests/i386-pf-athlon-1.c	26 May 2005 15:12:56 -0000
@@ -2,8 +2,8 @@
    variants that use 3DNow! prefetchw or SSE prefetch instructions with
    locality hints.  */
 
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ilp32 } */
 
 extern void exit (int);
 
============================================================
Index: gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c
--- gcc.misc-tests/i386-pf-3dnow-1.c	17 Nov 2004 17:21:45 -0000	1.4
+++ gcc.misc-tests/i386-pf-3dnow-1.c	26 May 2005 15:12:56 -0000
@@ -1,8 +1,8 @@
 /* Test that the correct data prefetch instructions are generated for i386
    variants that use 3DNow! prefetch instructions.  */
 
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-*} } */
+/* { dg-require-effective-target ilp32 } */
 
 extern void exit (int);
 
============================================================
Index: gcc/testsuite/g++.dg/abi/bitfield3.C
--- g++.dg/abi/bitfield3.C	17 Nov 2004 17:21:41 -0000	1.6
+++ g++.dg/abi/bitfield3.C	26 May 2005 15:12:56 -0000
@@ -1,10 +1,10 @@
 // Test for oversized bitfield alignment in structs on IA-32
-// { dg-do run { target i?86-*-* } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
 // { dg-options "-O2" }
 // Cygwin and mingw32 default to MASK_ALIGN_DOUBLE. Override to ensure
 // 4-byte alignment.
 // { dg-options "-mno-align-double" { target i?86-*-cygwin* i?86-*-mingw* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-require-effective-target ilp32 }
 
 struct A
 {
============================================================
Index: gcc/testsuite/g++.dg/abi/bitfield8.C
--- g++.dg/abi/bitfield8.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/bitfield8.C	26 May 2005 15:12:56 -0000
@@ -1,6 +1,7 @@
-// { dg-do run { target i?86-*-* } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
 // { dg-options "-fabi-version=0" }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-require-effective-target ilp32 }
+
 
 struct A { 
   virtual void f() {}
============================================================
Index: gcc/testsuite/g++.dg/abi/bitfield9.C
--- g++.dg/abi/bitfield9.C	7 Jan 2003 01:33:53 -0000	1.1
+++ g++.dg/abi/bitfield9.C	26 May 2005 15:12:56 -0000
@@ -1,4 +1,5 @@
-// { dg-do run { target i?86-*-* } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options -w }
 
 struct X {
============================================================
Index: gcc/testsuite/g++.dg/abi/dtor1.C
--- g++.dg/abi/dtor1.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/dtor1.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do compile { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-fabi-version=0" }
 
 struct A {
============================================================
Index: gcc/testsuite/g++.dg/abi/empty10.C
--- g++.dg/abi/empty10.C	17 Nov 2004 17:21:41 -0000	1.4
+++ g++.dg/abi/empty10.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do run { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-fabi-version=0 -w" }
 
 struct E {};
============================================================
Index: gcc/testsuite/g++.dg/abi/empty7.C
--- g++.dg/abi/empty7.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/empty7.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do run { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-fabi-version=0" }
 
 struct S1 {};
============================================================
Index: gcc/testsuite/g++.dg/abi/empty9.C
--- g++.dg/abi/empty9.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/empty9.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do run { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-w -fabi-version=0" }
 
 struct E1 {};
============================================================
Index: gcc/testsuite/g++.dg/abi/layout3.C
--- g++.dg/abi/layout3.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/layout3.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do run { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-fabi-version=0 -w" }
 
 struct S {
============================================================
Index: gcc/testsuite/g++.dg/abi/layout4.C
--- g++.dg/abi/layout4.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/layout4.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do run { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-fabi-version=1" }
 
 struct C4
============================================================
Index: gcc/testsuite/g++.dg/abi/thunk1.C
--- g++.dg/abi/thunk1.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/thunk1.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,6 @@
-// { dg-do compile { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
+
 
 struct A {
   virtual void f ();
============================================================
Index: gcc/testsuite/g++.dg/abi/thunk2.C
--- g++.dg/abi/thunk2.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/thunk2.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do compile { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options -w }
 
 struct A {
============================================================
Index: gcc/testsuite/g++.dg/abi/vbase11.C
--- g++.dg/abi/vbase11.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/vbase11.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do run { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-fabi-version=0" }
 
 struct A { virtual void f(); char c1; };
============================================================
Index: gcc/testsuite/g++.dg/abi/vthunk2.C
--- g++.dg/abi/vthunk2.C	17 Nov 2004 17:21:41 -0000	1.3
+++ g++.dg/abi/vthunk2.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do compile { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do compile { target i?86-*-* x86_64-*-*} }
+// { dg-require-effective-target ilp32 }
 
 struct c0 {
   virtual void f ();
============================================================
Index: gcc/testsuite/g++.dg/abi/vthunk3.C
--- g++.dg/abi/vthunk3.C	17 Nov 2004 17:21:41 -0000	1.4
+++ g++.dg/abi/vthunk3.C	26 May 2005 15:12:56 -0000
@@ -1,5 +1,5 @@
-// { dg-do compile { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 // { dg-options "-fabi-version=0" }
 
 struct A {
============================================================
Index: gcc/testsuite/g++.dg/charset/asm2.c
--- g++.dg/charset/asm2.c	22 Feb 2005 11:36:36 -0000	1.3
+++ g++.dg/charset/asm2.c	26 May 2005 15:12:56 -0000
@@ -1,6 +1,6 @@
 /* Test for complex asm statements. Make sure it compiles
    then test for some of the asm statements not being translated.  */
-/* { dg-do compile { target i?86-*-* } }
+/* { dg-do compile { target i?86-*-* x86_64-*-* } }
    { dg-require-iconv "IBM1047" }
    { dg-final { scan-assembler "std" } }
    { dg-final { scan-assembler "cld" } }
============================================================
Index: gcc/testsuite/g++.dg/ext/attrib8.C
--- g++.dg/ext/attrib8.C	17 Nov 2004 17:21:42 -0000	1.5
+++ g++.dg/ext/attrib8.C	26 May 2005 15:12:56 -0000
@@ -1,6 +1,6 @@
 // PR 8656
-// { dg-do compile { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 
 extern int * (__attribute__((stdcall)) *fooPtr)( void);
 int * __attribute__((stdcall)) myFn01( void) { return 0; }
============================================================
Index: gcc/testsuite/g++.dg/opt/mmx1.C
--- g++.dg/opt/mmx1.C	21 Feb 2002 21:16:22 -0000	1.1
+++ g++.dg/opt/mmx1.C	26 May 2005 15:12:56 -0000
@@ -4,6 +4,7 @@
 // { dg-do compile }
 // { dg-options "-O2" }
 // { dg-options "-fno-exceptions -O2 -mmmx -fPIC" { target i?86-*-*  } }
+// { dg-options "-fno-exceptions -O2 -mmmx -fPIC" { target { x86_64-*-* && ilp32 } } }
 
 struct A {
   unsigned a0;
============================================================
Index: gcc/testsuite/g++.dg/opt/reg-stack4.C
--- g++.dg/opt/reg-stack4.C	17 Nov 2004 17:21:43 -0000	1.3
+++ g++.dg/opt/reg-stack4.C	26 May 2005 15:12:56 -0000
@@ -5,8 +5,8 @@
 // deleted a valid edge.
 
 // { dg-do compile }
-// { dg-options "-mtune=i586 -O2" { target i?86-*-* } }
-// { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } }
+// { dg-options "-mtune=i586 -O2" { target { i?86-*-* && ilp32 } } }
+// { dg-options "-mtune=i586 -O2" { target { x86_64-*-* && ilp32 } } }
 
 struct array {
   double data;
============================================================
Index: gcc/testsuite/g++.dg/other/big-struct.C
--- g++.dg/other/big-struct.C	14 Apr 2002 20:55:48 -0000	1.2
+++ g++.dg/other/big-struct.C	26 May 2005 15:12:56 -0000
@@ -1,4 +1,5 @@
-// { dg-do compile { target i?86-*-* } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
 
 struct A
 {
============================================================
Index: gcc/testsuite/g++.dg/warn/register-var-1.C
--- g++.dg/warn/register-var-1.C	10 Nov 2004 21:09:58 -0000	1.1
+++ g++.dg/warn/register-var-1.C	26 May 2005 15:12:56 -0000
@@ -1,6 +1,6 @@
 /* PR/18160 */
 
-/* { dg-do compile { target i?86-*-* } } */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 
 /* This should yield an error even without -pedantic.  */
 /* { dg-options "-ansi" } */

============================================================
Index: gcc/testsuite/g++.dg/eh/simd-1.C
--- g++.dg/eh/simd-1.C	16 Mar 2004 20:37:28 -0000	1.7
+++ g++.dg/eh/simd-1.C	26 May 2005 15:52:55 -0000
@@ -2,6 +2,7 @@
 // Contributed by Aldy Hernandez (aldy@quesejoda.com).
 // { dg-options "-O" }
 // { dg-options "-O -w" { target i?86-*-* } }
+// { dg-options "-O -w" { target { x86_64-*-* && ilp32 } } }
 // { dg-do run }
 
 typedef int __attribute__((vector_size (8))) vecint;
============================================================
Index: gcc/testsuite/g++.dg/eh/simd-2.C
--- g++.dg/eh/simd-2.C	1 Feb 2005 21:33:28 -0000	1.10
+++ g++.dg/eh/simd-2.C	26 May 2005 15:52:55 -0000
@@ -2,6 +2,7 @@
 // Contributed by Aldy Hernandez (aldy@quesejoda.com).
 // { dg-options "-O" }
 // { dg-options "-O -w" { target i?86-*-* } }
+// { dg-options "-O -w" { target { x86_64-*-* && ilp32 } } }
 // { dg-options "-O -w -maltivec" { target powerpc*-*-linux* } }
 // { dg-do run }
 
============================================================
Index: gcc/testsuite/./gcc.dg/setjmp-2.c
--- ./gcc.dg/setjmp-2.c	23 Nov 2004 13:08:32 -0000	1.1
+++ ./gcc.dg/setjmp-2.c	26 May 2005 16:29:28 -0000
@@ -1,8 +1,8 @@
 /* PR middle-end/17813 */
 /* Origin: Tom Hughes <tom@compton.nu> */
 /* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O -fomit-frame-pointer -march=i386" { target i?86-*-linux* } } */
-/* { dg-options "-O -fomit-frame-pointer -m32 -march=i386" { target x86_64-*-linux* } } */
+/* { dg-options "-O -fomit-frame-pointer -march=i386" { target { i?86-*-linux* && ilp32 } } } */
+/* { dg-options "-O -fomit-frame-pointer -march=i386" { target { x86_64-*-linux* && ilp32 } } } */
 
 #include <setjmp.h>
 #include <signal.h>
============================================================
Index: gcc/testsuite/./gcc.dg/short-compare-1.c
--- ./gcc.dg/short-compare-1.c	6 Apr 2005 17:07:07 -0000	1.2
+++ ./gcc.dg/short-compare-1.c	26 May 2005 16:29:28 -0000
@@ -4,7 +4,7 @@
 /* { dg-do run } */
 /* { dg-options "-O" } */
 /* { dg-options "-O -mtune=i686" { target { i?86-*-* && ilp32 } } } */
-/* { dg-options "-O -m32 -mtune=i686" { target x86_64-*-* } } */
+/* { dg-options "-O -mtune=i686" { target { x86_64-*-* && ilp32 } } } */
 
 extern void abort(void);
 
============================================================
Index: gcc/testsuite/./gcc.dg/short-compare-2.c
--- ./gcc.dg/short-compare-2.c	6 Apr 2005 17:07:07 -0000	1.2
+++ ./gcc.dg/short-compare-2.c	26 May 2005 16:29:28 -0000
@@ -5,7 +5,7 @@
 /* { dg-do run } */
 /* { dg-options "-O" } */
 /* { dg-options "-O -mtune=i686" { target { i?86-*-* && ilp32 } } } */
-/* { dg-options "-O -m32 -mtune=i686" { target x86_64-*-* } } */
+/* { dg-options "-O -mtune=i686" { target { x86_64-*-* && ilp32 } } } */
 
 extern void abort();
 
============================================================
Index: gcc/testsuite/gcc.target/i386/asm-1.c
--- gcc.target/i386/asm-1.c	3 May 2005 17:00:59 -0000	1.2
+++ gcc.target/i386/asm-1.c	26 May 2005 16:34:23 -0000
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-m32" } */
+/* { dg-require-effective-target ilp32 } */
 
 register unsigned int EAX asm ("r14"); /* { dg-error "register name" } */
 
============================================================
Index: gcc/testsuite/./gcc.dg/i386-pentium4-not-mull.c
--- ./gcc.dg/i386-pentium4-not-mull.c	17 Nov 2004 17:21:44 -0000	1.4
+++ ./gcc.dg/i386-pentium4-not-mull.c	26 May 2005 16:37:12 -0000
@@ -1,7 +1,6 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -march=pentium4" { target i?86-*-* } } */
-/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
-/* { dg-options "-O2 -march=pentium4 -m32" { target x86_64-*-* } } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -march=pentium4" } */
 /* { dg-final { scan-assembler-not "imull" } } */
 
 /* Should be done not using imull.  */

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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