Commit bf737879 by Tobias Schlüter Committed by Paul Brook

trans.c (gfc_trans_code): Set global locus after recursing.

2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	* trans.c (gfc_trans_code): Set global locus after recursing. Fix
	comment typo.

From-SVN: r89887
parent 7a003d8e
2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* trans.c (gfc_trans_code): Set global locus after recursing. Fix
comment typo.
2004-10-30 Canqun Yang <canqun@nudt.edu.cn> 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
* check.c (gfc_check_rand): Allow missing optional argument. * check.c (gfc_check_rand): Allow missing optional argument.
......
...@@ -479,8 +479,6 @@ gfc_trans_code (gfc_code * code) ...@@ -479,8 +479,6 @@ gfc_trans_code (gfc_code * code)
the end of this gfc_code branch. */ the end of this gfc_code branch. */
for (; code; code = code->next) for (; code; code = code->next)
{ {
gfc_set_backend_locus (&code->loc);
if (code->here != 0) if (code->here != 0)
{ {
res = gfc_trans_label_here (code); res = gfc_trans_label_here (code);
...@@ -625,14 +623,16 @@ gfc_trans_code (gfc_code * code) ...@@ -625,14 +623,16 @@ gfc_trans_code (gfc_code * code)
internal_error ("gfc_trans_code(): Bad statement code"); internal_error ("gfc_trans_code(): Bad statement code");
} }
gfc_set_backend_locus (&code->loc);
if (res != NULL_TREE && ! IS_EMPTY_STMT (res)) if (res != NULL_TREE && ! IS_EMPTY_STMT (res))
{ {
if (TREE_CODE (res) == STATEMENT_LIST) if (TREE_CODE (res) == STATEMENT_LIST)
annotate_all_with_locus (&res, input_location); annotate_all_with_locus (&res, input_location);
else else
SET_EXPR_LOCATION (res, input_location); SET_EXPR_LOCATION (res, input_location);
/* Add the new statemment to the block. */ /* Add the new statement to the block. */
gfc_add_expr_to_block (&block, res); gfc_add_expr_to_block (&block, res);
} }
} }
......
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