From 88de9dd0236282cc67952ace2233f2a2be054c90 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Tue, 14 Oct 2008 01:53:35 +0000 Subject: [PATCH] re PR fortran/37083 (Formatted read of line without trailing new-line fails) 2008-10-13 Jerry DeLisle * testsuite/gcc.dg/format/ms-format1.c: New. diff --git a/gcc/testsuite/gfortran.dg/arrayio_8.f90 b/gcc/testsuite/gfortran.dg/arrayio_8.f90 index 7448221587a..9dc81f82da1 100644 --- a/gcc/testsuite/gfortran.dg/arrayio_8.f90 +++ b/gcc/testsuite/gfortran.dg/arrayio_8.f90 @@ -1,6 +1,6 @@ ! { dg-do run } ! PR28339, This test checks that internal unit array I/O handles a full record -! and and advances to th enext record properly. Test case derived from PR +! and advances to the next record properly. Test case derived from PR ! Submitted by Jerry DeLisle program main integer i diff --git a/gcc/testsuite/gfortran.dg/list_read_9.f90 b/gcc/testsuite/gfortran.dg/list_read_9.f90 new file mode 100644 index 00000000000..2021859eb4f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/list_read_9.f90 @@ -0,0 +1,13 @@ +! { dg-do run { target fd_truncate } } +! pr37083 formatted read of line without trailing new-line fails +real :: a, b, c +open(unit=10,file="atest",access='stream',form='unformatted',& + & status="replace") +write(10) '1.2'//achar(10)//'2.2'//achar(10)//'3.' +call fputc(10,'3') +close(10, status="keep") +open(unit=10,file="atest",form='formatted',status="old") +read(10,*) a, b, c +if (a.ne.1.2 .or. b.ne.2.2 .or. c.ne.3.3) call abort +close(10, status="delete") +end