From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 596D73851C3D for ; Tue, 9 Mar 2021 08:52:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 596D73851C3D Received: by mail-ed1-x52a.google.com with SMTP id p1so18745848edy.2 for ; Tue, 09 Mar 2021 00:52:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ijx1sOCRxA6pcaQb/x1Kz07lIUgQq+O4WMf8AvOVe2w=; b=hmj+DtxTWTrJDAxcMR8XgSvd9nWwF1kL1njF9Vhr4xd1DJyaB2Fma6RBoYSrTk1gDC s/8F5PbokrfmiX9MfxyOKEfjZy4HJ9NxVtOnWyesk79wTlkTAYaNQJuszih7JZ9N4WzH F8StRE1Y/1pDnDkYp3XXuPXmHD5fpFlt5tQw+dDm7OW/FrzAfDmIUrrRMmRf3RrmM9N4 kc/1CRi5xVwX2o7Wv71OyPpDHdyhuRiiPfV2vkSRWG4tWAf2g/X9v5hpO0YxtrFPxe0Y TP7P14U0nnSFPLIPGN2TbjYi3ipfmM4N5kQ5rLA49s/dJdX20IMGT/UeM+9t7aDKGZ9F AU8w== X-Gm-Message-State: AOAM532ZPABCDkNUIKvoppkohUNH+Au5R9N7Rn2PkOlmcAylrzlxI0bL u0YWN1SeGfslb7uqo/jS6cg5YxHuJESD6NKUSNY= X-Google-Smtp-Source: ABdhPJyJhJjLKOqpEORVGkUf8QkHYL40J9g7LqhvEOrjaW6Wc8RHO6xbXXLSrm3zWOqWiLlVIYIBHYREnBPk1AD0POU= X-Received: by 2002:aa7:c398:: with SMTP id k24mr2821524edq.61.1615279969521; Tue, 09 Mar 2021 00:52:49 -0800 (PST) MIME-Version: 1.0 References: <3632939.GJXPN1kz7x@fomalhaut> In-Reply-To: <3632939.GJXPN1kz7x@fomalhaut> From: Richard Biener Date: Tue, 9 Mar 2021 09:52:38 +0100 Message-ID: Subject: Re: [patch] Fix PR C++/90448 To: Eric Botcazou , Jan Hubicka Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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, 09 Mar 2021 08:52:55 -0000 On Mon, Mar 8, 2021 at 6:19 PM Eric Botcazou wrote: > > Hi, > > this is a regression present on the mainline and 10 branch for architectures > that pass all structure types by reference, e.g. 32-bit PowerPC or SPARC. > > Jakub posted a detailed analysis in the audit trail and this boils down to > the RTL expander trying to take the address of a DECL whose RTX is a register. > > Bootstrapped/regtested on x86-64/Linux, PowerPC64/Linux and SPARC/Solaris, > OK for the mainline and 10 branch? The whole point of thunks is that they do not require things like copying ... is this case somehow IPA-SRA/CPed in an odd way? Otherwise it seems like the passed through reference was mishandled on the GIMPLE level? Honza? > > 2021-03-08 Eric Botcazou > > PR C++/90448 > * calls.c (initialize_argument_information): When the argument > is passed by reference, do not make a copy in a thunk only if > the argument is already in memory. Remove redundant test for > the case of callee copy. > > -- > Eric Botcazou