[Ada] Reset Is_True_Constant on entites used as OUT/IN OUT actuals

2018-10-09  Ed Schonberg  <schonberg@adacore.com>

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
This commit is contained in:
Ed Schonberg 2018-10-09 15:05:34 +00:00 committed by Pierre-Marie de Rodat
parent 73efc7ff4c
commit 8f0303e751
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* 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 <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Do not load System to obtain

View File

@ -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