summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-30 14:35:23 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-30 14:35:23 +0000
commitb4a342ef485bfae67bc71ac6810b36c349ef59d3 (patch)
tree89e26787fdeb2f802a81caf7083a638ab398aac7
parentda1ce3b9299c3042a402ab93e2e8edc17fed7187 (diff)
downloadppe42-gcc-b4a342ef485bfae67bc71ac6810b36c349ef59d3.tar.gz
ppe42-gcc-b4a342ef485bfae67bc71ac6810b36c349ef59d3.zip
2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* trans.c (gfc_trans_code): Set global locus after recursing. Fix comment typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89887 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index c950f8c1920..b66bc3ed8d1 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+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>
* check.c (gfc_check_rand): Allow missing optional argument.
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 8005b32924b..35105437f71 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -479,8 +479,6 @@ gfc_trans_code (gfc_code * code)
the end of this gfc_code branch. */
for (; code; code = code->next)
{
- gfc_set_backend_locus (&code->loc);
-
if (code->here != 0)
{
res = gfc_trans_label_here (code);
@@ -625,14 +623,16 @@ gfc_trans_code (gfc_code * code)
internal_error ("gfc_trans_code(): Bad statement code");
}
+ gfc_set_backend_locus (&code->loc);
+
if (res != NULL_TREE && ! IS_EMPTY_STMT (res))
{
if (TREE_CODE (res) == STATEMENT_LIST)
annotate_all_with_locus (&res, input_location);
else
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);
}
}
OpenPOWER on IntegriCloud