diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2005-12-10 22:44:43 +0100 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2005-12-10 21:44:43 +0000 |
commit | 418a78fa4f1cf57ec41ce66ce0df1edbee83cef7 (patch) | |
tree | 008e4afd23e0977e5d20ff5d64a8d73a18aa79e4 /gcc/fortran/io.c | |
parent | 74f04a6a44feaa4374946a71e73910251bf4199c (diff) | |
download | gcc-418a78fa4f1cf57ec41ce66ce0df1edbee83cef7.zip gcc-418a78fa4f1cf57ec41ce66ce0df1edbee83cef7.tar.gz gcc-418a78fa4f1cf57ec41ce66ce0df1edbee83cef7.tar.bz2 |
re PR fortran/25068 ([4.0/4.1] IOSTAT should be default integer when -std=f95)
PR fortran/25068
* io.c (resolve_tag): Add correct diagnostic for F2003 feature.
* gfortran.dg/iostat_3.f90: New test.
From-SVN: r108360
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 090f905..6d3d94b 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1046,12 +1046,22 @@ resolve_tag (const io_tag * tag, gfc_expr * e) gfc_error ("%s tag at %L must be scalar", tag->name, &e->where); return FAILURE; } + if (tag == &tag_iomsg) { if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: IOMSG tag at %L", &e->where) == FAILURE) return FAILURE; } + + if (tag == &tag_iostat && e->ts.kind != gfc_default_integer_kind) + { + if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Non-default " + "integer kind in IOSTAT tag at %L", + &e->where) == FAILURE) + return FAILURE; + } + if (tag == &tag_convert) { if (gfc_notify_std (GFC_STD_GNU, "Extension: CONVERT tag at %L", |