The compiler fails with a Storage_Error when compiling a container aggregate
for a Map type coming from an instantiation of Ada.Containers.Ordered_Maps
that specifies an enumeration type for the Key_Type formal.
gcc/ada/ChangeLog:
* exp_aggr.adb (Build_Container_Aggr_Code.To_Int): Apply Enumeration_Pos
to Entity (Expr) rather than Expr.
begin
return UI_To_Int ((if Nkind (Expr) = N_Integer_Literal
then Intval (Expr)
- else Enumeration_Pos (Expr)));
+ else Enumeration_Pos (Entity (Expr))));
end To_Int;
-- Local variables