CVS difference for acats/new/b611010.a

Differences between 1.1 and version 1.2
Log of other versions for file acats/new/b611010.a

--- acats/new/b611010.a	2016/02/27 04:35:58	1.1
+++ acats/new/b611010.a	2016/03/29 06:12:09	1.2
@@ -39,12 +39,13 @@
 --
 -- CHANGE HISTORY:
 --     26 Feb 2016   RLB   Created test.
+--     28 Mar 2016   RLB   Added error location codes.
 --
 --!
 procedure B611010 is
 
     procedure Swap (M, N : in out Natural)
-       with Post => M'Old = N and N'Old = M;                      -- OK.
+       with Post => M'Old = N and N'Old = M;                 -- OK. {28;1}
 
     procedure Swap (M, N : in out Natural) is
        Tmp : Natural;
@@ -52,8 +53,8 @@
        Tmp := N;
        N := M;
        M := Tmp;
-       pragma Assert (M'Old = N);                                 -- ERROR:
-       if N'Old /= M then                                         -- ERROR:
+       pragma Assert (M'Old = N);                            -- ERROR: {23;6}
+       if N'Old /= M then                                    -- ERROR: {11;10}
           raise Program_Error;
        end if;
     end Swap;
@@ -61,9 +62,9 @@
     protected Lock is
        function Lock_Holder return Natural;
        procedure Unlock (Id : in out Natural)
-          with Post => Id = Lock_Holder'Old;                      -- OK.
+          with Post => Id = Lock_Holder'Old;                 -- OK. {29;1}
        entry Lock_It (Id : in out Natural)
-          with Post => Id'Old = Lock_Holder;                      -- OK.
+          with Post => Id'Old = Lock_Holder;                 -- OK. {24;15}
     private
        Lock_Id : Natural := 0;
     end Lock;
@@ -88,8 +89,8 @@
        entry Lock_It (Id : in out Natural) when Lock_Id = 0 is
        begin
           Lock_Id := Id;
-          pragma Assert (Lock_Id'Old = 0);                        -- ERROR:
-          if Lock_Id /= Id'Old then                               -- ERROR:
+          pragma Assert (Lock_Id'Old = 0);                   -- ERROR: {26;6}
+          if Lock_Id /= Id'Old then                          -- ERROR: {25;5}
              raise Program_Error with "id not set!";
           end if;
        end Lock_It;
@@ -98,7 +99,7 @@
 
     task Worker is
        entry Start_Job (Id : in out Natural) with
-          Post => Id'Old = Id;                                    -- OK.
+          Post => Id'Old = Id;                               -- OK. {19;6}
     end Worker;
 
     task body Worker is
@@ -109,10 +110,10 @@
              accept Start_Job (Id : in out Natural) do
                 Current_Id := Id;
                 -- Do the job.
-                if Current_Id'Old /= 0 then                       -- ERROR:
+                if Current_Id'Old /= 0 then                  -- ERROR: {20;10}
                    Id := Id / 2 + 2;
                 end if;
-                pragma Assert (Id'Old = Current_Id);              -- ERROR:
+                pragma Assert (Id'Old = Current_Id);         -- ERROR: {32;15}
              end Start_Job;
           or
              terminate;
@@ -126,19 +127,19 @@
       QB2 : Natural := 12;
    begin
       Swap (QB1, QB2);
-      pragma Assert (QB1'Old = QB2);                              -- ERROR:
+      pragma Assert (QB1'Old = QB2);                         -- ERROR: {22;8}
    end;
    declare
       My_Id : Natural := 12;
    begin
       Lock.Lock_It (Id => My_Id);
-      if Lock.Lock_Holder'Old /= My_Id then                       -- ERROR:
+      if Lock.Lock_Holder'Old /= My_Id then                  -- ERROR: {10;14}
          raise Program_Error;
       end if;
       Worker.Start_Job (My_Id);
-      pragma Assert (My_Id'Old = My_Id);                          -- ERROR:
+      pragma Assert (My_Id'Old = My_Id);                     -- ERROR: {22;10}
       Lock.Unlock (Id => My_Id);
-      if My_Id'Old /= My_Id then                                  -- ERROR:
+      if My_Id'Old /= My_Id then                             -- ERROR: {10;14}
          raise Program_Error;
       end if;
    end;

Questions? Ask the ACAA Technical Agent