* io.c (resolve_tag): Add correct diagnostic for F2003 feature.
* gfortran.dg/iostat_3.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108360
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-12-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR fortran/25068
+ * io.c (resolve_tag): Add correct diagnostic for F2003 feature.
+
2005-12-10 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/23815
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",
+2005-12-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR fortran/25068
+ * gfortran.dg/iostat_3.f90: New test.
+
2005-12-10 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/23815
--- /dev/null
+! { dg-do compile }
+! Testcase for PR libfortran/25068
+ real :: u
+ integer(kind=8) :: i
+ open (10,status="scratch")
+ read (10,*,iostat=i) u ! { dg-warning "Fortran 2003: Non-default integer kind in IOSTAT tag" }
+ close (10,iostat=i) ! { dg-warning "Fortran 2003: Non-default integer kind in IOSTAT tag" }
+ end