testcases for pr21302 [was: Re: [patch] pr21302: Max line length in free form mode]

Bernhard Fischer rep.nop@aon.at
Fri Oct 28 08:05:00 GMT 2005


Hi,

The assignment now is on file.

Should i resend with the belowmentioned answers to the three questions?


On Mon, Oct 24, 2005 at 04:45:54PM +0200, Bernhard Fischer wrote:
>Two testcases attached.
>
>gfortran -ffixed-line-length-none -ffree-line-length-none -o a.elf f1.f f2.f90 && ./a.elf
>
>thank you,
>
>On Mon, Oct 24, 2005 at 03:28:35PM +0200, Bernhard Fischer wrote:
>>On Sat, Oct 22, 2005 at 03:48:28PM +0200, Bernhard Fischer wrote:
>>
>>>21302 Max line length in free form mode
>>
>>Earlier referenced by Paul Brook here:
>>http://gcc.gnu.org/ml/fortran/2004-07/msg00212.html
>>
>>2005-xx-yy Bernhard Fischer <rep.nop@aon.at>
>>
>>	PR fortran/21302
>>	* lang.opt: New options -ffree-line-length- and -ffree-line-length-none.
>>	* gfortran.h: Add free_line_length.
>>	* c-opts.c (c_common_handle_option): Ignore OPT_ffree_form and
>>	OPT_ffree_line_length_ when preprocessing.
>>	* options.c (gfc_init_options, gfc_handle_option): Initialize
>>	and set free_line_length and fixed_line_length.
>>	* scanner.c (load_line): Set free_line_length to 132 and
>>	fixed_line_length to 72 or user requested values. A line either
>>	starts with '#' thus is a preprocessor-line or is an include, so
>>	use "else".
>>	* scanner.c: Typo in comment.
>>	* invoke.texi: Document -ffree-line-length- and
>>	-ffree-line-length-none
>>
>>Three questions:
>>In c-opts.c, see XXX. I would reuse the existing case instead of
>>duplicating it. This would, however, violate the alphabetical order.

I'd do this if nobody objects.
>>
>>In options.c, gfc_handle_option(), eventually drop the check for the
>>requested line-length but error out hinting to -ffree-line-length-none.
>>The line-parser obviously gets incredibly slow (or could OOM) if you
>>allocate huge amounts of memory instead of simply using ..-length-none.
>>Maybe do the same for ffixed-line-length-<huge value>.

I guess that it is safe to drop the size-checks.
>>
>>In lang.opt, why is ffixed-line-length-none flagged with
>>"Fortran RejectNegative" instead of plain "Fortran"?

Looks like a leftover from before variable line-lengths were supported,
so i'd remove the RejectNegative.
>>
>>
>>
>>Please review and commit as it is trivial. Please wait for the assignment
>>if you really think it to be a substantial contribution (it is not)..



More information about the Fortran mailing list