tags 315414 confirmed upstream
forwarded 315414 http://gcc.gnu.org/PR22165
thanks

The following test case isolates the problem more closely.

--  ARM 15.5.3(7): "The component subtypes of the formal and actual
--  array types shall statically match."

generic
package P is
    type T is private;
private
    type T is new Integer;
end P;

generic
    type Formal_Array_Type is array (Positive range <>) of T;
package P.Q is
end P.Q;


with P.Q;
package Test_315414 is
    package Instance_Of_P is new P;

    type Array_Type is array (Positive range <>) of Instance_Of_P.T;

    package Instance_Of_Q is new P.Q (Formal_Array_Type => Array_Type);
end Test_315414;


The compiler should accept the program, but says:

test_315414.ads:9:49: component subtype of actual does not match that of
formal "Formal_Array_Type"
test_315414.ads:9:49: instantiation abandoned
gnatmake: "test_315414.ads" compilation error

Also confirmed on gnat-4.0 and submitted upstream.

--
Ludovic Brenta.



Reply via email to