sem_res.adb (Resolve_Entry_Call): When an entry has preconditions...
authorEd Schonberg <schonberg@adacore.com>
Fri, 1 Aug 2014 13:35:22 +0000 (13:35 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 1 Aug 2014 13:35:22 +0000 (15:35 +0200)
2014-08-01  Ed Schonberg  <schonberg@adacore.com>

* sem_res.adb (Resolve_Entry_Call): When an entry has
preconditions, the entry call is wrapped in a procedure call
that incorporates the precondition checks. To prevent a double
expansion, with possible duplication of extra formals, that
procedure call must only be pre-analyzed and resolved. Expansion
takes place upon return to the caller Resolve_Call.

From-SVN: r213461

gcc/ada/ChangeLog
gcc/ada/sem_res.adb

index f829f8405968b6ca51cb40f2c8eee3523d075029..e4a89b17dd3112c03d318e4f664d069da31fa45a 100644 (file)
@@ -1,3 +1,12 @@
+2014-08-01  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_res.adb (Resolve_Entry_Call): When an entry has
+       preconditions, the entry call is wrapped in a procedure call
+       that incorporates the precondition checks. To prevent a double
+       expansion, with possible duplication of extra formals, that
+       procedure call must only be pre-analyzed and resolved. Expansion
+       takes place upon return to the caller Resolve_Call.
+
 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_res.adb (Resolve_Call): Do not perform
index 034ca5865f4f7359ddf82bf0f234745a4492ab96..92c8bfaa2ef6a1c78e501a83bf379b685d0aa671 100644 (file)
@@ -7176,7 +7176,11 @@ package body Sem_Res is
                   New_Occurrence_Of (PPC_Wrapper (Nam), Loc),
                 Parameter_Associations => New_Actuals);
             Rewrite (N, New_Call);
-            Analyze_And_Resolve (N);
+
+            --  Preanalyze and resolve new call. Current procedure is called
+            --  from Resolve_Call, after which expansion will take place.
+
+            Preanalyze_And_Resolve (N);
             return;
          end;
       end if;