From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 1C800398B842; Thu, 8 Jul 2021 13:37:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C800398B842 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-2156] [Ada] Restore context on failure in loading of renamed child unit X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: df0783f81ca9aca026a1db3b81080a8756c6166e X-Git-Newrev: e581fbeab695838c3e36bf31072c1dad11d9f81b Message-Id: <20210708133715.1C800398B842@sourceware.org> Date: Thu, 8 Jul 2021 13:37:15 +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: Thu, 08 Jul 2021 13:37:15 -0000 https://gcc.gnu.org/g:e581fbeab695838c3e36bf31072c1dad11d9f81b commit r12-2156-ge581fbeab695838c3e36bf31072c1dad11d9f81b Author: Piotr Trojanek Date: Tue May 25 17:39:26 2021 +0200 [Ada] Restore context on failure in loading of renamed child unit gcc/ada/ * lib-load.adb (Load): Replace early return with goto to properly restore context on failure. Diff: --- gcc/ada/lib-load.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb index f7534b6016b..737762c5e7a 100644 --- a/gcc/ada/lib-load.adb +++ b/gcc/ada/lib-load.adb @@ -451,8 +451,8 @@ package body Lib.Load is With_Node => With_Node); if Unump = No_Unit then - Parsing_Main_Extended_Source := Save_PMES; - return No_Unit; + Unum := No_Unit; + goto Done; end if; -- If parent is a renaming, then we use the renamed package as