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: PING [PATCH] testsuite: Add new effective target keywords


Hello ?Janis,

OK,  I have just realized that some of the changes I had been suggesting also 
already have found their way into the testsuite. So the number of changes in 
2.) is now smaller than beforehand. I should have checked that beforehand.

Hope, that it'sfinally OK :-)

Yours,

Björn


1.) new effective target keywords

2005-04-15  Bjoern Haase  <bjoern.m.haase@web.de>

????????* lib/target-supports.exp (check_effective_target_trampolines): New.
????????(check_effective_target_int_larger_than_16_bits): New.
????????(check_profiling_available): Add avr-*-*

2.) adaptions for avr and clean-ups in gcc.c-torture/compile

2004-04-15  Bjoern Haase  <bjoern.m.haase@web.de>

????????* gcc.c-torture/compile/20001226-1.c: Clean up and skip avr-*-*,
????????hc11,hc12 and xtensa.
	* gcc.c-torture/compile/20050303-1.c: Skip avr-*-*
????????* gcc.c-torture/compile/20010226-1.c: Add effective target trampolines
????????* gcc.c-torture/compile/nested-1.c: Ditto.
????????* gcc.c-torture/compile/20050122-2.c: Ditto.
????????* gcc.c-torture/compile/20020604-1.c: Clean up and xfail avr-*-*
????????* gcc.c-torture/compile/20010327-1.c: Ditto.
? ? ? ? * gcc.c-torture/compile/980506-1.c: Ditto.
Index: target-supports.exp
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.56
diff -U6 -r1.56 target-supports.exp
--- target-supports.exp	6 May 2005 17:03:10 -0000	1.56
+++ target-supports.exp	18 May 2005 20:53:11 -0000
@@ -249,12 +249,55 @@
 	    set gc_sections_available_saved 0
 	}
     }
     return $gc_sections_available_saved
 }
 
+# Return 1 if according to target_info struct and explicit target list
+# target is supposed to support trampolines.
+ 
+proc check_effective_target_trampolines { } {
+    if [target_info exists no_trampolines] {
+      return 0
+    }
+    if { [istarget avr-*-*]
+         || [istarget hppa2.0w-hp-hpux11.23]
+         || [istarget hppa64-hp-hpux11.23] } {
+        return 0;   
+    }
+    return 1
+}
+
+# Return 1 if target defines int to be larger than 16 bits.
+
+proc check_effective_target_int_larger_than_16_bits { } {
+    global int_larger_than_16_bits_saved
+    global tool
+
+    if [info exists int_larger_than_16_bits_saved] {
+        verbose "check_effective_target_int_larger_than_16_bits  returning saved $int_larger_than_16_bits_saved" 2
+    } else {
+        verbose "check_effective_target_int_larger_than_16_bits  compiling testfile" 2
+        set lines [get_compiler_messages intsize object "
+          #if (__INT_MAX__ <= 32767)
+             this code triggers an error;
+          #endif
+        "] 
+	if [string match "" $lines] then {
+	    # No error messages, so __INT_MAX__ > 32767.
+	    set int_larger_than_16_bits_saved 1
+	} else {
+	    set int_larger_than_16_bits_saved 0
+	}
+
+	verbose "check_effective_target_int_larger_than_16_bits  returning $int_larger_than_16_bits_saved" 2
+    }
+
+    return $int_larger_than_16_bits_saved
+}
+
 # Return true if profiling is supported on the target.
 
 proc check_profiling_available { test_what } {
     global profiling_available_saved
 
     verbose "Profiling argument is <$test_what>" 1
@@ -284,12 +327,13 @@
 	# Some targets don't have any implementation of __bb_init_func or are
 	# missing other needed machinery.
 	if { [istarget mmix-*-*]
 	     || [istarget arm*-*-eabi*]
 	     || [istarget arm*-*-elf]
 	     || [istarget arm*-*-symbianelf*]
+	     || [istarget avr-*-*]
 	     || [istarget powerpc-*-eabi*]
 	     || [istarget strongarm*-*-elf]
 	     || [istarget xscale*-*-elf]
 	     || [istarget cris-*-*]
 	     || [istarget h8300-*-*]
 	     || [istarget mips*-*-elf]
? .20050303-1.c.swp
Index: 20001226-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20001226-1.c,v
retrieving revision 1.2
diff -u -r1.2 20001226-1.c
--- 20001226-1.c	13 Jun 2003 05:40:59 -0000	1.2
+++ 20001226-1.c	18 May 2005 21:15:35 -0000
@@ -1,7 +1,9 @@
 /* This does not assemble on m68hc11 because the function is larger
    than 64K.  */
-/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
-/* { dg-xfail-if "jump beyond 128K not supported" "xtensa-*-*" "-O0" "" } */
+/* { dg-do assemble } */
+/* { dg-skip-if "jump beyond 128K not supported" "xtensa-*-*" "-O0" "" } */
+/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "too much code" { "m6811-*-*" "m6812-*-*" } { "*" } { "" } } */
 
 /* This testcase exposed two branch shortening bugs on powerpc.  */
 
Index: 20010226-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c,v
retrieving revision 1.1
diff -u -r1.1 20010226-1.c
--- 20010226-1.c	9 Jan 2002 21:34:30 -0000	1.1
+++ 20010226-1.c	18 May 2005 21:15:35 -0000
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target trampolines } */
+
 void f1 (void *);
 void f3 (void *, void (*)(void *));
 void f2 (void *);
Index: 20010327-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20010327-1.c,v
retrieving revision 1.5
diff -u -r1.5 20010327-1.c
--- 20010327-1.c	3 Mar 2003 19:02:28 -0000	1.5
+++ 20010327-1.c	18 May 2005 21:15:35 -0000
@@ -4,6 +4,9 @@
    size __SIZE_TYPE__.)  
 
    Some rare environments might not have the required relocs to support
-   this; they should have this test disabled in the .x file.  */
+   this; they should disable this test by magic comments.  */
+
+/* { dg-xfail-if "hi mode pointer for avr" { "avr-*-*" } { "*" } { "" } } */ 
+
 extern void _text;
 static unsigned long x = (unsigned long) &_text - 0x10000000L - 1;
Index: 20020604-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20020604-1.c,v
retrieving revision 1.4
diff -u -r1.4 20020604-1.c
--- 20020604-1.c	23 Dec 2003 20:36:59 -0000	1.4
+++ 20020604-1.c	18 May 2005 21:15:36 -0000
@@ -1,6 +1,5 @@
-/* The array is too big. */
-/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
-/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
+/* { dg-xfail-if "Array too big" { "m6811-*-*" "m6812-*-*" "avr-*-*" } { "*" } { "" } } */
+/* { dg-xfail-if "Array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
 
 /* PR c/6957
    This testcase ICEd at -O2 on IA-32, because
Index: 20050122-2.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20050122-2.c,v
retrieving revision 1.1
diff -u -r1.1 20050122-2.c
--- 20050122-2.c	22 Jan 2005 17:52:44 -0000	1.1
+++ 20050122-2.c	18 May 2005 21:15:36 -0000
@@ -1,4 +1,6 @@
 /* Related to PR 19484.  */
+/* { dg-require-effective-target trampolines } */
+
 extern void foo (void) __attribute__((noreturn));
 int n;
 
Index: 20050303-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20050303-1.c,v
retrieving revision 1.1
diff -u -r1.1 20050303-1.c
--- 20050303-1.c	4 Mar 2005 01:38:56 -0000	1.1
+++ 20050303-1.c	18 May 2005 21:15:36 -0000
@@ -1,3 +1,5 @@
+/* { dg-skip-if "array too large" { "avr-*-*" } { "*" } { "" } } */
+
 void crc()
 {
     int  toread;
Index: 980506-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/980506-1.c,v
retrieving revision 1.5
diff -u -r1.5 980506-1.c
--- 980506-1.c	23 Dec 2003 20:36:59 -0000	1.5
+++ 980506-1.c	18 May 2005 21:15:37 -0000
@@ -1,7 +1,6 @@
 /* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
+/* { dg-xfail-if "Array too big" { "xstormy16-*-*" "m6811-*-*" "m6812-*-*" "avr-*-*" } { "*" } { "" } } */
 /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
-/* { dg-do assemble { xfail xstormy16-*-* m6811-*-* m6812-*-* } } */
-
 unsigned char	TIFFFax2DMode[20][256];
 unsigned char	TIFFFax2DNextState[20][256];
 unsigned char	TIFFFaxUncompAction[20][256];
Index: nested-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/nested-1.c,v
retrieving revision 1.1
diff -u -r1.1 nested-1.c
--- nested-1.c	15 Oct 2004 13:49:02 -0000	1.1
+++ nested-1.c	18 May 2005 21:15:37 -0000
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target trampolines } */
+
 typedef __SIZE_TYPE__ size_t;
 extern int printf (const char *, ...);
 extern void *memset (void *, int, size_t);

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