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]

Re: [3.4 PATCH] backport dg-skip-if


 > Oh, good.  If you send me your whole patch, including my old one, I
 > can test it on powerpc64-linux.
 > Janis

Here's the patch.  I ran this applied against current 3.4.x.  The g++
results with -fpic/-fPIC are identical now to the regular pass.  There
are still a few extra failures in the C testsuite.  Around three of
the remaining failures are fixed by Kean's patch here, but it hasn't
been approved so I'm not backporting any of it yet:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg02067.html

The remaining -fpic/-fPIC failures on i686-unknown-linux-gnu may or
may not be bugs, but at least we can pick them out. :-)  I'll file PRs
for any that aren't determined to be spurious.

The silenced/bypassed "failures" are:

< FAIL: g++.old-deja/g++.pt/asm1.C (test for excess errors)
< FAIL: g++.old-deja/g++.pt/asm2.C (test for excess errors)
< FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
< FAIL: gcc.c-torture/compile/20000804-1.c  -O1  (test for excess errors)
< FAIL: gcc.dg/20011119-1.c (test for excess errors)
< WARNING: gcc.dg/20011119-1.c compilation failed to produce executable
< FAIL: gcc.dg/clobbers.c (test for excess errors)
< WARNING: gcc.dg/clobbers.c compilation failed to produce executable
< FAIL: gcc.dg/i386-cmov1.c scan-assembler sar[^\\\\n]*magic_namea
< FAIL: gcc.dg/i386-cmov1.c scan-assembler sar[^\\\\n]*magic_nameb
< FAIL: gcc.dg/i386-cmov1.c scan-assembler sar[^\\\\n]*magic_namec
< FAIL: gcc.dg/i386-cmov1.c scan-assembler shr[^\\\\n]*magic_named
< FAIL: gcc.dg/i386-cmov1.c scan-assembler shr[^\\\\n]*magic_namee
< FAIL: gcc.dg/i386-cmov1.c scan-assembler shr[^\\\\n]*magic_namef
< FAIL: gcc.dg/i386-mul.c scan-assembler and[^\\\\n]*magic
< FAIL: gcc.dg/i386-ssetype-1.c scan-assembler andpd[^\\\\n]*magic
< FAIL: gcc.dg/i386-ssetype-1.c scan-assembler andnpd[^\\\\n]*magic
< FAIL: gcc.dg/i386-ssetype-1.c scan-assembler xorpd[^\\\\n]*magic
< FAIL: gcc.dg/i386-ssetype-1.c scan-assembler orpd[^\\\\n]*magic
< FAIL: gcc.dg/i386-ssetype-1.c scan-assembler movapd[^\\\\n]*magic


Okay for 3.4.x?

		Thanks,
		--Kaveh


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.

diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm1.C egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm1.C	2005-11-03 11:01:41.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm1.C	2005-11-30 15:07:17.000000000 -0500
@@ -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)
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm2.C egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm2.C
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm2.C	2005-11-03 11:01:41.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/g++.old-deja/g++.pt/asm2.C	2005-11-30 15:07:17.000000000 -0500
@@ -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);
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.c-torture/compile/20000804-1.c egcc-3.4-SVN20051129/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.c-torture/compile/20000804-1.c	2005-11-03 11:00:52.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/gcc.c-torture/compile/20000804-1.c	2005-11-30 15:52:22.000000000 -0500
@@ -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 ()
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/20011119-1.c egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/20011119-1.c
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/20011119-1.c	2005-11-03 11:01:08.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/20011119-1.c	2005-11-30 15:08:12.000000000 -0500
@@ -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);
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/clobbers.c egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/clobbers.c
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/clobbers.c	2005-11-03 11:01:07.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/clobbers.c	2005-11-30 15:53:30.000000000 -0500
@@ -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);
 
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-cmov1.c egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-cmov1.c
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-cmov1.c	2005-11-03 11:01:07.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-cmov1.c	2005-11-30 15:59:42.000000000 -0500
@@ -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;
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-mul.c egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-mul.c
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-mul.c	2005-11-03 11:01:07.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-mul.c	2005-11-30 16:01:12.000000000 -0500
@@ -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;
 }
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-ssetype-1.c egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-ssetype-1.c
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-ssetype-1.c	2005-11-03 11:01:07.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/gcc.dg/i386-ssetype-1.c	2005-11-30 16:01:42.000000000 -0500
@@ -11,7 +11,7 @@
 
 #include <xmmintrin.h>
 
-__m128d magic_a, magic_b;
+static __m128d magic_a, magic_b;
 
 __m128d
 t1(void)
diff -rup orig/egcc-3.4-SVN20051129/gcc/testsuite/lib/gcc-dg.exp egcc-3.4-SVN20051129/gcc/testsuite/lib/gcc-dg.exp
--- orig/egcc-3.4-SVN20051129/gcc/testsuite/lib/gcc-dg.exp	2005-11-03 11:02:01.000000000 -0500
+++ egcc-3.4-SVN20051129/gcc/testsuite/lib/gcc-dg.exp	2005-11-30 15:41:57.000000000 -0500
@@ -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


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