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/31610] ICE with transfer, merge in gfc_conv_expr_descriptor



------- Comment #12 from fxcoudert at gcc dot gnu dot org  2007-11-22 09:09 -------
It's not even MERGE-related:

$ cat a.f90
  integer :: i(1) = 0
  write(*,*) foo([1]+i)
end
$ gfortran a.f90 
a.f90: In function ?MAIN__?:
a.f90:1: internal compiler error: in gfc_trans_create_temp_array, at
fortran/trans-array.c:592

The assertion in  fails because the loop->from[0] is equal to 1, but we want it
to be zero. It is set to 1 in gfc_conv_loop_setup:

      /* Set the extents of this range.  */
      cshape = loopspec[n]->shape;
      if (cshape && INTEGER_CST_P (info->start[n])
          && INTEGER_CST_P (info->stride[n]))
        {
          loop->from[n] = info->start[n];
          mpz_set (i, cshape[n]);
          mpz_sub_ui (i, i, 1);
          /* To = from + (size - 1) * stride.  */


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31610


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