]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: [multiple changes]
authorKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 30 Nov 2005 23:54:04 +0000 (23:54 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 30 Nov 2005 23:54:04 +0000 (23:54 +0000)
2005-11-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

Backport:
2005-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.pt/asm1.C, g++.old-deja/g++.pt/asm2.C,
gcc.dg/20011119-1.c: Bypass tests on x86 when using -fpic/-fPIC.

2005-11-28  Kean Johnston  <jkj@sco.com>
* gcc.c-torture/compile/20000804-1.c: Skip if using -fPIC on X86.
* gcc.dg/clobbers.c: Ditto.
* gcc.dg/i386-cmov1.c: Make magic* static so it matches the test
regexp.
* gcc.dg/i386-mul.c: Ditto.
* gcc.dg/i386-ssetype-1.c: Ditto.

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

* lib/gcc-dg.exp (dg-skip-if): New.

From-SVN: r107744

gcc/testsuite/g++.old-deja/g++.pt/asm1.C
gcc/testsuite/g++.old-deja/g++.pt/asm2.C
gcc/testsuite/gcc.c-torture/compile/20000804-1.c
gcc/testsuite/gcc.dg/20011119-1.c
gcc/testsuite/gcc.dg/clobbers.c
gcc/testsuite/gcc.dg/i386-cmov1.c
gcc/testsuite/gcc.dg/i386-mul.c
gcc/testsuite/gcc.dg/i386-ssetype-1.c
gcc/testsuite/lib/gcc-dg.exp

index 24cf653ceb456b45f859a4f1a28f26ec110d74d0..62787de9be18ac6c5d3ff94fd564218d8031884e 100644 (file)
@@ -1,4 +1,6 @@
 // { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
+// We'd use ebx with -fpic/-fPIC, so skip.
+// { dg-skip-if "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } }
 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
 
 template<int i> int foo(int v)
index b7e764808369307381c6b02279a19a852d0ceab5..3fe5e2a213e3c91918005bafe9c5cb3734db7adc 100644 (file)
@@ -1,4 +1,6 @@
 // { dg-do assemble { target i?86-*-linux* } }
+// We'd use ebx with -fpic/-fPIC, so skip.
+// { dg-skip-if "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } }
 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
 
 typedef void (function_ptr)(int);
index 782764b31bb340bb757663bac2c078b4b07bcd8a..6942ae7c9ec716d175701bbaae72016ef9545a40 100644 (file)
@@ -1,6 +1,7 @@
 /* This does not work on m68hc11 or h8300 due to the use of an asm
    statement to force a 'long long' (64-bits) to go in a register.  */
 /* { dg-do assemble { xfail m6811-*-* m6812-*-* h8300-*-* } } */
+/* { dg-skip-if "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } } */
 
 /* Copyright (C) 2000, 2003 Free Software Foundation */
 __complex__ long long f ()
index 5b3c00cd36faccd0471eb284fb52e7aa006354b2..28672eddde4b78a879934e3ab3be717bf1f1016d 100644 (file)
@@ -1,5 +1,6 @@
 /* Test for reload failing to eliminate from argp to sp.  */
 /* { dg-do run { target i?86-*-* } } */
+/* { dg-skip-if "" { i?86-*-* } { "-m64" "-fpic" "-fPIC" } { "" } } */
 /* { dg-options "-O2 -fomit-frame-pointer" } */
 
 static int ustrsize (const char *s);
index 474a396a05195b0afa11d40edbd45874c1622b0c..5e312bcb95c286f7dc65810d9a6b269f592ab2f6 100644 (file)
@@ -1,6 +1,7 @@
 /* Test asm clobbers on x86. */
 
 /* { dg-do run { target i?86-*-* } } */
+/* { dg-skip-if "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } } */
 
 extern void abort (void);
 
index 71f03ae9fead46999b539862ef652a5b034e2565..9252d868f9645c89094c52d89e695124277cdd25 100644 (file)
@@ -9,15 +9,15 @@
 
 /* Check code generation for several conditional moves doable by single arithmetics.  */
 
-int magic_namea;
-char magic_nameb;
-short magic_namec;
-int magic_named;
-char magic_namee;
-short magic_namef;
+static int magic_namea;
+static char magic_nameb;
+static short magic_namec;
+static int magic_named;
+static char magic_namee;
+static short magic_namef;
 
 unsigned int gen;
-m()
+void m(void)
 {
   magic_namec=magic_namec>=0?0:-1;
   magic_namea=magic_namea>=0?0:-1;
index 2a864af76d0de3b67b34a831054b2d9187124295..72069fe2cf813575f067aa5fed0a57b65429dab6 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-final { scan-assembler "and\[^\\n\]*magic" } } */
 
 /* Should be done as "andw $32767, magic".  */
-unsigned short magic;
-t()
+static unsigned short magic;
+void t(void)
 {
        magic%=(unsigned short)0x8000U;
 }
index 50d0fcaa58a8807ed326af0193dfa04c8a91eecc..47a68918d8ce0192efd516ff30b8352e29d2783f 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <xmmintrin.h>
 
-__m128d magic_a, magic_b;
+static __m128d magic_a, magic_b;
 
 __m128d
 t1(void)
index 8c01f29705500652dde766de8a8645788567f8ce..32c0e998186acd3275dbcab0c26b948a0f247fe1 100644 (file)
@@ -359,6 +359,49 @@ proc dg-require-named-sections { args } {
    }
 }
 
+# Skip the test (report it as UNSUPPORTED) if the target list and
+# included flags are matched and the excluded flags are not matched.
+#
+# The first argument is the line number of the dg-skip-if directive
+# within the test file.   Remaining arguments are as for xfail lists:
+# message { targets } { include } { exclude }
+#
+# This tests against multilib flags plus either the default flags for this
+# group of tests or flags specified with a previous dg-options command.
+
+proc dg-skip-if { args } {
+    set args [lreplace $args 0 0]
+
+    set selector "target [join [lindex $args 1]]"
+    if { [dg-process-target $selector] == "S" } {
+       # The target list matched; now check the flags.  The DejaGnu proc
+       # check_conditional_xfail will look at the options in compiler_flags,
+       # so set that up for this test based on flags we know about.  Start
+       # the list with a dummy tool name so the list will match "*" if
+       # there are no flags.
+
+       global compiler_flags
+       upvar dg-extra-tool-flags extra_tool_flags
+
+       set compiler_flags " toolname "
+       append compiler_flags $extra_tool_flags
+       set dest [target_info name]
+       if [board_info $dest exists multilib_flags] {
+           append compiler_flags "[board_info $dest multilib_flags] "
+       }
+
+       # The target list might be an effective-target keyword, so replace
+       # the original list with "*-*-*".
+       if [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]] {
+           upvar dg-do-what dg-do-what
+            set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+       }
+
+       # Any value in this variable was left over from an earlier test.
+       set compiler_flags ""
+    }
+}
+
 # Prune any messages matching ARGS[1] (a regexp) from test output.
 proc dg-prune-output { args } {
     global additional_prunes