Commit 7389bce6 by Bernhard Fischer Committed by Bernhard Reutner-Fischer

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
parent 5b767b9d
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.
2007-12-10 Tobias Burnus <burnus@net-b.de> 2007-12-10 Tobias Burnus <burnus@net-b.de>
PR fortran/34425 PR fortran/34425
......
...@@ -3653,7 +3653,7 @@ cleanup: ...@@ -3653,7 +3653,7 @@ cleanup:
static match static match
match_prefix (gfc_typespec *ts) match_prefix (gfc_typespec *ts)
{ {
int seen_type; bool seen_type;
gfc_clear_attr (&current_attr); gfc_clear_attr (&current_attr);
seen_type = 0; seen_type = 0;
...@@ -4334,16 +4334,18 @@ static bool ...@@ -4334,16 +4334,18 @@ static bool
add_global_entry (const char *name, int sub) add_global_entry (const char *name, int sub)
{ {
gfc_gsymbol *s; gfc_gsymbol *s;
int type;
s = gfc_get_gsymbol(name); s = gfc_get_gsymbol(name);
type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;
if (s->defined if (s->defined
|| (s->type != GSYM_UNKNOWN || (s->type != GSYM_UNKNOWN
&& s->type != (sub ? GSYM_SUBROUTINE : GSYM_FUNCTION))) && s->type != type))
gfc_global_used(s, NULL); gfc_global_used(s, NULL);
else else
{ {
s->type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION; s->type = type;
s->where = gfc_current_locus; s->where = gfc_current_locus;
s->defined = 1; s->defined = 1;
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment