diff options
author | aldot <aldot@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-11 16:38:42 +0000 |
---|---|---|
committer | aldot <aldot@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-11 16:38:42 +0000 |
commit | 336ce15dac060228fee60041ef2e11c64e2b5f72 (patch) | |
tree | d9b06e2f47a109c2f1a6686b09e8af25f2643eaf /gcc/fortran/scanner.c | |
parent | 6c17c071159c453d861c9b423ab6633e8bcab6a0 (diff) | |
download | gcc-336ce15dac060228fee60041ef2e11c64e2b5f72.tar.gz |
gcc/fortran:
2006-01-11 Bernhard Fischer <rep.nop@aon.at>
PR fortran/25486
* scanner.c (load_line): use maxlen to determine the line-length used
for padding lines in fixed form.
gcc/testsuite:
2006-01-10 Bernhard Fischer <rep.nop@aon.at>
PR fortran/25486
* gfortran.dg/literal_character_constant_1_x.F: New test.
* gfortran.dg/literal_character_constant_1_y.F: Ditto.
* gfortran.dg/literal_character_constant_1_z.F: Ditto.
* gfortran.dg/literal_character_constant_1.inc: Helper for new tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109591 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/scanner.c')
-rw-r--r-- | gcc/fortran/scanner.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 4b76f9c73e9..0b21e96497e 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -809,11 +809,13 @@ load_line (FILE * input, char **pbuf, int *pbuflen) /* Pad lines to the selected line length in fixed form. */ if (gfc_current_form == FORM_FIXED - && gfc_option.fixed_line_length > 0 + && gfc_option.fixed_line_length != 0 && !preprocessor_flag && c != EOF) - while (i++ < gfc_option.fixed_line_length) - *buffer++ = ' '; + { + while (i++ < maxlen) + *buffer++ = ' '; + } *buffer = '\0'; *pbuflen = buflen; |