re PR fortran/28335 (flush() / write() statement on closed units - error?)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 26 Jul 2006 01:47:13 +0000 (01:47 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 26 Jul 2006 01:47:13 +0000 (01:47 +0000)
2006-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/28335
* gfortran.dg/no_unit_error_1.f90: New test.
* gfortran.dg/no_unit_error_2.f90: New test.
* gfortran.dg/temporary_1.f90: Remove extraneous CLOSE.

From-SVN: r115750

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/no_unit_error_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/no_unit_error_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/temporary_1.f90

index 63aadaf8e28d0b6bd5938608a8f5bc5d92d3d17e..26a25b9680bc3585f8a6ba16eccf6436f7a0850a 100644 (file)
@@ -1,3 +1,10 @@
+2006-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/28335
+       * gfortran.dg/no_unit_error_1.f90: New test.
+       * gfortran.dg/no_unit_error_2.f90: New test.
+       * gfortran.dg/temporary_1.f90: Remove extraneous CLOSE.
+
 2006-07-25  Roger Sayle  <roger@eyesopen.com>
 
        PR middle-end/28473
diff --git a/gcc/testsuite/gfortran.dg/no_unit_error_1.f90 b/gcc/testsuite/gfortran.dg/no_unit_error_1.f90
new file mode 100644 (file)
index 0000000..fea2875
--- /dev/null
@@ -0,0 +1,7 @@
+! { dg-do run }
+! { dg-shouldfail "UNIT is not open before CLOSE" }
+! PR28335 Check for error on no unit.
+  close(88) ! { dg-output "Can't find specified UNIT in CLOSE" }
+  end
+
+
diff --git a/gcc/testsuite/gfortran.dg/no_unit_error_2.f90 b/gcc/testsuite/gfortran.dg/no_unit_error_2.f90
new file mode 100644 (file)
index 0000000..595191f
--- /dev/null
@@ -0,0 +1,7 @@
+! { dg-do run }
+! { dg-shouldfail "UNIT is not open before FLUSH" }
+! PR28335 Check for error on no unit.
+  flush(88) ! { dg-output "Can't find specified UNIT in FLUSH" }
+  end
+
+
index e255efdb7a88bf90d754804d534054f16c20cfa8..7bdf08d298469ca3de63e3e589427eb36068e98a 100644 (file)
@@ -15,7 +15,6 @@ program pr27662
      if (x (i, j) .ne. z (i, j)) call abort ()
    end do
  end do
- close (10)
 
 contains
  function test () result (res)