This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: fix PR testsuite/12325, inf unavailable on vax
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: janis187 at us dot ibm dot com
- Date: Sat, 13 Jan 2007 14:40:26 -0500 (EST)
- Subject: [PATCH]: fix PR testsuite/12325, inf unavailable on vax
In this PR, we get an error because some platforms (in this
case vax-netbsdelf) don't support inf and GCC blathers about it causing
the testsuite to flag the testcase as having an error.
The line in question actually folds away at the tree level and we never
need to actually generate any infs. So we can just ignore the warning.
I copied the dg-warning line from another testcase gcc.dg/builtin-inf-1.c,
so the logic should be correct. I don't have any vax systems, but I
tested it on sparc with "make check" to ensure there were no typos.
The PR was reported against 3.4, okay for all active branches?
Thanks,
--Kaveh
2007-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR testsuite/12325
* gcc.dg/torture/builtin-attr-1.c: Handle warnings from
targets that don't support Inf.
diff -rup orig/egcc-SVN20070111/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c egcc-SVN20070111/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c
--- orig/egcc-SVN20070111/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c 2006-11-01 01:06:38.000000000 -0500
+++ egcc-SVN20070111/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c 2007-01-13 14:21:19.017904997 -0500
@@ -339,7 +339,7 @@ FPTEST2 (fmod)
BUILTIN_FPTEST0 (huge_val)
FPTEST2 (hypot)
FPTEST1T (ilogb, int)
-BUILTIN_FPTEST0 (inf)
+BUILTIN_FPTEST0 (inf) /* { dg-warning "does not support infinity" "INF unsupported" { target vax-*-* c4x-*-* } } */
FPTEST1 (j0)
FPTEST1 (j1)
FPTEST2ARG1 (jn, int)