Commit 3446fc50 by Jerry DeLisle

re PR fortran/35840 (ICE for character expression in I/O specifier)

2008-09-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
	    Tobias Burnus  <burnus@net.b.de>

	PR fortran/35840
	* io.c (match_vtag): Add tag name to error message.
	(match_out_tag): Cleanup whitespace.
	(gfc_resolve_dt): Resolve id and async tags. 

Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r140366
parent c5cc92f5
2008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Tobias Burnus <burnus@net.b.de>
PR fortran/35840
* io.c (match_vtag): Add tag name to error message.
(match_out_tag): Cleanup whitespace.
(gfc_resolve_dt): Resolve id and async tags.
2008-09-13 Daniel Kraft <d@domob.eu> 2008-09-13 Daniel Kraft <d@domob.eu>
PR fortran/35770 PR fortran/35770
......
...@@ -1121,14 +1121,15 @@ match_vtag (const io_tag *tag, gfc_expr **v) ...@@ -1121,14 +1121,15 @@ match_vtag (const io_tag *tag, gfc_expr **v)
if (result->symtree->n.sym->attr.intent == INTENT_IN) if (result->symtree->n.sym->attr.intent == INTENT_IN)
{ {
gfc_error ("Variable tag cannot be INTENT(IN) at %C"); gfc_error ("Variable %s cannot be INTENT(IN) at %C", tag->name);
gfc_free_expr (result); gfc_free_expr (result);
return MATCH_ERROR; return MATCH_ERROR;
} }
if (gfc_pure (NULL) && gfc_impure_variable (result->symtree->n.sym)) if (gfc_pure (NULL) && gfc_impure_variable (result->symtree->n.sym))
{ {
gfc_error ("Variable tag cannot be assigned in PURE procedure at %C"); gfc_error ("Variable %s cannot be assigned in PURE procedure at %C",
tag->name);
gfc_free_expr (result); gfc_free_expr (result);
return MATCH_ERROR; return MATCH_ERROR;
} }
...@@ -1141,13 +1142,13 @@ match_vtag (const io_tag *tag, gfc_expr **v) ...@@ -1141,13 +1142,13 @@ match_vtag (const io_tag *tag, gfc_expr **v)
/* Match I/O tags that cause variables to become redefined. */ /* Match I/O tags that cause variables to become redefined. */
static match static match
match_out_tag(const io_tag *tag, gfc_expr **result) match_out_tag (const io_tag *tag, gfc_expr **result)
{ {
match m; match m;
m = match_vtag(tag, result); m = match_vtag (tag, result);
if (m == MATCH_YES) if (m == MATCH_YES)
gfc_check_do_variable((*result)->symtree); gfc_check_do_variable ((*result)->symtree);
return m; return m;
} }
...@@ -2472,6 +2473,7 @@ gfc_resolve_dt (gfc_dt *dt) ...@@ -2472,6 +2473,7 @@ gfc_resolve_dt (gfc_dt *dt)
RESOLVE_TAG (&tag_rec, dt->rec); RESOLVE_TAG (&tag_rec, dt->rec);
RESOLVE_TAG (&tag_spos, dt->rec); RESOLVE_TAG (&tag_spos, dt->rec);
RESOLVE_TAG (&tag_advance, dt->advance); RESOLVE_TAG (&tag_advance, dt->advance);
RESOLVE_TAG (&tag_id, dt->id);
RESOLVE_TAG (&tag_iomsg, dt->iomsg); RESOLVE_TAG (&tag_iomsg, dt->iomsg);
RESOLVE_TAG (&tag_iostat, dt->iostat); RESOLVE_TAG (&tag_iostat, dt->iostat);
RESOLVE_TAG (&tag_size, dt->size); RESOLVE_TAG (&tag_size, dt->size);
...@@ -2481,6 +2483,7 @@ gfc_resolve_dt (gfc_dt *dt) ...@@ -2481,6 +2483,7 @@ gfc_resolve_dt (gfc_dt *dt)
RESOLVE_TAG (&tag_e_round, dt->round); RESOLVE_TAG (&tag_e_round, dt->round);
RESOLVE_TAG (&tag_e_blank, dt->blank); RESOLVE_TAG (&tag_e_blank, dt->blank);
RESOLVE_TAG (&tag_e_decimal, dt->decimal); RESOLVE_TAG (&tag_e_decimal, dt->decimal);
RESOLVE_TAG (&tag_e_async, dt->asynchronous);
e = dt->io_unit; e = dt->io_unit;
if (gfc_resolve_expr (e) == SUCCESS if (gfc_resolve_expr (e) == SUCCESS
......
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