1-- { dg-do compile } 2 3procedure access_discr is 4 5 type One; 6 7 type Iface is limited interface; 8 type Base is tagged limited null record; 9 10 type Two_Alone (Parent : access One) is limited null record; 11 type Two_Iface (Parent : access One) is limited new Iface with null record; 12 type Two_Base (Parent : access One) is new Base with null record; 13 14 type One is limited record 15 TA : Two_Alone (One'Access); 16 TI : Two_Iface (One'Access); -- OFFENDING LINE 17 TB : Two_Base (One'Access); 18 end record; 19 20begin 21 null; 22end; 23