From bf0fdfdd54137ac3b05572176ca54934f102cd77 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Fri, 12 Nov 2004 22:22:16 +0000 Subject: [PATCH] gcc-dg.exp (dg-forbid-option): New function. 2004-11-12 Mark Mitchell * lib/gcc-dg.exp (dg-forbid-option): New function. * g++.dg/abi/bitfield3.C: Use dg-forbid-option -m64. * g++.dg/abi/bitfield8.C: Likewise. * g++.dg/abi/dtor1.C: Likewise. * g++.dg/abi/empty10.C: Likewise. * g++.dg/abi/empty7.C: Likewise. * g++.dg/abi/empty9.C: Likewise. * g++.dg/abi/layout3.C: Likewise. * g++.dg/abi/layout4.C: Likewise. * g++.dg/abi/thunk1.C: Likewise. * g++.dg/abi/thunk2.C: Likewise. * g++.dg/abi/vbase11.C: Likewise. * g++.dg/abi/vthunk2.C: Likewise. * g++.dg/abi/vthunk3.C: Likewise. * g++.dg/ext/attrib8.C: Likewise. * g++.dg/opt/longbranch2.C: Likewise. * g++.dg/opt/reg-stack4.C: Likewise. * g++.old-deja/g++.ext/attrib1.C: Likewise. * g++.old-deja/g++.ext/attrib2.C: Likewise. * g++.old-deja/g++.ext/attrib3.C: Likewise. * g++.old-deja/g++.other/store-expr1.C: Likewise. * g++.old-deja/g++.other/store-expr2.C: Likewise. * gcc.dg/20000609-1.c: Likewise. * gcc.dg/20000720-1.c: Likewise. * gcc.dg/20011107-1.c: Likewise. * gcc.dg/20011119-1.c: Likewise. * gcc.dg/20020108-1.c: Likewise. * gcc.dg/20020122-2.c: Likewise. * gcc.dg/20020122-3.c: Likewise. * gcc.dg/20020201-3.c: Likewise. * gcc.dg/20020206-1.c: Likewise. * gcc.dg/20020218-1.c: Likewise. * gcc.dg/20020310-1.c: Likewise. * gcc.dg/20020411-1.c: Likewise. * gcc.dg/20020418-2.c: Likewise. * gcc.dg/20020426-1.c: Likewise. * gcc.dg/20020426-2.c: Likewise. * gcc.dg/20020517-1.c: Likewise. * gcc.dg/20020523-1.c: Likewise. * gcc.dg/20020523-2.c: Likewise. * gcc.dg/20020729-1.c: Likewise. * gcc.dg/20030204-1.c: Likewise. * gcc.dg/20030826-2.c: Likewise. * gcc.dg/20030926-1.c: Likewise. * gcc.dg/20031202-1.c: Likewise. * gcc.dg/980312-1.c: Likewise. * gcc.dg/980313-1.c: Likewise. * gcc.dg/990117-1.c: Likewise. * gcc.dg/990424-1.c: Likewise. * gcc.dg/990524-1.c: Likewise. * gcc.dg/991230-1.c: Likewise. * gcc.dg/i386-387-1.c: Likewise. * gcc.dg/i386-387-2.c: Likewise. * gcc.dg/i386-387-3.c: Likewise. * gcc.dg/i386-387-4.c: Likewise. * gcc.dg/i386-387-5.c: Likewise. * gcc.dg/i386-387-6.c: Likewise. * gcc.dg/i386-asm-1.c: Likewise. * gcc.dg/i386-bitfield1.c: Likewise. * gcc.dg/i386-bitfield2.c: Likewise. * gcc.dg/i386-loop-1.c: Likewise. * gcc.dg/i386-loop-2.c: Likewise. * gcc.dg/i386-loop-3.c: Likewise. * gcc.dg/i386-pentium4-not-mull.c: Likewise. * gcc.dg/i386-pic-1.c: Likewise. * gcc.dg/i386-regparm.c: Likewise. * gcc.dg/i386-signbit-1.c: Likewise. * gcc.dg/i386-signbit-2.c: Likewise. * gcc.dg/i386-signbit-3.c: Likewise. * gcc.dg/i386-sse-5.c: Likewise. * gcc.dg/i386-sse-8.c: Likewise. * gcc.dg/i386-unroll-1.c: Likewise. * gcc.dg/tls/opt-1.c: Likewise. * gcc.dg/tls/opt-2.c: Likewise. * gcc.dg/unroll-1.c: Likewise. * gcc.misc-tests/i386-pf-3dnow-1.c: Likewise. * gcc.misc-tests/i386-pf-athlon-1.c: Likewise. * gcc.misc-tests/i386-pf-none-1.c: Likewise. * gcc.misc-tests/i386-pf-sse-1.c: Likewise. * gcc.c-torture/execute/20010129-1.x: Do not use -mtune=i686 when -m64 is specified. From-SVN: r90549 --- gcc/testsuite/ChangeLog | 84 +++++++++++++++++++ gcc/testsuite/g++.dg/abi/bitfield3.C | 1 + gcc/testsuite/g++.dg/abi/bitfield8.C | 1 + gcc/testsuite/g++.dg/abi/dtor1.C | 1 + gcc/testsuite/g++.dg/abi/empty10.C | 1 + gcc/testsuite/g++.dg/abi/empty7.C | 1 + gcc/testsuite/g++.dg/abi/empty9.C | 1 + gcc/testsuite/g++.dg/abi/layout3.C | 1 + gcc/testsuite/g++.dg/abi/layout4.C | 1 + gcc/testsuite/g++.dg/abi/thunk1.C | 1 + gcc/testsuite/g++.dg/abi/thunk2.C | 1 + gcc/testsuite/g++.dg/abi/vbase11.C | 1 + gcc/testsuite/g++.dg/abi/vthunk2.C | 1 + gcc/testsuite/g++.dg/abi/vthunk3.C | 1 + gcc/testsuite/g++.dg/ext/attrib8.C | 1 + gcc/testsuite/g++.dg/opt/longbranch2.C | 1 + gcc/testsuite/g++.dg/opt/reg-stack4.C | 1 + gcc/testsuite/g++.old-deja/g++.ext/attrib1.C | 1 + gcc/testsuite/g++.old-deja/g++.ext/attrib2.C | 1 + gcc/testsuite/g++.old-deja/g++.ext/attrib3.C | 1 + .../g++.old-deja/g++.other/store-expr1.C | 1 + .../g++.old-deja/g++.other/store-expr2.C | 1 + .../gcc.c-torture/execute/20010129-1.x | 11 ++- gcc/testsuite/gcc.dg/20000609-1.c | 1 + gcc/testsuite/gcc.dg/20000720-1.c | 1 + gcc/testsuite/gcc.dg/20011107-1.c | 1 + gcc/testsuite/gcc.dg/20011119-1.c | 1 + gcc/testsuite/gcc.dg/20020108-1.c | 1 + gcc/testsuite/gcc.dg/20020122-2.c | 1 + gcc/testsuite/gcc.dg/20020122-3.c | 1 + gcc/testsuite/gcc.dg/20020201-3.c | 1 + gcc/testsuite/gcc.dg/20020206-1.c | 1 + gcc/testsuite/gcc.dg/20020218-1.c | 1 + gcc/testsuite/gcc.dg/20020310-1.c | 1 + gcc/testsuite/gcc.dg/20020411-1.c | 1 + gcc/testsuite/gcc.dg/20020418-2.c | 1 + gcc/testsuite/gcc.dg/20020426-1.c | 1 + gcc/testsuite/gcc.dg/20020426-2.c | 1 + gcc/testsuite/gcc.dg/20020517-1.c | 1 + gcc/testsuite/gcc.dg/20020523-1.c | 1 + gcc/testsuite/gcc.dg/20020523-2.c | 1 + gcc/testsuite/gcc.dg/20020729-1.c | 1 + gcc/testsuite/gcc.dg/20030204-1.c | 1 + gcc/testsuite/gcc.dg/20030826-2.c | 1 + gcc/testsuite/gcc.dg/20030926-1.c | 1 + gcc/testsuite/gcc.dg/20031202-1.c | 1 + gcc/testsuite/gcc.dg/980312-1.c | 1 + gcc/testsuite/gcc.dg/980313-1.c | 1 + gcc/testsuite/gcc.dg/990117-1.c | 1 + gcc/testsuite/gcc.dg/990424-1.c | 1 + gcc/testsuite/gcc.dg/990524-1.c | 1 + gcc/testsuite/gcc.dg/991230-1.c | 1 + gcc/testsuite/gcc.dg/i386-387-1.c | 1 + gcc/testsuite/gcc.dg/i386-387-2.c | 1 + gcc/testsuite/gcc.dg/i386-387-3.c | 1 + gcc/testsuite/gcc.dg/i386-387-4.c | 1 + gcc/testsuite/gcc.dg/i386-387-5.c | 1 + gcc/testsuite/gcc.dg/i386-387-6.c | 1 + gcc/testsuite/gcc.dg/i386-asm-1.c | 1 + gcc/testsuite/gcc.dg/i386-bitfield1.c | 1 + gcc/testsuite/gcc.dg/i386-bitfield2.c | 1 + gcc/testsuite/gcc.dg/i386-loop-1.c | 1 + gcc/testsuite/gcc.dg/i386-loop-2.c | 1 + gcc/testsuite/gcc.dg/i386-loop-3.c | 1 + gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c | 1 + gcc/testsuite/gcc.dg/i386-pic-1.c | 1 + gcc/testsuite/gcc.dg/i386-regparm.c | 1 + gcc/testsuite/gcc.dg/i386-signbit-1.c | 1 + gcc/testsuite/gcc.dg/i386-signbit-2.c | 1 + gcc/testsuite/gcc.dg/i386-signbit-3.c | 1 + gcc/testsuite/gcc.dg/i386-sse-5.c | 1 + gcc/testsuite/gcc.dg/i386-sse-8.c | 1 + gcc/testsuite/gcc.dg/i386-unroll-1.c | 1 + gcc/testsuite/gcc.dg/tls/opt-1.c | 1 + gcc/testsuite/gcc.dg/tls/opt-2.c | 1 + gcc/testsuite/gcc.dg/unroll-1.c | 1 + .../gcc.misc-tests/i386-pf-3dnow-1.c | 1 + .../gcc.misc-tests/i386-pf-athlon-1.c | 1 + gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c | 1 + gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c | 1 + gcc/testsuite/lib/gcc-dg.exp | 31 +++++++ 81 files changed, 203 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 10bac622f80..a2d6a24a205 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,87 @@ +2004-11-12 Mark Mitchell + + * lib/gcc-dg.exp (dg-forbid-option): New function. + * g++.dg/abi/bitfield3.C: Use dg-forbid-option -m64. + * g++.dg/abi/bitfield8.C: Likewise. + * g++.dg/abi/dtor1.C: Likewise. + * g++.dg/abi/empty10.C: Likewise. + * g++.dg/abi/empty7.C: Likewise. + * g++.dg/abi/empty9.C: Likewise. + * g++.dg/abi/layout3.C: Likewise. + * g++.dg/abi/layout4.C: Likewise. + * g++.dg/abi/thunk1.C: Likewise. + * g++.dg/abi/thunk2.C: Likewise. + * g++.dg/abi/vbase11.C: Likewise. + * g++.dg/abi/vthunk2.C: Likewise. + * g++.dg/abi/vthunk3.C: Likewise. + * g++.dg/ext/attrib8.C: Likewise. + * g++.dg/opt/longbranch2.C: Likewise. + * g++.dg/opt/reg-stack4.C: Likewise. + * g++.old-deja/g++.ext/attrib1.C: Likewise. + * g++.old-deja/g++.ext/attrib2.C: Likewise. + * g++.old-deja/g++.ext/attrib3.C: Likewise. + * g++.old-deja/g++.other/store-expr1.C: Likewise. + * g++.old-deja/g++.other/store-expr2.C: Likewise. + * gcc.dg/20000609-1.c: Likewise. + * gcc.dg/20000720-1.c: Likewise. + * gcc.dg/20011107-1.c: Likewise. + * gcc.dg/20011119-1.c: Likewise. + * gcc.dg/20020108-1.c: Likewise. + * gcc.dg/20020122-2.c: Likewise. + * gcc.dg/20020122-3.c: Likewise. + * gcc.dg/20020201-3.c: Likewise. + * gcc.dg/20020206-1.c: Likewise. + * gcc.dg/20020218-1.c: Likewise. + * gcc.dg/20020310-1.c: Likewise. + * gcc.dg/20020411-1.c: Likewise. + * gcc.dg/20020418-2.c: Likewise. + * gcc.dg/20020426-1.c: Likewise. + * gcc.dg/20020426-2.c: Likewise. + * gcc.dg/20020517-1.c: Likewise. + * gcc.dg/20020523-1.c: Likewise. + * gcc.dg/20020523-2.c: Likewise. + * gcc.dg/20020729-1.c: Likewise. + * gcc.dg/20030204-1.c: Likewise. + * gcc.dg/20030826-2.c: Likewise. + * gcc.dg/20030926-1.c: Likewise. + * gcc.dg/20031202-1.c: Likewise. + * gcc.dg/980312-1.c: Likewise. + * gcc.dg/980313-1.c: Likewise. + * gcc.dg/990117-1.c: Likewise. + * gcc.dg/990424-1.c: Likewise. + * gcc.dg/990524-1.c: Likewise. + * gcc.dg/991230-1.c: Likewise. + * gcc.dg/i386-387-1.c: Likewise. + * gcc.dg/i386-387-2.c: Likewise. + * gcc.dg/i386-387-3.c: Likewise. + * gcc.dg/i386-387-4.c: Likewise. + * gcc.dg/i386-387-5.c: Likewise. + * gcc.dg/i386-387-6.c: Likewise. + * gcc.dg/i386-asm-1.c: Likewise. + * gcc.dg/i386-bitfield1.c: Likewise. + * gcc.dg/i386-bitfield2.c: Likewise. + * gcc.dg/i386-loop-1.c: Likewise. + * gcc.dg/i386-loop-2.c: Likewise. + * gcc.dg/i386-loop-3.c: Likewise. + * gcc.dg/i386-pentium4-not-mull.c: Likewise. + * gcc.dg/i386-pic-1.c: Likewise. + * gcc.dg/i386-regparm.c: Likewise. + * gcc.dg/i386-signbit-1.c: Likewise. + * gcc.dg/i386-signbit-2.c: Likewise. + * gcc.dg/i386-signbit-3.c: Likewise. + * gcc.dg/i386-sse-5.c: Likewise. + * gcc.dg/i386-sse-8.c: Likewise. + * gcc.dg/i386-unroll-1.c: Likewise. + * gcc.dg/tls/opt-1.c: Likewise. + * gcc.dg/tls/opt-2.c: Likewise. + * gcc.dg/unroll-1.c: Likewise. + * gcc.misc-tests/i386-pf-3dnow-1.c: Likewise. + * gcc.misc-tests/i386-pf-athlon-1.c: Likewise. + * gcc.misc-tests/i386-pf-none-1.c: Likewise. + * gcc.misc-tests/i386-pf-sse-1.c: Likewise. + * gcc.c-torture/execute/20010129-1.x: Do not use -mtune=i686 when + -m64 is specified. + 2004-11-12 Mark Mitchell PR c++/18389 diff --git a/gcc/testsuite/g++.dg/abi/bitfield3.C b/gcc/testsuite/g++.dg/abi/bitfield3.C index 5eefe97bb7b..5ff310bc738 100644 --- a/gcc/testsuite/g++.dg/abi/bitfield3.C +++ b/gcc/testsuite/g++.dg/abi/bitfield3.C @@ -4,6 +4,7 @@ // 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-forbid-option "-m64" } struct A { diff --git a/gcc/testsuite/g++.dg/abi/bitfield8.C b/gcc/testsuite/g++.dg/abi/bitfield8.C index 8195fda631d..64ec0f735cb 100644 --- a/gcc/testsuite/g++.dg/abi/bitfield8.C +++ b/gcc/testsuite/g++.dg/abi/bitfield8.C @@ -1,5 +1,6 @@ // { dg-do run { target i?86-*-* } } // { dg-options "-fabi-version=0" } +// { dg-forbid-option "-m64" } struct A { virtual void f() {} diff --git a/gcc/testsuite/g++.dg/abi/dtor1.C b/gcc/testsuite/g++.dg/abi/dtor1.C index 48b0a557127..429b39e098d 100644 --- a/gcc/testsuite/g++.dg/abi/dtor1.C +++ b/gcc/testsuite/g++.dg/abi/dtor1.C @@ -1,4 +1,5 @@ // { dg-do compile { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-fabi-version=0" } struct A { diff --git a/gcc/testsuite/g++.dg/abi/empty10.C b/gcc/testsuite/g++.dg/abi/empty10.C index 970afbaf512..af2ba9c7e82 100644 --- a/gcc/testsuite/g++.dg/abi/empty10.C +++ b/gcc/testsuite/g++.dg/abi/empty10.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-fabi-version=0 -w" } struct E {}; diff --git a/gcc/testsuite/g++.dg/abi/empty7.C b/gcc/testsuite/g++.dg/abi/empty7.C index 4b1ac3b2c2c..7cc6510046e 100644 --- a/gcc/testsuite/g++.dg/abi/empty7.C +++ b/gcc/testsuite/g++.dg/abi/empty7.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-fabi-version=0" } struct S1 {}; diff --git a/gcc/testsuite/g++.dg/abi/empty9.C b/gcc/testsuite/g++.dg/abi/empty9.C index 757bf6c8690..10ebedfdc3b 100644 --- a/gcc/testsuite/g++.dg/abi/empty9.C +++ b/gcc/testsuite/g++.dg/abi/empty9.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-w -fabi-version=0" } struct E1 {}; diff --git a/gcc/testsuite/g++.dg/abi/layout3.C b/gcc/testsuite/g++.dg/abi/layout3.C index 6ab6d6b4dc3..a2e94f693a5 100644 --- a/gcc/testsuite/g++.dg/abi/layout3.C +++ b/gcc/testsuite/g++.dg/abi/layout3.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-fabi-version=0 -w" } struct S { diff --git a/gcc/testsuite/g++.dg/abi/layout4.C b/gcc/testsuite/g++.dg/abi/layout4.C index a1d27ee7f43..105c74b95c7 100644 --- a/gcc/testsuite/g++.dg/abi/layout4.C +++ b/gcc/testsuite/g++.dg/abi/layout4.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-fabi-version=1" } struct C4 diff --git a/gcc/testsuite/g++.dg/abi/thunk1.C b/gcc/testsuite/g++.dg/abi/thunk1.C index c9ad5b478f9..0ba7ce76102 100644 --- a/gcc/testsuite/g++.dg/abi/thunk1.C +++ b/gcc/testsuite/g++.dg/abi/thunk1.C @@ -1,4 +1,5 @@ // { dg-do compile { target i?86-*-* } } +// { dg-forbid-option "-m64" } struct A { virtual void f (); diff --git a/gcc/testsuite/g++.dg/abi/thunk2.C b/gcc/testsuite/g++.dg/abi/thunk2.C index b1c9788e6d0..e6774194e95 100644 --- a/gcc/testsuite/g++.dg/abi/thunk2.C +++ b/gcc/testsuite/g++.dg/abi/thunk2.C @@ -1,4 +1,5 @@ // { dg-do compile { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options -w } struct A { diff --git a/gcc/testsuite/g++.dg/abi/vbase11.C b/gcc/testsuite/g++.dg/abi/vbase11.C index 375577365a3..974f56216a8 100644 --- a/gcc/testsuite/g++.dg/abi/vbase11.C +++ b/gcc/testsuite/g++.dg/abi/vbase11.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-fabi-version=0" } struct A { virtual void f(); char c1; }; diff --git a/gcc/testsuite/g++.dg/abi/vthunk2.C b/gcc/testsuite/g++.dg/abi/vthunk2.C index 2499749d64c..314f5980f7a 100644 --- a/gcc/testsuite/g++.dg/abi/vthunk2.C +++ b/gcc/testsuite/g++.dg/abi/vthunk2.C @@ -1,4 +1,5 @@ // { dg-do compile { target i?86-*-* } } +// { dg-forbid-option "-m64" } struct c0 { virtual void f (); diff --git a/gcc/testsuite/g++.dg/abi/vthunk3.C b/gcc/testsuite/g++.dg/abi/vthunk3.C index 3bd2fd40a18..bc677df1c3d 100644 --- a/gcc/testsuite/g++.dg/abi/vthunk3.C +++ b/gcc/testsuite/g++.dg/abi/vthunk3.C @@ -1,4 +1,5 @@ // { dg-do compile { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-fabi-version=0" } struct A { diff --git a/gcc/testsuite/g++.dg/ext/attrib8.C b/gcc/testsuite/g++.dg/ext/attrib8.C index 26021c56ca4..0b162e32e93 100644 --- a/gcc/testsuite/g++.dg/ext/attrib8.C +++ b/gcc/testsuite/g++.dg/ext/attrib8.C @@ -1,5 +1,6 @@ // PR 8656 // { dg-do compile { target i?86-*-* } } +// { dg-forbid-option "-m64" } extern int * (__attribute__((stdcall)) *fooPtr)( void); int * __attribute__((stdcall)) myFn01( void) { return 0; } diff --git a/gcc/testsuite/g++.dg/opt/longbranch2.C b/gcc/testsuite/g++.dg/opt/longbranch2.C index b74ceddf085..2ada1980cf9 100644 --- a/gcc/testsuite/g++.dg/opt/longbranch2.C +++ b/gcc/testsuite/g++.dg/opt/longbranch2.C @@ -3,6 +3,7 @@ // { dg-do compile } // { dg-options "-O3 -funroll-loops -mtune=k6 -fomit-frame-pointer" { target i?86-*-* } } +// { dg-forbid-option "-m64" { target i?86-*-* } } // This used to fail to assemble because of an out-of-range 'loop' instructions. diff --git a/gcc/testsuite/g++.dg/opt/reg-stack4.C b/gcc/testsuite/g++.dg/opt/reg-stack4.C index 7b461d8a6f3..5db14159bd1 100644 --- a/gcc/testsuite/g++.dg/opt/reg-stack4.C +++ b/gcc/testsuite/g++.dg/opt/reg-stack4.C @@ -6,6 +6,7 @@ // { dg-do compile } // { dg-options "-mtune=i586 -O2" { target i?86-*-* } } +// { dg-forbid-option "-m64" { target i?86-*-* } } struct array { double data; diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib1.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib1.C index 3947e904f5f..0d66d72ebc6 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/attrib1.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib1.C @@ -1,4 +1,5 @@ // { dg-do assemble { target i?86-*-* } } +// { dg-forbid-option "-m64" } // Test for using prefix attributes in a parameter decl. // Contributed by Jason Merrill diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib2.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib2.C index 0979e168abb..abac1b322cf 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/attrib2.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib2.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // Test that stdcall doesn't prevent us from using op delete. // Contributed by Jason Merrill diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib3.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib3.C index aff745e527c..f47ab074e45 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/attrib3.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib3.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // Test for proper handling of attributes in template instantiation. // Contributed by Jason Merrill diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C index f3a682d77f6..153c8810703 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-mtune=i686 -O2 -fpic" } // { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } class G {}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C index 430a2c6c1f6..651f81d8d80 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C +++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C @@ -1,4 +1,5 @@ // { dg-do run { target i?86-*-* } } +// { dg-forbid-option "-m64" } // { dg-options "-mtune=i686 -O2" } class G {}; diff --git a/gcc/testsuite/gcc.c-torture/execute/20010129-1.x b/gcc/testsuite/gcc.c-torture/execute/20010129-1.x index d35a7a62c53..7e474c45348 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20010129-1.x +++ b/gcc/testsuite/gcc.c-torture/execute/20010129-1.x @@ -1,4 +1,13 @@ +# Use "-mtune=i686" on i?86-*-* unless "-m64" is specified. if { [istarget "i?86-*-*"] } { - set additional_flags "-mtune=i686" + set target_name [target_info name] + if {[board_info $target_name exists multilib_flags]} { + set multilib_flags [board_info $target_name multilib_flags] + if { ![regexp -- "-m64" $multilib_flags] } { + set additional_flags "-mtune=i686" + } + } else { + set additional_flags "-mtune=i686" + } } return 0 diff --git a/gcc/testsuite/gcc.dg/20000609-1.c b/gcc/testsuite/gcc.dg/20000609-1.c index 568ca5c1596..2f0f783cfab 100644 --- a/gcc/testsuite/gcc.dg/20000609-1.c +++ b/gcc/testsuite/gcc.dg/20000609-1.c @@ -1,5 +1,6 @@ /* { dg-do run { target i?86-*-* } } */ /* { dg-options "-O1 -ffast-math -march=i686" } */ +/* { dg-forbid-option "-m64" } */ /* Sanity check for fp_jcc_* with TARGET_CMOVE. */ diff --git a/gcc/testsuite/gcc.dg/20000720-1.c b/gcc/testsuite/gcc.dg/20000720-1.c index 92b52fb1d3b..dc3fb25b9d8 100644 --- a/gcc/testsuite/gcc.dg/20000720-1.c +++ b/gcc/testsuite/gcc.dg/20000720-1.c @@ -1,4 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-mpreferred-stack-boundary=2 -march=i586 -O2 -fomit-frame-pointer" } */ extern void *foo(void *a, const void *b, unsigned c); diff --git a/gcc/testsuite/gcc.dg/20011107-1.c b/gcc/testsuite/gcc.dg/20011107-1.c index 395de3dae34..b61de6cb514 100644 --- a/gcc/testsuite/gcc.dg/20011107-1.c +++ b/gcc/testsuite/gcc.dg/20011107-1.c @@ -1,4 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -mtune=k6" } */ void diff --git a/gcc/testsuite/gcc.dg/20011119-1.c b/gcc/testsuite/gcc.dg/20011119-1.c index 0df09a3f778..67525b9aaa7 100644 --- a/gcc/testsuite/gcc.dg/20011119-1.c +++ b/gcc/testsuite/gcc.dg/20011119-1.c @@ -1,5 +1,6 @@ /* Test for reload failing to eliminate from argp to sp. */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ static int ustrsize (const char *s); diff --git a/gcc/testsuite/gcc.dg/20020108-1.c b/gcc/testsuite/gcc.dg/20020108-1.c index 08baa076ec1..6cabb502783 100644 --- a/gcc/testsuite/gcc.dg/20020108-1.c +++ b/gcc/testsuite/gcc.dg/20020108-1.c @@ -6,6 +6,7 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mtune=i686" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ void foo (unsigned short *cp) diff --git a/gcc/testsuite/gcc.dg/20020122-2.c b/gcc/testsuite/gcc.dg/20020122-2.c index 2115a22ad6a..d6062b58b34 100644 --- a/gcc/testsuite/gcc.dg/20020122-2.c +++ b/gcc/testsuite/gcc.dg/20020122-2.c @@ -4,6 +4,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fprefetch-loop-arrays -w" } */ /* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ extern int access( char* ); extern int a(); diff --git a/gcc/testsuite/gcc.dg/20020122-3.c b/gcc/testsuite/gcc.dg/20020122-3.c index 3b2a371282e..77b70353f11 100644 --- a/gcc/testsuite/gcc.dg/20020122-3.c +++ b/gcc/testsuite/gcc.dg/20020122-3.c @@ -5,6 +5,7 @@ /* { dg-do compile } */ /* { dg-options "-Os -fprefetch-loop-arrays -w" } */ /* { dg-options "-Os -fprefetch-loop-arrays -mtune=pentium3 -w" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ int foo (int *p, int n) { diff --git a/gcc/testsuite/gcc.dg/20020201-3.c b/gcc/testsuite/gcc.dg/20020201-3.c index 67e9a8a76e4..1d93475b0a2 100644 --- a/gcc/testsuite/gcc.dg/20020201-3.c +++ b/gcc/testsuite/gcc.dg/20020201-3.c @@ -1,6 +1,7 @@ /* This testcase ICEd because a SFmode variable was given a MMX register for which there is no movsf exists. */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=i686 -mmmx -fno-strict-aliasing" } */ struct A { unsigned int a, b; }; diff --git a/gcc/testsuite/gcc.dg/20020206-1.c b/gcc/testsuite/gcc.dg/20020206-1.c index 724c03ab24b..643c4394d65 100644 --- a/gcc/testsuite/gcc.dg/20020206-1.c +++ b/gcc/testsuite/gcc.dg/20020206-1.c @@ -5,6 +5,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fprefetch-loop-arrays -w" } */ /* { dg-options "-O2 -fprefetch-loop-arrays -mtune=pentium3 -w" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ struct reload { diff --git a/gcc/testsuite/gcc.dg/20020218-1.c b/gcc/testsuite/gcc.dg/20020218-1.c index 2887328d5fb..eff60de18d9 100644 --- a/gcc/testsuite/gcc.dg/20020218-1.c +++ b/gcc/testsuite/gcc.dg/20020218-1.c @@ -1,5 +1,6 @@ /* Verify that X86-64 only SSE registers aren't restored on IA-32. */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -msse" } */ /* { dg-final { scan-assembler-not "xmm8" } } */ diff --git a/gcc/testsuite/gcc.dg/20020310-1.c b/gcc/testsuite/gcc.dg/20020310-1.c index 39fbdb0c96b..fd3c24ddf28 100644 --- a/gcc/testsuite/gcc.dg/20020310-1.c +++ b/gcc/testsuite/gcc.dg/20020310-1.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mtune=i586" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ struct A { diff --git a/gcc/testsuite/gcc.dg/20020411-1.c b/gcc/testsuite/gcc.dg/20020411-1.c index a1834b8a1a5..d78608d111d 100644 --- a/gcc/testsuite/gcc.dg/20020411-1.c +++ b/gcc/testsuite/gcc.dg/20020411-1.c @@ -4,6 +4,7 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -march=i686" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ #if __INT_MAX__ > 32767 diff --git a/gcc/testsuite/gcc.dg/20020418-2.c b/gcc/testsuite/gcc.dg/20020418-2.c index fbc38da03da..e3066c95b47 100644 --- a/gcc/testsuite/gcc.dg/20020418-2.c +++ b/gcc/testsuite/gcc.dg/20020418-2.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -funroll-all-loops" } */ /* { dg-options "-O2 -funroll-all-loops -march=pentium3" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ void bar (float); diff --git a/gcc/testsuite/gcc.dg/20020426-1.c b/gcc/testsuite/gcc.dg/20020426-1.c index 94523e7298a..225b3199bca 100644 --- a/gcc/testsuite/gcc.dg/20020426-1.c +++ b/gcc/testsuite/gcc.dg/20020426-1.c @@ -1,5 +1,6 @@ /* { dg-do compile { target i?86-*-* } } */ /* { dg-options "-msoft-float -mfp-ret-in-387" } */ +/* { dg-forbid-option "-m64" } */ void f() { __builtin_apply(0, 0, 0); diff --git a/gcc/testsuite/gcc.dg/20020426-2.c b/gcc/testsuite/gcc.dg/20020426-2.c index dd7fa7ff577..85f04f871f3 100644 --- a/gcc/testsuite/gcc.dg/20020426-2.c +++ b/gcc/testsuite/gcc.dg/20020426-2.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mtune=i686" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ /* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */ extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/20020517-1.c b/gcc/testsuite/gcc.dg/20020517-1.c index 40de8663d80..bc6cb8305e0 100644 --- a/gcc/testsuite/gcc.dg/20020517-1.c +++ b/gcc/testsuite/gcc.dg/20020517-1.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mtune=i686" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ #include diff --git a/gcc/testsuite/gcc.dg/20020523-1.c b/gcc/testsuite/gcc.dg/20020523-1.c index 5ae3da5473a..de0555f37d2 100644 --- a/gcc/testsuite/gcc.dg/20020523-1.c +++ b/gcc/testsuite/gcc.dg/20020523-1.c @@ -2,6 +2,7 @@ This testcase was miscompiled because sse_mov?fcc_const0* patterns were missing earlyclobber. */ /* { dg-do run { target i386-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-march=pentium3 -msse -ffast-math -O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/20020523-2.c b/gcc/testsuite/gcc.dg/20020523-2.c index 1bb5a1a6567..dc9a12657e6 100644 --- a/gcc/testsuite/gcc.dg/20020523-2.c +++ b/gcc/testsuite/gcc.dg/20020523-2.c @@ -2,6 +2,7 @@ This testcase was miscompiled because sse_mov?fcc_const0* patterns were missing earlyclobber. */ /* { dg-do run { target i386-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-march=pentium3 -msse -ffast-math -O2" } */ #include "i386-cpuid.h" diff --git a/gcc/testsuite/gcc.dg/20020729-1.c b/gcc/testsuite/gcc.dg/20020729-1.c index da1ed1b7153..028464541df 100644 --- a/gcc/testsuite/gcc.dg/20020729-1.c +++ b/gcc/testsuite/gcc.dg/20020729-1.c @@ -1,4 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=k6" } */ static inline void * diff --git a/gcc/testsuite/gcc.dg/20030204-1.c b/gcc/testsuite/gcc.dg/20030204-1.c index e236e3a3a39..ac7c3add320 100644 --- a/gcc/testsuite/gcc.dg/20030204-1.c +++ b/gcc/testsuite/gcc.dg/20030204-1.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O -ffast-math -funroll-loops" } */ /* { dg-options "-march=pentium3 -O -ffast-math -funroll-loops" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ float foo (float *a, int i) { diff --git a/gcc/testsuite/gcc.dg/20030826-2.c b/gcc/testsuite/gcc.dg/20030826-2.c index f25887d47d2..f38e32372c0 100644 --- a/gcc/testsuite/gcc.dg/20030826-2.c +++ b/gcc/testsuite/gcc.dg/20030826-2.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ /* { dg-options "-O2 -fomit-frame-pointer -march=i386" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/20030926-1.c b/gcc/testsuite/gcc.dg/20030926-1.c index 806dea76165..8af98aa56ef 100644 --- a/gcc/testsuite/gcc.dg/20030926-1.c +++ b/gcc/testsuite/gcc.dg/20030926-1.c @@ -2,6 +2,7 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -minline-all-stringops" } */ /* { dg-options "-O2 -minline-all-stringops -march=pentium4" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ extern void *memcpy (void *, const void *, __SIZE_TYPE__); extern __SIZE_TYPE__ strlen (const char *); diff --git a/gcc/testsuite/gcc.dg/20031202-1.c b/gcc/testsuite/gcc.dg/20031202-1.c index 424e01b5dd4..7947770dfd5 100644 --- a/gcc/testsuite/gcc.dg/20031202-1.c +++ b/gcc/testsuite/gcc.dg/20031202-1.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mtune=i686" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/980312-1.c b/gcc/testsuite/gcc.dg/980312-1.c index 8f72c31d341..69553ef4199 100644 --- a/gcc/testsuite/gcc.dg/980312-1.c +++ b/gcc/testsuite/gcc.dg/980312-1.c @@ -1,4 +1,5 @@ /* { dg-do link { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=pentiumpro" } */ extern __inline double diff --git a/gcc/testsuite/gcc.dg/980313-1.c b/gcc/testsuite/gcc.dg/980313-1.c index 1036339b076..1e23fee16ed 100644 --- a/gcc/testsuite/gcc.dg/980313-1.c +++ b/gcc/testsuite/gcc.dg/980313-1.c @@ -1,4 +1,5 @@ /* { dg-do link { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=pentiumpro" } */ extern __inline double diff --git a/gcc/testsuite/gcc.dg/990117-1.c b/gcc/testsuite/gcc.dg/990117-1.c index 606ba440ca8..df7636b8a8c 100644 --- a/gcc/testsuite/gcc.dg/990117-1.c +++ b/gcc/testsuite/gcc.dg/990117-1.c @@ -1,4 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=pentiumpro" } */ extern __inline double diff --git a/gcc/testsuite/gcc.dg/990424-1.c b/gcc/testsuite/gcc.dg/990424-1.c index 00b476427f3..9a3b630554e 100644 --- a/gcc/testsuite/gcc.dg/990424-1.c +++ b/gcc/testsuite/gcc.dg/990424-1.c @@ -2,6 +2,7 @@ with stdcall functions. */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options -mpreferred-stack-boundary=4 } */ void __attribute__((stdcall)) foo(int a, int b, int c); diff --git a/gcc/testsuite/gcc.dg/990524-1.c b/gcc/testsuite/gcc.dg/990524-1.c index 8b101724503..bded9f412a9 100644 --- a/gcc/testsuite/gcc.dg/990524-1.c +++ b/gcc/testsuite/gcc.dg/990524-1.c @@ -1,4 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=pentiumpro" } */ typedef struct t_anim_info { diff --git a/gcc/testsuite/gcc.dg/991230-1.c b/gcc/testsuite/gcc.dg/991230-1.c index 76b1b8e9884..3bc1b0693ea 100644 --- a/gcc/testsuite/gcc.dg/991230-1.c +++ b/gcc/testsuite/gcc.dg/991230-1.c @@ -1,4 +1,5 @@ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O -ffast-math -mtune=i486" } */ /* Test that floating point greater-than tests are compiled correctly with diff --git a/gcc/testsuite/gcc.dg/i386-387-1.c b/gcc/testsuite/gcc.dg/i386-387-1.c index 92b671bf99c..05861885315 100644 --- a/gcc/testsuite/gcc.dg/i386-387-1.c +++ b/gcc/testsuite/gcc.dg/i386-387-1.c @@ -1,5 +1,6 @@ /* Verify that -mno-fancy-math-387 works. */ /* { dg-do compile { target "i?86-*-*" } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */ /* { dg-final { scan-assembler "call\t_?sin" } } */ /* { dg-final { scan-assembler "call\t_?cos" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-387-2.c b/gcc/testsuite/gcc.dg/i386-387-2.c index 11eb0cc9aa5..9642b225e3e 100644 --- a/gcc/testsuite/gcc.dg/i386-387-2.c +++ b/gcc/testsuite/gcc.dg/i386-387-2.c @@ -1,5 +1,6 @@ /* Verify that -march overrides -mno-fancy-math-387. */ /* { dg-do compile { target "i?86-*-*" } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O -ffast-math -mfpmath=387 -march=i686 -mno-fancy-math-387" } */ /* { dg-final { scan-assembler "fsin" } } */ /* { dg-final { scan-assembler "fcos" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-387-3.c b/gcc/testsuite/gcc.dg/i386-387-3.c index f61cd6100e2..92f95d6fd63 100644 --- a/gcc/testsuite/gcc.dg/i386-387-3.c +++ b/gcc/testsuite/gcc.dg/i386-387-3.c @@ -1,5 +1,6 @@ /* Verify that 387 mathematical constants are recognized. */ /* { dg-do compile { target "i?86-*-*" } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=i686" } */ /* { dg-final { scan-assembler "fldpi" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-387-4.c b/gcc/testsuite/gcc.dg/i386-387-4.c index 809ab823660..65834b0e73d 100644 --- a/gcc/testsuite/gcc.dg/i386-387-4.c +++ b/gcc/testsuite/gcc.dg/i386-387-4.c @@ -1,4 +1,5 @@ /* { dg-do compile { target "i?86-*-*" } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2 -march=i686" } */ /* { dg-final { scan-assembler "fldpi" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-387-5.c b/gcc/testsuite/gcc.dg/i386-387-5.c index 7c512977420..d5f29b33d15 100644 --- a/gcc/testsuite/gcc.dg/i386-387-5.c +++ b/gcc/testsuite/gcc.dg/i386-387-5.c @@ -1,5 +1,6 @@ /* Verify that -mno-fancy-math-387 works. */ /* { dg-do compile { target "i?86-*-*" } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */ /* { dg-final { scan-assembler "call\t_?atan" } } */ /* { dg-final { scan-assembler "call\t_?log1p" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-387-6.c b/gcc/testsuite/gcc.dg/i386-387-6.c index c8e5311c091..85d2fa4121d 100644 --- a/gcc/testsuite/gcc.dg/i386-387-6.c +++ b/gcc/testsuite/gcc.dg/i386-387-6.c @@ -1,5 +1,6 @@ /* Verify that -march overrides -mno-fancy-math-387. */ /* { dg-do compile { target "i?86-*-*" } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O -ffast-math -mfpmath=387 -march=i686 -mno-fancy-math-387" } */ /* { dg-final { scan-assembler "fpatan" } } */ /* { dg-final { scan-assembler "fyl2xp1" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-asm-1.c b/gcc/testsuite/gcc.dg/i386-asm-1.c index 826f5b6dbe3..593869909ef 100644 --- a/gcc/testsuite/gcc.dg/i386-asm-1.c +++ b/gcc/testsuite/gcc.dg/i386-asm-1.c @@ -1,5 +1,6 @@ /* PR inline-asm/11676 */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/i386-bitfield1.c b/gcc/testsuite/gcc.dg/i386-bitfield1.c index 21916c1cc7e..1db7cb562bf 100644 --- a/gcc/testsuite/gcc.dg/i386-bitfield1.c +++ b/gcc/testsuite/gcc.dg/i386-bitfield1.c @@ -1,5 +1,6 @@ // Test for bitfield alignment in structs on IA-32 // { dg-do run { target i?86-*-* } } +/* { dg-forbid-option "-m64" } */ // { dg-options "-O2" } // { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-interix* i?86-*-cygwin* i?86-*-mingw*} } diff --git a/gcc/testsuite/gcc.dg/i386-bitfield2.c b/gcc/testsuite/gcc.dg/i386-bitfield2.c index 9e5da397877..60e1697c055 100644 --- a/gcc/testsuite/gcc.dg/i386-bitfield2.c +++ b/gcc/testsuite/gcc.dg/i386-bitfield2.c @@ -1,5 +1,6 @@ // Test for bitfield alignment in structs on IA-32 // { dg-do run { target i?86-*-* } } +/* { dg-forbid-option "-m64" } */ // { dg-options "-O2" } // { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-interix* i?86-*-cygwin* i?86-*-mingw* } } diff --git a/gcc/testsuite/gcc.dg/i386-loop-1.c b/gcc/testsuite/gcc.dg/i386-loop-1.c index 635f012a477..b9e0fe20697 100644 --- a/gcc/testsuite/gcc.dg/i386-loop-1.c +++ b/gcc/testsuite/gcc.dg/i386-loop-1.c @@ -1,5 +1,6 @@ /* PR optimization/9888 */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-mtune=k6 -O3" } */ /* Verify that GCC doesn't emit out of range 'loop' instructions. */ diff --git a/gcc/testsuite/gcc.dg/i386-loop-2.c b/gcc/testsuite/gcc.dg/i386-loop-2.c index 3a3e69e98b4..3da2b09e966 100644 --- a/gcc/testsuite/gcc.dg/i386-loop-2.c +++ b/gcc/testsuite/gcc.dg/i386-loop-2.c @@ -1,6 +1,7 @@ /* PR optimization/9888 */ /* Originator: Jim Bray */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-mtune=k6 -Os" } */ enum reload_type diff --git a/gcc/testsuite/gcc.dg/i386-loop-3.c b/gcc/testsuite/gcc.dg/i386-loop-3.c index 59ed5bf589f..d574f2f2d2e 100644 --- a/gcc/testsuite/gcc.dg/i386-loop-3.c +++ b/gcc/testsuite/gcc.dg/i386-loop-3.c @@ -2,6 +2,7 @@ /* Originator: Tim McGrath */ /* Testcase contributed by Eric Botcazou */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-mtune=k6 -O3 -ffast-math -funroll-loops" } */ extern void *memset (void *, int, __SIZE_TYPE__); diff --git a/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c b/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c index 8d4a083e5d8..24516fdd605 100644 --- a/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c +++ b/gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c @@ -1,5 +1,6 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -march=pentium4" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ /* { dg-options "-O2 -march=pentium4 -m32" { target x86_64-*-* } } */ /* { dg-final { scan-assembler-not "imull" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-pic-1.c b/gcc/testsuite/gcc.dg/i386-pic-1.c index 4c548bf1cd6..72c46e92735 100644 --- a/gcc/testsuite/gcc.dg/i386-pic-1.c +++ b/gcc/testsuite/gcc.dg/i386-pic-1.c @@ -1,5 +1,6 @@ /* PR target/8340 */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-fPIC" } */ int foo () diff --git a/gcc/testsuite/gcc.dg/i386-regparm.c b/gcc/testsuite/gcc.dg/i386-regparm.c index 18206ea7fc3..8406874dd18 100644 --- a/gcc/testsuite/gcc.dg/i386-regparm.c +++ b/gcc/testsuite/gcc.dg/i386-regparm.c @@ -1,4 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-W -Wall" } */ /* Verify that GCC correctly detects non-matching regparm attributes. */ diff --git a/gcc/testsuite/gcc.dg/i386-signbit-1.c b/gcc/testsuite/gcc.dg/i386-signbit-1.c index 8b8866e92aa..2c0fe5c78b5 100644 --- a/gcc/testsuite/gcc.dg/i386-signbit-1.c +++ b/gcc/testsuite/gcc.dg/i386-signbit-1.c @@ -1,5 +1,6 @@ /* PR optimization/8746 */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O1 -mtune=i586" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/i386-signbit-2.c b/gcc/testsuite/gcc.dg/i386-signbit-2.c index 5687d857a07..dbda6c4c95e 100644 --- a/gcc/testsuite/gcc.dg/i386-signbit-2.c +++ b/gcc/testsuite/gcc.dg/i386-signbit-2.c @@ -1,5 +1,6 @@ /* PR optimization/8746 */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O1 -mtune=i586" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/i386-signbit-3.c b/gcc/testsuite/gcc.dg/i386-signbit-3.c index ae97f215603..476e873d57e 100644 --- a/gcc/testsuite/gcc.dg/i386-signbit-3.c +++ b/gcc/testsuite/gcc.dg/i386-signbit-3.c @@ -1,5 +1,6 @@ /* PR optimization/8746 */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-O1 -mtune=i586" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/i386-sse-5.c b/gcc/testsuite/gcc.dg/i386-sse-5.c index 81184fcb67e..ab2d499c5e7 100644 --- a/gcc/testsuite/gcc.dg/i386-sse-5.c +++ b/gcc/testsuite/gcc.dg/i386-sse-5.c @@ -1,4 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-Winline -O2 -march=i386" } */ typedef double v2df __attribute__ ((vector_size (16))); v2df p; diff --git a/gcc/testsuite/gcc.dg/i386-sse-8.c b/gcc/testsuite/gcc.dg/i386-sse-8.c index 8ec5e7034a5..e74f0c0f679 100644 --- a/gcc/testsuite/gcc.dg/i386-sse-8.c +++ b/gcc/testsuite/gcc.dg/i386-sse-8.c @@ -4,6 +4,7 @@ /* { dg-do compile } */ /* { dg-options "" } */ /* { dg-options "-march=pentium3" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ int main() { diff --git a/gcc/testsuite/gcc.dg/i386-unroll-1.c b/gcc/testsuite/gcc.dg/i386-unroll-1.c index a424b95eba2..2dff9127721 100644 --- a/gcc/testsuite/gcc.dg/i386-unroll-1.c +++ b/gcc/testsuite/gcc.dg/i386-unroll-1.c @@ -1,5 +1,6 @@ /* PR optimization/8599 */ /* { dg-do run { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ /* { dg-options "-mtune=k6 -O2 -funroll-loops" } */ extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/tls/opt-1.c b/gcc/testsuite/gcc.dg/tls/opt-1.c index 8523c762a2e..a35b72b0927 100644 --- a/gcc/testsuite/gcc.dg/tls/opt-1.c +++ b/gcc/testsuite/gcc.dg/tls/opt-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fPIC" } */ /* { dg-options "-O2 -fPIC -mtune=i686" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ extern __thread int thr; diff --git a/gcc/testsuite/gcc.dg/tls/opt-2.c b/gcc/testsuite/gcc.dg/tls/opt-2.c index 713fb7f360c..a4064f0b8d8 100644 --- a/gcc/testsuite/gcc.dg/tls/opt-2.c +++ b/gcc/testsuite/gcc.dg/tls/opt-2.c @@ -5,6 +5,7 @@ /* { dg-do link } */ /* { dg-options "-O2 -ftls-model=initial-exec" } */ /* { dg-options "-O2 -ftls-model=initial-exec -march=i686" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ __thread int thr; diff --git a/gcc/testsuite/gcc.dg/unroll-1.c b/gcc/testsuite/gcc.dg/unroll-1.c index 1e2dd09ebec..7a75d6b2812 100644 --- a/gcc/testsuite/gcc.dg/unroll-1.c +++ b/gcc/testsuite/gcc.dg/unroll-1.c @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -funroll-loops" } */ /* { dg-options "-mtune=k6 -O2 -funroll-loops" { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" { target i?86-*-* } } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c index a44c6076481..a21e9ccf112 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-3dnow-1.c @@ -2,6 +2,7 @@ variants that use 3DNow! prefetch instructions. */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ extern void exit (int); diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c index 09a67d83426..33acfbb9bd8 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-athlon-1.c @@ -3,6 +3,7 @@ locality hints. */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ extern void exit (int); diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c index 0ad3220e856..02d0efe726f 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-none-1.c @@ -2,6 +2,7 @@ that do not support those instructions. */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ extern void exit (int); diff --git a/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c b/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c index 15275775caa..e5fc0910c24 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c +++ b/gcc/testsuite/gcc.misc-tests/i386-pf-sse-1.c @@ -2,6 +2,7 @@ variants that use SSE prefetch instructions. */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-forbid-option "-m64" } */ extern void exit (int); diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 848526b32b9..83c0a5b8b3a 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -446,6 +446,37 @@ proc dg-require-effective-target { args } { } } +# ARGS is a list. The 0th element is the line number at which the +# dg-forbid-option directive appeared in the source file. The 1st +# element is a regular expression. If the regular expression matches +# the command-line options implied by the current multilib, then the +# test will be treated as unsupported. The 2nd element of the list, +# if present, is a target selector conditionalizing this directive; +# if the target selector does not match the current target, this +# dg-forbid-option directive is ignored. + +proc dg-forbid-option { args } { + set target_name [target_info name] + set pattern [lindex $args 1] + + if {[llength $args] > 2} { + set selector [lindex $args 2] + if { [dg-process-target $selector] == "N" } { + return + } + } + + # Check to see if the option occurs in the multilib options + # for this target. + if {[board_info $target_name exists multilib_flags]} { + set multilib_flags [board_info $target_name multilib_flags] + if { [regexp -- ${pattern} $multilib_flags] } { + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + } + } +} + # Prune any messages matching ARGS[1] (a regexp) from test output. proc dg-prune-output { args } { global additional_prunes -- 2.30.2