aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c4
-rw-r--r--gcc/fortran/trans.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index ef1031a..c766d40 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ * trans.c (trans_code): Set backend locus early.
+ * trans-decl.c (gfc_get_fake_result_decl): Use source location
+ of the function instead of current input_location.
+
2010-05-13 Daniel Franke <franke.daniel@gmail.com>
PR fortran/35779
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 64d87ca..4f0256a 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -2283,11 +2283,11 @@ gfc_get_fake_result_decl (gfc_symbol * sym, int parent_flag)
IDENTIFIER_POINTER (DECL_NAME (this_function_decl)));
if (!sym->attr.mixed_entry_master && sym->attr.function)
- decl = build_decl (input_location,
+ decl = build_decl (DECL_SOURCE_LOCATION (this_function_decl),
VAR_DECL, get_identifier (name),
gfc_sym_type (sym));
else
- decl = build_decl (input_location,
+ decl = build_decl (DECL_SOURCE_LOCATION (this_function_decl),
VAR_DECL, get_identifier (name),
TREE_TYPE (TREE_TYPE (this_function_decl)));
DECL_ARTIFICIAL (decl) = 1;
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 21c5604..8acccf8 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -1067,6 +1067,8 @@ trans_code (gfc_code * code, tree cond)
gfc_add_expr_to_block (&block, res);
}
+ gfc_set_backend_locus (&code->loc);
+
switch (code->op)
{
case EXEC_NOP: