[Ada] Fix assertion failure on (in-)out function parameter
authorYannick Moy <moy@adacore.com>
Wed, 27 May 2020 15:30:23 +0000 (17:30 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 10 Jul 2020 09:16:19 +0000 (05:16 -0400)
gcc/ada/

* sem_res.adb (Resolve_Actuals): Protect call to
Is_Valued_Procedure.

gcc/ada/sem_res.adb

index f76366d944b6fd2f152d4544fbb4d329f8641c0c..b5cdbb7593b1972f67ceecd6383609787c95168d 100644 (file)
@@ -4641,6 +4641,7 @@ package body Sem_Res is
                      --  This is for Starlet only though, so long obsolete.
 
                      if Mechanism (F) = By_Reference
+                       and then Ekind (Nam) = E_Procedure
                        and then Is_Valued_Procedure (Nam)
                      then
                         null;