From: Piotr Trojanek Date: Tue, 25 May 2021 15:39:26 +0000 (+0200) Subject: [Ada] Restore context on failure in loading of renamed child unit X-Git-Tag: basepoints/gcc-13~6157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e581fbeab695838c3e36bf31072c1dad11d9f81b;p=thirdparty%2Fgcc.git [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 --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb index f7534b6016b5..737762c5e7ab 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