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


Am Montag, 18. April 2005 11:03 schrieb Giovanni Bajo:
>
> So, there is no reason for an effective-target for nested functions, since
> nested functions without trampolines are available for all backends.
>
> Giovanni Bajo

You're right. I now agree that there is no need to use an additional 
"nested_function" keyword.

So here again are the modified patches and change logs:

Yours,

Björn


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

? ? ? ? * lib/target-supports.exp: 
	Add effective-target keywords "trampolines" and "int_larger_than_16_bits".
	Add "avr-*-*" to the list of targets without support for profiling. 



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

	*gcc.c-torture/compile/20001226-1.c:
	Skip avr-*-* and use dg-xfail-if for 68HC11 and 68HC12.

	*gcc.c-torture/compile/20010226-1.c, nested-1.c and 20050122-2.c:
	Add dg-require-effective-target trampolines 

	*gcc.c-torture/compile/20010327-1.c:
	Update comment and xfail avr-*-*
     
        *gcc.c-torture/compile/20011119-1.c, 981001-2.c and 20011119-2.c:
	Add dg-require-alias

	*gcc.c-torture/compile/20020604-1.c:
	Use dg-xfail-if also for HC11 / HC12, add avr-*-* to the xfail list. 
	
        *gcc.c-torture/compile/980506-1.c:
        Use dg-xfail-if for HC11/HC12 xstormy and add avr to the list

? dummy
Index: target-supports.exp
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.50
diff -C8 -r1.50 target-supports.exp
*** target-supports.exp	14 Apr 2005 17:46:08 -0000	1.50
--- target-supports.exp	18 Apr 2005 14:06:36 -0000
***************
*** 247,262 ****
--- 247,282 ----
  	    set gc_sections_available_saved 1
  	} else {
  	    set gc_sections_available_saved 0
  	}
      }
      return $gc_sections_available_saved
  }
  
+ # Looks at target_info struct for finding out whether target is known to
+ # lack support for trampolines.
+  
+ proc check_effective_target_trampolines { } {
+     if {[target_info exists no_trampolines]} {
+       return 0
+     }
+     return 1
+ }
+ 
+ # Looks at target_info struct for finding out whether target defines int to be 
+ # less than 32 bit. 
+ 
+ proc check_effective_target_int_larger_than_16_bits { } {
+     if {[target_info exists int_size_16_bits]} {
+       return 0
+     }
+     return 1
+ }
+ 
  # 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
  
      # These conditions depend on the argument so examine them before
***************
*** 282,297 ****
--- 302,318 ----
      # Now examine the cache variable.
      if {![info exists profiling_available_saved]} {
  	# 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]
  	     || [istarget *-*-windiss] } {
  	    set profiling_available_saved 0
Index: 20001226-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20001226-1.c,v
retrieving revision 1.2
diff -C8 -r1.2 20001226-1.c
*** 20001226-1.c	13 Jun 2003 05:40:59 -0000	1.2
--- 20001226-1.c	18 Apr 2005 14:15:43 -0000
***************
*** 1,12 ****
  /* 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; \
    if (a < b)  goto lt;
  
  #define C4(x,b) C((x)[0], b) C((x)[1],b) C((x)[2],b) C((x)[3],b)
--- 1,14 ----
  /* This does not assemble on m68hc11 because the function is larger
     than 64K.  */
! /* { dg-do assemble } */
  /* { dg-xfail-if "jump beyond 128K not supported" "xtensa-*-*" "-O0" "" } */
+ /* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
+ /* { dg-xfail-if "too much code" { "m6811-*-*" "m6812-*-*" } { "*" } { "" } } */
  
  /* This testcase exposed two branch shortening bugs on powerpc.  */
  
  #define C(a,b) \
    if (a > b)  goto gt; \
    if (a < b)  goto lt;
  
  #define C4(x,b) C((x)[0], b) C((x)[1],b) C((x)[2],b) C((x)[3],b)
Index: 20010226-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c,v
retrieving revision 1.1
diff -C8 -r1.1 20010226-1.c
*** 20010226-1.c	9 Jan 2002 21:34:30 -0000	1.1
--- 20010226-1.c	18 Apr 2005 14:15:43 -0000
***************
*** 1,8 ****
--- 1,11 ----
+ /* { dg-do compile }                                */
+ /* { dg-require-effective-target trampolines } */
+ 
  void f1 (void *);
  void f3 (void *, void (*)(void *));
  void f2 (void *);
  
  int foo (void *a, int b)
  {
    if (!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 -C8 -r1.5 20010327-1.c
*** 20010327-1.c	3 Mar 2003 19:02:28 -0000	1.5
--- 20010327-1.c	18 Apr 2005 14:15:43 -0000
***************
*** 1,9 ****
  /* This testcase tests whether GCC can produce static initialized data
     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;
--- 1,13 ----
  /* This testcase tests whether GCC can produce static initialized data
     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-do compile } */
! /* { 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 -C8 -r1.2 20011119-1.c
*** 20011119-1.c	25 Mar 2002 20:55:20 -0000	1.2
--- 20011119-1.c	18 Apr 2005 14:15:44 -0000
***************
*** 1,4 ****
--- 1,7 ----
+ /* { dg-do compile } */
+ /* { 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 -C8 -r1.2 20011119-2.c
*** 20011119-2.c	25 Mar 2002 20:55:20 -0000	1.2
--- 20011119-2.c	18 Apr 2005 14:15:44 -0000
***************
*** 1,6 ****
--- 1,7 ----
+ /* { 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");
  int xxx(void) { return 23; }
Index: 20020604-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20020604-1.c,v
retrieving revision 1.4
diff -C8 -r1.4 20020604-1.c
*** 20020604-1.c	23 Dec 2003 20:36:59 -0000	1.4
--- 20020604-1.c	18 Apr 2005 14:15:47 -0000
***************
*** 1,11 ****
! /* 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)
  	       (reg:SF 76))) 525 {*fop_sf_comm_nosse} (insn_list 134 (nil))
         (expr_list:REG_DEAD (reg:SF 73) (nil)))
     couldn't be reloaded. */
--- 1,11 ----
! /* { dg-do assemble } */
! /* { 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)
  	       (reg:SF 76))) 525 {*fop_sf_comm_nosse} (insn_list 134 (nil))
         (expr_list:REG_DEAD (reg:SF 73) (nil)))
     couldn't be reloaded. */
Index: 20050122-2.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20050122-2.c,v
retrieving revision 1.1
diff -C8 -r1.1 20050122-2.c
*** 20050122-2.c	22 Jan 2005 17:52:44 -0000	1.1
--- 20050122-2.c	18 Apr 2005 14:15:50 -0000
***************
*** 1,9 ****
--- 1,12 ----
  /* Related to PR 19484.  */
+ /* { dg-do compile }                                */
+ /* { dg-require-effective-target trampolines } */
+ 
  extern void foo (void) __attribute__((noreturn));
  int n;
  
  void
  g (void)
  {
    __label__ lab;
    void h (void) { if (n == 2) goto lab; }
Index: 980506-1.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/980506-1.c,v
retrieving revision 1.5
diff -C8 -r1.5 980506-1.c
*** 980506-1.c	23 Dec 2003 20:36:59 -0000	1.5
--- 980506-1.c	18 Apr 2005 14:15:57 -0000
***************
*** 1,12 ****
  /* 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];
  unsigned char	TIFFFax1DNextState[230][256];
  
  typedef struct tableentry {
--- 1,12 ----
  /* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
+ /* { dg-do assemble } */
+ /* { 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];
  unsigned char	TIFFFax1DNextState[230][256];
  
  typedef struct tableentry {
Index: 981001-2.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/981001-2.c,v
retrieving revision 1.2
diff -C8 -r1.2 981001-2.c
*** 981001-2.c	16 Dec 1998 22:10:22 -0000	1.2
--- 981001-2.c	18 Apr 2005 14:15:57 -0000
***************
*** 1,8 ****
--- 1,11 ----
+ /* { dg-do compile } */
+ /* { dg-require-alias "" } */
+ 
  #define weak_alias(func, aliasname) \
  	extern __typeof (func) aliasname __attribute__ ((weak, alias (#func)));
  
  #define add3(d, m, c) ((d) + (m) + (c))
  
  int
  __add3(int d, int m, int 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 -C8 -r1.1 nested-1.c
*** nested-1.c	15 Oct 2004 13:49:02 -0000	1.1
--- nested-1.c	18 Apr 2005 14:15:59 -0000
***************
*** 1,8 ****
--- 1,11 ----
+ /* { dg-do compile }                                */
+ /* { 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 *);
  
  int
  main(int argc, char **argv)

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