-- RM 4.1.3(9.2/2): -- The selector_name shall resolve to denote a view of a subprogram -- declared immediately within the declarative region in which an -- ancestor of the type T is declared.
package pak1 is package pak2 is type T1 is tagged private; private type T1 is tagged null record; function f1(x: T1) return integer; end pak2; x1: pak2.T1; x2: integer := x1.f1; -- ERROR: f1 not declared in visible part of pak2 end pak1; gcc-4.1 -c -gnat05 pak1.ads cannot generate code for file pak1.ads (package spec) to check package spec for errors, use -gnatc -- Summary: Illegal program not detected, RM 4.1.3(9.2/2) Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ludovic at ludovic-brenta dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35794