This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[patch, fortran][4.3 Regression] ICE with transfer, merge in gfc_conv_expr_descriptor
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 26 Jan 2008 09:51:31 -0800
- Subject: [patch, fortran][4.3 Regression] ICE with transfer, merge in gfc_conv_expr_descriptor
Hi propose we commit this patch with the TODO as shown and downgrade PR31610 to
no longer regression or F95 hot list, but leave it open. We should mark 34946
as a duplicate of 31610. I will give the test case an appropriate name.
All due respect to Paul if he discovers a deeper issue. :)
Someone should test with cp2k latest if possible.
Regression tested on x86-64.
OK for trunk?
Jerry
2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31610
* trans-array.c (gfc_trans_create_temp_array): Remove call to
gcc_assert (integer_zerop (loop->from[n])).
Index: trans-array.c
===================================================================
--- trans-array.c (revision 131856)
+++ trans-array.c (working copy)
@@ -588,9 +588,9 @@ gfc_trans_create_temp_array (stmtblock_t
for (dim = 0; dim < info->dimen; dim++)
{
n = loop->order[dim];
- if (n < loop->temp_dim)
- gcc_assert (integer_zerop (loop->from[n]));
- else
+ /* TODO: Investigate why "if (n < loop->temp_dim)
+ gcc_assert (integer_zerop (loop->from[n]));" fails here. */
+ if (n >= loop->temp_dim)
{
/* Callee allocated arrays may not have a known bound yet. */
if (loop->to[n])
! { dg-do compile }
! pr31610 ICE with transfer, merge in gfc_conv_expr_descriptor
integer :: i(1) = 1
integer :: foo(3)
integer :: n(1)
foo(1) = 17
foo(2) = 55
foo(3) = 314
print *, i, foo
write(*,*) foo([1]), foo([1]+i), [1]+1
n = foo([1]+i)
print *, n, shape(foo([1]+i)), shape(foo(i+[1]))
end