+2019-08-21 Javier Miranda <miranda@adacore.com>
+
+ * sem_util.adb (Update_Named_Associations): Update
+ First_Named_Actual when the subprogram call has a single named
+ actual.
+
2019-08-21 Joel Brobecker <brobecker@adacore.com>
* doc/Makefile (mk_empty_dirs): New (PHONY) rule.
Old_Next : Node_Id;
begin
+ if No (First_Named_Actual (Old_Call)) then
+ return;
+ end if;
+
-- Recreate the First/Next_Named_Actual chain of a call by traversing
-- the chains of both the old and new calls in parallel.
Old_Act := First (Parameter_Associations (Old_Call));
while Present (Old_Act) loop
if Nkind (Old_Act) = N_Parameter_Association
- and then Present (Next_Named_Actual (Old_Act))
+ and then Explicit_Actual_Parameter (Old_Act)
+ = First_Named_Actual (Old_Call)
then
- if First_Named_Actual (Old_Call) =
- Explicit_Actual_Parameter (Old_Act)
- then
- Set_First_Named_Actual (New_Call,
- Explicit_Actual_Parameter (New_Act));
- end if;
+ Set_First_Named_Actual (New_Call,
+ Explicit_Actual_Parameter (New_Act));
+ end if;
+ if Nkind (Old_Act) = N_Parameter_Association
+ and then Present (Next_Named_Actual (Old_Act))
+ then
-- Scan the actual parameter list to find the next suitable
-- named actual. Note that the list may be out of order.
+2019-08-21 Javier Miranda <miranda@adacore.com>
+
+ * gnat.dg/implicit_param.adb, gnat.dg/implicit_param_pkg.ads:
+ New testcase.
+
2019-08-20 Martin Sebor <msebor@redhat.com>
PR testsuite/91458
--- /dev/null
+-- { dg-do compile }
+
+with Implicit_Param_Pkg;
+
+procedure Implicit_Param is
+ subtype Tiny is Integer range 1 .. 5;
+ V : Tiny := 4;
+
+ function Func62 return Implicit_Param_Pkg.Lim_Rec is
+ begin
+ return
+ (case V is
+ when 1 .. 3 => Implicit_Param_Pkg.Func_Lim_Rec,
+ when 4 .. 5 => raise Program_Error);
+ end Func62;
+
+begin
+ null;
+end Implicit_Param;