From: Jerry DeLisle Date: Thu, 28 Dec 2006 01:39:15 +0000 (+0000) Subject: re PR libfortran/30014 (INQUIRE (iolength = xx) limited to kind=4) X-Git-Tag: releases/gcc-4.3.0~7818 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3415f511593e977c04a73cc3dbd48da0fa48c284;p=thirdparty%2Fgcc.git re PR libfortran/30014 (INQUIRE (iolength = xx) limited to kind=4) 2006-12-27 Jerry DeLisle PR fortran/30014 *io.c (resolve_tag): Don't issue error for tag_size type not being default integer size for -std=F2003. Add similar check for tag_iolength. *ioparm.def: Change size and iolength parameters to ioint pointer, which corresponds to GFC_IO_INT on the library side. From-SVN: r120233 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 534c4574d46e..8d9fd6e0ab8a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2006-12-27 Jerry DeLisle + + PR fortran/30014 + *io.c (resolve_tag): Don't issue error for tag_size type not being + default integer size for -std=F2003. Add similar check for + tag_iolength. + *ioparm.def: Change size and iolength parameters to ioint pointer, which + corresponds to GFC_IO_INT on the library side. + 2006-12-27 Gerald Pfeifer * interface.c (compare_actual_formal): Remove unused variable diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index adf274ee1189..cb424c487796 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1122,7 +1122,7 @@ resolve_tag (const io_tag * tag, gfc_expr * e) if (tag == &tag_size && e->ts.kind != gfc_default_integer_kind) { - if (gfc_notify_std (GFC_STD_GNU, "Fortran 95 requires default " + if (gfc_notify_std (GFC_STD_F2003, "Fortran 95 requires default " "INTEGER in SIZE tag at %L", &e->where) == FAILURE) return FAILURE; @@ -1134,6 +1134,14 @@ resolve_tag (const io_tag * tag, gfc_expr * e) &e->where) == FAILURE) return FAILURE; } + + if (tag == &tag_iolength && e->ts.kind != gfc_default_integer_kind) + { + if (gfc_notify_std (GFC_STD_F2003, "Fortran 95 requires default " + "INTEGER in IOLENGTH tag at %L", + &e->where) == FAILURE) + return FAILURE; + } } return SUCCESS; diff --git a/gcc/fortran/ioparm.def b/gcc/fortran/ioparm.def index 8c09a296fa2f..57a5db9ef787 100644 --- a/gcc/fortran/ioparm.def +++ b/gcc/fortran/ioparm.def @@ -60,8 +60,8 @@ IOPARM (inquire, convert, 1 << 30, char1) #endif IOPARM (dt, common, 0, common) IOPARM (dt, rec, 1 << 9, intio) -IOPARM (dt, size, 1 << 10, pint4) -IOPARM (dt, iolength, 1 << 11, pint4) +IOPARM (dt, size, 1 << 10, pintio) +IOPARM (dt, iolength, 1 << 11, pintio) IOPARM (dt, internal_unit_desc, 0, parray) IOPARM (dt, format, 1 << 12, char1) IOPARM (dt, advance, 1 << 13, char2)