OSDN Git Service

2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jul 2010 02:07:48 +0000 (02:07 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jul 2010 02:07:48 +0000 (02:07 +0000)
PR fortran/37077
* trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
internal unit.

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

gcc/fortran/ChangeLog
gcc/fortran/trans-io.c

index 94572cf..25b34f2 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/37077
+       * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
+       internal unit.
+
 2010-07-12  Mikael Morin  <mikael@gcc.gnu.org>
 
        * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
index 8626e03..80cc765 100644 (file)
@@ -1669,7 +1669,8 @@ build_dt (tree function, gfc_code * code)
        {
          mask |= set_internal_unit (&block, &post_iu_block,
                                     var, dt->io_unit);
-         set_parameter_const (&block, var, IOPARM_common_unit, 0);
+         set_parameter_const (&block, var, IOPARM_common_unit,
+                              dt->io_unit->ts.kind == 1 ? 0 : -1);
        }
     }
   else