From 8f0303e751226c85f3556bda0d19091ceef61a6a Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Tue, 9 Oct 2018 15:05:34 +0000 Subject: [PATCH] [Ada] Reset Is_True_Constant on entites used as OUT/IN OUT actuals 2018-10-09 Ed Schonberg gcc/ada/ * exp_ch6.adb (Add_Call_By_Copy_Node, Add_Simple_Call_By_Copy_Node, Expand_Call_Helper): Reset Is_True_Constant on entities used as Out or In_Out parameters in calls. From-SVN: r264968 --- gcc/ada/ChangeLog | 7 +++++++ gcc/ada/exp_ch6.adb | 3 +++ 2 files changed, 10 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index aee5a62c0f4..70702933f24 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2018-10-09 Ed Schonberg + + * exp_ch6.adb (Add_Call_By_Copy_Node, + Add_Simple_Call_By_Copy_Node, Expand_Call_Helper): Reset + Is_True_Constant on entities used as Out or In_Out parameters in + calls. + 2018-10-09 Ed Schonberg * exp_unst.adb (Unnest_Subprogram): Do not load System to obtain diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 96ee696bdb7..2988f77e3cb 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -1442,6 +1442,7 @@ package body Exp_Ch6 is Kill_Current_Values (Temp); Set_Is_Known_Valid (Temp, False); + Set_Is_True_Constant (Temp, False); -- If type conversion, use reverse conversion on exit @@ -1653,6 +1654,7 @@ package body Exp_Ch6 is if Ekind (Formal) /= E_In_Parameter then Lhs := Outcod; Rhs := New_Occurrence_Of (Temp, Loc); + Set_Is_True_Constant (Temp, False); -- Deal with conversion @@ -3431,6 +3433,7 @@ package body Exp_Ch6 is Kill_Current_Values (Ent); Set_Last_Assignment (Ent, Sav); Set_Is_Known_Valid (Ent, False); + Set_Is_True_Constant (Ent, False); -- For all other cases, just kill the current values