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
// { 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)
// { 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);
/* 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 ()
/* 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);
/* Test asm clobbers on x86. */
/* { dg-do run { target i?86-*-* } } */
+/* { dg-skip-if "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } } */
extern void abort (void);
/* 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;
/* { 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;
}
#include <xmmintrin.h>
-__m128d magic_a, magic_b;
+static __m128d magic_a, magic_b;
__m128d
t1(void)
}
}
+# 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