[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 5fa74f0f48b2a392870bc0564c971fa250d1b389..c60f46c81b614b6b903a31c8803fee83af0ae7ae 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;
 
    -------------------------