]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2013-03-24 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 24 Mar 2013 10:16:33 +0000 (10:16 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 24 Mar 2013 10:16:33 +0000 (10:16 +0000)
        PR fortran/56696
        * io/list_read.c (read_real): Fix EOF diagnostic.

2013-03-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/56696
        * gfortran.dg/eof_5.f90: New.

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

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/eof_5.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/list_read.c

index 88a14e41c5cd25eb67a41a6eae84132d0b8f0c92..8e39514d90cf4d31c00be0481fc39a56f90637b4 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-24  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/56696
+       * gfortran.dg/eof_5.f90: New.
+
 2013-03-23  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
        * gcc.c-torture/execute/builtins/builtins.exp: Sort targets
diff --git a/gcc/testsuite/gfortran.dg/eof_5.f90 b/gcc/testsuite/gfortran.dg/eof_5.f90
new file mode 100644 (file)
index 0000000..88671ba
--- /dev/null
@@ -0,0 +1,21 @@
+! { dg-do run }
+!
+! PR fortran/56696
+!
+! Contributed by Keith Refson
+!
+
+program iotest
+   character(len=258) :: inp = ' 1.0 1.0 1.0'
+   character(len=7) :: inp2 = '1 2 3 4'
+   integer :: ios
+   real :: a1, a2, a3, a4
+
+   read(inp2,*,iostat=ios) a1, a2, a3, a4
+   if (ios /= 0) call abort ()
+
+   read(inp,*,iostat=ios) a1, a2, a3, a4
+   if (ios == 0) call abort ()
+!   write(*,*) 'IOSTAT=',ios
+end program iotest
+
index 877d2d0c95965e622b8cc8f4e0bb43d472d1ebf0..865725fbffa07b63d342b9a4b0480a91bbdf151a 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-24  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/56696
+       * io/list_read.c (read_real): Fix EOF diagnostic.
+
 2013-03-20  Tilo Schwarz  <tilo@tilo-schwarz.de>
 
        PR libfortran/51825
index aa7c8c0d2c1c37cdbc07aff823c5c6bc61ccfe99..e7ae98fcf282080e0f0cc6b724d1548d92d2ba82 100644 (file)
@@ -1433,7 +1433,6 @@ read_real (st_parameter_dt *dtp, void * dest, int length)
       goto got_sign;
 
     CASE_SEPARATORS:
-    case EOF:
       unget_char (dtp, c);             /* Single null.  */
       eat_separator (dtp);
       return;