[Ada] Fix inconsistent parameter of SPARK_Msg_NE
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 9 Oct 2020 12:27:08 +0000 (14:27 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 24 Nov 2020 10:16:07 +0000 (05:16 -0500)
gcc/ada/

* sem_prag.adb (Analyze_Global_Item): Call SPARK_Msg_NE with the
entity, not with its identifier.

gcc/ada/sem_prag.adb

index a46f52f..2ccaaa2 100644 (file)
@@ -2385,7 +2385,7 @@ package body Sem_Prag is
 
                   if Ekind (Item_Id) in Named_Kind then
                      SPARK_Msg_NE
-                       ("\named number & is not an object", Item, Item);
+                       ("\named number & is not an object", Item, Item_Id);
                   end if;
 
                   return;