aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 584bb19..0df1858 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -3653,7 +3653,7 @@ cleanup:
static match
match_prefix (gfc_typespec *ts)
{
- int seen_type;
+ bool seen_type;
gfc_clear_attr (&current_attr);
seen_type = 0;
@@ -4334,16 +4334,18 @@ static bool
add_global_entry (const char *name, int sub)
{
gfc_gsymbol *s;
+ int type;
s = gfc_get_gsymbol(name);
+ type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;
if (s->defined
|| (s->type != GSYM_UNKNOWN
- && s->type != (sub ? GSYM_SUBROUTINE : GSYM_FUNCTION)))
+ && s->type != type))
gfc_global_used(s, NULL);
else
{
- s->type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;
+ s->type = type;
s->where = gfc_current_locus;
s->defined = 1;
return true;