https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97896

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #2 from anlauf at gcc dot gnu.org ---
Reverting the following snippet from my fix attempt for pr91651:

diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index c2a4865f28f..994a9af4eb8 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -1296,11 +1296,7 @@ gfc_resolve_index_func (gfc_expr *f, gfc_actual_arglist
*a)

   f->ts.type = BT_INTEGER;
   if (kind)
-    {
-      f->ts.kind = mpz_get_si ((kind)->value.integer);
-      a_back->next = NULL;
-      gfc_free_actual_arglist (a_kind);
-    }
+    f->ts.kind = mpz_get_si ((kind)->value.integer);
   else
     f->ts.kind = gfc_default_integer_kind;

fixes the current PR, but breaks testcase index_4.f90

Reply via email to