RISC-V: Add support for riscv-*-*.
[official-gcc.git] / gcc / testsuite / gnat.dg / discr52.adb
blob3f91f0aa8d30662a2b1180efad7066786ea51087
1 -- { dg-do compile }
3 procedure Discr52 is
4 type T_Root (Root_Disc : Natural) is record
5 Data : Natural := 0;
6 end record;
8 type T_Derived (deriv_disc : Natural) is
9 new T_Root (root_disc => deriv_disc);
11 Derived : T_Derived (Deriv_Disc => 3);
12 Value : Natural;
14 procedure Do_Test (Obj : T_Derived) is
15 begin
16 Value := Obj.root_disc; -- { dg-error "no selector \"root_disc\" for type \"T_Derived\" defined at line \\d+" }
17 end;
18 begin
19 Do_Test (Derived);
20 end;