From: Jerry DeLisle Date: Sat, 16 May 2015 17:51:41 +0000 (+0000) Subject: re PR fortran/65903 (Line continuation followed by comment character in string fails... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f70713026c1c5d0a235e8fdd472c97ae125834fc;p=gcc.git re PR fortran/65903 (Line continuation followed by comment character in string fails to compile) 2015-05-16 Jerry DeLisle PR fortran/65903 * gfortran.dg/continuation_13.f90: Update test. * gfortran.dg/pr65903.f90: New test. From-SVN: r223249 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b3aa87ca73c..6732ed6dc04 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-05-16 Jerry DeLisle + + PR fortran/65903 + * gfortran.dg/continuation_13.f90: Update test. + * gfortran.dg/pr65903.f90: New test. + 2015-05-16 Thomas Koenig PR fortran/66113 diff --git a/gcc/testsuite/gfortran.dg/continuation_13.f90 b/gcc/testsuite/gfortran.dg/continuation_13.f90 index 18528121931..95ff1f9f9e9 100644 --- a/gcc/testsuite/gfortran.dg/continuation_13.f90 +++ b/gcc/testsuite/gfortran.dg/continuation_13.f90 @@ -17,8 +17,11 @@ character(25) :: astring ) 700 format('This format now works.'''& !comment ) +! See PR65903 for the following cases. 800 format('This is actually ok.'& !comment ' end' ) +900 format('This is actually ok.' & !comment + ' end' ) write(astring,100) if (astring.ne."This format is OK.") call abort write(astring,200) @@ -34,6 +37,8 @@ if (astring.ne."This format now works.'") call abort write(astring,700) if (astring.ne."This format now works.'") call abort write(astring,800) +if (astring.ne."This is actually ok.' end") call abort +write(astring,900) if (astring.ne."This is actually ok. end") call abort end diff --git a/gcc/testsuite/gfortran.dg/pr65903.f90 b/gcc/testsuite/gfortran.dg/pr65903.f90 new file mode 100644 index 00000000000..20e78cad315 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr65903.f90 @@ -0,0 +1,20 @@ +! { dg-do run } +! { dg-options "-std=gnu" } +! +character(20) :: astring + +100 format ("& notblank !") +200 format ("& !") +300 format ("&!") + +write(astring,100) +if (astring.ne."& notblank !") call abort +!print *, astring +write(astring,200) +if (astring.ne."& !") call abort +!print *, astring +write(astring,300) +if (astring.ne."&!") call abort +!print *, astring + +end