This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46978] [4.6 Regression] TRANSPOSE with RESHAPE and ALLOCATE: Segfault


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]