summaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-24 18:26:27 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-24 18:26:27 +0000
commit4f0fae8eaaf1c34db1c4d9fa1577768a145d35f8 (patch)
tree2139266e39d005be3049810c27d9856644ae20f4 /gcc/fortran/interface.c
parentd780f590d0d504e606e4ea2ae875b35076943150 (diff)
downloadgcc-4f0fae8eaaf1c34db1c4d9fa1577768a145d35f8.tar.gz
Unrevert previously reversed patch, adding this patch:
* module.c (find_true_name): Deal with NULL module. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95506 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 9f163d0efd2..ecbf9a27aac 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -340,8 +340,9 @@ gfc_compare_types (gfc_typespec * ts1, gfc_typespec * ts2)
true names and module names are the same and the module name is
nonnull, then they are equal. */
if (strcmp (ts1->derived->name, ts2->derived->name) == 0
- && ts1->derived->module[0] != '\0'
- && strcmp (ts1->derived->module, ts2->derived->module) == 0)
+ && ((ts1->derived->module == NULL && ts2->derived->module == NULL)
+ || (ts1->derived != NULL && ts2->derived != NULL
+ && strcmp (ts1->derived->module, ts2->derived->module) == 0)))
return 1;
/* Compare type via the rules of the standard. Both types must have
@@ -1165,7 +1166,7 @@ compare_actual_formal (gfc_actual_arglist ** ap,
for (a = actual; a; a = a->next, f = f->next)
{
- if (a->name[0] != '\0')
+ if (a->name != NULL)
{
i = 0;
for (f = formal; f; f = f->next, i++)