diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2013-06-20 12:55:03 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2013-06-20 12:55:03 +0200 |
commit | 937424c1826e89c7618bf220643974e84f91f86a (patch) | |
tree | 6426d9088a34794eb37d2319f0f0768ab79ac42e /gcc | |
parent | c3a9b91b4ac1f8304b2ad8b026dc378be662b597 (diff) | |
download | gcc-937424c1826e89c7618bf220643974e84f91f86a.zip gcc-937424c1826e89c7618bf220643974e84f91f86a.tar.gz gcc-937424c1826e89c7618bf220643974e84f91f86a.tar.bz2 |
re PR fortran/57633 (I/O: Problem with formatted read: reading CR-LF files (\r\n))
2013-06-20 Tobias Burnus <burnus@net-b.de>
PR fortran/57633
* io/list_read.c (next_char, eat_separator): Don't set EOL for \r.
2013-06-20 Tobias Burnus <burnus@net-b.de>
PR fortran/57633
* gfortran.dg/list_read_11.f90: New.
From-SVN: r200238
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/list_read_11.f90 | 38 |
2 files changed, 50 insertions, 7 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d5da496..6dca973 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-06-20 Tobias Burnus <burnus@net-b.de> + + PR fortran/57633 + * gfortran.dg/list_read_11.f90: New. + 2013-06-20 Richard Biener <rguenther@suse.de> PR tree-optimization/57584 @@ -23,13 +28,13 @@ 2013-06-19 Balaji V. Iyer <balaji.v.iyer@intel.com> - * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Replaced all the - hard-coded values of array sizes with a #define. - * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Likewise. - * c-c++-common/cilk-plus/AN/builtin_func_double2.c: Likewise. - * c-c++-common/cilk-plus/AN/gather_scatter.c: Likewise. - * c-c++-common/cilk-plus/AN/pr57577.c: Likewise. - * c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Likewise. + * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Replaced all the + hard-coded values of array sizes with a #define. + * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Likewise. + * c-c++-common/cilk-plus/AN/builtin_func_double2.c: Likewise. + * c-c++-common/cilk-plus/AN/gather_scatter.c: Likewise. + * c-c++-common/cilk-plus/AN/pr57577.c: Likewise. + * c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Likewise. 2013-06-19 Yufeng Zhang <yufeng.zhang@arm.com> diff --git a/gcc/testsuite/gfortran.dg/list_read_11.f90 b/gcc/testsuite/gfortran.dg/list_read_11.f90 new file mode 100644 index 0000000..10344a1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/list_read_11.f90 @@ -0,0 +1,38 @@ +! { dg-do run } +! { dg-options "-fbackslash" } +! +! PR fortran/57633 +! +program teststuff + implicit none + integer::a + character(len=10)::s1,s2 + + open(11,file="testcase.txt",form='unformatted',access='stream',status='new') + write(11) 'line1,1,\r\nline2' + close(11) + + open(11,file="testcase.txt",form='formatted') + s1 = repeat('x', len(s1)) + a = 99 + read(11,*)s1,a + if (s1 /= "line1" .or. a /= 1) call abort() + + s1 = repeat('x', len(s1)) + read(11,"(a)")s1 + close(11,status="delete") + if (s1 /= "line2") call abort() + + + open(11,file="testcase.txt",form='unformatted',access='stream',status='new') + write(11) 'word1\rword2,\n' + close(11) + + open(11,file="testcase.txt",form='formatted') + s1 = repeat('x', len(s1)) + s2 = repeat('x', len(s1)) + read(11,*)s1,s2 + close(11,status="delete") + if (s1 /= "word1") call abort() + if (s2 /= "word2") call abort() +end program teststuff |