From af38b9146aa457c0bbd679ebf0aa897097942300 Mon Sep 17 00:00:00 2001 From: Daniel Thornburgh Date: Fri, 1 Dec 2023 10:32:12 -0800 Subject: [PATCH] Enable float torture suite tests --- .../C/gcc-c-torture/execute/930513-1.c | 2 +- .../C/gcc-c-torture/execute/CMakeLists.txt | 94 +++++++++++-------- 2 files changed, 57 insertions(+), 39 deletions(-) diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c b/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c index f16300768..561acbfde 100644 --- a/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c +++ b/SingleSource/Regression/C/gcc-c-torture/execute/930513-1.c @@ -1,7 +1,7 @@ /* { dg-additional-options "-Wl,-u,_printf_float" { target newlib_nano_io } } */ #include -char buf[2]; +char buf[3]; f (fp) int (*fp)(char *, const char *, ...); diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt b/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt index 8fd7ca39c..a27c85e3d 100644 --- a/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt +++ b/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt @@ -202,6 +202,7 @@ file(GLOB TestRequiresLibM CONFIGURE_DEPENDS complex-5.c # -lm needed on FreeBSD ) + ## ## Architecture-specific Test Blacklists ## @@ -406,7 +407,9 @@ if(ARCH STREQUAL "MOS") pr65427.c pr70903.c pr85169.c + scal-to-vec1.c scal-to-vec2.c + scal-to-vec3.c simd-1.c simd-2.c simd-4.c @@ -455,10 +458,57 @@ if(ARCH STREQUAL "MOS") # Undefined behavior with short enums and short == int. enum-3.c + # Too slow. + loop-ivopts-1.c + pr59643.c + # Temporarily disabled tests. # --------------------------- - # Requires floating point. + # Requires libm + pr39501.c + + # Requires __builtin_return_address. + 20010122-1.c + 20030323-1.c + 20030811-1.c + pr17377.c + + # Requires __builtin_frame_address. + frame-address.c + + # Requires built-in-setjmp + built-in-setjmp.c + pr84521.c + + # Requires FILE* + fprintf-1.c + fprintf-2.c + printf-2.c + user-printf.c + vfprintf-1.c + gofast.c + + # Requires qsort + pr34456.c + + # Requres "g" inline asm contraint. + pr40022.c + pr51933.c + pr56866.c + pr65053-1.c + pr65053-2.c + pr68328.c + pr78726.c + pr81588.c + pr82954.c + pr88904.c + pr65956.c + stkalign.c + ) + list(APPEND MOSTestsToSkip ${TestRequiresLibM}) + + file(GLOB TestRequiresLibPrintfFlt CONFIGURE_DEPENDS 20000223-1.c 20000603-1.c 20000605-1.c @@ -638,45 +688,9 @@ if(ARCH STREQUAL "MOS") va-arg-7.c va-arg-pack-1.c va-arg-trap-1.c - - # Requires __builtin_return_address. - 20010122-1.c - 20030323-1.c - 20030811-1.c - pr17377.c - - # Requires __builtin_frame_address. - frame-address.c - - # Requires built-in-setjmp - built-in-setjmp.c - pr84521.c - - # Requires FILE* - fprintf-1.c - fprintf-2.c - printf-2.c - user-printf.c - vfprintf-1.c - - # Requires qsort - pr34456.c - - # Requres "g" inline asm contraint. - pr40022.c - pr51933.c - pr56866.c - pr65053-1.c - pr65053-2.c - pr68328.c - pr78726.c - pr81588.c - pr82954.c - pr88904.c - pr65956.c - stkalign.c ) + list(APPEND TestsToSkip ${MOSTestsToSkip}) if (CMAKE_BUILD_TYPE STREQUAL Debug AND CMAKE_C_FLAGS_DEBUG MATCHES -O0) file(GLOB MOSO0TestsToSkip CONFIGURE_DEPENDS @@ -740,6 +754,10 @@ foreach(File ${TestFiles}) list(APPEND MaybeCFlags "-fwrapv") endif() + if(${File} IN_LIST TestRequiresLibPrintfFlt) + list(APPEND MaybeLDFlags "-lprintf_flt") + endif() + # Add Test Target gcc_torture_execute_test(${File} PREFIX "GCC-C-execute"