2 -- { dg-require-effective-target strub }
4 procedure Strub_Disp
is
6 type A
is tagged null record;
8 procedure P
(I
: Integer; X
: A
);
9 pragma Machine_Attribute
(P
, "strub", "at-calls");
11 function F
(X
: access A
) return Integer;
13 type B
is new A
with null record;
16 procedure P
(I
: Integer; X
: B
); -- { dg-error "requires the same .strub. mode" }
19 function F
(X
: access B
) return Integer;
20 pragma Machine_Attribute
(F
, "strub", "at-calls"); -- { dg-error "requires the same .strub. mode" }
25 procedure P
(I
: Integer; X
: A
) is
30 function F
(X
: access A
) return Integer is (0);
33 procedure P
(I
: Integer; X
: B
) is
39 function F
(X
: access B
) return Integer is (1);
44 procedure Q
(X
: A
'Class) is
57 I
:= I
+ F
(XA
'Access);
58 I
:= I
+ F
(XB
'Access);