I downloaded the December 6 version of gfortran from http://quatramaran.ens.fr/~coudert/gfortran/gfortran-linux.tar.gz and attempted to compile the following file:
END SUBROUTINE f1
END SUBROUTINE f2
The INCLUDE file can contain anything. I got the following message:
f.f90:1: internal compiler error: in change_file, at fortran/scanner.c:322
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Known, but not yet fixed. See:
*** Bug 34377 has been marked as a duplicate of this bug. ***
Subject: Bug 34359
Date: Sat Dec 8 21:00:06 2007
New Revision: 130712
* gfortran.h (gfc_file): Remove sibling and down fields.
* scanner.c (file_changes, file_changes_cur, file_changes_count,
file_changes_allocated): New variables.
(add_file_change, report_file_change): New functions.
(gfc_start_source_files, gfc_end_source_files): Call
report_file_change instead of change_file.
(gfc_advance_line): Call report_file_change instead of change_file,
call it even if lb->file == lb->next->file.
(get_file): Revert last changes.
(preprocessor_line): Call add_file_change when entering or leaving
(load_file): Likewise. Set file_change[...].lb for all newly added
* gfortran.dg/include_1.f90: New test.
* gfortran.dg/include_1.inc: New.
* gfortran.dg/include_2.f90: New test.
*** Bug 34401 has been marked as a duplicate of this bug. ***