Skip to content
Snippets Groups Projects
  • Eric Botcazou's avatar
    42fcc750
    ada: Fix memory explosion on aggregate of nested packed array type · 42fcc750
    Eric Botcazou authored
    It occurs at compile time on an aggregate of a 2-dimensional packed array
    type whose component type is itself a packed array, because the compiler
    is trying to pack the intermediate aggregate and ends up rewriting a bunch
    of subcomponents.  This optimization was originally devised for the case of
    a scalar component type so the change adds this restriction.
    
    gcc/ada/
    
    	* exp_aggr.adb (Is_Two_Dim_Packed_Array): Return true only if the
    	component type of the array is scalar.
    42fcc750
    History
    ada: Fix memory explosion on aggregate of nested packed array type
    Eric Botcazou authored
    It occurs at compile time on an aggregate of a 2-dimensional packed array
    type whose component type is itself a packed array, because the compiler
    is trying to pack the intermediate aggregate and ends up rewriting a bunch
    of subcomponents.  This optimization was originally devised for the case of
    a scalar component type so the change adds this restriction.
    
    gcc/ada/
    
    	* exp_aggr.adb (Is_Two_Dim_Packed_Array): Return true only if the
    	component type of the array is scalar.