aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/test_unknown_discrs.adb
blob: 6af52dfd62b72f863cab335c6aa1e3e7d64952b1 (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
25
26
27
28
29
30
31
--  { dg-do compile }

procedure Test_Unknown_Discrs is
   
   package Display is

      type Component_Id (<>) is limited private;

      Deferred_Const : constant Component_Id;
   
   private
      
      type Component_Id is (Clock);

      type Rec1 is record
         C : Component_Id := Deferred_Const;
      end record;

      Priv_Cid_Object : Component_Id := Component_Id'First;

      type Rec2 is record
         C : Component_Id := Priv_Cid_Object;
      end record;

      Deferred_Const : constant Component_Id := Priv_Cid_Object;
   
   end Display;

begin
   null;
end Test_Unknown_Discrs;