blob: 3b245b03aef9017fa6d44ec037f7810de4179bc2 [file] [log] [blame]
-- { dg-do compile }
procedure CPP_Constructor2 is
package P is
type X is tagged limited record
A, B, C, D : Integer;
end record;
pragma Import (Cpp, X);
procedure F1 (V : X);
pragma Import (Cpp, F1);
function F2 return X; -- { dg-error "C\\+\\+ constructor must have external name or link name" }
pragma Cpp_Constructor (F2);
end P;
begin
null;
end CPP_Constructor2;