2006-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Dec 2006 01:39:15 +0000 (01:39 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Dec 2006 01:39:15 +0000 (01:39 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120233 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 534c457..8d9fd6e 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 adf274e..cb424c4 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 8c09a29..57a5db9 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)