public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9686] testsuite: Fix up ext-floating{3,12}.C on i686-linux
@ 2024-03-27 11:01 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2024-03-27 11:01 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:aac30f8416e992c524b86eaa40f35f30fe04b755

commit r14-9686-gaac30f8416e992c524b86eaa40f35f30fe04b755
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Mar 27 12:00:58 2024 +0100

    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.

Diff:
---
 gcc/testsuite/g++.dg/cpp23/ext-floating12.C | 2 ++
 gcc/testsuite/g++.dg/cpp23/ext-floating3.C  | 1 +
 gcc/testsuite/lib/target-supports.exp       | 3 +++
 3 files changed, 6 insertions(+)

diff --git a/gcc/testsuite/g++.dg/cpp23/ext-floating12.C b/gcc/testsuite/g++.dg/cpp23/ext-floating12.C
index 77ee4c70a93..a09c3fc10c4 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 ca9399fccd2..803a057e7ef 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 3262104b5fd..843515f69d7 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"
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-27 11:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 11:01 [gcc r14-9686] testsuite: Fix up ext-floating{3,12}.C on i686-linux Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).