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 5D7953858CDA for ; Thu, 14 Sep 2023 08:17:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D7953858CDA 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=1694679457; 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=C7506Ztej7AbCuRZmNfDieXwvUVJFH0u65zlgaFqqo0=; b=aX5hrbyHNwrzJHcftjba1FQEjXs7/kRAFNtCzS8ztnJTM+Kutx2VmBZ4dODCvAcf+REErR nY+chs5qfpbow4u3l2Ql+Vf1nGjHNZk77ybzFqjotpBuGE6aVkVYbVOOcrOrKNwRnfTIGC xAIJIoiLZfKH3bVVHqjAhtzXc/RMdN0= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-353-grCOcAJKMZWsRno9ee2t8g-1; Thu, 14 Sep 2023 04:17:36 -0400 X-MC-Unique: grCOcAJKMZWsRno9ee2t8g-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2bce36a1628so8632831fa.1 for ; Thu, 14 Sep 2023 01:17:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694679455; x=1695284255; h=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=C7506Ztej7AbCuRZmNfDieXwvUVJFH0u65zlgaFqqo0=; b=eEEp9a/JwTsEP/SN9XA7n0y0N9mXEZDS9WshYnWyAxmxwzEhuoHfpz9TfFU/VjclHI qwyi7FNKy289WOtLnP6JSdnt7JeEEjkSMq1u9JburNhQVD1SapVaS1jld2redICJnWZI U8T33JogvB7CNA2J1jz0F6CqWUCzva2JOW+GeDRZVf8UIDmcQpIii6jtGftQ/ZgEq2dV j1TOu9koXG24dHPzyNox2FizS1L3PJR4+YMISdONkyMVfQECZ4bQajnTzKCY8EydvpS1 AXoGOcaxRBJcQ5DUCXy4ybqZoxnrQS8gogZQ3981bb4GVyctRZk7IVkAld4hhFYJFmtm cjfw== X-Gm-Message-State: AOJu0YxS2McphymgXUbhlc8Tyznixlcdy574HTXDNoLPMGOZlCudjhRk ocWzL1rWM9PqYjlhyOg25ixVDozpeHVTi2TUb+BdEnE/KiIYZhpE0kAV/DYIfQ1mvo4CIM3ZiCK wbStKdDq6cD5/3kih60LuFOkAK9aPDY1kcw== X-Received: by 2002:a2e:808f:0:b0:2bc:e51d:89a3 with SMTP id i15-20020a2e808f000000b002bce51d89a3mr4122701ljg.29.1694679454971; Thu, 14 Sep 2023 01:17:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwbwNtZQ3f+pki4UJmkSKfNkEw3I5KZqoHHenme57AkfEe9mvwTLfkSkR9fPwmnRS6C5ukvUwGORydVR2yIFI= X-Received: by 2002:a2e:808f:0:b0:2bc:e51d:89a3 with SMTP id i15-20020a2e808f000000b002bce51d89a3mr4122690ljg.29.1694679454659; Thu, 14 Sep 2023 01:17:34 -0700 (PDT) MIME-Version: 1.0 References: <20230913123226.2083892-1-jwakely@redhat.com> In-Reply-To: From: Jonathan Wakely Date: Thu, 14 Sep 2023 09:17:23 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Remove some more unconditional uses of atomics To: Christophe Lyon Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.1 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 List-Id: On Thu, 14 Sept 2023 at 08:44, Christophe Lyon wrote: > > Hi, > > > On Wed, 13 Sept 2023 at 14:32, Jonathan Wakely wrote: >> >> Tested x86_64-linux and aarch64-linux. I intend to push this to trunk. >> >> -- >8 -- >> >> These atomics cause linker errors on arm4t where __sync_synchronize is >> not defined. For single-threaded targets we don't need the atomics. >> > > I ran the tests on arm-eabi default config (so, armv4t) with this patch, and here is the list of remaining UNRESOLVED tests: > 29_atomics/atomic/compare_exchange_padding.cc > 29_atomics/atomic/cons/value_init.cc > 29_atomics/atomic_float/value_init.cc > 29_atomics/atomic_integral/cons/value_init.cc > 29_atomics/atomic_ref/compare_exchange_padding.cc > 29_atomics/atomic_ref/generic.cc > 29_atomics/atomic_ref/integral.cc > 29_atomics/atomic_ref/pointer.cc > experimental/polymorphic_allocator/construct_pair.cc > > all of them are due to undefined reference to __sync_synchronize > (some also reference __atomic_compare_exchange_4, etc...) > > > IIUC, this should not be the case for experimental/polymorphic_allocator/construct_pair.cc ? > The reference for __sync_synchronize is near the beginning of test0[123] > from a call to __atomic_load_n line 835 of atomic_base.h > not sure where it comes from, the .loc directive indicates line 28 of the testcase which is the opening brace Doh, I removed the atomics from but this is , which has a separate implementation. I'll make a change to as well, thanks for catching my silly mistake.