diff options
author | Bernhard Fischer <aldot@gcc.gnu.org> | 2007-12-11 09:36:13 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2007-12-11 09:36:13 +0100 |
commit | 7389bce6b90106f226fd56739afd4de9863cfe1e (patch) | |
tree | 0e0ec790307683caf3c87bd96d72d21a11d59e28 /gcc/fortran/decl.c | |
parent | 5b767b9d0c2c2b2646aeadfa2c8156dde7a085fc (diff) | |
download | gcc-7389bce6b90106f226fd56739afd4de9863cfe1e.zip gcc-7389bce6b90106f226fd56739afd4de9863cfe1e.tar.gz gcc-7389bce6b90106f226fd56739afd4de9863cfe1e.tar.bz2 |
decl.c (match_prefix): Make seen_type a boolean.
2007-12-11 Bernhard Fischer <aldot@gcc.gnu.org>
* decl.c (match_prefix): Make seen_type a boolean.
(add_global_entry): Cache type distinction.
* trans-decl.c: Whitespace cleanup.
From-SVN: r130772
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 8 |
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 (¤t_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; |