[patch installed]: Run more c99 tests on solaris 10
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Sun Oct 8 01:15:00 GMT 2006
I added some code to gcc.dg/builtins-config.h, modeled on what darwin
already does in that file, to ensure we get the right flags used on
solaris2 when running c99 tests. Doing so helped me uncover a few more
testcases that required special handling.
Tested on sparc-sun-solaris2.10 via c-only "make check" and installed on
the trunk.
--Kaveh
2006-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/builtins-config.h: Ensure we use -std=c99 on solaris2.
* gcc.dg/torture/builtin-convert-1.c,
gcc.dg/torture/builtin-convert-2.c,
gcc.dg/torture/builtin-convert-3.c,
gcc.dg/torture/builtin-power-1.c: Use -std=c99 on solaris2.
diff -rup orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/builtins-config.h egcc-SVN20061006/gcc/testsuite/gcc.dg/builtins-config.h
--- orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/builtins-config.h 2006-03-21 20:01:23.000000000 -0500
+++ egcc-SVN20061006/gcc/testsuite/gcc.dg/builtins-config.h 2006-10-07 14:48:41.389775562 -0400
@@ -11,6 +11,12 @@
#if defined(__hppa) && defined(__hpux)
/* PA HP-UX doesn't have the entire C99 runtime. */
+#elif defined(__sun) && __STDC_VERSION__ - 0 < 199901L
+/* Solaris up to 9 doesn't have the entire C99 runtime.
+ Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L.
+ But, if you're including this file, you probably want to test the
+ newer behaviour, so: */
+#error forgot to set -std=c99.
#elif defined(__sun) && ! defined (_STDC_C99)
/* Solaris up to 9 doesn't have the entire C99 runtime.
Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L. */
diff -rup orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c
--- orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c 2006-01-22 23:31:01.000000000 -0500
+++ egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c 2006-10-07 14:44:38.501161566 -0400
@@ -8,6 +8,7 @@
/* { dg-do link } */
/* { dg-options "-ffast-math" } */
/* { dg-options "-ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */
+/* { dg-options "-ffast-math -std=c99" { target *-*-solaris2* } } */
#include "../builtins-config.h"
diff -rup orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c
--- orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c 2006-01-22 23:31:01.000000000 -0500
+++ egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c 2006-10-07 14:44:45.339912538 -0400
@@ -8,6 +8,7 @@
/* { dg-do link } */
/* { dg-options "-ffast-math" } */
/* { dg-options "-ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */
+/* { dg-options "-ffast-math -std=c99" { target *-*-solaris2* } } */
#include "../builtins-config.h"
diff -rup orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c
--- orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c 2006-01-22 23:31:01.000000000 -0500
+++ egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c 2006-10-07 14:44:56.039252338 -0400
@@ -8,6 +8,7 @@
/* { dg-do link } */
/* { dg-options "-ffast-math" } */
/* { dg-options "-ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */
+/* { dg-options "-ffast-math -std=c99" { target *-*-solaris2* } } */
#include "../builtins-config.h"
diff -rup orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-power-1.c egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
--- orig/egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-power-1.c 2006-01-22 23:30:56.000000000 -0500
+++ egcc-SVN20061006/gcc/testsuite/gcc.dg/torture/builtin-power-1.c 2006-10-07 14:50:44.070983019 -0400
@@ -8,6 +8,7 @@
/* { dg-do link } */
/* { dg-options "-ffast-math" } */
/* { dg-options "-ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */
+/* { dg-options "-ffast-math -std=c99" { target *-*-solaris2* } } */
#include "../builtins-config.h"
More information about the Gcc-patches
mailing list