https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62205
Bug ID: 62205 Summary: GNAT does not accept class types for Default_Iterator Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: porton at narod dot ru Created attachment 33370 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33370&action=edit An Ada file whose semantics does not verify I attach an Ada package file which does not verify: gprbuild -q -c -gnatc -u -P/home/porton/t/default.gpr test.ads --subdirs=check -cargs:Ada -g -O0 -gnato -fstack-check -gnatVa -cargs:C -g -O0 -fstack-check -cargs:C++ -g -O0 -fstack-check test.ads:19:28: Default Iterator must be a primitive of "Descriptions_List" gprbuild: *** compilation phase failed But from Ada Reference Manual 2012 (5.5.1 8/3): [[[ Default_Iterator This aspect is specified by a name that denotes exactly one function declared immediately within the same declaration list in which T is declared, whose first parameter is of type T or T'Class or an access parameter whose designated type is type T or T'Class, whose other parameters, if any, have default expressions, and whose result type is an iterator type. ]]] That is T'Class (in our case Descriptions_List'Class) should work. I think this is a bug in GNAT 4.9.1.