The error occures in the following code: ------------------ a.ads generic type T is digits <>; package A is end A; ------------------ b.ads with A; generic with package AA is new A (<>); package B is end B; ------------------ c.ads with A; generic with package AA is new A (<>); package C is end C; ----------------- d.ads with B, C; generic with package BB is new B (<>); with package CC is new C (BB.AA); package D is X : BB.AA.T; -- "T" is not a visible entity of "AA" end D;
[In the case when the formal package CC is excluded from the list of formal packages of D, it is compiled successfully. It seems that CC "hides" specifications of BB.] The output of gcc -v -save-temps -c d.ads: ---------------------- Reading specs from c:/gnat/bin/../lib/gcc/pentium-mingw32msv/3.4.5/specs Configured with: /gnatmail-gap-2005a/build-toulouse//src/configure --prefix=/gnat-prefix --enable-languages=c,c++,ada --disable-nls --disable-checking --disable-libada --enable-threads=win32 --disable-sjlj-exceptions pentium-mingw32msv Thread model: win32 gcc version 3.4.5 20050524 (prerelease) for GNAT GPL 2005 (20050614) c:/gnat/bin/../libexec/gcc/pentium-mingw32msv/3.4.5/gnat1.exe -quiet -dumpbase d.ads -mtune=pentium d.ads -o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cccDaaaa.s d.ads:6:13: "T" is not a visible entity of "AA" ---------------------------- -- Summary: Error in visibility rules of formal generic packages Product: gcc Version: 3.4.5 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mailbox at dmitry-kazakov dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24381