[Ada] Remove useless code related to current value propagation
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 16 Mar 2022 13:22:42 +0000 (14:22 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 16 May 2022 08:42:06 +0000 (08:42 +0000)
The current value propagation applies only to assignable objects and
doesn't make sense for subprogram entities. This was a mistake
introduced when extending the current value propagation years ago.

Cleanup related to fixing interference between expansion of attribute
Loop_Entry and current value propagation.

gcc/ada/

* sem_attr.adb (Address_Checks): Remove call to
Kill_Current_Values for subprogram entities, because this
routine only does something for object entities.

gcc/ada/sem_attr.adb

index 55da9ef73f2b3d19a6fcdec1ada437ad5f3c7403..b3965f3664e840363fdb7c69834d69a6a0664fac 100644 (file)
@@ -504,7 +504,6 @@ package body Sem_Attr is
             begin
                if Is_Subprogram (Ent) then
                   Set_Address_Taken (Ent);
-                  Kill_Current_Values (Ent);
 
                   --  An Address attribute is accepted when generated by the
                   --  compiler for dispatching operation, and an error is