http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53736
Bug #: 53736
Summary: Instantiation error for Indefinite_Hashed_Sets package
when using -gnatN switch
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: [email protected]
ReportedBy: [email protected]
If you compile the following package instantiation with -gnatN switch
the compiler reports instantiation errors. Removing the -gnatN switch
compiles the package.
---
with Ada.Strings.Hash;
with Ada.Containers.Indefinite_Hashed_Sets;
package Bug is new Ada.Containers.Indefinite_Hashed_Sets
(Element_Type => String,
Hash => Ada.Strings.Hash,
Equivalent_Elements => "=");
---
gcc -c bug.ads -gnatN -O2
bug.ads:4:01: instantiation error at a-cihase.adb:294
bug.ads:4:01: missing argument for parameter "Container" in call to "Clear"
declared at a-cihase.ads:121, instance at line 4
bug.ads:4:01: instantiation error at a-cihase.adb:294
bug.ads:4:01: missing argument for parameter "Source" in call to "Union"
declared at a-cihase.ads:232, instance at line 4
gcc -c bug.ads -O2 works.
gcc -c bug.ads -gnatN fails.
This is a regression that came with 4.7 branch.
This package is compiled correctly with -Os -gnatN for 4.6.3, 4.4.3 and 4.5.