summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2005-03-25 14:35:29 +0100
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2005-03-25 13:35:29 +0000
commit94887ef4788e211ffcae25f17018099bf75dbab3 (patch)
treed266bc81427627226c9cf0f342c8ef74a86d6d84 /gcc
parentcd928652255d6203f3223a589fff3eed02995850 (diff)
downloadgcc-94887ef4788e211ffcae25f17018099bf75dbab3.tar.gz
re PR libfortran/19678 (DOS files don't work for list directed input)
PR libfortran/19678 PR libfortran/19679 * gfortran.dg/dos_eol.f: New test. PR libfortran/19678 * list_read.c (next_char, eat_separator, finish_separator, read_real) (namelist_read): Add support for '\r' as well as '\n' as EOL character. PR libfortran/19679 * list_read.c (read_sf): Add a '\r' in a test to support DOS line-endings when line length is exceeded. From-SVN: r97041
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/dos_eol.f19
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ce9e6236fbb..77095caab4a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/19678
+ PR libfortran/19679
+ * gfortran.dg/dos_eol.f: New test.
+
2005-03-25 Zdenek Dvorak <dvorakz@suse.cz>
PR rtl-optimization/20249
diff --git a/gcc/testsuite/gfortran.dg/dos_eol.f b/gcc/testsuite/gfortran.dg/dos_eol.f
new file mode 100644
index 00000000000..3a22a14b143
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dos_eol.f
@@ -0,0 +1,19 @@
+! PR libfortran/19678 and PR libfortran/19679
+! { dg-do run }
+ integer i, j
+
+ open (10,status='scratch')
+ write (10,'(2A)') '1', achar(13)
+ rewind (10)
+ read (10,*) i
+ if (i .ne. 1) call abort
+ close (10)
+
+ open (10,status='scratch')
+ write (10,'(2A)') ' 1', achar(13)
+ write (10,'(2A)') ' 2', achar(13)
+ rewind (10)
+ read (10,'(I4)') i
+ read (10,'(I5)') j
+ if ((i .ne. 1) .or. (j .ne. 2)) call abort
+ end