Commit 043c2d9e by Bernhard Fischer Committed by Bernhard Reutner-Fischer

re PR fortran/25486 (fortran fixed-form literal character constant not padded.)

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.

From-SVN: r109591
parent 758333d5
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.
2005-01-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25730
......
......@@ -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;
......
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.
2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/ext/packed3.C: Add expected packed error.
C fixed-form literal character constant with continuation line padding test
C PR fortran/25486
program a
character(len=90) c
character(90) :: fil
c A tab is between 8 and 9.
c = '1234567
&8 9'
write(fil,'(a)') c
#ifdef LL_NONE
if(fil.ne. "12345678 9")
& call abort
#else
if(fil.ne.
&"1234567 8 9"
&)
& call abort
#endif
end
! { dg-do run }
C fixed-form literal character constant with continuation line padding test
C PR fortran/25486
! { dg-options "" }
#include "literal_character_constant_1.inc"
! { dg-do run }
C fixed-form literal character constant with continuation line padding test
C PR fortran/25486
! { dg-options "-ffixed-line-length-72" }
#include "literal_character_constant_1.inc"
! { dg-do run }
C fixed-form literal character constant with continuation line padding test
C PR fortran/25486
! { dg-options "-ffixed-line-length-none -DLL_NONE" }
#include "literal_character_constant_1.inc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment