[Ada] Target name is an object reference
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 28 May 2020 18:28:28 +0000 (20:28 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 15 Jul 2020 13:42:58 +0000 (09:42 -0400)
gcc/ada/

* sem_util.adb (Is_Object_Reference): Return True on
N_Target_Name.

gcc/ada/sem_util.adb

index 59073b0355f887d28a4ccdd228b6a4d1627f8fa5..56fd677ed3ce5e45a5e4c8b4a647cbd600fb45bf 100644 (file)
@@ -17217,6 +17217,11 @@ package body Sem_Util is
                return Is_Rewrite_Substitution (N)
                  and then Is_Object_Reference (Original_Node (N));
 
+            --  AI12-0125: Target name represents a constant object
+
+            when N_Target_Name =>
+               return True;
+
             when others =>
                return False;
          end case;