From patchwork Wed Mar 27 10:47:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1916692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Q/Qf1wwq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4Ngb4tZ8z1yWr for ; Wed, 27 Mar 2024 21:48:27 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D54363858407 for ; Wed, 27 Mar 2024 10:48:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D586F3858D20 for ; Wed, 27 Mar 2024 10:48:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D586F3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D586F3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711536487; cv=none; b=ay9qIl2xs/9ivYoC6smDzVEU4++GSARydwPGWA43hfzQnEjxOCRHdaqak2oPc4BKlKJTfOWzwyGIDY/4a4hZXuzWKZLdbMCnDTHOKpFm/ELEYsBhiWP2XtP9cvyKhgkwYmg9ap+/BbLFT5jQTNE/3dtTWyHLc29UntaSpub2jO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711536487; c=relaxed/simple; bh=htkt/fF0ds0x+qROpvvP0n6XTTIQormjHO51aI2zz1w=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=QxxbZQcph/lE1xB5Zxi+U82/s2cFQ9B5S1Ilw8Usj5JFgt4KKIgmUtCQ2pGm+wMvpF5JINKqMEyPhNERZePwhlSCmCPS+tLN87oMYwZiMzwNvhTiCnwcAFyC6M3ly7oxDiRkM3xi3OhMmjRjYsibD1dqzo8fuYijFFlFzGc7Sec= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711536485; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=OsQkWzzYxYi+9eZkEWskhXiap3pTpqRyVsjs1nH8ddU=; b=Q/Qf1wwqA802jKTYd8vJ/d1V6LRhUY0cIPdo+VF430PTwjxlTfuWLxRG22HzNtJ7E3r+pH 6oVQ7xutor/tX0LESwsfbNz8YrBy4NY9WEJrIeT/VYmLHY1BUtc9KhoUOQI2NZ7cf+xhNy oSql7Bt5mA+1MZ4OCXH8xiKPNp4nbF8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-421-a3izzccXN9WnKBK6Acku-A-1; Wed, 27 Mar 2024 06:48:02 -0400 X-MC-Unique: a3izzccXN9WnKBK6Acku-A-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B7A83C0E64A; Wed, 27 Mar 2024 10:48:01 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.57]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A004492BC8; Wed, 27 Mar 2024 10:48:01 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 42RAlsmJ1688626 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 27 Mar 2024 11:47:54 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 42RAlpsd1688625; Wed, 27 Mar 2024 11:47:51 +0100 Date: Wed, 27 Mar 2024 11:47:51 +0100 From: Jakub Jelinek To: Richard Biener , Uros Bizjak , Jeff Law , Mike Stump , Rainer Orth Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up ext-floating{3,12}.C on i686-linux Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org 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 * 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. Jakub --- 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 #include