This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran,patch] Ignore byte order mark at start of file
Tobias Schlüter wrote:
Tobias Schlüter wrote:
Brooks Moses wrote:
This part assumes that line[1] and line[2] exist. However, line[] is
allocated in load_line as having length maxlen, which is set to
gfc_option.free_line_length if we have free-form source with limited
line lengths, and there is no guarantee that free_line_length is 3 or
higher.
Thus, these should be conditioned on line_len > 2 or 3 as appropriate.
Exactly this point came up in FX and my discussion on IRC :-)
-ffree-line-length < 3 makes no sense because the END statement may
not be continued, and every program unit will have one of them. I
wanted to craft a patch ensuring that restriction tomorrow. Please be
my guest if you want to submit the obvious patch to options.c yourself.
I submitted the attached patch for this. I couldn't figure out a way to
check for fatal errors in the testsuite, so this comes without a
testcase.
Try the should-fail option. I think there are one or two examples in the
test-suite.
Jerry