The following is non-standard and the compiler should probably generate a warning/error with '-pedantic -std=f95', but does not do so with gcc version 4.3.0 20080103 (experimental) [trunk revision 131300] (GCC) & end
ifort: Warning: Continuation character illegal as first non_blank in statement NAG f95: Error: Invalid continuation
I will have a go on this one.
This is a regression. I thought in the back of my mind that I had this working right before. Sure enough, 4.2 gives a warning. gfc42 -static pr34659.f90 Warning: '&' not allowed by itself in line 1
This trivial patch fixes this: Index: scanner.c =================================================================== --- scanner.c (revision 131355) +++ scanner.c (working copy) @@ -1176,7 +1176,7 @@ load_line (FILE *input, char **pbuf, int seen_ampersand = 1; } - if ((c != '&' && c != '!') || (c == '!' && !seen_ampersand)) + if ((c != '&' && c != '!' && c != ' ') || (c == '!' && !seen_ampersand)) seen_printable = 1; /* Is this a fixed-form comment? */ I will commit as such and add a test case. I may refine on this a bit. :)
Subject: Bug 34659 Author: jvdelisle Date: Mon Jan 7 02:53:04 2008 New Revision: 131371 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131371 Log: 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/34659 * scanner.c (load_line): Do not count ' ' as printable when checking for continuations. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/scanner.c
Fixed on trunk.
Subject: Bug 34659 Author: jvdelisle Date: Sun Jan 20 06:48:39 2008 New Revision: 131673 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131673 Log: 2008-01-20 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/34795 * gfortran.dg/inquire_13.f90: New test. PR libfortran/34659 * gfortran.dg/continuation_9.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/continuation_9.f90 trunk/gcc/testsuite/gfortran.dg/inquire_13.f90 Modified: trunk/gcc/testsuite/ChangeLog