Bug 24381 - Error in visibility rules of formal generic packages
Summary: Error in visibility rules of formal generic packages
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.4.5
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-15 10:33 UTC by Dr. Dmitry A. Kazakov
Modified: 2024-07-29 16:10 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Dmitry A. Kazakov 2005-10-15 10:33:03 UTC
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"
----------------------------
Comment 1 Arnaud Charlet 2007-05-04 11:22:14 UTC
Compiles cleanly on trunk
Comment 2 Emma Kivimaki 2024-07-29 16:10:28 UTC Comment hidden (spam)