]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/61173 (Erroneous "end of file" with internal read)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 24 May 2014 19:30:38 +0000 (19:30 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 24 May 2014 19:30:38 +0000 (19:30 +0000)
2014-05-24  Jerry DeLisle  <jvdelisle@gcc.gnu>

PR libfortran/61173
gfortran.dg/arrayio_14.f90: New test.

From-SVN: r210899

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

index 69358cb186067762c11378fe6276e49f15c0adf1..018fe9e956877cc8d14aa4d38bc3a66c8ca5378a 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-24  Jerry DeLisle  <jvdelisle@gcc.gnu>
+
+       PR libfortran/61173
+       gfortran.dg/arrayio_14.f90: New test.
+
 2014-05-24  Andreas Schwab  <schwab@suse.de>
 
        * gcc.c-torture/execute/bswap-2.c (main): Handle more bitfield
diff --git a/gcc/testsuite/gfortran.dg/arrayio_14.f90 b/gcc/testsuite/gfortran.dg/arrayio_14.f90
new file mode 100644 (file)
index 0000000..3d878c7
--- /dev/null
@@ -0,0 +1,18 @@
+! { dg-do run }
+! PR61173.f90 Bogus END condition
+module bd
+  character(len=25, kind=1), dimension(:), allocatable, save :: source
+  contains
+    subroutine init_data
+      allocate(source(2))
+      source=["   1   1   1  ", "   4   4   4  "]
+    end subroutine init_data
+end module bd
+program read_internal
+  use bd
+  integer :: x(6),i
+
+  call init_data
+  read(source,*) (x(i), i=1,6)
+  if (any(x/=[1,1,1,4,4,4])) call abort
+end program read_internal