OSDN Git Service

PR fortran/20846
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 May 2005 00:19:43 +0000 (00:19 +0000)
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 May 2005 00:19:43 +0000 (00:19 +0000)
* gfortran.dg/inquire_8.f90: New test.

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

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

index e556827..2dd90cf 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-30  Steven G. Kargl
+
+       PR fortran/20846
+       * gfortran.dg/inquire_8.f90: New test.
+
 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR libfortran/21376
diff --git a/gcc/testsuite/gfortran.dg/inquire_8.f90 b/gcc/testsuite/gfortran.dg/inquire_8.f90
new file mode 100644 (file)
index 0000000..1d30973
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! fortran/pr20846
+program inquire_8
+  character(len=20) :: n = 'data'
+  integer :: d = 23
+  logical a
+  inquire(file=n,unit=d,opened=a) ! { dg-error "contain both FILE and UNIT" }
+  inquire(unit=d,file=n,opened=a) ! { dg-error "contain both FILE and UNIT" }
+  inquire(opened=a)               ! { dg-error "requires either FILE or UNIT" }
+end program inquire_8