2 -- { dg-require-effective-target strub }
4 -- Check that strub mode mismatches between overrider and overridden
5 -- subprograms are reported even when the overriders for an
6 -- interface's subprograms are inherited from a type that is not a
7 -- descendent of the interface.
9 procedure Strub_Intf2
is
11 type A
is tagged null record;
13 procedure P
(I
: Integer; X
: A
);
14 pragma Machine_Attribute
(P
, "strub", "at-calls"); -- { dg-error "requires the same .strub. mode" }
16 function F
(X
: access A
) return Integer;
20 procedure P
(I
: Integer; X
: TX
) is abstract;
22 function F
(X
: access TX
) return Integer is abstract;
23 pragma Machine_Attribute
(F
, "strub", "at-calls");
25 type B
is new A
and TX
with null record; -- { dg-error "requires the same .strub. mode" }
30 procedure P
(I
: Integer; X
: A
) is
35 function F
(X
: access A
) return Integer is (0);
41 procedure Q
(X
: TX
'Class) is
52 I
:= I
+ F
(XB
'Access);