aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-08-29 20:50:30 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-08-29 20:50:30 +0200
commit9268ba9ad692f010dc8447c165404ac201d0a6d4 (patch)
tree608299ccb142373813b47b20670e29f7a75ee3c3 /gcc/fortran/module.c
parentf51d8f1af29a9c5db950dbf4158387067eecce7e (diff)
downloadgcc-9268ba9ad692f010dc8447c165404ac201d0a6d4.zip
gcc-9268ba9ad692f010dc8447c165404ac201d0a6d4.tar.gz
gcc-9268ba9ad692f010dc8447c165404ac201d0a6d4.tar.bz2
gfortran.h (gfc_use_list): Add where field.
* gfortran.h (gfc_use_list): Add where field. * module.c (use_locus): New static variable. (gfc_match_use): Set it. (gfc_use_module): Copy it to gfc_use_list's where field. * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts. (gfc_trans_use_stmts): Set backend locus before calling the debug hook. Allow non-VAR_DECLs to be created even for non-external module. Don't emit anything so far for renames from different modules. From-SVN: r139780
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index b67b878..0f504ef 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -188,6 +188,8 @@ static int symbol_number; /* Counter for assigning symbol numbers */
/* Tells mio_expr_ref to make symbols for unused equivalence members. */
static bool in_load_equiv;
+static locus use_locus;
+
/*****************************************************************/
@@ -546,6 +548,8 @@ gfc_match_use (void)
}
}
+ use_locus = gfc_current_locus;
+
m = gfc_match_name (module_name);
if (m != MATCH_YES)
return m;
@@ -5142,6 +5146,7 @@ gfc_use_module (void)
use_stmt->module_name = gfc_get_string (module_name);
use_stmt->only_flag = only_flag;
use_stmt->rename = gfc_rename_list;
+ use_stmt->where = use_locus;
gfc_rename_list = NULL;
use_stmt->next = gfc_current_ns->use_stmts;
gfc_current_ns->use_stmts = use_stmt;