diff options
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/io.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/eor_handling_2.f90 | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/read_1.f90 | 9 |
5 files changed, 25 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 629859f04a9..9e8abeae125 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2007-08-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/33232 + * io.c (match_io): Also diagnose extra comma for READ. + 2007-08-31 Joseph Myers <joseph@codesourcery.com> * intrinsic.texi (LGAMMA): Remove empty @cindex line. diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index ef1b88e5d77..1ecea88eb18 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -2975,9 +2975,8 @@ get_io_list: /* Optional leading comma (non-standard). */ if (!comma_flag && gfc_match_char (',') == MATCH_YES - && k == M_WRITE - && gfc_notify_std (GFC_STD_GNU, "Extension: Comma before output " - "item list at %C is an extension") == FAILURE) + && gfc_notify_std (GFC_STD_GNU, "Extension: Comma before i/o " + "item list at %C") == FAILURE) return MATCH_ERROR; io_code = NULL; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 82d3f3a31e5..ea3bd822914 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-08-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/33232 + * gfortran.dg/eor_handling_2.f90: Add dg-warnings. + * gfortran.dg/read_1.f90: New. + 2007-08-31 Paolo Carlini <pcarlini@suse.de> PR c++/33210 diff --git a/gcc/testsuite/gfortran.dg/eor_handling_2.f90 b/gcc/testsuite/gfortran.dg/eor_handling_2.f90 index 5eb62f8a894..9ae56384695 100644 --- a/gcc/testsuite/gfortran.dg/eor_handling_2.f90 +++ b/gcc/testsuite/gfortran.dg/eor_handling_2.f90 @@ -4,10 +4,10 @@ program main character(len=1) c1(10),c2(10) open(77,status='scratch') - write(77,'(A)') 'Line 1','Line 2','Line 3' + write(77,'(A)'), 'Line 1','Line 2','Line 3' ! { dg-warning "Comma before i/o item list" } rewind(77) - read(77,'(10A1)'), c1 - read(77,'(10A1)'), c2 + read(77,'(10A1)'), c1 ! { dg-warning "Comma before i/o item list" } + read(77,'(10A1)'), c2 ! { dg-warning "Comma before i/o item list" } if (c1(1) /= 'L' .or. c2(1) /= 'L') call abort close(77) end program main diff --git a/gcc/testsuite/gfortran.dg/read_1.f90 b/gcc/testsuite/gfortran.dg/read_1.f90 new file mode 100644 index 00000000000..27f2a11245c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/read_1.f90 @@ -0,0 +1,9 @@ +! { dg-do compile } +! +! Cf. PR fortran/33232 +program test + implicit none + integer :: a + READ *, a + READ '(i3)', a +end program test |