OSDN Git Service

2010-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Jun 2010 01:05:05 +0000 (01:05 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Jun 2010 01:05:05 +0000 (01:05 +0000)
PR libfortran/44477
* gfortran.dg/eof_3.f90
* gfortran.dg/endfile_2.f90
* gfortran.dg/endfile_4.f90
* gfortran.dg/endfile_3.f90

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

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/endfile_2.f90
gcc/testsuite/gfortran.dg/endfile_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/endfile_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/eof_3.f90

index c425e3a..d5a648e 100644 (file)
@@ -1,3 +1,11 @@
+2010-06-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/44477
+       * gfortran.dg/eof_3.f90
+       * gfortran.dg/endfile_2.f90
+       * gfortran.dg/endfile_4.f90
+       * gfortran.dg/endfile_3.f90
+
 2010-06-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR c++/41090
index e91e80e..ee911e8 100644 (file)
@@ -5,7 +5,7 @@
       integer i
       endfile(8)
       rewind(8)
-      read(8,end=0023)i
+      read(8,*,end=0023)i
       call abort ! should never get here
       stop
  0023 continue
diff --git a/gcc/testsuite/gfortran.dg/endfile_3.f90 b/gcc/testsuite/gfortran.dg/endfile_3.f90
new file mode 100644 (file)
index 0000000..0c41314
--- /dev/null
@@ -0,0 +1,9 @@
+! { dg-do run }
+! pr44477 READ/WRITE not allowed after ENDFILE 
+!-------------------------------------------
+  open(10, form='formatted', &
+    action='write', position='rewind', status="scratch")
+  endfile(10)
+  write(10,'(a)') "aa" ! { dg-shouldfail "Cannot perform ENDFILE" }
+end
+
diff --git a/gcc/testsuite/gfortran.dg/endfile_4.f90 b/gcc/testsuite/gfortran.dg/endfile_4.f90
new file mode 100644 (file)
index 0000000..a2462c9
--- /dev/null
@@ -0,0 +1,8 @@
+! { dg-do run }
+! pr44477 ENDFILE not allowed after ENDFILE
+!-------------------------------------------
+  open(10, form='formatted', &
+    action='write', position='rewind', status="scratch")
+  endfile(10)
+  endfile(10) ! { dg-shouldfail "Cannot perform ENDFILE" }
+end
index 83d6529..f1d5098 100644 (file)
@@ -4,5 +4,6 @@ program test
 open(unit=32,status="scratch",access="sequential",form="unformatted")
 read(32,end=100)
 100 continue
+backspace(32)
 write (32)
 end program test