sem_prag.adb (Is_Matching_Input): Consume a matching null input.
authorHristian Kirtchev <kirtchev@adacore.com>
Mon, 14 Oct 2013 13:49:15 +0000 (13:49 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 14 Oct 2013 13:49:15 +0000 (15:49 +0200)
2013-10-14  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Is_Matching_Input): Consume a matching null input.

From-SVN: r203557

gcc/ada/ChangeLog
gcc/ada/sem_prag.adb

index bd160a8..986d97b 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * sem_prag.adb (Is_Matching_Input): Consume a matching null input.
+
 2013-10-14  Robert Dewar  <dewar@adacore.com>
 
        * freeze.adb (Freeze_Record): Don't give warning about packed
index f8ee02d..ee790ad 100644 (file)
@@ -19965,7 +19965,13 @@ package body Sem_Prag is
                --  Match a null input with another null input
 
                if Nkind (Dep_Input) = N_Null then
-                  if Nkind (Expression (Ref_Clause)) = N_Null then
+                  Ref_Input := First (Ref_Inputs);
+
+                  --  Remove the matching null from the pool of candidates
+
+                  if Nkind (Ref_Input) = N_Null then
+                     Remove (Ref_Input);
+
                      return True;
                   else
                      Match_Error