+2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
+ parameters of function calls here either.
+
2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
-- Renaming objects in renaming associations
-- This case is handled when a use of the renamed variable occurs
- -- Actual parameters for a procedure call
+ -- Actual parameters for a subprogram call
-- This case is handled in Exp_Ch6.Expand_Actuals
-- The second expression in a 'Read attribute reference
if Nkind (Parnt) = N_Unchecked_Expression then
null;
- elsif Nkind_In (Parnt, N_Object_Renaming_Declaration,
- N_Procedure_Call_Statement)
+ elsif Nkind (Parnt) = N_Object_Renaming_Declaration then
+ return;
+
+ elsif Nkind (Parnt) in N_Subprogram_Call
or else (Nkind (Parnt) = N_Parameter_Association
- and then
- Nkind (Parent (Parnt)) = N_Procedure_Call_Statement)
+ and then Nkind (Parent (Parnt)) in N_Subprogram_Call)
then
return;
+2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack23.adb, gnat.dg/pack23_pkg.ads: New testcase.
+
2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* gnat.dg/task3.adb, gnat.dg/task3.ads, gnat.dg/task3_pkg1.ads,
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+with Pack23_Pkg;
+
+function Pack23 return Integer is
+
+ type Arr is array (1 .. 32) of Boolean with Size => 32, Pack;
+
+ A : Arr;
+
+begin
+ return Pack23_Pkg.Func (A (1));
+end;
--- /dev/null
+package Pack23_Pkg is
+
+ function Func (B : in out Boolean) return Integer;
+
+end Pack23_Pkg;