This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/50651] New: GNAT rejects matching parameter in generic instantiation as non-matching
- From: "bateast at bat dot fr.eu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Oct 2011 08:07:31 +0000
- Subject: [Bug ada/50651] New: GNAT rejects matching parameter in generic instantiation as non-matching
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50651
Bug #: 50651
Summary: GNAT rejects matching parameter in generic
instantiation as non-matching
Classification: Unclassified
Product: gcc
Version: 4.5.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: bateast@bat.fr.eu.org
CC: bateast@bat.fr.eu.org, gcc-bugs@gcc.gnu.org,
ludovic@ludovic-brenta.org, sam@gcc.gnu.org,
sparre@nbi.dk
+++ This bug was initially created as a clone of Bug #22164 +++
-- ARM 15.5.3(7): "The component subtypes of the formal and actual
-- array types shall statically match."
it passes OK in most situations, but fails with 2005 extension and match
checks.
---
generic
type Data is range <>; -- would pass with "Type Data is private" or anything
even less constraint
type Table is array (Positive range <>) of access Data;
package Test is
end Test;
---
with Test;
package Test_2 is
type My_Data is range 0 .. 16#ff#;
type Data_Table is array (Positive range <>) of access My_Data;
package Instance is new Test
(
Data => My_Data,
Table => Data_Table
);
end Test_2;
---
gcc -c -gnatc -g -gnatq -gnatQ test_2.ads
test_2.ads:11:16: component subtype of actual does not match that of formal
"Table"
test_2.ads:11:16: instantiation abandoned