public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4673] [Ada] Don't expect enumeration literals to be renamings
@ 2021-10-25 15:08 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-25 15:08 UTC (permalink / raw)
  To: gcc-cvs

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

commit r12-4673-gf977a792721cdaa0d6cbda689b3a6930cf510f7e
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Wed Oct 20 09:46:38 2021 +0200

    [Ada] Don't expect enumeration literals to be renamings
    
    gcc/ada/
    
            * lib-xref.adb (Get_Through_Renamings): Exit loop when an
            enumeration literal is found.

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

diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 17de8864bef..2c3c37233bb 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -481,7 +481,9 @@ package body Lib.Xref is
                            --  e.g. function call, slicing of a function call,
                            --  pointer dereference, etc.
 
-                           if No (Obj) then
+                           if No (Obj)
+                             or else Ekind (Obj) = E_Enumeration_Literal
+                           then
                               return Empty;
                            end if;
                         else


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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 15:08 [gcc r12-4673] [Ada] Don't expect enumeration literals to be renamings 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).