aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernhard Fischer <aldot@gcc.gnu.org>2007-12-11 09:36:13 +0100
committerBernhard Reutner-Fischer <aldot@gcc.gnu.org>2007-12-11 09:36:13 +0100
commit7389bce6b90106f226fd56739afd4de9863cfe1e (patch)
tree0e0ec790307683caf3c87bd96d72d21a11d59e28 /gcc
parent5b767b9d0c2c2b2646aeadfa2c8156dde7a085fc (diff)
downloadgcc-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')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/decl.c8
-rw-r--r--gcc/fortran/trans-decl.c8
3 files changed, 15 insertions, 7 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index cd9b218..280cc46 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+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>
PR fortran/34425
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;
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index e48de1f..96beed2 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -2053,7 +2053,7 @@ gfc_build_intrinsic_function_decls (void)
gfc_charlen_type_node, pchar_type_node,
gfc_logical4_type_node);
- gfor_fndecl_string_trim =
+ gfor_fndecl_string_trim =
gfc_build_library_function_decl (get_identifier (PREFIX("string_trim")),
void_type_node,
4,
@@ -2114,7 +2114,7 @@ gfc_build_intrinsic_function_decls (void)
pvoid_type_node);
gfor_fndecl_sr_kind =
- gfc_build_library_function_decl (get_identifier
+ gfc_build_library_function_decl (get_identifier
(PREFIX("selected_real_kind")),
gfc_int4_type_node,
2, pvoid_type_node,
@@ -3049,7 +3049,7 @@ gfc_trans_entry_master_switch (gfc_entry_list * el)
val = build_int_cst (gfc_array_index_type, el->id);
tmp = build3_v (CASE_LABEL_EXPR, val, NULL_TREE, label);
gfc_add_expr_to_block (&block, tmp);
-
+
/* And jump to the actual entry point. */
label = gfc_build_label_decl (NULL_TREE);
tmp = build1_v (GOTO_EXPR, label);
@@ -3131,7 +3131,7 @@ gfc_generate_function_code (gfc_namespace * ns)
gfc_generate_contained_functions (ns);
generate_local_vars (ns);
-
+
/* Keep the parent fake result declaration in module functions
or external procedures. */
if ((ns->parent && ns->parent->proc_name->attr.flavor == FL_MODULE)