https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643
--- Comment #16 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Needed a minor tweak:
+ if (string->ts.type != BT_CHARACTER
+ || (string->ts.type == BT_CHARACTER
// && on the inner paren instead of ||
+ && (string->ts.kind != 1 && string->ts.is_c_interop != 1))) //
+ {
+ gfc_error ("%qs argument of %qs intrinsic at %L shall have "
+ "a type of CHARACTER(KIND=C_CHAR)",
+ gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic,
+ &string->where);
+ return false;
+ }