(Debian bug #315414) -- ARM 15.5.3(7): "The component subtypes of the formal and actual -- array types shall statically match."
generic package P is type T is private; private type T is new Integer; end P; generic type Formal_Array_Type is array (Positive range <>) of T; package P.Q is end P.Q; with P.Q; package Test_315414 is package Instance_Of_P is new P; type Array_Type is array (Positive range <>) of Instance_Of_P.T; package Instance_Of_Q is new P.Q (Formal_Array_Type => Array_Type); end Test_315414; The compiler should accept the program, but says: test_315414.ads:9:49: component subtype of actual does not match that of formal "Formal_Array_Type" test_315414.ads:9:49: instantiation abandoned gnatmake: "test_315414.ads" compilation error -- Summary: GNAT rejects matching parameter in generic instantiation as non-matching Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ludovic dot brenta at insalien dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22165