]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/30014 (INQUIRE (iolength = xx) limited to kind=4)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 28 Dec 2006 01:39:15 +0000 (01:39 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 28 Dec 2006 01:39:15 +0000 (01:39 +0000)
2006-12-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

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

gcc/fortran/ChangeLog
gcc/fortran/io.c
gcc/fortran/ioparm.def

index 534c4574d46e20f0ffdd16083e935b29f4dd455b..8d9fd6e0ab8a093055788ac29d77aaead9492c1a 100644 (file)
@@ -1,3 +1,12 @@
+2006-12-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       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  <gerald@pfeifer.com>
 
        * interface.c (compare_actual_formal): Remove unused variable
index adf274ee118949ef301c87dc15c9f41fbc1c6e8d..cb424c4877965d7b059030e47cbd603218747360 100644 (file)
@@ -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;
index 8c09a296fa2f2e29532078b86a76a074a3e59103..57a5db9ef7879f7c6f0a895c7ee3ed693d49cab7 100644 (file)
@@ -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)