From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 6A4B93858D20 for ; Wed, 5 Apr 2023 11:08:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A4B93858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680692918; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rgHve9XEmzORGaYb66LXSLw8UzkDzbX6sJfv2yK6JvY=; b=cjDl/ebgoWYfLe/BthMuTqRfUE+qpRQYEimG1/AbP+tjhwVK3DzJa1ZgvUbNh81DTpG4p2 LfgGxE1tisIr8GW+X+T0O1ofb4ZANto54gnVSiosQKqGMd8u4B0o5IeJxaQpdqCS/GyOff Hc0TT620Ktgpdqs4ieBFYd31cG2K8Ww= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-MIau532CNa2jFHYF_TadFg-1; Wed, 05 Apr 2023 07:08:36 -0400 X-MC-Unique: MIau532CNa2jFHYF_TadFg-1 Received: by mail-lf1-f71.google.com with SMTP id d23-20020a193857000000b004e9d2af9e57so14158577lfj.23 for ; Wed, 05 Apr 2023 04:08:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680692915; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rgHve9XEmzORGaYb66LXSLw8UzkDzbX6sJfv2yK6JvY=; b=Yugawz+kwk7ZHjEhQ3iJHmniCXkIu7pWv7qVCX5zxovK8I5zxe+TlCTUGd5ygPEio8 k7ivzDtW6q/0JEfykPBwWCtsTkqEQSQPZa4t8l1L8zmMQd9yTQlHxPGgxL2g3OIhbD+3 xGQ0YWU9jekjGtAu9VgUm9edK6H1nfB9RTpSkoA/0jeNxgpkaH35FY5oNwi7nFepGsZ0 K0p6V0SJoDkKwr34ZSFuHcnzCLR6KlKwNuGTlUJG5xFnJkJlqaCvLUcdM+NIL3vCv6/I X6+sMCB0r6WK+RAUIfKx4QCOUe4/ICUAfyTTwwK70og2ehGzyGQCBWu6k2HEMXwx12kK t0zw== X-Gm-Message-State: AAQBX9esFGNVlzKiMFqzif0xkAAW/tPCp/sZXqoYxqrxB5hvBWh38G7U vr/ocd45ohQObOjaGwsfWufdnx34qQe0IB/Z1ERSqBAOVcYh2FqWiAVABaGJQXoe4nTVIJEkLEF rBwVHWjleVwQ5+gpGzKyJQlYZG++oR6c= X-Received: by 2002:a2e:7c10:0:b0:298:b375:ace9 with SMTP id x16-20020a2e7c10000000b00298b375ace9mr2046363ljc.9.1680692915191; Wed, 05 Apr 2023 04:08:35 -0700 (PDT) X-Google-Smtp-Source: AKy350bawTgo9ELdSIcADjH7Ro+aZ+VtoHHolfywRTsU8d475ta7LqS1e3/ITRvHUu67hV22u45s6nirfaMauMdCdmQ= X-Received: by 2002:a2e:7c10:0:b0:298:b375:ace9 with SMTP id x16-20020a2e7c10000000b00298b375ace9mr2046358ljc.9.1680692914821; Wed, 05 Apr 2023 04:08:34 -0700 (PDT) MIME-Version: 1.0 References: <20230404230950.158556-1-arsen@aarsen.me> <20230404230950.158556-4-arsen@aarsen.me> In-Reply-To: <20230404230950.158556-4-arsen@aarsen.me> From: Jonathan Wakely Date: Wed, 5 Apr 2023 12:08:23 +0100 Message-ID: Subject: Re: [PATCH 4/4] libstdc++: Fix some freestanding test failures To: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: 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 it. 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/inc= lude/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/te= stsuite/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 fute= xes > // (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/l= ibstdc++-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/l= ibstdc++-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_p= artial_void.cc b/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer= _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 >