From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by sourceware.org (Postfix) with ESMTPS id D0F893858D20; Wed, 5 Apr 2023 11:29:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0F893858D20 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Ps2TK6Yh9z9sxL; Wed, 5 Apr 2023 13:29:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1680694149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OtokdmB0fxOxgRv/1viojKjLlJ4yAxlBW5wAP5m5zSE=; b=s+JPw6eTeTXw3WWIIwDXRCiQVWRWQp2p0A/KN5TfKesqv/odin13KCjyP+mM/8DkUogVyp I6/N0nVshncTcKTMLbOWmPAeb95IgYWA8+ZTWNPISOWA66jqcvRot7w+NZbt3pOMfht01B jourxvu3alZrZif4cOXElnuYpUW50+lRsN/E7FF7MIsVPvcbdeOr+Gwdfz1MuYtxJVmkGS 5hVhWlfqoFRP7BUoVjfQQTJxkY484cC/WaqHW+BgSJOZOnQ520Zdd6S1gWGUYYJgnblyRV pFVkmWr7Dqi2BjaIjTeYg6EtmAi+yr4ZQs+OJLaVGOcKoy2p3DvnKSJIYy+NBQ== References: <20230404230950.158556-1-arsen@aarsen.me> <20230404230950.158556-4-arsen@aarsen.me> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCH 4/4] libstdc++: Fix some freestanding test failures Date: Wed, 05 Apr 2023 13:28:47 +0200 In-reply-to: Message-ID: <86355ebm9o.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4Ps2TK6Yh9z9sxL X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,URI_HEX autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jonathan Wakely writes: > On Wed, 5 Apr 2023 at 00:13, Arsen Arsenovi=C4=87 via Libstdc++ > wrote: >> >> At some point, was added to the non-hosted bit of the C++17 >> block, which induced failures in many tests. >> >> In addition, some tests also lacked a dg-require-effective-target hosted >> tag. >> >> libstdc++-v3/ChangeLog: >> >> * include/precompiled/stdc++.h (C++17): Don't double-include >> , once with wrong conditions. >> * testsuite/18_support/96817.cc: Require hosted. >> * testsuite/18_support/bad_exception/59392.cc: Ditto. >> * testsuite/20_util/scoped_allocator/108952.cc: Ditto. >> * testsuite/20_util/uses_allocator/lwg3527.cc: Ditto. > > Maybe this could be adjusted to not use std::allocator. > >> * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc: > > This fails because std::abs s not freestanding (which is surprising, > at least for the integral overloads). > We could adjust the test to define its own abs but maybe it's not worth i= t. I can take a look in stage 1. > OK for trunk. > >> Ditto. >> --- >> libstdc++-v3/include/precompiled/stdc++.h | 1 - >> libstdc++-v3/testsuite/18_support/96817.cc | 1 + >> libstdc++-v3/testsuite/18_support/bad_exception/59392.cc | 1 + >> libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc | 1 + >> libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc | 1 + >> .../29_atomics/atomic/operators/pointer_partial_void.cc | 1 + >> 6 files changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/libstdc++-v3/include/precompiled/stdc++.h b/libstdc++-v3/in= clude/precompiled/stdc++.h >> index bc011986b53..176ad79ff3c 100644 >> --- a/libstdc++-v3/include/precompiled/stdc++.h >> +++ b/libstdc++-v3/include/precompiled/stdc++.h >> @@ -75,7 +75,6 @@ >> >> #if __cplusplus >=3D 201703L >> #include >> -#include >> // #include >> #include >> #include >> diff --git a/libstdc++-v3/testsuite/18_support/96817.cc b/libstdc++-v3/t= estsuite/18_support/96817.cc >> index 70938812bd8..073fc337e8f 100644 >> --- a/libstdc++-v3/testsuite/18_support/96817.cc >> +++ b/libstdc++-v3/testsuite/18_support/96817.cc >> @@ -17,6 +17,7 @@ >> >> // { dg-do run } >> // { dg-additional-options "-pthread" { target pthread } } >> +// { dg-require-effective-target hosted } >> >> // Static init cannot detect recursion for gthreads targets without fut= exes >> // (and the futex case can only detect it if __libc_single_threaded=3D= =3Dtrue). >> diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/59392.cc b/= libstdc++-v3/testsuite/18_support/bad_exception/59392.cc >> index ac64e6eddb2..ae972d0535d 100644 >> --- a/libstdc++-v3/testsuite/18_support/bad_exception/59392.cc >> +++ b/libstdc++-v3/testsuite/18_support/bad_exception/59392.cc >> @@ -17,6 +17,7 @@ >> >> // { dg-options "-Wno-deprecated" } >> // { dg-do run { target c++14_down } } >> +// { dg-require-effective-target hosted } >> >> #include >> #include >> diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc b= /libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc >> index a6b9c67498c..9342f453bf4 100644 >> --- a/libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc >> +++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc >> @@ -1,4 +1,5 @@ >> // { dg-do compile { target c++11 } } >> +// { dg-require-effective-target hosted } >> >> #include >> >> diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc b/= libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc >> index ae377f4b5a3..c5a7d513b31 100644 >> --- a/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc >> +++ b/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc >> @@ -1,5 +1,6 @@ >> // { dg-options "-std=3Dgnu++20" } >> // { dg-do compile { target c++20 } } >> +// { dg-require-effective-target hosted } >> >> #include >> >> diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_= partial_void.cc b/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointe= r_partial_void.cc >> index ddb63233a64..e5d221ed15a 100644 >> --- a/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial= _void.cc >> +++ b/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial= _void.cc >> @@ -1,5 +1,6 @@ >> // { dg-do run { target { c++11_only || c++14_only } } } >> // { dg-require-atomic-builtins "" } >> +// { dg-require-effective-target hosted } >> >> // Copyright (C) 2012-2023 Free Software Foundation, Inc. >> // >> -- >> 2.40.0 >> =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZC1bg18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTnOkBAI+6Sxg8VzJ6rZCFAA8hquolQRqj10NDIkhJ 2t50X/cmAQC5WNxvNvcfbQ83J1z3fTtUSS5kc973Mnnw9aFnjbyxDg== =MeP5 -----END PGP SIGNATURE----- --=-=-=--