Temp_Typ := Etype (A);
end if;
- -- If the actual is a simple name or a literal, no need to
- -- create a temporary, object can be used directly.
-
- -- If the actual is a literal and the formal has its address taken,
- -- we cannot pass the literal itself as an argument, so its value
- -- must be captured in a temporary. Skip this optimization in
- -- GNATprove mode, to make sure any check on a type conversion
- -- will be issued.
+ -- If the actual is a simple name or a literal, no need to create a
+ -- temporary, object can be used directly. Skip this optimization in
+ -- GNATprove mode, to make sure any check on a type conversion will
+ -- be issued.
if (Is_Entity_Name (A)
and then
and then Formal_Is_Used_Once (F)
and then not GNATprove_Mode)
+ -- If the actual is a literal and the formal has its address taken,
+ -- we cannot pass the literal itself as an argument, so its value
+ -- must be captured in a temporary.
+
or else
(Nkind (A) in
N_Real_Literal | N_Integer_Literal | N_Character_Literal