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]

PING [PATCH] testsuite: Add new effective target keywords


Hello  Janis,

after having arranged for the legal issues: Here are again the two patches.

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/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/20011119-1.c: Add dg-require-alias
ÂÂÂÂÂÂÂÂ* gcc.c-torture/compile/981001-2.c: Ditto.
ÂÂÂÂÂÂÂÂ* gcc.c-torture/compile/20011119-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.
? .target-supports.exp.swp
? dummy
Index: target-supports.exp
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.50
diff -c -r1.50 target-supports.exp
*** target-supports.exp	14 Apr 2005 17:46:08 -0000	1.50
--- target-supports.exp	19 Apr 2005 22:05:52 -0000
***************
*** 252,257 ****
--- 252,302 ----
      return $gc_sections_available_saved
  }
  
+ # Looks at target_info struct and explicit target list
+ # for finding out whether target is supposed to support
+ # trampolines. In case of missing support return 0.
+  
+ 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
+ }
+ 
+ # Find out whether target defines int to be 
+ # larger than 16 bits and return 1 in this case.
+ 
+ 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 } {
***************
*** 287,292 ****
--- 332,338 ----
  	     || [istarget arm*-*-eabi*]
  	     || [istarget arm*-*-elf]
  	     || [istarget arm*-*-symbianelf*]
+              || [istarget avr-*-*]
  	     || [istarget powerpc-*-eabi*]
  	     || [istarget strongarm*-*-elf]
  	     || [istarget xscale*-*-elf]
Index: 20001226-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20001226-1.c,v
retrieving revision 1.2
diff -C5 -r1.2 20001226-1.c
*** 20001226-1.c	13 Jun 2003 05:40:59 -0000	1.2
--- 20001226-1.c	19 Apr 2005 19:11:26 -0000
***************
*** 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" "" } */
  
  /* This testcase exposed two branch shortening bugs on powerpc.  */
  
  #define C(a,b) \
    if (a > b)  goto gt; \
--- 1,11 ----
  /* This does not assemble on m68hc11 because the function is larger
     than 64K.  */
! /* { 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.  */
  
  #define C(a,b) \
    if (a > b)  goto gt; \
Index: 20010226-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c,v
retrieving revision 1.1
diff -C5 -r1.1 20010226-1.c
*** 20010226-1.c	9 Jan 2002 21:34:30 -0000	1.1
--- 20010226-1.c	19 Apr 2005 19:11:26 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-require-effective-target trampolines } */
+ 
  void f1 (void *);
  void f3 (void *, void (*)(void *));
  void f2 (void *);
  
  int foo (void *a, int b)
Index: 20010327-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20010327-1.c,v
retrieving revision 1.5
diff -C5 -r1.5 20010327-1.c
*** 20010327-1.c	3 Mar 2003 19:02:28 -0000	1.5
--- 20010327-1.c	19 Apr 2005 19:11:26 -0000
***************
*** 2,9 ****
     that references addresses of size 'unsigned long', even if that's not
     the same as __SIZE_TYPE__.  (See 20011114-1.c for the same test of
     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.  */
  extern void _text;
  static unsigned long x = (unsigned long) &_text - 0x10000000L - 1;
--- 2,12 ----
     that references addresses of size 'unsigned long', even if that's not
     the same as __SIZE_TYPE__.  (See 20011114-1.c for the same test of
     size __SIZE_TYPE__.)  
  
     Some rare environments might not have the required relocs to support
!    this; they should have this test disabled 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: 20011119-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20011119-1.c,v
retrieving revision 1.2
diff -C5 -r1.2 20011119-1.c
*** 20011119-1.c	25 Mar 2002 20:55:20 -0000	1.2
--- 20011119-1.c	19 Apr 2005 19:11:27 -0000
***************
*** 1,4 ****
--- 1,6 ----
+ /* { dg-require-alias "" } */
+ 
  extern inline int foo (void) { return 23; }
  int xxx(void) __asm__("xxx");
  int xxx(void) { return 23; }
  extern int foo (void) __attribute__ ((weak, alias ("xxx")));
Index: 20011119-2.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20011119-2.c,v
retrieving revision 1.2
diff -C5 -r1.2 20011119-2.c
*** 20011119-2.c	25 Mar 2002 20:55:20 -0000	1.2
--- 20011119-2.c	19 Apr 2005 19:11:27 -0000
***************
*** 1,5 ****
--- 1,6 ----
+ /* { dg-require-alias "" } */
  extern inline int foo (void) { return 23; }
  int bar (void) { return foo (); }
  extern int foo (void) __attribute__ ((weak, alias ("xxx")));
  int baz (void) { return foo (); }
  int xxx(void) __asm__("xxx");
Index: 20020604-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20020604-1.c,v
retrieving revision 1.4
diff -C5 -r1.4 20020604-1.c
*** 20020604-1.c	23 Dec 2003 20:36:59 -0000	1.4
--- 20020604-1.c	19 Apr 2005 19:11:30 -0000
***************
*** 1,8 ****
! /* The array is too big. */
! /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
! /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
  
  /* PR c/6957
     This testcase ICEd at -O2 on IA-32, because
     (insn 141 139 142 (set (subreg:SF (reg:QI 72) 0)
  	   (plus:SF (reg:SF 73)
--- 1,7 ----
! /* { 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
     (insn 141 139 142 (set (subreg:SF (reg:QI 72) 0)
  	   (plus:SF (reg:SF 73)
Index: 20050122-2.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20050122-2.c,v
retrieving revision 1.1
diff -C5 -r1.1 20050122-2.c
*** 20050122-2.c	22 Jan 2005 17:52:44 -0000	1.1
--- 20050122-2.c	19 Apr 2005 19:11:33 -0000
***************
*** 1,6 ****
--- 1,8 ----
  /* Related to PR 19484.  */
+ /* { dg-require-effective-target trampolines } */
+ 
  extern void foo (void) __attribute__((noreturn));
  int n;
  
  void
  g (void)
Index: 980506-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/980506-1.c,v
retrieving revision 1.5
diff -C5 -r1.5 980506-1.c
*** 980506-1.c	23 Dec 2003 20:36:59 -0000	1.5
--- 980506-1.c	19 Apr 2005 19:11:40 -0000
***************
*** 1,9 ****
  /* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
  /* { 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];
  unsigned char	TIFFFaxUncompNextState[20][256];
  unsigned char	TIFFFax1DAction[230][256];
--- 1,8 ----
  /* 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" } { "" } } */
  unsigned char	TIFFFax2DMode[20][256];
  unsigned char	TIFFFax2DNextState[20][256];
  unsigned char	TIFFFaxUncompAction[20][256];
  unsigned char	TIFFFaxUncompNextState[20][256];
  unsigned char	TIFFFax1DAction[230][256];
Index: 981001-2.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/981001-2.c,v
retrieving revision 1.2
diff -C5 -r1.2 981001-2.c
*** 981001-2.c	16 Dec 1998 22:10:22 -0000	1.2
--- 981001-2.c	19 Apr 2005 19:11:40 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-require-alias "" } */
+ 
  #define weak_alias(func, aliasname) \
  	extern __typeof (func) aliasname __attribute__ ((weak, alias (#func)));
  
  #define add3(d, m, c) ((d) + (m) + (c))
  
Index: nested-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/nested-1.c,v
retrieving revision 1.1
diff -C5 -r1.1 nested-1.c
*** nested-1.c	15 Oct 2004 13:49:02 -0000	1.1
--- nested-1.c	19 Apr 2005 19:11:42 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-require-effective-target trampolines } */
+ 
  typedef __SIZE_TYPE__ size_t;
  extern int printf (const char *, ...);
  extern void *memset (void *, int, size_t);
  
  int bar (int (*)(), int, void *);

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