This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] testsuite: Compiler limit test fixes for 16-bit targets
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 Aug 2007 14:45:03 +0200
- Subject: [PATCH] testsuite: Compiler limit test fixes for 16-bit targets
This patch fixes seven testsuite failures on targets with 16-bit int by
ensuring we don't exceed limits derived from the size of int.
-FAIL: gcc.c-torture/compile/limits-blockid.c -O0 (test for excess errors)
-FAIL: gcc.c-torture/compile/limits-enumconst.c -O0 (test for excess errors)
-FAIL: gcc.c-torture/compile/limits-enumconst.c -O1 (test for excess errors)
-FAIL: gcc.c-torture/compile/limits-enumconst.c -O2 (test for excess errors)
-FAIL: gcc.c-torture/compile/limits-enumconst.c -O3 -fomit-frame-pointer (test for excess errors)
-FAIL: gcc.c-torture/compile/limits-enumconst.c -O3 -g (test for excess errors)
-FAIL: gcc.c-torture/compile/limits-enumconst.c -Os (test for excess errors)
Tested by running the testsuite on m32c-unknown-elf and
x86_64-unknown-linux-gnu. Ok for trunk?
:ADDPATCH testsuite:
2007-08-28 Rask Ingemann Lambertsen <rask@sygehus.dk>
* gcc.c-torture/compile/limits-blockid.c: Reduce testcase size to
10000 for targets where "int" can't hold at least 100000.
* gcc.c-torture/compile/limits-enumconst.c: Likewise.
Index: gcc/testsuite/gcc.c-torture/compile/limits-blockid.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/limits-blockid.c (revision 127806)
+++ gcc/testsuite/gcc.c-torture/compile/limits-blockid.c (working copy)
@@ -14,5 +14,9 @@
void q9_func(void)
{
+#if __INT_MAX__ >= 100000
LIM5(char t)
+#else
+ LIM4(char t)
+#endif
}
Index: gcc/testsuite/gcc.c-torture/compile/limits-enumconst.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/limits-enumconst.c (revision 127806)
+++ gcc/testsuite/gcc.c-torture/compile/limits-enumconst.c (working copy)
@@ -14,5 +14,9 @@
enum q21_enum
{
+#if __INT_MAX__ >= 100000
LIM5 (e)
+#else
+ LIM4 (e)
+#endif
};
--
Rask Ingemann Lambertsen