Hi! 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.
Bootstrapped/regtested on x86_64-linux and i686-linux, 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, ok for trunk? 2024-03-26 Jakub Jelinek <ja...@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. --- gcc/testsuite/lib/target-supports.exp.jj 2024-03-19 08:55:18.500791497 +0100 +++ gcc/testsuite/lib/target-supports.exp 2024-03-26 20:30:41.963222438 +0100 @@ -3829,6 +3829,9 @@ proc check_effective_target_bfloat16_run } proc add_options_for_bfloat16 { flags } { + if { [istarget i?86-*-*] || [istarget x86_64-*-*] } { + return "$flags -msse2" + } return "$flags" } --- gcc/testsuite/g++.dg/cpp23/ext-floating3.C.jj 2022-09-27 08:03:27.000000000 +0200 +++ gcc/testsuite/g++.dg/cpp23/ext-floating3.C 2024-03-26 20:26:41.921609624 +0100 @@ -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" --- gcc/testsuite/g++.dg/cpp23/ext-floating12.C.jj 2022-10-31 20:15:49.755552032 +0100 +++ gcc/testsuite/g++.dg/cpp23/ext-floating12.C 2024-03-26 20:31:29.876546341 +0100 @@ -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> Jakub