$ cat continuation.f90 print *,s& in(1.) end $ gfortran continuation.f90 $ ./a.out 0.8414710 $ gfortran -v Using built-in specs. Configured with: ../gcc-4.0-20050102/configure --prefix=/home/zfkts --enable-languages=c,c++,f95 Thread model: posix gcc version 4.0.0 20050102 (experimental) $ gfortran -dumpmachine ia64-unknown-linux-gnu The above program is illegal, there should be a "&" as the first nonblank character in the second line.
Confirmed. See sec. 3.3.1.3.1.
Isn't this a dup of bug 19101?
(In reply to comment #2) > Isn't this a dup of bug 19101? No but it is related to it.
I will see if I can fix this. I fear some serious messing with all the matching routines may be required if it can not be handled in scanner.c
Subject: Bug number PR19260 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00854.html
Subject: Bug 19260 Author: jvdelisle Date: Tue Oct 3 03:58:20 2006 New Revision: 117384 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117384 Log: 2006-10-02 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/19262 * gfortran.h (gfc_option_t): Add max_continue_fixed and max_continue_free. * options.c (gfc_init_options): Initialize fixed form and free form consecutive continuation line limits. * scanner.c (gfc_scanner_init_1): Initialize continue_line and continue_count. (gfc_next_char_literal): Count the number of continuation lines in the current statement and warn if limit is exceeded. 2006-10-02 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/19260 * scanner.c (gfc_next_char_literal): Add check for missing '&' and warn if in_string, otherwise return ' '. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/options.c trunk/gcc/fortran/scanner.c
Subject: Bug 19260 Author: jvdelisle Date: Tue Oct 3 04:09:49 2006 New Revision: 117385 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117385 Log: 2006-10-02 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/19260 * gfortran.dg/continuation.f90: Rename to continuation_1.f90. * gfortran.dg/continuation_2.f90: New test. PR fortran/19262 * gfortran.dg/continuation_3.f90: New test. * gfortran.dg/continuation_4.f90: New test. * gfortran.dg/continuation_5.f: New test. * gfortran.dg/continuation_6.f: New test. Added: trunk/gcc/testsuite/gfortran.dg/continuation_1.f90 - copied unchanged from r117065, trunk/gcc/testsuite/gfortran.dg/continuation.f90 trunk/gcc/testsuite/gfortran.dg/continuation_2.f90 trunk/gcc/testsuite/gfortran.dg/continuation_3.f90 trunk/gcc/testsuite/gfortran.dg/continuation_4.f90 trunk/gcc/testsuite/gfortran.dg/continuation_5.f trunk/gcc/testsuite/gfortran.dg/continuation_6.f Removed: trunk/gcc/testsuite/gfortran.dg/continuation.f90 Modified: trunk/gcc/testsuite/ChangeLog
Fixed on 4.2
Subject: Bug number PR19260 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00255.html