From: Tobias Schlüter Date: Wed, 11 May 2005 22:32:04 +0000 (+0200) Subject: re PR fortran/21260 (Conflict between comment and H edit descriptor) X-Git-Tag: misc/cutover-cvs2svn~3254 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b160dd2803ed9103058b7f48f2bae6ed87442886;p=thirdparty%2Fgcc.git re PR fortran/21260 (Conflict between comment and H edit descriptor) fortran/ PR fortran/21260 * io.c (check_format): Look for literal characters inside hollerith constant. testsuite/ PR fortran/21260 * gfortran.dg/hollerith_1.f90: New test. From-SVN: r99597 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b87d81474f45..98d9bb328b9f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-05-11 Tobias Schl"uter + + PR fortran/21260 + * io.c (check_format): Look for literal characters inside + hollerith constant. + 2005-05-11 Tobias Schl"uter * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension' diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 90eb855016d7..8dab5f59afd8 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -642,7 +642,7 @@ data_desc: { while(repeat >0) { - next_char(0); + next_char(1); repeat -- ; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6e3cae14cc9e..ece62d2eacf8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-05-11 Tobias Schl"uter + + PR fortran/21260 + * gfortran.dg/hollerith_1.f90: New test. + 2005-05-11 Tobias Schl"uter * gfortran.dg/func_result_2.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/hollerith_1.f90 b/gcc/testsuite/gfortran.dg/hollerith_1.f90 new file mode 100644 index 000000000000..d6732d40b693 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/hollerith_1.f90 @@ -0,0 +1,11 @@ +! { dg-do run } +! PR 21260 +! We wrongly interpreted the '!' as the beginning of a comment. +! Also verifies the functioning of hollerith formatting. + character*72 c + write(c,8000) +8000 format(36(2H!))) + do i = 1,72,2 + if (c(i:i+1) /= '!)') call abort + end do + end