aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-05-25 17:39:26 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-08 13:34:20 +0000
commite581fbeab695838c3e36bf31072c1dad11d9f81b (patch)
tree92eae1315eac7806e9ada3955d6d17bc7e98dd89 /gcc
parentdf0783f81ca9aca026a1db3b81080a8756c6166e (diff)
downloadgcc-e581fbeab695838c3e36bf31072c1dad11d9f81b.zip
gcc-e581fbeab695838c3e36bf31072c1dad11d9f81b.tar.gz
gcc-e581fbeab695838c3e36bf31072c1dad11d9f81b.tar.bz2
[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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/lib-load.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb
index f7534b6..737762c 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