[Ada] Detect overlapping actuals in entry calls
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 23 Mar 2020 22:39:10 +0000 (23:39 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 12 Jun 2020 08:29:21 +0000 (04:29 -0400)
2020-06-12  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* sem_res.adb (Resolve_Entry_Call): Add call to
Warn_On_Overlapping_Actuals.

gcc/ada/sem_res.adb

index 5fa74f0..c60f46c 100644 (file)
@@ -8090,6 +8090,13 @@ package body Sem_Res is
       then
          Establish_Transient_Scope (N, Manage_Sec_Stack => True);
       end if;
+
+      --  Now we know that this is not a call to a function that returns an
+      --  array type; moreover, we know the name of the called entry. Detect
+      --  overlapping actuals, just like for a subprogram call.
+
+      Warn_On_Overlapping_Actuals (Nam, N);
+
    end Resolve_Entry_Call;
 
    -------------------------