https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89159
Bug ID: 89159
Summary: limited with, tagged record and access to function
confuse the linker
Product: gcc
Version: 8.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: nicolas at debian dot org
Target Milestone: ---
The following sources demonstrate the issue with GCC 8.2.0.
# gnatmake main
x86_64-linux-gnu-gnatlink-8 main.ali
/usr/bin/ld: ./ms.o:(.data.rel.ro.local+0x80): undefined reference to `ms__g'
----------------------------------------------------------------------
with Ms;
package Ts is
type T;
type T is new Integer;
end Ts;
----------------------------------------------------------------------
limited with Ts;
package Ms is
type M is tagged null record;
procedure G (Container : in M;
F : access function return Ts.T);
end Ms;
----------------------------------------------------------------------
with Ts;
package body Ms is
procedure G (Container : in M;
F : access function return Ts.T) is
Item : Ts.T := F.all;
begin
null;
end G;
end Ms;
----------------------------------------------------------------------
with Ts;
procedure Main is
begin
null;
end Main;