]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/40638 (RTE: "Unit number in I/O statement too large" -- fails with...
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 4 Jul 2009 04:16:59 +0000 (04:16 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 4 Jul 2009 04:16:59 +0000 (04:16 +0000)
2009-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/40638
* trans-io.c (set_parameter_value): Don't build un-necessary run-time
checks for units of KIND less than 4.

From-SVN: r149220

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

index 536148280f7927b674f7174fb673129659af4adc..ee62ed98d1915b93bdf047f001233427e2e10bcf 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/40638
+       * trans-io.c (set_parameter_value): Don't build un-necessary run-time
+       checks for units of KIND less than 4.
+
 2009-05-10  Paul Thomas  <pault@gcc.gnu.org>
 
        Backport from mainline:
index 1e124154a4add3597e27afb26f768f1c002da618..19bd796dda6163cd9e1a279c2f6a9173fafd9524 100644 (file)
@@ -454,7 +454,7 @@ set_parameter_value (stmtblock_t *block, tree var, enum iofield type,
   gfc_conv_expr_val (&se, e);
 
   /* If we're storing a UNIT number, we need to check it first.  */
-  if (type == IOPARM_common_unit && e->ts.kind != 4)
+  if (type == IOPARM_common_unit && e->ts.kind > 4)
     {
       tree cond, max;
       int i;