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 [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 87CE1386F436 for ; Mon, 1 Mar 2021 16:36:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 87CE1386F436 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-eTxqFWDgMJKhQBYy1vihkg-1; Mon, 01 Mar 2021 11:36:56 -0500 X-MC-Unique: eTxqFWDgMJKhQBYy1vihkg-1 Received: by mail-qk1-f197.google.com with SMTP id h134so1003770qke.1 for ; Mon, 01 Mar 2021 08:36:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Hcn81HHfzsheqESJ5dAZxeuiNN9qs8JoC2CzLqLFhMI=; b=ieWGToxJE7yJZCVouzVccAk+4PGDZsQWScBgGQ8lBEbHcagCGSYFs9XEYpeIGe/yO5 Ej9WflCrLmSR2GRLNo9EtvzIxvx9/C9Uw6mYv15K7PTbTpEGiePnb62z3AeWOoL3rPMW nciLVXhLEBgjyaglNHQWlmuL1p00vREokrh9+0kHytuij8NME+Sj34q6KTU6ZOPPyezF 9IfDsAUkjFF3GvfUNBa8Qy0f3kyU/IHT3jidIfm6f1T3XnsGbuxPTc9/6Ss5cuYSlS2w 4kheML6XRoevSHvWcs/ZLMyYlfZPhiPTOx5b9VkwaQjEvJPygihrMYEZ2RCfnsLhD5Wg j9fQ== X-Gm-Message-State: AOAM533qtENV+a4hCn+6MmtUt1ciYnCstV+GrW+TvUu69jxDREeeOFwX ariuvUf9AFwq5V+CKtq5piLB+ODJJU6QFSw0+p00eL1CztZZ1D7H+Wg5UyVh5Ed/NR2/0k39QJi c0z+0Oa1ambpzwTpYF4OUolI6yOYrXgHp3LfB4tU021kV8DkTSzQIcUYpeSO8kScr9g== X-Received: by 2002:a0c:b8a3:: with SMTP id y35mr15397245qvf.23.1614616615594; Mon, 01 Mar 2021 08:36:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxuGQq0LpUJil+FiZXh5TvpiRVfTe9aO+Y6kDS9CIYD5JveSQHaTfeJwibSY2uzXjEGE8jiw== X-Received: by 2002:a0c:b8a3:: with SMTP id y35mr15397217qvf.23.1614616615293; Mon, 01 Mar 2021 08:36:55 -0800 (PST) Received: from [192.168.1.148] (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 i6sm2899613qtd.93.2021.03.01.08.36.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Mar 2021 08:36:54 -0800 (PST) Subject: Re: [PATCH] C++: target attribute - local decl To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , gcc-patches@gcc.gnu.org References: <15035626-d39b-cb2a-f9b6-272503b16ba5@suse.cz> <43c9c10d-077a-633d-92d4-d769c5838e6f@redhat.com> <41c44de0-9d88-4a03-079e-a1af4502268b@suse.cz> From: Jason Merrill Message-ID: Date: Mon, 1 Mar 2021 11:36:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <41c44de0-9d88-4a03-079e-a1af4502268b@suse.cz> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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: Mon, 01 Mar 2021 16:36:59 -0000 On 3/1/21 7:43 AM, Martin Liška wrote: > On 2/22/21 11:53 PM, Jason Merrill wrote: >> The problem seems to be with the handling of local decls.  If >> DECL_LOCAL_DECL_P, you need to look at DECL_LOCAL_DECL_ALIAS to find >> the namespace-scope decl.  But then if there is no preceding >> namespace-scope declaration, the new decl created by >> push_local_extern_decl_alias doesn't have a cgraph node, either.  I >> guess maybe_function_versions >> also needs to look through DECL_LOCAL_DECL_ALIAS. > > Ah, I see. Are you sure about the name 'maybe_function_versions'? I > can't find it. Ah, it's maybe_version_functions, sorry. Jason