diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-03-27 12:00:58 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-03-27 12:00:58 +0100 |
commit | aac30f8416e992c524b86eaa40f35f30fe04b755 (patch) | |
tree | 464388ea9694044e8d78e4a18aa46927dd6648c6 | |
parent | 258defbdee985c8f27c33e9f533c19d059941972 (diff) | |
download | gcc-aac30f8416e992c524b86eaa40f35f30fe04b755.zip gcc-aac30f8416e992c524b86eaa40f35f30fe04b755.tar.gz gcc-aac30f8416e992c524b86eaa40f35f30fe04b755.tar.bz2 |
testsuite: Fix up ext-floating{3,12}.C on i686-linux
These tests FAIL for quite a while on i686-linux since July last year,
likely r14-2628 . Since that patch gcc claims _Float16 and __bf16
support even without -msse2 because some functions could be using
target attribute.
Later r14-2691 added -msse2 to add_options_for_float16, but didn't do that
for bfloat16, plus ext-floating{3,12}.C tests need the added dg-add-options,
so that float16 and bfloat16 effective targets match the __STDCPP_FLOAT16_T__
or __STDCPP_BFLOAT16_T__ macros.
Fixes
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++23 (test for errors, line 144)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++23 (test for errors, line 146)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++23 (test for errors, line 148)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++23 (test for errors, line 150)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++23 (test for errors, line 152)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++23 (test for errors, line 154)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++26 (test for errors, line 144)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++26 (test for errors, line 146)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++26 (test for errors, line 148)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++26 (test for errors, line 150)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++26 (test for errors, line 152)
-FAIL: g++.dg/cpp23/ext-floating12.C -std=gnu++26 (test for errors, line 154)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for errors, line 107)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for errors, line 114)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for errors, line 126)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for errors, line 79)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for errors, line 86)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for errors, line 98)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for warnings, line 22)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for warnings, line 23)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for warnings, line 24)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++23 (test for warnings, line 25)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for errors, line 107)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for errors, line 114)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for errors, line 126)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for errors, line 79)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for errors, line 86)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for errors, line 98)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for warnings, line 22)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for warnings, line 23)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for warnings, line 24)
-FAIL: g++.dg/cpp23/ext-floating3.C -std=gnu++26 (test for warnings, line 25)
on the latter and changes nothing on the former.
2024-03-27 Jakub Jelinek <jakub@redhat.com>
* lib/target-supports.exp (add_options_for_bfloat16): Add -msse2 on
i?86/x86_64.
* g++.dg/cpp23/ext-floating3.C: Add dg-add-options float16.
* g++.dg/cpp23/ext-floating12.C: Add dg-add-options float16 and
bfloat16.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp23/ext-floating12.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp23/ext-floating3.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 3 |
3 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp23/ext-floating12.C b/gcc/testsuite/g++.dg/cpp23/ext-floating12.C index 77ee4c7..a09c3fc 100644 --- a/gcc/testsuite/g++.dg/cpp23/ext-floating12.C +++ b/gcc/testsuite/g++.dg/cpp23/ext-floating12.C @@ -1,6 +1,8 @@ // P1467R9 - Extended floating-point types and standard names. // { dg-do compile { target { c++23 && { i?86-*-linux* x86_64-*-linux* } } } } // { dg-options "" } +// { dg-add-options float16 } +// { dg-add-options bfloat16 } #include <complex> #include <stdfloat> diff --git a/gcc/testsuite/g++.dg/cpp23/ext-floating3.C b/gcc/testsuite/g++.dg/cpp23/ext-floating3.C index ca9399f..803a057 100644 --- a/gcc/testsuite/g++.dg/cpp23/ext-floating3.C +++ b/gcc/testsuite/g++.dg/cpp23/ext-floating3.C @@ -4,6 +4,7 @@ // And some further tests. // { dg-do compile { target { c++23 && { i?86-*-linux* x86_64-*-linux* } } } } // { dg-options "" } +// { dg-add-options float16 } #include "ext-floating.h" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 3262104..843515f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3829,6 +3829,9 @@ proc check_effective_target_bfloat16_runtime {} { } proc add_options_for_bfloat16 { flags } { + if { [istarget i?86-*-*] || [istarget x86_64-*-*] } { + return "$flags -msse2" + } return "$flags" } |