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
This commit is contained in:
Francois-Xavier Coudert 2005-12-10 22:44:43 +01:00 committed by François-Xavier Coudert
parent 74f04a6a44
commit 418a78fa4f
4 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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",

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,8 @@
! { 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