This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[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

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