aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 519aa8b..cdabbf5 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -3947,6 +3947,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;