public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-2156] [Ada] Restore context on failure in loading of renamed child unit
Date: Thu,  8 Jul 2021 13:37:15 +0000 (GMT)	[thread overview]
Message-ID: <20210708133715.1C800398B842@sourceware.org> (raw)

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


                 reply	other threads:[~2021-07-08 13:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210708133715.1C800398B842@sourceware.org \
    --to=pmderodat@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).