Commit 418a78fa by Francois-Xavier Coudert Committed by François-Xavier Coudert

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
parent 74f04a6a
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> 2005-12-10 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/23815 PR fortran/23815
......
...@@ -1046,12 +1046,22 @@ resolve_tag (const io_tag * tag, gfc_expr * e) ...@@ -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); gfc_error ("%s tag at %L must be scalar", tag->name, &e->where);
return FAILURE; return FAILURE;
} }
if (tag == &tag_iomsg) if (tag == &tag_iomsg)
{ {
if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: IOMSG tag at %L", if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: IOMSG tag at %L",
&e->where) == FAILURE) &e->where) == FAILURE)
return 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 (tag == &tag_convert)
{ {
if (gfc_notify_std (GFC_STD_GNU, "Extension: CONVERT tag at %L", 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> 2005-12-10 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/23815 PR fortran/23815
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment