http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59234
Bug ID: 59234 Summary: Legal program rejected, a generic package having intricate formal package parameters could not be instantiated Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: demoonlit at panathenaia dot halfmoon.jp Created attachment 31263 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31263&action=edit minimal bug triggering source code It could not compile a generic package having intricate formal package parameters. The generic package (X) having two formal package parameters, another generic package (Y) and its child generic package (Y.C). The 2nd generic package (Y) also having a formal package parameter that is 4th generic package (Z). In this case, The generic package X could not be instantiated. (If Y.C or Z is removed, X would be able to be instantiated.) An example is in the attached file: $ gnatmake main.adb gcc -c main.adb main.adb:8:30: actual parameter must be instance of "nested" main.adb:8:30: instantiation abandoned gnatmake: "main.adb" compilation error This bug has also been discussed on comp.lang.ada. Some people suggested me to report. https://groups.google.com/d/msg/comp.lang.ada/3UyNvf6KXRE/sjJB1zcmg7kJ Regards.