Debian Codegraph @

gcc/testsuite/gnat.dg/tagged4.adb

raw
1 -- { dg-do compile }
2
3 procedure Tagged4 is
4 type T0 is tagged null record;
5
6 generic
7 type F1 is tagged private;
8 procedure Gen1;
9
10 procedure Gen1 is
11 type Inst1 is new F1 with null record; -- { dg-error "ancestor type \"F1\" is formal type of enclosing generic unit \\(RM 3\\.9\\.1 \\(4\\/2\\)\\)" }
12 begin
13 null;
14 end Gen1;
15
16 generic
17 type F2 is interface;
18 procedure Gen2;
19
20 procedure Gen2 is
21 type Inst2 is new T0 and F2 with null record; -- { dg-error "ancestor type \"F2\" is formal type of enclosing generic unit \\(RM 3\\.9\\.1 \\(4\\/2\\)\\)" }
22 begin
23 null;
24 end Gen2;
25
26 begin
27 null;
28 end Tagged4;