http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56047
--- Comment #10 from janus at gcc dot gnu.org 2013-01-20 12:05:11 UTC --- (In reply to comment #8) > Note that the patch from PR 55984 comment 4 fixes the ICE for both comment 0 > and comment 3. This brings comment 3 to the same error message one gets with > 4.6/4.7, while comment 0 yields a new ICE: > > associate (template => templates%initial(1)%variant_def) > 1 > Internal Error at (1): > gfc_variable_attr(): Bad array reference Reduced test case for this error: implicit none type :: process_variant_def_t end type type :: process_component_def_t class(process_variant_def_t), allocatable :: variant_def end type type(process_component_def_t), dimension(1:2) :: initial associate (template => initial(1)%variant_def) end associate end The error only occurs with the patch, but not with a clean trunk.