]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/48976 (INQUIRE with STREAM= not supported)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 27 Dec 2012 19:24:44 +0000 (19:24 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 27 Dec 2012 19:24:44 +0000 (19:24 +0000)
2012-12-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/48976
* gfortran.dg/inquire_15.f90: New.

From-SVN: r194736

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

index 0d97252967a044aced2e626067990df6e8b78298..1237fb9bdf9a2d7423ea56d2cf074e7fbca30a3a 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/48976
+       * gfortran.dg/inquire_15.f90: New.
+
 2012-12-27  Sriraman Tallam  <tmsriram@google.com>
 
        * testsuite/g++.dg/mv1.C: Remove target options.
diff --git a/gcc/testsuite/gfortran.dg/inquire_15.f90 b/gcc/testsuite/gfortran.dg/inquire_15.f90
new file mode 100644 (file)
index 0000000..8550663
--- /dev/null
@@ -0,0 +1,27 @@
+! PR48976 test case by jvdelisle@gcc.gnu.org
+character(len=20) :: str
+str = "abcdefg"
+inquire(file="abcddummy", stream=str)
+!print *, "str=",str
+if (str /= "UNKNOWN") call abort
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "UNKNOWN") call abort
+open(99,access="stream")
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "YES") goto 10
+close(99)
+open(99,access="direct", recl=16)
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "NO") goto 10
+close(99)
+open(99,access="sequential")
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "NO") goto 10
+stop
+10 close(99, status="delete")
+call abort
+end