From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 6FE7E383D03C; Tue, 15 Jun 2021 10:22:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FE7E383D03C MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1472] [Ada] Fix handling of scopes for subprogram calls in unnesting X-Act-Checkin: gcc X-Git-Author: Arnaud Charlet X-Git-Refname: refs/heads/master X-Git-Oldrev: 903655af70232eee31e5d83c59a45fa4d9e9ab00 X-Git-Newrev: 4cee20bb1ebbe66d4065c33da9f8743683228ede Message-Id: <20210615102233.6FE7E383D03C@sourceware.org> Date: Tue, 15 Jun 2021 10:22:33 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2021 10:22:33 -0000 https://gcc.gnu.org/g:4cee20bb1ebbe66d4065c33da9f8743683228ede commit r12-1472-g4cee20bb1ebbe66d4065c33da9f8743683228ede Author: Arnaud Charlet Date: Thu Feb 11 14:08:35 2021 +0100 [Ada] Fix handling of scopes for subprogram calls in unnesting gcc/ada/ * exp_unst.adb (Unnest_Subprogram.Build_Table.Visit_Node): Fix handling of scopes for subprogram calls. Diff: --- gcc/ada/exp_unst.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 6fd7a0ec6b9..52d6142f20d 100644 --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -883,7 +883,7 @@ package body Exp_Unst is -- within Subp. Calls to Subp itself or to subprograms -- outside the nested structure do not affect us. - if Scope_Within (Ent, Subp) + if Scope_Within (Ultimate_Alias (Ent), Subp) and then Is_Subprogram (Ent) and then not Is_Imported (Ent) then