diff options
author | Tobias Schlüter <tobi@gcc.gnu.org> | 2005-02-24 19:26:27 +0100 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2005-02-24 19:26:27 +0100 |
commit | cb9e4f55b0bfcbf3b25213774193d4a4bb8a8342 (patch) | |
tree | 2139266e39d005be3049810c27d9856644ae20f4 /gcc/fortran/trans-decl.c | |
parent | ef6201a68e43c0c72daadaafaff4a76dad8b0262 (diff) | |
download | gcc-cb9e4f55b0bfcbf3b25213774193d4a4bb8a8342.tar.gz |
Unrevert previously reversed patch, adding this patch:
* module.c (find_true_name): Deal with NULL module.
From-SVN: r95506
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 6567695ad29..b81b9862207 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -272,7 +272,7 @@ gfc_sym_mangled_identifier (gfc_symbol * sym) { char name[GFC_MAX_MANGLED_SYMBOL_LEN + 1]; - if (sym->module[0] == 0) + if (sym->module == NULL) return gfc_sym_identifier (sym); else { @@ -290,8 +290,8 @@ gfc_sym_mangled_function_id (gfc_symbol * sym) int has_underscore; char name[GFC_MAX_MANGLED_SYMBOL_LEN + 1]; - if (sym->module[0] == 0 || sym->attr.proc == PROC_EXTERNAL - || (sym->module[0] != 0 && sym->attr.if_source == IFSRC_IFBODY)) + if (sym->module == NULL || sym->attr.proc == PROC_EXTERNAL + || (sym->module != NULL && sym->attr.if_source == IFSRC_IFBODY)) { if (strcmp (sym->name, "MAIN__") == 0 || sym->attr.proc == PROC_INTRINSIC) @@ -404,7 +404,7 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym) DECL_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; } - else if (sym->module[0] && !sym->attr.result && !sym->attr.dummy) + else if (sym->module && !sym->attr.result && !sym->attr.dummy) { /* TODO: Don't set sym->module for result or dummy variables. */ gcc_assert (current_function_decl == NULL_TREE); @@ -766,7 +766,7 @@ gfc_get_symbol_decl (gfc_symbol * sym) /* Symbols from modules should have their assembler names mangled. This is done here rather than in gfc_finish_var_decl because it is different for string length variables. */ - if (sym->module[0]) + if (sym->module) SET_DECL_ASSEMBLER_NAME (decl, gfc_sym_mangled_identifier (sym)); if (sym->attr.dimension) @@ -808,7 +808,7 @@ gfc_get_symbol_decl (gfc_symbol * sym) { char name[GFC_MAX_MANGLED_SYMBOL_LEN + 2]; - if (sym->module[0]) + if (sym->module) { /* Also prefix the mangled name for symbols from modules. */ strcpy (&name[1], sym->name); |