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 4433A381DCE1 for ; Tue, 17 Mar 2020 20:50:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4433A381DCE1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ro@cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 771A9B208F; Tue, 17 Mar 2020 21:50:15 +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 dllXBqZiazYC; Tue, 17 Mar 2020 21:50:15 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4FDDB167.dip0.t-ipconnect.de [79.221.177.103]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 02E5DB1CC3; Tue, 17 Mar 2020 21:50:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1584478215; bh=4q9gM4Uju79o3Jfm+SlLrv9nb3Dwg648X2s4irlviH4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lyTl1ZQ8w65NlRCNk4KnaUI9xyhXwZdNwovZQOis6bGzKz5PNbkdG+fjSjmHLBatY BkC0EEjCo5cw5Tt52XpMAm+2VwYDPh7Js/2svqDfnuQsEsFLMMof5F59rcgKwRVb/9 z7vVJ6RRV3+BQVaDzI+14yssAjZBmh9TmiQMWovzBZtRkuiWQS4VyaJEB4CtjStmOC 0DtuLunYr8zIkfsuCOx+0QCcYduXLPNPi9Fol04lNGqm13F276PIS3B9K78dRNWkCm lae+jnmJkzVbboBJejmwuOTXHVo1XqEwJhO1XijF7yvkjcbEdFCLqA/hueGsjwta1h atthZzye/IipA== From: Rainer Orth To: Iain Buclaw via Gcc-patches Subject: Re: [PATCH] d: Committed fix multiple definition error when using mixins and interfaces. References: <20200316220809.31868-1-ibuclaw@gdcproject.org> Date: Tue, 17 Mar 2020 21:50:13 +0100 In-Reply-To: <20200316220809.31868-1-ibuclaw@gdcproject.org> (Iain Buclaw via Gcc-patches's message of "Mon, 16 Mar 2020 23:08:09 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.1 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_2, SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2020 20:50:19 -0000 Hi Iain, > When generating thunks in the D front-end, they need not necesarily be > in the same compilation unit as the module where the target function is > declared. When this happens, don't make the thunk public. Later on > expand_thunk will be called with force_gimple_thunk=true, so the thunk > can never be made weak due to differing implementations between modules. > > Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. > > Regards > Iain. > --- > gcc/d/ChangeLog: > > PR d/92216 > * decl.cc (make_thunk): Don't set TREE_PUBLIC on thunks if the target > function is external to the current compilation. > > gcc/testsuite/ChangeLog: > > PR d/92216 > * gdc.dg/imports/pr92216.d: New. > * gdc.dg/pr92216.d: New test. this new testcase FAILs on 32-bit Solaris/SPARC and x86 (and, I suppose, on every non-64-bit target): +FAIL: gdc.dg/pr92216.d -O0 scan-assembler _DT16_D7imports7pr922161B8__mixin24getSMFZPv[: \\t\\n] +FAIL: gdc.dg/pr92216.d -O0 -frelease scan-assembler _DT16_D7imports7pr922161B8__mixin24getSMFZPv[: \\t\\n] +FAIL: gdc.dg/pr92216.d -O0 -frelease -g scan-assembler _DT16_D7imports7pr922161B8__mixin24getSMFZPv[: \\t\\n] +FAIL: gdc.dg/pr92216.d -O0 -g scan-assembler _DT16_D7imports7pr922161B8__mixin24getSMFZPv[: \\t\\n] Same at -O[1-3s]. While the 64-bit version contains the expected _DT16_D7imports7pr922161B8__mixin24getSMFZPv the 32-bit one has _DT8_D7imports7pr922161B8__mixin24getSMFZPv I can't tell for certain if it's enough to allow for those two variants or if more is needed. Btw., I noticed that binutils 2.34 c++filt -s dlang cannot demangle those symbols. Is this expected? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University