CVS difference for acats/new/bd30001.a

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

--- acats/new/bd30001.a	2017/03/30 08:54:57	1.1
+++ acats/new/bd30001.a	2017/03/31 03:56:14	1.2
@@ -55,6 +55,14 @@
 --            visible part of a package cannot name a deferred constant,
 --            even if the completion of that constant is static -
 --            13.14(7.2/3) and 13.14(18).
+--        (G) The Size aspect must not be given on a private type -
+--            implied by 13.1(9/5).
+--            [Note: This rule appears to be missing from the RM, it will
+--            get added soon; we test it anyway as it follows from the
+--            rules for representation items.]
+--        (H) The expression for the Size aspect of a type must resolve to
+--            the same entities at the first freezing point as at the end of
+--            the declaration list - 13.1.1(13/3).
 --
 --     We try only a handful of examples of each of these rules; we're trying
 --     to ensure that a check for the rule exists in the implementation, not
@@ -82,13 +90,16 @@
 --
 -- CHANGE HISTORY:
 --     29 Mar 17   RLB     Created test.
+--     30 Mar 17   RLB     Added additional checks.
 --
 --!
 procedure BD30001 is
 
+   type Basic_Int is range -99 .. 99;
+   Specified_Size : constant := Basic_Int'Size;
+   Outer_Size : constant := Specified_Size;
+
    package Pack is
-      type Basic_Int is range -99 .. 99;
-      Specified_Size : constant := Basic_Int'Size;
 
       type Check_Int is range -99 .. 99
          with Size => Specified_Size;                   -- ANX-C RQMT. {1:7;1}
@@ -127,6 +138,12 @@
       type TstA is range -99 .. 99
          with Size => Def_Size;        -- POSSIBLE ERROR: [Set06] (F) {1:7;1}
 
+      type TstB is private
+         with Size => A_Size;          -- ERROR: (G) {1:7;1}
+
+      type TstC is range -99 .. 99
+         with Size => Outer_Size;      -- POSSIBLE ERROR: [Set07] (H) {1:7;1}
+
       -- Static:
       ICnst : constant Integer := Specified_Size;
       A_Size : constant := Specified_Size;
@@ -137,18 +154,27 @@
       Sml_Size : constant :=
                       Specified_Size;  -- POSSIBLE ERROR: [Set05] (E) {1:7;1}
 
+      ObjC : TstC := 2; -- Freezes TstC, Size = BD30001.Outer_Size.
+                                       -- POSSIBLE ERROR: [Set07] (H) {1:7;1}
+      Outer_Size : constant :=
+                      Specified_Size;  -- POSSIBLE ERROR: [Set07] (H) {1:7;1}
+                                        -- Different declaration of Outer_Size.
+
       -- Not static:
       IVar : Integer := Specified_Size;-- POSSIBLE ERROR: [Set01] (A) {7;1}
 
       -- Deferred:
       Def_Size : constant Integer;     -- POSSIBLE ERROR: [Set06] (F) {7;1}
 
-   private
+      -- Resolution recheck here.
+   private                             -- POSSIBLE ERROR: [Set07] (H) {1:7;1}
       Hidden_Size : constant :=
                       Specified_Size;  -- POSSIBLE ERROR: [Set04] (D) {1:7;1}
 
       Def_Size : constant Integer
              := Specified_Size;        -- POSSIBLE ERROR: [Set06] (F) {1:7;1}
+
+      type TstB is range -99 .. 99;    -- OPTIONAL ERROR: {7;1}
    end Pack;
 
 begin

Questions? Ask the ACAA Technical Agent