#253737 Legal program rejected, nested generic packages

Package:
gnat-12
Source:
gcc-12
Description:
GNU Ada compiler
Submitter:
Date:
2022-04-04 05:33:21 UTC
Severity:
normal
Tags:
#253737#5
Date:
2004-06-10 21:39:44 UTC
From:
To:
generic
package parent is
end parent;

generic
package parent.pak2 is
end parent.pak2;

generic
package parent.pak2.pak3 is
end parent.pak2.pak3;

with parent.pak2.pak3;
generic
package parent.pak2.pak4 is
   package pak3 is new parent.pak2.pak3;
end parent.pak2.pak4;

with parent;
package pak1 is new parent;

with parent.pak2;
with pak1;
package pak6 is new pak1.pak2;

with parent.pak2.pak4;
with pak6;
package Test_4 is new pak6.pak4;





The above is a legal Ada program, but GNAT 3.15p and 3.4 both reject
it with:

test_4.ads:4:01: instantiation error at parent-pak2-pak4.ads:5
test_4.ads:4:01: "pak2" not declared in "pak1"
compilation abandoned due to previous error
gnatmake: "test_4.ads" compilation error

#253737#20
Date:
2008-12-31 10:17:28 UTC
From:
To:
found 248681 4.3.2-2
found 248682 4.3.2-2
found 251265 4.3.2-2
found 253737 4.3.2-2
thanks

#253737#31
Date:
2009-08-30 12:46:10 UTC
From:
To:
found 253737 4.4.1-1
thanks