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.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -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