This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46978] [4.6 Regression] TRANSPOSE with RESHAPE and ALLOCATE: Segfault
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Dec 2010 23:25:08 +0000
- Subject: [Bug fortran/46978] [4.6 Regression] TRANSPOSE with RESHAPE and ALLOCATE: Segfault
- Auto-submitted: auto-generated
- References: <bug-46978-4@http.gcc.gnu.org/bugzilla/>
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.