open_dev_null.f90: New test.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 10 Nov 2010 04:36:45 +0000 (04:36 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 10 Nov 2010 04:36:45 +0000 (04:36 +0000)
2010-11-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

* gfortran.dg/open_dev_null.f90: New test.

From-SVN: r166518

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

index e4cb43653478132f945d3ae9a1994e5c2504a4ee..52e7693e4476f8d4fb22d007a219501139e375a1 100644 (file)
@@ -1,3 +1,7 @@
+2010-11-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       * gfortran.dg/open_dev_null.f90: New test.
+
 2010-11-09   Jan Hubicka  <jh@suse.cz>
 
        * testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c: Update for loop unrolling.
diff --git a/gcc/testsuite/gfortran.dg/open_dev_null.f90 b/gcc/testsuite/gfortran.dg/open_dev_null.f90
new file mode 100644 (file)
index 0000000..00394cb
--- /dev/null
@@ -0,0 +1,9 @@
+! { dg-do run }
+! PR45723 opening /dev/null for appending writes fails
+logical :: thefile
+inquire(file="/dev/null",exist=thefile)
+if (thefile) then
+  open(unit=7,file="/dev/null",position="append")
+  close(7)
+endif
+end