In the program below, the full declaration of T2 (in the private part of the package) is illegal because it conflicts with the public declaration. The public declaration defines the discriminant, d1, to have the value 3 whereas the private declaration specifies the value to be 4. GNAT fails to diagnose this error. -- error not detected package pak1 is -- RM 7.3(13), 4.9.1(1) -- check that discriminants statically match type T1(d1: integer) is tagged null record; type T2 is new T1 (3) with private; private subtype T3 is T1 (4); type T2 is new T3 with null record; -- Error: 3 vs 4 end pak1; To reproduce: gnatmake pak1.ads Error message expected: pak1.ads:9:8: full view of type "T2" conflicts with public declaration at line 6
This is Debian Bug#416975.
found 4.6.1
Fixed in 4.9-20140218
.