[Bug fortran/65903] [5/6 Regression] Line continuation followed by comment character in string fails to compile

laurent.chardon at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu May 14 20:09:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65903

--- Comment #4 from Laurent Chardon <laurent.chardon at gmail dot com> ---
Thanks for the fix. If I may suggest a modification of the testcase in order to
check also when there are no blanks between the & and !. I know in Fortran it
shouldn't matter, but I don't see any harm in making sure... 

! { 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



More information about the Gcc-bugs mailing list