public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4021] [Ada] Crash on renaming within declare expression
@ 2021-10-01  6:15 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-01  6:15 UTC (permalink / raw)
  To: gcc-cvs

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;


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

only message in thread, other threads:[~2021-10-01  6:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01  6:15 [gcc r12-4021] [Ada] Crash on renaming within declare expression 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).