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

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to kargl from comment #3)
> Patch is against svn r280157.
> 
> Index: gcc/fortran/check.c
> ===================================================================
> --- gcc/fortran/check.c       (revision 280157)
> +++ gcc/fortran/check.c       (working copy)
> @@ -3942,6 +3942,10 @@ gfc_check_findloc (gfc_actual_arglist *ap)
>    v1 = v->ts.type == BT_CHARACTER;
>    if ((a1 && !v1) || (!a1 && v1))
>      goto incompat;
> +
> +  /* Check the kind of the characters argument match.  */
> +  if (a1 && v1 && a->ts.kind != v->ts.kind)
> +    goto incompat;
>        
>    d = ap->next->next->expr;
>    m = ap->next->next->next->expr;

This avoids the ICE.

What I have not yet have had time to figure out if the test case
is legal or not, if we need to convert or to reject.

Reply via email to