fortran: Fix arg types of _gfortran_is_extension_of
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Mon, 7 Sep 2020 07:36:29 +0000 (09:36 +0200)
committerFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Mon, 7 Sep 2020 07:37:01 +0000 (09:37 +0200)
gcc/fortran/ChangeLog

* resolve.c (resolve_select_type): Provide a formal arg list.

gcc/fortran/resolve.c

index e4232717e42c4ae3eea49adcdeb3edeb66d5184a..fc2431b8aad7bb2e0f4b6f88f7fe6b5fbf35fa7f 100644 (file)
@@ -9637,6 +9637,12 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns)
          new_st->expr1->value.function.actual->next = gfc_get_actual_arglist ();
          new_st->expr1->value.function.actual->next->expr = gfc_get_variable_expr (st);
          new_st->expr1->value.function.actual->next->expr->where = code->loc;
+         /* Set up types in formal arg list.  */
+         new_st->expr1->value.function.isym->formal = XCNEW (gfc_intrinsic_arg);
+         new_st->expr1->value.function.isym->formal->ts = new_st->expr1->value.function.actual->expr->ts;
+         new_st->expr1->value.function.isym->formal->next = XCNEW (gfc_intrinsic_arg);
+         new_st->expr1->value.function.isym->formal->next->ts = new_st->expr1->value.function.actual->next->expr->ts;
+
          new_st->next = body->next;
        }
        if (default_case->next)