public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2156] [Ada] Restore context on failure in loading of renamed child unit
@ 2021-07-08 13:37 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-08 13:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e581fbeab695838c3e36bf31072c1dad11d9f81b

commit r12-2156-ge581fbeab695838c3e36bf31072c1dad11d9f81b
Author: Piotr Trojanek <trojanek@adacore.com>
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-08 13:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 13:37 [gcc r12-2156] [Ada] Restore context on failure in loading of renamed child unit Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).