[Ada] Use Sloc of delay statement in timed entry call
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 1 Jun 2020 18:49:43 +0000 (20:49 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 15 Jul 2020 13:42:36 +0000 (09:42 -0400)
gcc/ada/

* exp_ch9.adb (Expand_N_Timed_Entry_Call): Use the Sloc of
the delay statement in the expansion.

gcc/ada/exp_ch9.adb

index c4b9882..2c3e9d8 100644 (file)
@@ -12613,8 +12613,6 @@ package body Exp_Ch9 is
    --  global references if within an instantiation.
 
    procedure Expand_N_Timed_Entry_Call (N : Node_Id) is
-      Loc : constant Source_Ptr := Sloc (N);
-
       Actuals        : List_Id;
       Blk_Typ        : Entity_Id;
       Call           : Node_Id;
@@ -12637,6 +12635,7 @@ package body Exp_Ch9 is
       Index          : Node_Id;
       Is_Disp_Select : Boolean;
       Lim_Typ_Stmts  : List_Id;
+      Loc            : constant Source_Ptr := Sloc (D_Stat);
       N_Stats        : List_Id;
       Obj            : Entity_Id;
       Param          : Node_Id;