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-4021] [Ada] Crash on renaming within declare expression
Date: Fri,  1 Oct 2021 06:15:53 +0000 (GMT)	[thread overview]
Message-ID: <20211001061553.093603858C2C@sourceware.org> (raw)

https://gcc.gnu.org/g:10ca293141e0e8178de6d68473bd2ac607c6348b

commit r12-4021-g10ca293141e0e8178de6d68473bd2ac607c6348b
Author: Justin Squirek <squirek@adacore.com>
Date:   Thu Aug 12 08:54:15 2021 -0400

    [Ada] Crash on renaming within declare expression
    
    gcc/ada/
    
            * exp_dbug.adb (Debug_Renaming_Declaration): Add check for
            Entity present for Ren to prevent looking at unanalyzed nodes

Diff:
---
 gcc/ada/exp_dbug.adb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/exp_dbug.adb b/gcc/ada/exp_dbug.adb
index a3751691f28..96d78cc97ca 100644
--- a/gcc/ada/exp_dbug.adb
+++ b/gcc/ada/exp_dbug.adb
@@ -409,7 +409,9 @@ package body Exp_Dbug is
             when N_Expanded_Name
                | N_Identifier
             =>
-               if not Present (Renamed_Object (Entity (Ren))) then
+               if No (Entity (Ren))
+                 or else not Present (Renamed_Object (Entity (Ren)))
+               then
                   exit;
                end if;


                 reply	other threads:[~2021-10-01  6:15 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=20211001061553.093603858C2C@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).