diff options
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 8d54107..8415df1 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -2205,6 +2205,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 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 be scalar", + &open->asynchronous->where); + return MATCH_ERROR; + } + if (open->asynchronous->expr_type == EXPR_CONSTANT) { static const char * asynchronous[] = { "YES", "NO", NULL }; @@ -3799,6 +3814,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 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 be scalar", + &dt->asynchronous->where); + return MATCH_ERROR; + } + if (!compare_to_allowed_values ("ASYNCHRONOUS", asynchronous, NULL, NULL, dt->asynchronous->value.character.string, |