From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 261493858C39; Thu, 9 Dec 2021 12:28:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 261493858C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id E79FD3BEC; Thu, 9 Dec 2021 13:28:50 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hplB4_CLtvtg; Thu, 9 Dec 2021 13:28:50 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb8cc.dip0.t-ipconnect.de [79.221.184.204]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 7CD4F4493; Thu, 9 Dec 2021 13:28:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1639052930; bh=WZTlItol6qxUOxgLQVpx86/Dtol3f4gvHa7Zc4BaTiQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=b76UAgWVwyzyf4vRjU0PUi+ZEtqDiswS6VTi72Z88/oa6rQp/G9Rg0CtxyN0ugaTY IbjsIk50GleTfi5wFPSwDEQ22Ies4DYT/BsXCQEUJ4Iy8vQAcy43OFJ0yjTxXmeULG UqGEM4vZ+S+FB5q9Be9u5T+ZY7n3LfhlzvNfn6BPxdz0BpivbPAA2vQq7lgrb9tJgN CyBJql0VaGBJTxGG1oq/VUED5PwQ8rhEMNiZ3Sl1rOdnoonj1Q7om7Bt93FlbOKOmy vAWwyyXoJ5OC3Bqq4pRLsTpw5CRgGg0hyAeLTVu0aKI+m+CBxgeflTBNtwYlv1/pGU nlH7TmPeFBcOQ== From: Rainer Orth To: Jonathan Wakely Cc: Jonathan Wakely via Gcc-patches , "libstdc++" Subject: Re: [committed] libstdc++: Fix undefined shift when _Atomic_word is 64-bit References: Date: Thu, 09 Dec 2021 13:28:50 +0100 In-Reply-To: (Jonathan Wakely's message of "Wed, 8 Dec 2021 23:47:13 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3788.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2021 12:28:54 -0000 Hi Jonathan, >> > Ah yes, so we need to disable this optimization. Patch coming up ... >> >> Gah, I remembered to check that: >> >> constexpr bool __double_word >> = sizeof(long long) == 2 * sizeof(_Atomic_word); >> // The ref-count members follow the vptr, so are aligned to >> // alignof(void*). >> constexpr bool __aligned = __alignof(long long) <= alignof(void*); >> if _GLIBCXX17_CONSTEXPR (__lock_free && __double_word && __aligned) >> >> >> But for C++11 and C++14 that is a normal runtime condition not >> if-constexpr, so the undefined shift still gets compiled, even though >> it can never be reached at runtime. > > Fixed like so. Tested sparc-sun-solaris2.11, pushed to trunk. great, thanks a lot. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University