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]

Skip c99-tgmath-*.c for !c99_runtime (was Re: tgmath.h without complex.h)


"Joseph S. Myers" <joseph@codesourcery.com> writes:
> On Tue, 25 Sep 2007, Richard Sandiford wrote:
>> The problem is that SYSTEM_HEADER_DIR can be overridden by the target
>> makefile fragments, so we don't necessarily know the right value at
>> configure time.  I also think it would be a bad idea to test for
>> limits.h in the Makefile and complex.h in configure.
>
> SYSTEM_HEADER_DIR can also depend on the multilib, so the logic testing 
> for tgmath.h would best go in the loop over multilibs that runs 
> LIMITS_H_TEST.  This would mean tgmath.h goes in include-fixed rather than 
> include (which agrees with where I said it should go when include-fixed 
> was first proposed <http://gcc.gnu.org/ml/gcc/2004-11/msg00255.html>).

OK, this is getting too complicated.  How about we just go for the
option of continuing to install tgmath.h unconditionally and skip the
c99-tgmath* tests if !c99_runtime?  That's progress, and leaves open the
possiblity of doing what you want (or doing something else) later.

I.e. how about the patch below?  Tested on x86_64-linux-gnu (where the
tests still run and pass) and mipsisa64-elfoabi (where they are now
skipped).  OK to install?

Richard


gcc/testsuite/
	* gcc.dg/c99-tgmath-1.c: Require c99_runtime and add the associated
	options.
	* gcc.dg/c99-tgmath-2.c: Likewise.
	* gcc.dg/c99-tgmath-3.c: Likewise.
	* gcc.dg/c99-tgmath-4.c: Likewise.

Index: gcc/testsuite/gcc.dg/c99-tgmath-1.c
===================================================================
--- gcc/testsuite/gcc.dg/c99-tgmath-1.c	2007-09-25 22:09:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/c99-tgmath-1.c	2007-09-25 22:09:20.000000000 +0100
@@ -1,7 +1,8 @@
 /* Test for <tgmath.h> in C99. */
 /* Origin: Matt Austern <austern@apple.com>
-/* { dg-do preprocess } */
+/* { dg-do preprocess { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
+/* { dg-add-options c99_runtime } */
 
 /* Test that tgmath defines the macros it's supposed to. */
 #include <tgmath.h>
Index: gcc/testsuite/gcc.dg/c99-tgmath-2.c
===================================================================
--- gcc/testsuite/gcc.dg/c99-tgmath-2.c	2007-09-25 22:09:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/c99-tgmath-2.c	2007-09-25 22:09:20.000000000 +0100
@@ -1,7 +1,8 @@
 /* Test for <tgmath.h> in C99. */
 /* Origin: Matt Austern <austern@apple.com>
-/* { dg-do compile } */
+/* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
+/* { dg-add-options c99_runtime } */
 
 /* Test that invoking type-generic sin on a float invokes sinf. */
 #include <tgmath.h>
Index: gcc/testsuite/gcc.dg/c99-tgmath-3.c
===================================================================
--- gcc/testsuite/gcc.dg/c99-tgmath-3.c	2007-09-25 22:09:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/c99-tgmath-3.c	2007-09-25 22:09:20.000000000 +0100
@@ -1,7 +1,8 @@
 /* Test for <tgmath.h> in C99. */
 /* Origin: Matt Austern <austern@apple.com>
-/* { dg-do compile } */
+/* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
+/* { dg-add-options c99_runtime } */
 
 /* Test that invoking type-generic exp on a complex invokes cexp. */
 #include <tgmath.h>
Index: gcc/testsuite/gcc.dg/c99-tgmath-4.c
===================================================================
--- gcc/testsuite/gcc.dg/c99-tgmath-4.c	2007-09-25 22:09:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/c99-tgmath-4.c	2007-09-25 22:09:20.000000000 +0100
@@ -1,7 +1,8 @@
 /* Test for <tgmath.h> in C99. */
 /* Origin: Matt Austern <austern@apple.com>
-/* { dg-do compile } */
+/* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
+/* { dg-add-options c99_runtime } */
 
 /* Test that invoking type-generic pow on complex float invokes cpowf. */
 #include <tgmath.h>


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