Message ID | 20220912081925.GA1512920@poulhies-Precision-5550 |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp1781190wrt; Mon, 12 Sep 2022 01:29:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TiiPiYXlIqNu3bR4IBJ135LO+3s2XrVeX7sTiSD4Dx69Mynvaap68qx8zxF8TB7diH22r X-Received: by 2002:aa7:d341:0:b0:44e:67f1:5a2d with SMTP id m1-20020aa7d341000000b0044e67f15a2dmr21991806edr.175.1662971387233; Mon, 12 Sep 2022 01:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662971387; cv=none; d=google.com; s=arc-20160816; b=YtPoCXLTPxYDpzRGqOQH+3ht5MAEMqIAddCbUvUPh9Mfm83mnHxq4NcPW3KAEFQwVJ 9Q/sOoSU9dfBDiV5IfJAFYV8NrJHN9200VWwHXI/RAssqfp6OQvMPLPX8ClCrkqoUdBN wQXYq+Bg2Vuj9w9c68+MEoxmEC3uj89B8aNVdiXkN2ViCb9FvoFfMP8OxyDR9rAw8yMe +SlDgdY9xWJzlMNxo9woE2SDInnUNSRXtOJohVU4bVTI2fGVxc+j7ysGHf0jIGusQK5z ZDGyzn2GQ6173wg/GTg/lN51xrhU/DjmVopJctiYPU/BLe3qz4B5xwEkqZJj5JkVtNMz ZnWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=xSq35LZfBYPUpjwzOFAXMeNVNH4yJi/tkE5kt/txyH4=; b=gsvhr8cSasEdLOV18Jimol9Ge/8bfqdwURBHQxhB6pBgIkaXnksEl1kyBPd9XKTSLe bRiOTs5PEhjAviIiQvSzOyig2njW36ivvBQSpSHmzECWZyFDZE4BeWy6SoO0lwWEhxDX aZpmZkuD1TmXZQt2TpGKp7WaZFUxv6K29ycY123p7U7UHYU5E4jGT7qux6WJNRZxlLyR gF4e5xAiFDpysioQepdgHjY45trKn+9IsVozhjrl8I46YX4WJYqCJ7v9IHhTE+UGlx1w bU3fOjn2i4Ns7XHtrh4Q3LStUNPfn2rVwQiPGpSWYhDMimPfh2fULCcqWLzB3hCC37dm tAow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=A+jSbmJ6; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id z16-20020a056402275000b00450cd1eb7e2si7152417edd.22.2022.09.12.01.29.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=A+jSbmJ6; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A4A80395BC44 for <ouuuleilei@gmail.com>; Mon, 12 Sep 2022 08:24:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4A80395BC44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662971044; bh=xSq35LZfBYPUpjwzOFAXMeNVNH4yJi/tkE5kt/txyH4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=A+jSbmJ6kQNEQHJ1ulCrjTBf1YgwIhzTdVbNOI9+LU4GmI/hXapHRPCQ6vsXG5LRN uB4SYNsJI/YQpGqQi+skmilZvzcyhCw9jo/Z4JN724Il6241YgN6dJknbE/jq4OZwP uRFdI2Qnlxubr6DHiveSOIfSXn5aGcZ+hIVAVSZM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 926DB3851A9B for <gcc-patches@gcc.gnu.org>; Mon, 12 Sep 2022 08:19:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 926DB3851A9B Received: by mail-wr1-x42e.google.com with SMTP id e20so14034503wri.13 for <gcc-patches@gcc.gnu.org>; Mon, 12 Sep 2022 01:19:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=xSq35LZfBYPUpjwzOFAXMeNVNH4yJi/tkE5kt/txyH4=; b=qQvDoWTqNdFC/73L8O9edhVtlYsnR8x5QAuuPd+9S3gUKLUfIb8CrQ63e21I4W3I8V v91rZTSE6tBQGowUFazF75/v8sDB+Ww8sP3qE3d/AFUbq5eoZHegPSoZp2qQJR+ypfOj CsBipMoJViYy/D474mzcKb4kAKaljix4Q6SJHAGRK1xobOmhfmZza2n0SIft3VcFn6DO SuDv0K0Kv5Q+mjePapdO/W32CQReC+A4MQBlnC4ycixACgc60Unb3pD4TkD57nqDWxbD 8j7CceEJgfTZzyGqAYhRJ25Tb6ITUx+ljOQ5677p+ZUQCg+vRVOan9vk6M/b7d3D7lNx JX2w== X-Gm-Message-State: ACgBeo0Mc2+x9nGWHIdckYlsf8NMGSAfXphEMh/j+ceizhGiYOvAUmu3 OxD440bf4+qidDsde+EAfPcLClLibThN0g== X-Received: by 2002:a05:6000:1563:b0:222:c70e:b2a5 with SMTP id 3-20020a056000156300b00222c70eb2a5mr14538998wrz.492.1662970766533; Mon, 12 Sep 2022 01:19:26 -0700 (PDT) Received: from poulhies-Precision-5550 (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id b17-20020a05600c06d100b003a62400724bsm8715001wmn.0.2022.09.12.01.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:19:25 -0700 (PDT) Date: Mon, 12 Sep 2022 10:19:25 +0200 To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix oversight in implementation of unnesting Message-ID: <20220912081925.GA1512920@poulhies-Precision-5550> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: Marc =?iso-8859-1?q?Poulhi=E8s?= <poulhies@adacore.com> Cc: Eric Botcazou <ebotcazou@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743751885313137356?= X-GMAIL-MSGID: =?utf-8?q?1743751885313137356?= |
Series |
[Ada] Fix oversight in implementation of unnesting
|
|
Commit Message
Marc Poulhiès
Sept. 12, 2022, 8:19 a.m. UTC
The pass would traverse generic subprogram bodies, which are not expanded, thus stumbling on unexpected nodes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_unst.adb (Unnest_Subprograms.Search_Subprograms): Skip the subprogram bodies that are not to be unnested.
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -2592,6 +2592,8 @@ package body Exp_Unst is and then Is_Library_Level_Entity (Spec_Id) then Unnest_Subprogram (Spec_Id, N); + else + return Skip; end if; end;