aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2013-06-01 16:30:43 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2013-06-01 16:30:43 +0200
commit3a43b5b3cb8a5db125fcaa00df0236aeab398ba2 (patch)
treed371d9ce0e3b5001524b40fc29fad0cad6f82e38 /gcc/fortran/parse.c
parent40a7fe1e382e97dda78b7cff9e05bc8e17bc9216 (diff)
downloadgcc-3a43b5b3cb8a5db125fcaa00df0236aeab398ba2.zip
gcc-3a43b5b3cb8a5db125fcaa00df0236aeab398ba2.tar.gz
gcc-3a43b5b3cb8a5db125fcaa00df0236aeab398ba2.tar.bz2
decl.c (add_global_entry): Take locus.
2013-06-01 Tobias Burnus <burnus@net-b.de> * decl.c (add_global_entry): Take locus. (gfc_match_entry): Update call. (gfc_match_end): Better error location. * parse.c (parse_block_data, parse_module, add_global_procedure, add_global_program): Use better locus data. From-SVN: r199580
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r--gcc/fortran/parse.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index a223a2c..f98a213 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -4270,11 +4270,11 @@ parse_block_data (void)
s = gfc_get_gsymbol (gfc_new_block->name);
if (s->defined
|| (s->type != GSYM_UNKNOWN && s->type != GSYM_BLOCK_DATA))
- gfc_global_used(s, NULL);
+ gfc_global_used (s, &gfc_new_block->declared_at);
else
{
s->type = GSYM_BLOCK_DATA;
- s->where = gfc_current_locus;
+ s->where = gfc_new_block->declared_at;
s->defined = 1;
}
}
@@ -4302,11 +4302,11 @@ parse_module (void)
s = gfc_get_gsymbol (gfc_new_block->name);
if (s->defined || (s->type != GSYM_UNKNOWN && s->type != GSYM_MODULE))
- gfc_global_used(s, NULL);
+ gfc_global_used (s, &gfc_new_block->declared_at);
else
{
s->type = GSYM_MODULE;
- s->where = gfc_current_locus;
+ s->where = gfc_new_block->declared_at;
s->defined = 1;
}
@@ -4360,7 +4360,7 @@ add_global_procedure (bool sub)
|| (s->type != GSYM_UNKNOWN
&& s->type != (sub ? GSYM_SUBROUTINE : GSYM_FUNCTION)))
{
- gfc_global_used (s, NULL);
+ gfc_global_used (s, &gfc_new_block->declared_at);
/* Silence follow-up errors. */
gfc_new_block->binding_label = NULL;
}
@@ -4368,7 +4368,7 @@ add_global_procedure (bool sub)
{
s->type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;
s->sym_name = gfc_new_block->name;
- s->where = gfc_current_locus;
+ s->where = gfc_new_block->declared_at;
s->defined = 1;
s->ns = gfc_current_ns;
}
@@ -4385,7 +4385,7 @@ add_global_procedure (bool sub)
|| (s->type != GSYM_UNKNOWN
&& s->type != (sub ? GSYM_SUBROUTINE : GSYM_FUNCTION)))
{
- gfc_global_used (s, NULL);
+ gfc_global_used (s, &gfc_new_block->declared_at);
/* Silence follow-up errors. */
gfc_new_block->binding_label = NULL;
}
@@ -4394,7 +4394,7 @@ add_global_procedure (bool sub)
s->type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;
s->sym_name = gfc_new_block->name;
s->binding_label = gfc_new_block->binding_label;
- s->where = gfc_current_locus;
+ s->where = gfc_new_block->declared_at;
s->defined = 1;
s->ns = gfc_current_ns;
}
@@ -4414,11 +4414,11 @@ add_global_program (void)
s = gfc_get_gsymbol (gfc_new_block->name);
if (s->defined || (s->type != GSYM_UNKNOWN && s->type != GSYM_PROGRAM))
- gfc_global_used(s, NULL);
+ gfc_global_used (s, &gfc_new_block->declared_at);
else
{
s->type = GSYM_PROGRAM;
- s->where = gfc_current_locus;
+ s->where = gfc_new_block->declared_at;
s->defined = 1;
s->ns = gfc_current_ns;
}