aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/abstract_state1.ads
blob: 306f051f4112a19313f0100c926e4b847ac77f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package Abstract_State1
  with Abstract_State => null,
       Initializes    => null
is
   type Complex (B : Boolean) is tagged private;
   type No_F is tagged private;
   X : constant No_F;

   procedure Foo;

private
   type Complex (B : Boolean) is tagged record
      G : Integer;
      case B is
         when True =>
            F : Integer;
         when False =>
            null;
      end case;
   end record;

   type No_F is new Complex (False) with null record;
   X : constant No_F := (B => False, G => 7);
end Abstract_State1;