http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53737

             Bug #: 53737
           Summary: Assert_Failure sinfo.adb:1066 on a generic package
                    with an package as parameter (Ada Util)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: ada
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: stephane.car...@gmail.com


GCC 4.7.1 fails to compile a generic package that compiled correctly
with GCC 4.4.3, 4.5.4 and 4.6.3.  FYI, the generic package comes
from Ada Utility Library.

The generic package uses two packages as parameter:

generic
   with package Vectors is
     new Ada.Containers.Vectors (<>);
   with package Element_Mapper is
     new Record_Mapper (Element_Type => Vectors.Element_Type,
                        others => <>);
package Util.Serialize.Mappers.Vector_Mapper is


and the 'Record_Mapper' is itself a generic package defined with:

generic
   type Element_Type is limited private;
   type Element_Type_Access is access all Element_Type;
   type Fields is (<>);
   with procedure Set_Member (Into   : in out Element_Type;
                              Field  : in Fields;
                              Value  : in Util.Beans.Objects.Object);
package Util.Serialize.Mappers.Record_Mapper is


The issue seems to be in sem_ch12.adb:1460 in Analyze_Associations
when it is checking a N_Formal_Type_Declaration.
I guess this could be the Element_Type_Access but I have no clear fact
about that (I stopped there my investigations).


+===========================GNAT BUG DETECTED==============================+
| 4.7.1 (i686-pc-linux-gnu) Assert_Failure sinfo.adb:1066                  |
| Error detected at util-serialize-mappers-vector_mapper.ads:29:4          |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

util-serialize-mappers-vector_mapper.adb
util-serialize-mappers-vector_mapper.ads
util-serialize-mappers.ads
util-serialize.ads
util.ads
util-beans.ads
util-beans-objects.ads
util-concurrent.ads
util-concurrent-counters.ads
util-beans-basic.ads
util-log.ads
util-log-loggers.ads
util-log-appenders.ads
util-properties.ads
util-serialize-contexts.ads
util-serialize-mappers-record_mapper.ads
util-serialize-io.ads
util-streams.ads
util-streams-buffered.ads
util-stacks.ads
util-concurrent-counters.adb

compilation abandoned
Exit 1

Reply via email to