http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46978
--- Comment #7 from Mikael Morin <mikael at gcc dot gnu.org> 2010-12-20 23:24:54 UTC --- This seems to fix it, though I find it somewhat suspicious. Index: trans-array.c =================================================================== --- trans-array.c (révision 164205) +++ trans-array.c (copie de travail) @@ -851,8 +851,8 @@ gfc_trans_create_temp_array (stmtblock_t * pre, st of the descriptor fields. */ tmp = fold_build2_loc (input_location, MINUS_EXPR, gfc_array_index_type, - gfc_conv_descriptor_ubound_get (desc, gfc_rank_cst[n]), - gfc_conv_descriptor_lbound_get (desc, gfc_rank_cst[n])); + gfc_conv_descriptor_ubound_get (desc, gfc_rank_cst[dim]), + gfc_conv_descriptor_lbound_get (desc, gfc_rank_cst[dim])); loop->to[n] = tmp; continue; } I remember making this change back and forth, and indeed, it reverts part of revision 164112, but the regression is at revision 164205. Strange.