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

--- Comment #15 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #14)
> Is there any way to do multiline comments in gfortran?
> 
> Am attempting to write expected output like this:
> 
> ! { dg-begin-multiline-output "" }
> EXPECTED OUTPUT TO GO HERE
> ! { dg-end-multiline-output "" }
> 
> If not, I may need to require every line within the begin/end to start with a
>   "! "
> and to strip that.

It is not possible to continue comments in Fortran.

You could place a block of code inside an #if 0 and invoke the
C preprocessor (preferably by using a file suffix like .F90)
to do something like

ig25@linux-fd1f:/tmp> cat comment.F90 
program main
#if 0
{ dg-begin-multiline-output "" }
EXPECTED OUTPUT TO GO HERE
{ dg-end-multiline-output "" }
#endif
end program main

which would a bit of a hack.

Reply via email to