This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31610] ICE with transfer, merge in gfc_conv_expr_descriptor
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2007 09:09:18 -0000
- Subject: [Bug fortran/31610] ICE with transfer, merge in gfc_conv_expr_descriptor
- References: <bug-31610-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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