https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64866
Bug ID: 64866
Summary: Lost visibility of package Interfaces after task or PO
declaration
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: simon at pushface dot org
Created attachment 34618
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34618&action=edit
Demonstrator
While developing an Ada RTS, I found that code like
with Interfaces;
package body Foo is
task T is
end T;
U : Interfaces.Unsigned_32 := 0;
task body T is
begin
null;
end T;
end Foo;
would fail with
foo.adb:7:08: "Interfaces" is not visible (more references follow)
foo.adb:7:08: non-visible declaration at interfac.ads:38
(and similar problems with a PO).
I’m fairly confident that this is caused by having System.Tasking ‘with’ an
unexpected package, in this case package FreeRTOS (it wasn’t just the name, I
changed it to package Whatever, same result).
I also tried making the child packages of FreeRTOS into nested packages, and
then making that a child of System (in s-freert.ads); no joy.
In the attachment, I’ve included the relevant RTS specs, which are all that is
needed to show the problem when unpacked into the same directory as foo.ad?.
The same problem occurs if the RTS code is in a proper RTS’s adainclude/.