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 842243858C27 for ; Thu, 14 Sep 2023 08:17:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 842243858C27 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=1694679458; 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=CjuraYYYiEimw1C8ZkjdaojKywjhpKJVW/loRQ/097z42pXAqmZo5QCeiOiR8TElCnDXBi nLjjHeNKJOTT5aed9Dv6IQ9Fm530p/PCywbeOVO91dJRt3i0t4AATTKBfuGklwhwQnyl6e N0CtQ4rEyg+pmPiZKufRElhy6vxqbVg= 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-341-kYs89DJJMae_1bFY8KqaQQ-1; Thu, 14 Sep 2023 04:17:36 -0400 X-MC-Unique: kYs89DJJMae_1bFY8KqaQQ-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2bd132e84b2so8852841fa.0 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=G30+Ew9WPI+IYgBx9G1DEauEtARQbpaMCt8xanUykbdZHIavML2q0Vi8FwvKq+xjQw uTveuf8WSSCMBvRwRdPLPn1zyMUk5/FJfYcIeGaMcWew9m6mqiB77WmjK1eLAkbz4Au+ iPoGtXMzxcYde6jlel/RhtJL2niX06NQ6bEBPsoMfWF49YvelTBKNgrVd0NNCeTVpCPI 8FJ5cXkW5Hn8ve2kcDxb1/Br+1avt5Tkouz8oA/wAcMrSZKJ6FrJ8z32fghXNUSBOi71 mIR7fxK25IF2n7wZK/iQHJbtB6Kxu6+MwUy8Z0tFxzPogqlFFeD6Og447ZscQhRiu6SJ njDA== X-Gm-Message-State: AOJu0YyNQMZsQPaED90aTUxA9Hal0TZNzNMHsDw5NmPUxdQMyMfpWnOV iVY8Qk0rdx6ZBuYO5Rx3m13lfo39qiVrtQBDx85ZDi70aU6LZGhn3q7tXeoJxWofz8e8Cgfdjtl Gkmnv3FoDP6joqlY6tHqFg1a0MCvFB1jG7JNjmXc= X-Received: by 2002:a2e:808f:0:b0:2bc:e51d:89a3 with SMTP id i15-20020a2e808f000000b002bce51d89a3mr4122700ljg.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=-3.4 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=unavailable 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.