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]

[PATCH,testsuite] Disable certain tests for 16-bit targets and some for picochip


Hello all,
The attached patch disables certain tests for all 16-bit targets (the test contains some assumption about int being 32-bit). It also disables a couple of tests just for picochip target. On Janis's advice, i have added support for "freestanding", based on the meaning from Section 4 of C99 standard.


Of course, any other target that is freestanding could be added to the check_effective_target_freestanding function and I intend to send another patch with more tests disabled for freestanding targets.

Please let me know if this is okay to commit.

Cheers
Hari
Index: gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.x
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.x	(revision 0)
+++ gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_freestanding] } {
+        return 1; 
+}
+
+return 0;
Index: gcc/testsuite/gcc.c-torture/execute/pr37573.x
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr37573.x	(revision 0)
+++ gcc/testsuite/gcc.c-torture/execute/pr37573.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+        return 1
+}
+
+return 0
Index: gcc/testsuite/gcc.c-torture/execute/20081117-1.x
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20081117-1.x	(revision 0)
+++ gcc/testsuite/gcc.c-torture/execute/20081117-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+        return 1
+}
+
+return 0
Index: gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c	(revision 142761)
+++ gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-skip-if "Array too big" { "avr-*-*" } { "*" } { "" } } */ 
+/* { dg-skip-if "Array too big" { avr-*-* picochip-*-* } { "*" } { "" } } */ 
 
 #define STR2 "012345678901234567890123456789012345678901234567890123456789\
 0123456789012345678901234567890123456789"
Index: gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c	(revision 142761)
+++ gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-skip-if "too complex for avr" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "too complex for avr and picochip" { picochip-*-* avr-*-* } { "*" } { "" } } */
 #define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
 #define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
 		LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
Index: gcc/testsuite/gcc.dg/array-quals-1.c
===================================================================
--- gcc/testsuite/gcc.dg/array-quals-1.c	(revision 142761)
+++ gcc/testsuite/gcc.dg/array-quals-1.c	(working copy)
@@ -4,7 +4,7 @@
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do compile } */
 /* The MMIX port always switches to the .data section at the end of a file.  */
-/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* avr-*-*} } } */
+/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* picochip--*-* avr-*-*} } } */
 static const int a[2] = { 1, 2 };
 const int a1[2] = { 1, 2 };
 typedef const int ci;
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 142761)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,14 @@
+2008-12-15  Hariharan Sandanagobalane <hariharan@picochip.com>
+
+	* gcc.c-torture/execute/builtins/fprintf.x: Disable test for
+	freestanding targets.
+	* gcc.c-torture/execute/pr37573.x: Disable test for 16-bit targets.
+	* gcc.c-torture/execute/20081117-1.x: Disable test for 16-bit targets.
+	* gcc.c-torture/compile/limits-stringlit.c: Disable test for picochip.
+	* gcc.dg/array-quals-1.c: Disable test for picochip.
+	* lib/target-supports.exp: Add support for freestanding ports and 
+	disable picochip for profiling tests.
+
 2008-12-14  Paul Thomas  <pault@gcc.gnu.org>
 
 	PR fortran/35937
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 142761)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -452,6 +452,11 @@ proc check_profiling_available { test_wh
 	return 0
     }
 
+    # At present, there is no profiling support on picochip.
+    if { [istarget picochip-*-*] } {
+	return 0
+    }
+
     # At present, there is no profiling support on NetWare.
     if { [istarget *-*-netware*] } {
 	return 0
@@ -495,6 +500,14 @@ proc check_profiling_available { test_wh
     return $profiling_available_saved
 }
 
+proc check_effective_target_freestanding { } {
+    if { [istarget picochip-*-*] } then {
+        return 1
+    } else {
+        return 0
+    }
+}
+
 # Return 1 if target has packed layout of structure members by
 # default, 0 otherwise.  Note that this is slightly different than
 # whether the target has "natural alignment": both attributes may be

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