CVS difference for acats/new/bd30002.a

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

--- acats/new/bd30002.a	2017/03/30 08:54:57	1.1
+++ acats/new/bd30002.a	2017/03/31 03:56:14	1.2
@@ -56,6 +56,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 Alignment 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 Alignment 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
@@ -83,13 +91,17 @@
 --
 -- CHANGE HISTORY:
 --     29 Mar 17   RLB     Created test.
+--     30 Mar 17   RLB     Added additional checks.
 --
 --!
 procedure BD30002 is
 
+   type Basic_Int is range -99 .. 99;
+   Specified_Alignment : constant := Basic_Int'Alignment;
+
+   Outer_Alignment : constant := Specified_Alignment;
+
    package Pack is
-      type Basic_Int is range -99 .. 99;
-      Specified_Alignment : constant := Basic_Int'Alignment;
 
       type Check_Int is range -99 .. 99
          with Alignment => Specified_Alignment;         -- ANX-C RQMT. {1:7;1}
@@ -129,6 +141,13 @@
       type TstA is range -99 .. 99
          with Alignment => Def_Alignment;-- POSSIBLE ERROR: [Set06] (F) {1:7;1}
 
+      type TstB is private
+         with Alignment => An_Alignment; -- ERROR: (G) {1:7;1}
+
+      type TstC is range -99 .. 99
+         with Alignment =>
+                   Outer_Alignment;      -- POSSIBLE ERROR: [Set07] (H) {2:7;1}
+
       -- Static:
       ICnst : constant Integer := Specified_Alignment;
       An_Alignment : constant := Specified_Alignment;
@@ -139,6 +158,13 @@
       Sml_Alignment : constant :=
                    Specified_Alignment;  -- POSSIBLE ERROR: [Set05] (E) {1:7;1}
 
+      ObjC : TstC := 2; -- Freezes TstC, Alignment = BD30002.Outer_Alignment.
+                                         -- POSSIBLE ERROR: [Set07] (H) {1:7;1}
+      Outer_Alignment : constant :=
+                  Specified_Alignment;   -- POSSIBLE ERROR: [Set07] (H) {1:7;1}
+                                         -- Different declaration
+                                         -- of Outer_Alignment.
+
       -- Not static:
       IVar : Integer :=
                      Specified_Alignment;-- POSSIBLE ERROR: [Set01] (A) {1:7;1}
@@ -146,12 +172,16 @@
       -- Deferred:
       Def_Alignment : constant Integer;  -- POSSIBLE ERROR: [Set06] (F) {7;1}
 
-   private
+      -- Resolution recheck here.
+   private                               -- POSSIBLE ERROR: [Set07] (H) {1:7;1}
+
       Hidden_Alignment : constant :=
                    Specified_Alignment;  -- POSSIBLE ERROR: [Set04] (D) {1:7;1}
 
       Def_Alignment : constant Integer
           := Specified_Alignment;        -- 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