https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87922
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-07 Target Milestone|--- |9.0 Ever confirmed|0 |1 --- Comment #1 from kargl at gcc dot gnu.org --- Index: gcc/fortran/io.c =================================================================== --- gcc/fortran/io.c (revision 265885) +++ gcc/fortran/io.c (working copy) @@ -2232,6 +2232,21 @@ gfc_match_open (void) if (!is_char_type ("ASYNCHRONOUS", open->asynchronous)) goto cleanup; + if (open->asynchronous->ts.kind != 1) + { + gfc_error ("ASYNCHRONOUS= specifier at %L must have be of default " + "CHARACTER kind", &open->asynchronous->where); + return MATCH_ERROR; + } + + if (open->asynchronous->expr_type == EXPR_ARRAY + || open->asynchronous->expr_type == EXPR_STRUCTURE) + { + gfc_error ("ASYNCHRONOUS= specifier at %L must have be scalar", + &open->asynchronous->where); + return MATCH_ERROR; + } + if (open->asynchronous->expr_type == EXPR_CONSTANT) { static const char * asynchronous[] = { "YES", "NO", NULL }; @@ -3792,6 +3807,21 @@ if (condition) \ if (!is_char_type ("ASYNCHRONOUS", dt->asynchronous)) return MATCH_ERROR; + + if (dt->asynchronous->ts.kind != 1) + { + gfc_error ("ASYNCHRONOUS= specifier at %L must have be of default " + "CHARACTER kind", &dt->asynchronous->where); + return MATCH_ERROR; + } + + if (dt->asynchronous->expr_type == EXPR_ARRAY + || dt->asynchronous->expr_type == EXPR_STRUCTURE) + { + gfc_error ("ASYNCHRONOUS= specifier at %L must have be scalar", + &dt->asynchronous->where); + return MATCH_ERROR; + } if (!compare_to_allowed_values ("ASYNCHRONOUS", asynchronous, NULL, NULL,