]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[committed] [RISC-V] Don't run new rounding tests on newlib risc-v targets
authorJeff Law <jlaw@ventanamicro.com>
Thu, 2 May 2024 14:42:32 +0000 (08:42 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Thu, 2 May 2024 14:44:16 +0000 (08:44 -0600)
The new round_32.c and round_64.c tests depend on the optimizers to recognize
the conversions feeding the floor/ceil calls and convert them into ceilf,
floorf and the like.

Those transformations only occur when the target indicates the C library has
the appropriate routines (fnclass == function_c99_misc).  While newlib has
these routines, they are not exposed as available to the compiler and thus the
transformation the tests depend on do not happen. Naturally the scan-tests then
fail.

gcc/testsuite
* gcc.target/riscv/round_32.c: Add require-effective-target glibc.
* gcc.target/riscv/round_64.c: Likewise.

gcc/testsuite/gcc.target/riscv/round_32.c
gcc/testsuite/gcc.target/riscv/round_64.c

index f9fea70ad5523c76c98bd2c20ce4d17db98b8b79..88ff77aff2e049716592f785609b75ee37f7d0b4 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { riscv32*-*-* } } } */
+/* { dg-require-effective-target glibc } */
 /* { dg-options "-march=rv32gc -mabi=ilp32d -fno-math-errno -funsafe-math-optimizations -fno-inline" } */
 /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
 
index e79690979a50663c1c3518724cc23466d9e20490..5e13bccdcd2a19f459ae24f7c2e87da34687a0b7 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { riscv64*-*-* } } } */
+/* { dg-require-effective-target glibc } */
 /* { dg-options "-march=rv64gc -mabi=lp64d -fno-math-errno -funsafe-math-optimizations -fno-inline" } */
 /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */