Fix bootstrap failure for bare metal due to autoconf link tests
[official-gcc.git] / gcc / testsuite / gnat.dg / interface6.adb
blob04eb1e179999a9ebe58674ce9b38b65b02ad3c42
1 -- { dg-do compile }
3 procedure Interface6 is
5 type TI is interface;
6 type TI2 is interface;
8 type Rec_Type is tagged null record;
10 type Rec_Type1 is new TI
11 with
12 record
13 A : Integer;
14 end record;
16 type Rec_Type2 is new Rec_Type1 and TI2
17 with
18 record
19 B : Integer;
20 end record;
22 type Rec_Type12 is new Rec_Type1 and TI and TI2
23 with
24 record
25 C : Integer;
26 end record;
28 generic
29 type T is new Rec_Type1 and TI2 with private;
30 procedure Test;
32 procedure Test is
33 begin
34 null;
35 end Test;
37 procedure Test_Instance1 is new Test (T => Rec_Type); -- { dg-error "actual must implement all interfaces of formal \"T\"" }
38 procedure Test_Instance1 is new Test (T => Rec_Type1); -- { dg-error "Actual \"Rec_Type1\" must implement interface \"TI2\"" }
39 procedure Test_Instance2 is new Test (T => Rec_Type2);
40 procedure Test_Instance12 is new Test (T => Rec_Type12);
42 begin
43 null;
44 end Interface6;