Commit 7b666432 by Francois-Xavier Coudert Committed by François-Xavier Coudert

re PR fortran/24285 ([4.2 only] format(1000(a,$)))

	PR fortran/24285

	* io.c (check_format): Allow dollars everywhere in format, and
	issue a warning.

	* gfortran.dg/dollar_edit_descriptor-3.f: New test.

From-SVN: r118971
parent ea574900
2006-11-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/24285
* io.c (check_format): Allow dollars everywhere in format, and
issue a warning.
2006-11-17 Francois-Xavier Coudert <coudert@clipper.ens.fr> 2006-11-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* gfortran.h (gfc_add_intrinsic_modules_path, * gfortran.h (gfc_add_intrinsic_modules_path,
......
...@@ -510,8 +510,8 @@ format_item_1: ...@@ -510,8 +510,8 @@ format_item_1:
return FAILURE; return FAILURE;
if (t != FMT_RPAREN || level > 0) if (t != FMT_RPAREN || level > 0)
{ {
error = _("$ must be the last specifier"); gfc_warning ("$ should be the last specifier in format at %C");
goto syntax; goto optional_comma_1;
} }
goto finished; goto finished;
...@@ -755,8 +755,9 @@ between_desc: ...@@ -755,8 +755,9 @@ between_desc:
optional_comma: optional_comma:
/* Optional comma is a weird between state where we've just finished /* Optional comma is a weird between state where we've just finished
reading a colon, slash or P descriptor. */ reading a colon, slash, dollar or P descriptor. */
t = format_lex (); t = format_lex ();
optional_comma_1:
switch (t) switch (t)
{ {
case FMT_COMMA: case FMT_COMMA:
......
2006-11-17 Francois-Xavier Coudert <coudert@clipper.ens.fr> 2006-11-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/24285
* gfortran.dg/dollar_edit_descriptor-3.f: New test.
2006-11-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* gfortran.dg/use_1.f90: New test. * gfortran.dg/use_1.f90: New test.
* gfortran.dg/use_1.f90: New test. * gfortran.dg/use_1.f90: New test.
* gfortran.dg/use_1.f90: New test. * gfortran.dg/use_1.f90: New test.
! { dg-do run }
! { dg-options "-std=gnu" }
! Test for dollar descriptor in the middle of a format
300 format(1000(a,$)) ! { dg-warning "should be the last specifier" }
write(*,300) "gee", "gee"
write(*,"(1000(a,$))") "foo", "bar" ! { dg-warning "should be the last specifier" }
end
! { dg-output "^geegeefoobar$" }
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