Rainer Orth <r...@cebitec.uni-bielefeld.de> writes:

>>>> I’m not quite sure what you’re proposing here (probably missing something
>>>> obvious).
>>>
>>> At the moment, gcc/testsuite/lib/target-supports.exp
>>> (add_options_for_c99_runtime) adds -mmacosx-version-min=10.3 to the
>>> testcase flags on powerpc-*-darwin*.  Since, as Joseph mentioned, gcc
>>> now defaults to -std=gnu11 (which implies a C99 runtime), this (or
>>> something similar) would always be needed now (unless someone forces,
>>> say, -std=c90) and should be handled in the Darwin/PowerPC driver code,
>>> not just the testsuite.
>>
>> The driver has the following rules:
>>
>>   * if the user puts -mmacosx-version-min= on the command line that trumps 
>> all
>>
>>   * else we pick a default using the following priority.
>>     1. MACOSX_DEPLOYMENT_TARGET env var.
>>     2. (native)
>>          - what the kernel returns for the system version.
>>         (cross)
>>          - what was set at configure time for DEF_MIN_OSX_VERSION (which will
>>            be >= 10.3.9 as things stand)
>>
>> So, of course, if we were hosted on 10.2.8 - that would create a problem
>> (2, native)
>> but if the system doesn’t have c99 support, that’s a problem anyway.
>>
>> Otherwise, deliberate mis-configuration or passing -mmacosx-version-min=  in
>> RUNTESTFLAGS … but we don’t need to support that.
>
> Right: users should be allowed to shoot themselves ;-)
>
>> Therefore, I suspect that the addition of the "-mmacosx-version-min=10.3”
>> is not
>> necessary and is a hang-over from older toolchains.
>
> I know now what's going on...
>
>> Perhaps, we could have a target_supports_c99 (maybe we already do), since
>> it’s
>> feasible that some embedded platforms might also want that exclusion - that
>> would
>> cover earlier Darwin “automagically” assuming folks remember to apply it.
>
> We do, and it's unsurprisingly called c99_runtime, too: in this as in a
> few other cases where a specific feature may need additional options to
> enable it, we have dg-add-options <option keyword> corresponding to the
> <effective target keyword>.
>
> What's happening for c99_runtime, as can be seen in
> lib/target-supports.exp (check_effective_target_c99_runtime) is that it
> checks gcc.dg/builtins-config.h for a definition of HAVE_C99_RUNTIME.
>
> In the Darwin/PowerPC case, that isn't defined before 10.3, skipping the
> affected tests.  However, if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
> isn't defined, builtins-config.h #error's out.  Fortunately, gcc on
> Darwin always passes -mmacosx-version-min now, so there's no need to
> explicitly pass it in add_options_for_c99_runtime and that proc together
> with all calls to dg-add-options c99_runtime can go unless something
> really unexpected comes up during Solaris testing.

Here's what I installed after successful i386-pc-solaris2.11,
sparc-sun-solaris2.11, and x86_64-pc-linux-gnu testing.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2019-10-10  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        gcc:
        * doc/sourcebuild.texi (Test Directives, Add Options): Remove
        c99_runtime.

        gcc/testsuite:
        * lib/target-supports.exp (add_options_for_c99_runtime): Remove.
        (check_effective_target_c99_runtime): Remove call to
        add_options_for_c99_runtime.

        * gcc.dg/builtins-18.c: Remove dg-add-options c99_runtime.
        * gcc.dg/builtins-20.c: Likewise.
        * gcc.dg/builtins-53.c: Likewise.
        * gcc.dg/builtins-55.c: Likewise.
        * gcc.dg/builtins-67.c: Likewise.
        * gcc.dg/c99-tgmath-1.c: Likewise.
        * gcc.dg/c99-tgmath-2.c: Likewise.
        * gcc.dg/c99-tgmath-3.c: Likewise.
        * gcc.dg/c99-tgmath-4.c: Likewise.
        * gcc.dg/ipa/inline-8.c: Likewise.
        * gcc.dg/ipa/ipa-icf-5.c: Likewise.
        * gcc.dg/ipa/ipa-icf-7.c: Likewise.
        * gcc.dg/nextafter-2.c: Likewise.
        * gcc.dg/pr42427.c: Likewise.
        * gcc.dg/pr78965.c: Likewise.
        * gcc.dg/single-precision-constant.c: Likewise.
        * gcc.dg/torture/builtin-convert-1.c: Likewise.
        * gcc.dg/torture/builtin-convert-2.c: Likewise.
        * gcc.dg/torture/builtin-convert-3.c: Likewise.
        * gcc.dg/torture/builtin-convert-4.c: Likewise.
        * gcc.dg/torture/builtin-fp-int-inexact.c: Likewise.
        * gcc.dg/torture/builtin-fp-int-inexact-c2x.c: Likewise.
        * gcc.dg/torture/builtin-integral-1.c: Likewise.
        * gcc.dg/torture/builtin-power-1.c: Likewise.
        * gcc.dg/tree-ssa/copy-sign-1.c: Likewise.
        * gcc.dg/tree-ssa/minmax-2.c: Likewise.
        * gcc.dg/tree-ssa/mult-abs-2.c: Likewise.
        * gcc.target/i386/387-builtin-fp-int-inexact.c: Likewise.
        * gcc.target/i386/387-rint-inline-1.c: Likewise.
        * gcc.target/i386/387-rint-inline-2.c: Likewise.
        * gcc.target/i386/conversion.c: Likewise.
        * gcc.target/i386/pr47312.c: Likewise.
        * gcc.target/i386/sse2-builtin-fp-int-inexact.c: Likewise.
        * gcc.target/i386/sse2-rint-inline-1.c: Likewise.
        * gcc.target/i386/sse2-rint-inline-2.c: Likewise.
        * gcc.target/i386/sse4_1-builtin-fp-int-inexact.c: Likewise.
        * gcc.target/i386/sse4_1-rint-inline.c: Likewise.

# HG changeset patch
# Parent  9d03670f83f9095b7fbae460a569fc1adc003372
Remove dg-add-options c99_runtime

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2528,9 +2528,6 @@ instructions, if this is supported by th
 Add the target-specific flags needed to enable functions to bind
 locally when using pic/PIC passes in the testsuite.
 
-@item c99_runtime
-Add the target-specific flags needed to access the C99 runtime.
-
 @item float@var{n}
 Add the target-specific flags needed to use the @code{_Float@var{n}} type.
 
diff --git a/gcc/testsuite/gcc.dg/builtins-18.c b/gcc/testsuite/gcc.dg/builtins-18.c
--- a/gcc/testsuite/gcc.dg/builtins-18.c
+++ b/gcc/testsuite/gcc.dg/builtins-18.c
@@ -7,7 +7,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-O2 -ffast-math" } */
-/* { dg-add-options c99_runtime } */
 
 #include "builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.dg/builtins-20.c b/gcc/testsuite/gcc.dg/builtins-20.c
--- a/gcc/testsuite/gcc.dg/builtins-20.c
+++ b/gcc/testsuite/gcc.dg/builtins-20.c
@@ -7,7 +7,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-O2 -ffast-math" } */
-/* { dg-add-options c99_runtime } */
 
 #include "builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.dg/builtins-53.c b/gcc/testsuite/gcc.dg/builtins-53.c
--- a/gcc/testsuite/gcc.dg/builtins-53.c
+++ b/gcc/testsuite/gcc.dg/builtins-53.c
@@ -10,7 +10,6 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O2 -ffast-math" } */
-/* { dg-add-options c99_runtime } */
 
 #include "builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.dg/builtins-55.c b/gcc/testsuite/gcc.dg/builtins-55.c
--- a/gcc/testsuite/gcc.dg/builtins-55.c
+++ b/gcc/testsuite/gcc.dg/builtins-55.c
@@ -1,6 +1,5 @@
 /* { dg-do link } */
 /* { dg-options "-O2 -ffast-math" } */
-/* { dg-add-options c99_runtime } */
 
 #include "builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.dg/builtins-67.c b/gcc/testsuite/gcc.dg/builtins-67.c
--- a/gcc/testsuite/gcc.dg/builtins-67.c
+++ b/gcc/testsuite/gcc.dg/builtins-67.c
@@ -2,7 +2,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-ffast-math -lm" }  */
-/* { dg-add-options c99_runtime } */
 /* Bionic doesn't have rintl */
 /* { dg-require-effective-target non_bionic } */
 
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-1.c b/gcc/testsuite/gcc.dg/c99-tgmath-1.c
--- a/gcc/testsuite/gcc.dg/c99-tgmath-1.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-1.c
@@ -2,7 +2,6 @@
 /* Origin: Matt Austern <aust...@apple.com>
 /* { dg-do preprocess { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target tgmath_h } */
 
 /* Test that tgmath defines the macros it's supposed to. */
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-2.c b/gcc/testsuite/gcc.dg/c99-tgmath-2.c
--- a/gcc/testsuite/gcc.dg/c99-tgmath-2.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-2.c
@@ -2,7 +2,6 @@
 /* Origin: Matt Austern <aust...@apple.com>
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target tgmath_h } */
 
 /* Test that invoking type-generic sin on a float invokes sinf. */
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-3.c b/gcc/testsuite/gcc.dg/c99-tgmath-3.c
--- a/gcc/testsuite/gcc.dg/c99-tgmath-3.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-3.c
@@ -2,7 +2,6 @@
 /* Origin: Matt Austern <aust...@apple.com>
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target tgmath_h } */
 
 /* Test that invoking type-generic exp on a complex invokes cexp. */
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-4.c b/gcc/testsuite/gcc.dg/c99-tgmath-4.c
--- a/gcc/testsuite/gcc.dg/c99-tgmath-4.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-4.c
@@ -2,7 +2,6 @@
 /* Origin: Matt Austern <aust...@apple.com>
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target tgmath_h } */
 
 /* Test that invoking type-generic pow on complex float invokes cpowf. */
diff --git a/gcc/testsuite/gcc.dg/ipa/inline-8.c b/gcc/testsuite/gcc.dg/ipa/inline-8.c
--- a/gcc/testsuite/gcc.dg/ipa/inline-8.c
+++ b/gcc/testsuite/gcc.dg/ipa/inline-8.c
@@ -3,7 +3,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target c99_runtime } */
 /* { dg-options "-O2"  } */
-/* { dg-add-options c99_runtime } */
 #include <math.h>
 extern int isnanf (float);
 /* Can't be inlined because isnanf will be optimized out.  */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c
--- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c
@@ -1,6 +1,5 @@
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
-/* { dg-add-options c99_runtime } */
 
 #include <complex.h>
 
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c
--- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c
@@ -1,6 +1,5 @@
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
-/* { dg-add-options c99_runtime } */
 
 #include <complex.h>
 
diff --git a/gcc/testsuite/gcc.dg/nextafter-2.c b/gcc/testsuite/gcc.dg/nextafter-2.c
--- a/gcc/testsuite/gcc.dg/nextafter-2.c
+++ b/gcc/testsuite/gcc.dg/nextafter-2.c
@@ -3,7 +3,6 @@
 /* { dg-require-effective-target c99_runtime } */
 /* { dg-options "-O2 -fno-builtin" } */
 /* { dg-add-options ieee } */
-/* { dg-add-options c99_runtime } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/pr42427.c b/gcc/testsuite/gcc.dg/pr42427.c
--- a/gcc/testsuite/gcc.dg/pr42427.c
+++ b/gcc/testsuite/gcc.dg/pr42427.c
@@ -1,6 +1,5 @@
 /* { dg-do assemble { target c99_runtime } } */
 /* { dg-options "-O2 -fexceptions -fnon-call-exceptions -fpeel-loops" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target exceptions } */
 
diff --git a/gcc/testsuite/gcc.dg/pr78965.c b/gcc/testsuite/gcc.dg/pr78965.c
--- a/gcc/testsuite/gcc.dg/pr78965.c
+++ b/gcc/testsuite/gcc.dg/pr78965.c
@@ -1,7 +1,6 @@
 /* PR tree-optimization/78965 */
 /* { dg-do run { target c99_runtime } } */
 /* { dg-options "-O2" } */
-/* { dg-add-options c99_runtime } */
 
 int
 main ()
diff --git a/gcc/testsuite/gcc.dg/single-precision-constant.c b/gcc/testsuite/gcc.dg/single-precision-constant.c
--- a/gcc/testsuite/gcc.dg/single-precision-constant.c
+++ b/gcc/testsuite/gcc.dg/single-precision-constant.c
@@ -4,7 +4,6 @@
 
 /* { dg-do run } */
 /* { dg-options "-fsingle-precision-constant" } */
-/* { dg-add-options c99_runtime } */
 
 #include <math.h>
 #include <float.h>
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c b/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c
@@ -7,7 +7,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-ffast-math" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target c99_runtime } */
 
 #include "../builtins-config.h"
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c b/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-convert-2.c
@@ -7,7 +7,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-ffast-math" } */
-/* { dg-add-options c99_runtime } */
 
 #include "../builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c b/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-convert-3.c
@@ -7,7 +7,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-ffast-math" } */
-/* { dg-add-options c99_runtime } */
 
 #include "../builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-convert-4.c b/gcc/testsuite/gcc.dg/torture/builtin-convert-4.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-convert-4.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-convert-4.c
@@ -7,7 +7,6 @@
 
 /* { dg-do compile } */
 /* { dg-options "-ftrapping-math -fdump-tree-original" } */
-/* { dg-add-options c99_runtime } */
 
 #include "../builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c b/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact-c2x.c
@@ -1,7 +1,6 @@
 /* Test C2X enables -fno-fp-int-builtin-inexact.  */
 /* { dg-do run } */
 /* { dg-options "-std=c2x" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target fenv_exceptions } */
 
 #include "builtin-fp-int-inexact.c"
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact.c b/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-fp-int-inexact.c
@@ -1,7 +1,6 @@
 /* Test -fno-fp-int-builtin-inexact.  */
 /* { dg-do run } */
 /* { dg-options "-fno-fp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target fenv_exceptions } */
 
 #include <fenv.h>
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-integral-1.c b/gcc/testsuite/gcc.dg/torture/builtin-integral-1.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-integral-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-integral-1.c
@@ -10,7 +10,6 @@
    that various math functions are marked const/pure and can be
    folded.  */
 /* { dg-options "-ffinite-math-only -fno-math-errno" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target c99_runtime } */
 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
 
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-power-1.c b/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
--- a/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
@@ -7,7 +7,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-ffast-math" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-skip-if "PR44214" { *-*-* } { "-O0" } { "" } } */
 
 #include "../builtins-config.h"
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/copy-sign-1.c b/gcc/testsuite/gcc.dg/tree-ssa/copy-sign-1.c
--- a/gcc/testsuite/gcc.dg/tree-ssa/copy-sign-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/copy-sign-1.c
@@ -1,7 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target c99_runtime } */
 /* { dg-options "-O2 -ffast-math -fdump-tree-gimple" } */
-/* { dg-add-options c99_runtime } */
 float f(float x)
 {
   return (x > 0.f ? -1.f : 1.f);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/minmax-2.c b/gcc/testsuite/gcc.dg/tree-ssa/minmax-2.c
--- a/gcc/testsuite/gcc.dg/tree-ssa/minmax-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/minmax-2.c
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fstrict-overflow -fdump-tree-optimized" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target c99_runtime } */
 
 static int max(int a,int b){return (a<b)?b:a;}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/mult-abs-2.c b/gcc/testsuite/gcc.dg/tree-ssa/mult-abs-2.c
--- a/gcc/testsuite/gcc.dg/tree-ssa/mult-abs-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/mult-abs-2.c
@@ -1,7 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target c99_runtime } */
 /* { dg-options "-O2 -ffast-math -fdump-tree-gimple" } */
-/* { dg-add-options c99_runtime } */
 
 float f(float x)
 {
diff --git a/gcc/testsuite/gcc.target/i386/387-builtin-fp-int-inexact.c b/gcc/testsuite/gcc.target/i386/387-builtin-fp-int-inexact.c
--- a/gcc/testsuite/gcc.target/i386/387-builtin-fp-int-inexact.c
+++ b/gcc/testsuite/gcc.target/i386/387-builtin-fp-int-inexact.c
@@ -1,7 +1,6 @@
 /* Test -fno-fp-int-builtin-inexact for 387.  */
 /* { dg-do run } */
 /* { dg-options "-O2 -mfancy-math-387 -mfpmath=387 -fno-fp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target fenv_exceptions } */
 
 #include "../../gcc.dg/torture/builtin-fp-int-inexact.c"
diff --git a/gcc/testsuite/gcc.target/i386/387-rint-inline-1.c b/gcc/testsuite/gcc.target/i386/387-rint-inline-1.c
--- a/gcc/testsuite/gcc.target/i386/387-rint-inline-1.c
+++ b/gcc/testsuite/gcc.target/i386/387-rint-inline-1.c
@@ -2,7 +2,6 @@
    should be expanded when spurious "inexact" allowed.  */
 /* { dg-do compile } */
 /* { dg-options "-O2 -mfancy-math-387 -mfpmath=387 -ffp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 
 #define TEST(FN, TYPE)				\
   do						\
diff --git a/gcc/testsuite/gcc.target/i386/387-rint-inline-2.c b/gcc/testsuite/gcc.target/i386/387-rint-inline-2.c
--- a/gcc/testsuite/gcc.target/i386/387-rint-inline-2.c
+++ b/gcc/testsuite/gcc.target/i386/387-rint-inline-2.c
@@ -2,7 +2,6 @@
    should be expanded even when spurious "inexact" not allowed.  */
 /* { dg-do compile } */
 /* { dg-options "-O2 -mfancy-math-387 -mfpmath=387 -fno-fp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 
 #define TEST(FN, TYPE)				\
   do						\
diff --git a/gcc/testsuite/gcc.target/i386/conversion.c b/gcc/testsuite/gcc.target/i386/conversion.c
--- a/gcc/testsuite/gcc.target/i386/conversion.c
+++ b/gcc/testsuite/gcc.target/i386/conversion.c
@@ -2,7 +2,6 @@
 
 /* { dg-do link } */
 /* { dg-options "-ffast-math" }  */
-/* { dg-add-options c99_runtime } */
 
 #include "../../gcc.dg/builtins-config.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/pr47312.c b/gcc/testsuite/gcc.target/i386/pr47312.c
--- a/gcc/testsuite/gcc.target/i386/pr47312.c
+++ b/gcc/testsuite/gcc.target/i386/pr47312.c
@@ -4,7 +4,6 @@
 /* { dg-require-effective-target xop } */
 /* { dg-require-effective-target c99_runtime } */
 /* { dg-options "-O -flto -mno-sse3 -mxop" } */
-/* { dg-add-options c99_runtime } */
 
 extern double fma (double, double, double);
 extern float fmaf (float, float, float);
diff --git a/gcc/testsuite/gcc.target/i386/sse2-builtin-fp-int-inexact.c b/gcc/testsuite/gcc.target/i386/sse2-builtin-fp-int-inexact.c
--- a/gcc/testsuite/gcc.target/i386/sse2-builtin-fp-int-inexact.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-builtin-fp-int-inexact.c
@@ -1,7 +1,6 @@
 /* Test -fno-fp-int-builtin-inexact for SSE 2.  */
 /* { dg-do run } */
 /* { dg-options "-O2 -msse2 -mfpmath=sse -fno-fp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target fenv_exceptions } */
 /* { dg-require-effective-target sse2 } */
 
diff --git a/gcc/testsuite/gcc.target/i386/sse2-rint-inline-1.c b/gcc/testsuite/gcc.target/i386/sse2-rint-inline-1.c
--- a/gcc/testsuite/gcc.target/i386/sse2-rint-inline-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-rint-inline-1.c
@@ -2,7 +2,6 @@
    should be expanded when spurious "inexact" allowed.  */
 /* { dg-do compile } */
 /* { dg-options "-O2 -msse2 -mfpmath=sse -ffp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target sse2 } */
 
 #define TEST(FN, TYPE)				\
diff --git a/gcc/testsuite/gcc.target/i386/sse2-rint-inline-2.c b/gcc/testsuite/gcc.target/i386/sse2-rint-inline-2.c
--- a/gcc/testsuite/gcc.target/i386/sse2-rint-inline-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-rint-inline-2.c
@@ -2,7 +2,6 @@
    should be expanded even when spurious "inexact" not allowed.  */
 /* { dg-do compile } */
 /* { dg-options "-O2 -msse2 -mfpmath=sse -fno-fp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target sse2 } */
 
 #define TEST(FN, TYPE)				\
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-builtin-fp-int-inexact.c b/gcc/testsuite/gcc.target/i386/sse4_1-builtin-fp-int-inexact.c
--- a/gcc/testsuite/gcc.target/i386/sse4_1-builtin-fp-int-inexact.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-builtin-fp-int-inexact.c
@@ -1,7 +1,6 @@
 /* Test -fno-fp-int-builtin-inexact for SSE 4.1.  */
 /* { dg-do run } */
 /* { dg-options "-O2 -msse4.1 -mfpmath=sse -fno-fp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target fenv_exceptions } */
 /* { dg-require-effective-target sse4 } */
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-rint-inline.c b/gcc/testsuite/gcc.target/i386/sse4_1-rint-inline.c
--- a/gcc/testsuite/gcc.target/i386/sse4_1-rint-inline.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-rint-inline.c
@@ -2,7 +2,6 @@
    when spurious "inexact" not allowed.  */
 /* { dg-do compile } */
 /* { dg-options "-O2 -msse4.1 -mfpmath=sse -fno-fp-int-builtin-inexact" } */
-/* { dg-add-options c99_runtime } */
 /* { dg-require-effective-target sse4 } */
 
 #define TEST(FN, TYPE)				\
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -7488,18 +7488,6 @@ proc check_effective_target_fd_truncate 
     return [check_runtime chsize $prog]
 }
 
-# Add to FLAGS all the target-specific flags needed to access the c99 runtime.
-
-proc add_options_for_c99_runtime { flags } {
-    if { [istarget *-*-solaris2*] } {
-	return "$flags -std=c99"
-    }
-    if { [istarget powerpc-*-darwin*] } {
-	return "$flags -mmacosx-version-min=10.3"
-    }
-    return $flags
-}
-
 # Add to FLAGS all the target-specific flags needed to enable
 # full IEEE compliance mode.
 
@@ -7581,8 +7569,7 @@ proc check_effective_target_c99_runtime 
 	    #error !HAVE_C99_RUNTIME
 	    #endif
 	}
-	check_no_compiler_messages_nocache c99_runtime assembly \
-	    $contents [add_options_for_c99_runtime ""]
+	check_no_compiler_messages_nocache c99_runtime assembly $contents
     }]
 }
 

Reply via email to