From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111048 invoked by alias); 5 Dec 2018 20:49:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 110957 invoked by uid 89); 5 Dec 2018 20:49:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=86669, clone_body, gimplifier, walks X-HELO: mail-qt1-f170.google.com Received: from mail-qt1-f170.google.com (HELO mail-qt1-f170.google.com) (209.85.160.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Dec 2018 20:49:30 +0000 Received: by mail-qt1-f170.google.com with SMTP id t13so23951325qtn.3 for ; Wed, 05 Dec 2018 12:49:30 -0800 (PST) Return-Path: Received: from [192.168.1.149] (209-6-216-142.s141.c3-0.smr-cbr1.sbo-smr.ma.cable.rcncustomer.com. [209.6.216.142]) by smtp.gmail.com with ESMTPSA id j36sm12589343qtk.15.2018.12.05.12.49.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 12:49:27 -0800 (PST) From: Jason Merrill Subject: Re: [C++ PATCH] Fix clone_body (PR c++/86669) To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org References: <20181128084247.GX12380@tucnak> Message-ID: Date: Wed, 05 Dec 2018 20:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181128084247.GX12380@tucnak> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00311.txt.bz2 On 11/28/18 3:42 AM, Jakub Jelinek wrote: > Whenever we need to clone a cdtor (either because the target doesn't support > aliases the way we need, e.g. initlist105.C testcase on darwin, where it has > been originally reported, or when it has virtual bases, like the made up > initlist106.C on x86_64-linux), we rely on DECL_INITIAL of the local > variables being unshared, because the tree unsharing gimplify.c performs > doesn't unshare DECL_INITIAL. clone_body has some code to recurse on the > DECL_INITIAL, but it handles just decls FOR_EACH_LOCAL_DECL walks. I > believe it is generally ok that not all temporaries are covered in local > decls, the gimplifier should take care of those fine if we don't need > debug info for them. I think any temporaries that have DECL_INITIAL should be pushed so that they end up in local_decls. set_up_extended_ref_temp already adds a DECL_EXPR for it, I guess we need a pushdecl as well. Though the comment for get_temp_regvar suggests that this is problematic somehow. Jason