testsuite: no dfp run without dfprt
Checks
Commit Message
newlib-src/libc/include/sys/fenv.h doesn't define the FE_* macros that
libgcc expects to enable decimal float support. Only after newlib is
configured and built does an overriding header that defines those
macros become available in objdir/<target>/newlib/targ-include/, but
by then, libgcc has already been built without dfp and libbid.
This has exposed a number of tests that attempt to link dfp programs
without requiring a dfprt effective target.
dfp.exp already skips if dfp support is missing altogether, and sets
the default to compile rather than run if dfp support is present in
the compiler but missing in the runtime libraries.
However, some of the dfp tests override the default without requiring
dfprt. Drop the overriders where reasonable, and add the explicit
requirement elsewhere.
Regstrapped on x86_64-linux-gnu; also tested on aarch64-elf with gcc-13,
where the problem was observed. Ok to install?
for gcc/testsuite/ChangeLog
* c-c++-common/dfp/pr36800.c: Drop dg-do overrider.
* c-c++-common/dfp/pr39034.c: Likewise.
* c-c++-common/dfp/pr39035.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d32-1.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d32-2.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d64-1.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d64-2.c: Likewise.
* gcc.dg/dfṕ/builtin-tgmath-dfp.c: Likewise.
* gcc.dg/dfṕ/c23-float-dfp-4.c: Likewise.
* gcc.dg/dfṕ/c23-float-dfp-5.c: Likewise.
* gcc.dg/dfṕ/c23-float-dfp-6.c: Likewise.
* gcc.dg/dfṕ/c23-float-dfp-7.c: Likewise.
* gcc.dg/dfp/pr108068.c: Likewise.
* gcc.dg/dfp/pr97439.c: Likewise.
* g++.dg/compat/decimal/pass-1_main.C: Require dfprt.
* g++.dg/compat/decimal/pass-2_main.C: Likewise.
* g++.dg/compat/decimal/pass-3_main.C: Likewise.
* g++.dg/compat/decimal/pass-4_main.C: Likewise.
* g++.dg/compat/decimal/pass-5_main.C: Likewise.
* g++.dg/compat/decimal/pass-6_main.C: Likewise.
* g++.dg/compat/decimal/return-1_main.C: Likewise.
* g++.dg/compat/decimal/return-2_main.C: Likewise.
* g++.dg/compat/decimal/return-3_main.C: Likewise.
* g++.dg/compat/decimal/return-4_main.C: Likewise.
* g++.dg/compat/decimal/return-5_main.C: Likewise.
* g++.dg/compat/decimal/return-6_main.C: Likewise.
* g++.dg/eh/dfp-1.C: Likewise.
* g++.dg/eh/dfp-2.C: Likewise.
* g++.dg/eh/dfp-saves-aarch64.C: Likewise.
* gcc.c-torture/execute/pr80692.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d128-1.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d128-2.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d128-3.c: Likewise.
* gcc.dg/dfṕ/bid-non-canonical-d128-4.c: Likewise.
---
gcc/testsuite/c-c++-common/dfp/pr36800.c | 2 --
gcc/testsuite/c-c++-common/dfp/pr39034.c | 1 -
gcc/testsuite/c-c++-common/dfp/pr39035.c | 1 -
gcc/testsuite/g++.dg/compat/decimal/pass-1_main.C | 1 +
gcc/testsuite/g++.dg/compat/decimal/pass-2_main.C | 1 +
gcc/testsuite/g++.dg/compat/decimal/pass-3_main.C | 1 +
gcc/testsuite/g++.dg/compat/decimal/pass-4_main.C | 1 +
gcc/testsuite/g++.dg/compat/decimal/pass-5_main.C | 1 +
gcc/testsuite/g++.dg/compat/decimal/pass-6_main.C | 1 +
.../g++.dg/compat/decimal/return-1_main.C | 1 +
.../g++.dg/compat/decimal/return-2_main.C | 1 +
.../g++.dg/compat/decimal/return-3_main.C | 1 +
.../g++.dg/compat/decimal/return-4_main.C | 1 +
.../g++.dg/compat/decimal/return-5_main.C | 1 +
.../g++.dg/compat/decimal/return-6_main.C | 1 +
gcc/testsuite/g++.dg/eh/dfp-1.C | 1 +
gcc/testsuite/g++.dg/eh/dfp-2.C | 1 +
gcc/testsuite/g++.dg/eh/dfp-saves-aarch64.C | 1 +
gcc/testsuite/gcc.c-torture/execute/pr80692.c | 1 +
.../gcc.dg/dfp/bid-non-canonical-d128-1.c | 2 +-
.../gcc.dg/dfp/bid-non-canonical-d128-2.c | 2 +-
.../gcc.dg/dfp/bid-non-canonical-d128-3.c | 2 +-
.../gcc.dg/dfp/bid-non-canonical-d128-4.c | 2 +-
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-1.c | 1 -
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-2.c | 1 -
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c | 1 -
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-2.c | 1 -
gcc/testsuite/gcc.dg/dfp/builtin-snan-1.c | 1 -
gcc/testsuite/gcc.dg/dfp/builtin-tgmath-dfp.c | 1 -
gcc/testsuite/gcc.dg/dfp/c23-float-dfp-4.c | 1 -
gcc/testsuite/gcc.dg/dfp/c23-float-dfp-5.c | 1 -
gcc/testsuite/gcc.dg/dfp/c23-float-dfp-6.c | 1 -
gcc/testsuite/gcc.dg/dfp/c23-float-dfp-7.c | 1 -
gcc/testsuite/gcc.dg/dfp/pr108068.c | 1 -
gcc/testsuite/gcc.dg/dfp/pr97439.c | 1 -
35 files changed, 20 insertions(+), 20 deletions(-)
Comments
On 1/23/24 00:13, Alexandre Oliva wrote:
>
> newlib-src/libc/include/sys/fenv.h doesn't define the FE_* macros that
> libgcc expects to enable decimal float support. Only after newlib is
> configured and built does an overriding header that defines those
> macros become available in objdir/<target>/newlib/targ-include/, but
> by then, libgcc has already been built without dfp and libbid.
>
> This has exposed a number of tests that attempt to link dfp programs
> without requiring a dfprt effective target.
>
> dfp.exp already skips if dfp support is missing altogether, and sets
> the default to compile rather than run if dfp support is present in
> the compiler but missing in the runtime libraries.
>
> However, some of the dfp tests override the default without requiring
> dfprt. Drop the overriders where reasonable, and add the explicit
> requirement elsewhere.
>
> Regstrapped on x86_64-linux-gnu; also tested on aarch64-elf with gcc-13,
> where the problem was observed. Ok to install?
>
>
> for gcc/testsuite/ChangeLog
>
> * c-c++-common/dfp/pr36800.c: Drop dg-do overrider.
> * c-c++-common/dfp/pr39034.c: Likewise.
> * c-c++-common/dfp/pr39035.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d32-1.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d32-2.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d64-1.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d64-2.c: Likewise.
> * gcc.dg/dfṕ/builtin-tgmath-dfp.c: Likewise.
> * gcc.dg/dfṕ/c23-float-dfp-4.c: Likewise.
> * gcc.dg/dfṕ/c23-float-dfp-5.c: Likewise.
> * gcc.dg/dfṕ/c23-float-dfp-6.c: Likewise.
> * gcc.dg/dfṕ/c23-float-dfp-7.c: Likewise.
> * gcc.dg/dfp/pr108068.c: Likewise.
> * gcc.dg/dfp/pr97439.c: Likewise.
> * g++.dg/compat/decimal/pass-1_main.C: Require dfprt.
> * g++.dg/compat/decimal/pass-2_main.C: Likewise.
> * g++.dg/compat/decimal/pass-3_main.C: Likewise.
> * g++.dg/compat/decimal/pass-4_main.C: Likewise.
> * g++.dg/compat/decimal/pass-5_main.C: Likewise.
> * g++.dg/compat/decimal/pass-6_main.C: Likewise.
> * g++.dg/compat/decimal/return-1_main.C: Likewise.
> * g++.dg/compat/decimal/return-2_main.C: Likewise.
> * g++.dg/compat/decimal/return-3_main.C: Likewise.
> * g++.dg/compat/decimal/return-4_main.C: Likewise.
> * g++.dg/compat/decimal/return-5_main.C: Likewise.
> * g++.dg/compat/decimal/return-6_main.C: Likewise.
> * g++.dg/eh/dfp-1.C: Likewise.
> * g++.dg/eh/dfp-2.C: Likewise.
> * g++.dg/eh/dfp-saves-aarch64.C: Likewise.
> * gcc.c-torture/execute/pr80692.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d128-1.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d128-2.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d128-3.c: Likewise.
> * gcc.dg/dfṕ/bid-non-canonical-d128-4.c: Likewise.
OK
jeff
On Jan 24, 2024, Jeff Law <jeffreyalaw@gmail.com> wrote:
> OK
Thanks. FTR, there were typos (s/ṕ/p/g) and a missing entry for
builtin-snan-1.c in the ChangeLog entries, that the ChangeLog checker
kindly pointed out. Fixed below, just pushed along with the
otherwise-unchanged patch as r14-8505.
for gcc/testsuite/ChangeLog
* c-c++-common/dfp/pr36800.c: Drop dg-do overrider.
* c-c++-common/dfp/pr39034.c: Likewise.
* c-c++-common/dfp/pr39035.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d32-1.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d32-2.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d64-1.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d64-2.c: Likewise.
* gcc.dg/dfp/builtin-snan-1.c: Likewise.
* gcc.dg/dfp/builtin-tgmath-dfp.c: Likewise.
* gcc.dg/dfp/c23-float-dfp-4.c: Likewise.
* gcc.dg/dfp/c23-float-dfp-5.c: Likewise.
* gcc.dg/dfp/c23-float-dfp-6.c: Likewise.
* gcc.dg/dfp/c23-float-dfp-7.c: Likewise.
* gcc.dg/dfp/pr108068.c: Likewise.
* gcc.dg/dfp/pr97439.c: Likewise.
* g++.dg/compat/decimal/pass-1_main.C: Require dfprt.
* g++.dg/compat/decimal/pass-2_main.C: Likewise.
* g++.dg/compat/decimal/pass-3_main.C: Likewise.
* g++.dg/compat/decimal/pass-4_main.C: Likewise.
* g++.dg/compat/decimal/pass-5_main.C: Likewise.
* g++.dg/compat/decimal/pass-6_main.C: Likewise.
* g++.dg/compat/decimal/return-1_main.C: Likewise.
* g++.dg/compat/decimal/return-2_main.C: Likewise.
* g++.dg/compat/decimal/return-3_main.C: Likewise.
* g++.dg/compat/decimal/return-4_main.C: Likewise.
* g++.dg/compat/decimal/return-5_main.C: Likewise.
* g++.dg/compat/decimal/return-6_main.C: Likewise.
* g++.dg/eh/dfp-1.C: Likewise.
* g++.dg/eh/dfp-2.C: Likewise.
* g++.dg/eh/dfp-saves-aarch64.C: Likewise.
* gcc.c-torture/execute/pr80692.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d128-1.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d128-2.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d128-3.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d128-4.c: Likewise.
@@ -1,5 +1,3 @@
-/* { dg-do run } */
-
#include <stdarg.h>
#include "dfp-dbg.h"
@@ -1,4 +1,3 @@
-/* { dg-do run } */
/* { dg-options "-O" } */
/* DFP TR 24732 == WG14 / N1176, N1312 */
@@ -1,4 +1,3 @@
-/* { dg-do run } */
/* { dg-options "-O" } */
/* DFP TR 24732 == WG14 / N1176, N1312 */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test passing decimal scalars by value. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test passing decimal classes by value. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test passing decimal scalars and classes by value. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test passing decimal classes and scalars by value. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test passing decimal scalars and typedef'd classes by value. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test passing typedef'd decimal classes and scalars by value. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test function return values for decimal float scalars. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test function return values for decimal classes. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test function return values for decimal float scalars and classes. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test function return values for decimal float classes and scalars. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test function return values for decimal float scalars and typedef'd
classes. */
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
/* Test function return values for typedef'd decimal float classes
and scalars. */
@@ -1,5 +1,6 @@
// { dg-do run }
// { dg-require-effective-target dfp }
+/* { dg-require-effective-target dfprt } */
extern "C" void abort ();
@@ -1,5 +1,6 @@
// { dg-do run }
// { dg-require-effective-target dfp }
+/* { dg-require-effective-target dfprt } */
extern "C" void abort ();
@@ -1,5 +1,6 @@
// { dg-do run { target aarch64*-*-* } }
// { dg-require-effective-target dfp }
+/* { dg-require-effective-target dfprt } */
/* Test unwinding of AArch64 register saves. */
/* We cannot use #include <decimal/decimal> because it defines
@@ -1,4 +1,5 @@
/* { dg-require-effective-target dfp } */
+/* { dg-require-effective-target dfprt } */
int main () {
_Decimal64 d64 = -0.DD;
@@ -1,5 +1,5 @@
/* Test non-canonical BID significands: _Decimal128. Bug 91226. */
-/* { dg-do run { target lp64 } } */
+/* { dg-do run { target { lp64 && dfprt } } } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O2" } */
@@ -1,6 +1,6 @@
/* Test non-canonical BID significands: _Decimal128, case where
combination field starts 11. Bug 91226. */
-/* { dg-do run { target lp64 } } */
+/* { dg-do run { target { lp64 && dfprt } } } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O2" } */
@@ -1,5 +1,5 @@
/* Test non-canonical BID significands: _Decimal128. Bug 91226. */
-/* { dg-do run { target lp64 } } */
+/* { dg-do run { target { lp64 && dfprt } } } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O0" } */
@@ -1,6 +1,6 @@
/* Test non-canonical BID significands: _Decimal128, case where
combination field starts 11. Bug 91226. */
-/* { dg-do run { target lp64 } } */
+/* { dg-do run { target { lp64 && dfprt } } } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O0" } */
@@ -1,5 +1,4 @@
/* Test non-canonical BID significands: _Decimal32. Bug 91226. */
-/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O2" } */
@@ -1,5 +1,4 @@
/* Test non-canonical BID significands: _Decimal32. Bug 91226. */
-/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O0" } */
@@ -1,5 +1,4 @@
/* Test non-canonical BID significands: _Decimal64. Bug 91226. */
-/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O2" } */
@@ -1,5 +1,4 @@
/* Test non-canonical BID significands: _Decimal64. Bug 91226. */
-/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu23 -O0" } */
@@ -1,6 +1,5 @@
/* Test __builtin_nansd* functions. Test not requiring runtime
exceptions support. */
-/* { dg-do run } */
/* { dg-options "" } */
volatile _Decimal32 d32 = __builtin_nansd32 ("");
@@ -1,5 +1,4 @@
/* Test __builtin_tgmath: valid uses, decimal floating-point types. */
-/* { dg-do run } */
/* { dg-options "" } */
extern void abort (void);
@@ -1,5 +1,4 @@
/* Test DEC_INFINITY defined in <float.h> with DFP support. */
-/* { dg-do run } */
/* { dg-options "-std=c23" } */
#include <float.h>
@@ -1,5 +1,4 @@
/* Test DEC_NAN defined in <float.h> with DFP support. */
-/* { dg-do run } */
/* { dg-options "-std=c23" } */
#include <float.h>
@@ -2,7 +2,6 @@
quiet not signaling. (This would only actually fail for a
signaling NaN in the hardware DFP case, because the software DFP
support in libgcc does not integrate with hardware exceptions.) */
-/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
/* { dg-options "-std=c23" } */
@@ -1,5 +1,4 @@
/* Test DEC*_SNAN macros defined in <float.h> with DFP support. */
-/* { dg-do run } */
/* { dg-options "-std=c23" } */
#include <float.h>
@@ -1,5 +1,4 @@
/* PR tree-optimization/108068 */
-/* { dg-do run } */
/* { dg-options "-O2" } */
int
@@ -1,4 +1,3 @@
-// { dg-do run }
// { dg-options "-O1" }
static int