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 01B633850417 for ; Tue, 16 Mar 2021 20:12:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 01B633850417 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-440-6iKLbC0bOaayElNy7zQvVA-1; Tue, 16 Mar 2021 16:12:18 -0400 X-MC-Unique: 6iKLbC0bOaayElNy7zQvVA-1 Received: by mail-qt1-f199.google.com with SMTP id r32so16638029qtd.16 for ; Tue, 16 Mar 2021 13:12:18 -0700 (PDT) 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=6xnAeAf2EL1XlGPpVxzn/+7+d0r19olnBjQDVe3hqfk=; b=kgC8f6P6mtX9uOdRGBeEYKlK7eMPWSg/4+76wn1vNiH3QUEz+sms7bg2Wu4i/Sn5OA Js5YjGMEvj3r9RVatrZqaLKkLIYoSTPx6AwnytPufZsWr7ovinTFyqwGYzmEvG4eE472 YxM68Ujz6yomQRXXNOP4uGAgVuhRmjMSqqNKI/dm0cXwP/DVNmFIEtGUmsp+pXvWqdHB bLkEvElgf9JG5LlO6yq1fpC2yAGxnPO+JE76ZoG+7oJ23aKQXbEUzlgRd51VaGHamCyx ofH+1ZWZVAenkkBO7ua60wGm+4uRt49Yn8Q8uPa/AdzYg1HUGjqPPNNhTPQab+VEuZfF Vpxw== X-Gm-Message-State: AOAM533HfhQ0pgQDCNGMUQSExmBM11dODODpmefvcURyWuP4AxEORSAw /xjIIQQD9gzxyoS+M8ZAnPX30VUod7kBGAmjU5c/4SxaHByzx0cwWUv6ZVUcb9FL1SdD4lwBR92 6abo2JXr9sWkli6hVQTdgb3QhfB/ountEIvdCX7VnuuQgP/S3AhhYIpkThTO2qwyQyA== X-Received: by 2002:ac8:520a:: with SMTP id r10mr619538qtn.334.1615925537552; Tue, 16 Mar 2021 13:12:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFZljsfXwxGTD4kRBSC89WZL2v3JCiNaVhpUcbcypAsc/9NBSuPbfiKVmagmoEnJNznX3HHA== X-Received: by 2002:ac8:520a:: with SMTP id r10mr619508qtn.334.1615925537168; Tue, 16 Mar 2021 13:12:17 -0700 (PDT) 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 x36sm14342066qte.1.2021.03.16.13.12.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Mar 2021 13:12:16 -0700 (PDT) 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> <34cad5cc-7d96-a348-4e4a-c17673475407@redhat.com> <41174163-b47c-f105-a5f1-8bb2177feefe@suse.cz> <752a6974-2069-eba1-faf0-03aa9689288d@suse.cz> <301ab0a4-59ee-454a-cfff-45594c49adb2@redhat.com> <9965d5a9-85ca-b553-e98a-60376e5e6de5@suse.cz> <43c8bf3d-5bf4-3094-da24-56b2ec256090@redhat.com> <3982b6fb-4533-9680-5998-694686ccd549@suse.cz> From: Jason Merrill Message-ID: Date: Tue, 16 Mar 2021 16:12:15 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <3982b6fb-4533-9680-5998-694686ccd549@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=-8.3 required=5.0 tests=BAYES_00, BODY_8BITS, 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: Tue, 16 Mar 2021 20:12:21 -0000 On 3/8/21 4:33 AM, Martin Liška wrote: > On 3/4/21 9:54 PM, Jason Merrill wrote: >> On 3/4/21 10:52 AM, Martin Liška wrote: >>> On 3/4/21 4:45 PM, Jason Merrill wrote: >>>> >>>> Sure, I guess you do need to set that flag for the local decls, but >>>> that should be all. >>>> >>>> Jason >>> >>> Doing that also fails :/ >>> This time likely due to how we set RECORD argument of >>> maybe_version_functions function: >>> >>> gcc/cp/decl.c:    && maybe_version_functions (newdecl, olddecl, >>> gcc/cp/decl.c- >>> (!DECL_FUNCTION_VERSIONED (newdecl) >>> gcc/cp/decl.c-                                 || >>> !DECL_FUNCTION_VERSIONED (olddecl)))) >> >> That is odd. >> >> The other problem is that DECL_LOCAL_DECL_ALIAS isn't always set >> before we get to maybe_version_functions; it's set further down in >> do_pushdecl.  We need it to be set or things break. > > Oh, I see. > >> >> This seems to work for me, what do you think? > > Seems good to me, please apply the patch. Done. Jason