diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-09-18 20:21:03 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2008-09-18 20:21:03 +0000 |
commit | 334e912a93187986aa51b980b30b50b42fa109c5 (patch) | |
tree | 2632203ed364ae97ee9b947de350525a0cbd781e /gcc/fortran | |
parent | 47993132a0d2efb2135b952c0012642eef3a4974 (diff) | |
download | gcc-334e912a93187986aa51b980b30b50b42fa109c5.tar.gz |
re PR fortran/35945 (Complex module-based overloading fails)
2008-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35945
* resolve.c (resolve_fl_variable_derived): Remove derived type
comparison for use associated derived types. Host association
of a derived type will not arise if there is a local derived type
whose use name is the same.
PR fortran/36700
* match.c (gfc_match_call): Use the existing symbol even if
it is a function.
2008-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35945
* gfortran.dg/host_assoc_types_2.f90: New test.
PR fortran/36700
* gfortran.dg/host_assoc_call_2.f90: New test.
From-SVN: r140474
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/fortran/match.c | 7 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 3 |
3 files changed, 18 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d3d36903bec..c972097a67b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,15 @@ +2008-09-18 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/35945 + * resolve.c (resolve_fl_variable_derived): Remove derived type + comparison for use associated derived types. Host association + of a derived type will not arise if there is a local derived type + whose use name is the same. + + PR fortran/36700 + * match.c (gfc_match_call): Use the existing symbol even if + it is a function. + 2008-09-18 Daniel Kraft <d@domob.eu> PR fortran/37507 diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 3b9d3d21d71..f7ff9bbdc3b 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -2589,9 +2589,12 @@ gfc_match_call (void) if (sym->attr.flavor != FL_PROCEDURE && sym->ts.type == BT_DERIVED) return match_typebound_call (st); - /* If it does not seem to be callable... */ + /* If it does not seem to be callable (include functions so that the + right association is made. They are thrown out in resolution.) + ... */ if (!sym->attr.generic - && !sym->attr.subroutine) + && !sym->attr.subroutine + && !sym->attr.function) { if (!(sym->attr.external && !sym->attr.referenced)) { diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index a11b90d21f5..f8f2df972cc 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -7371,8 +7371,7 @@ resolve_fl_variable_derived (gfc_symbol *sym, int no_init_flag) { gfc_symbol *s; gfc_find_symbol (sym->ts.derived->name, sym->ns, 0, &s); - if (s && (s->attr.flavor != FL_DERIVED - || !gfc_compare_derived_types (s, sym->ts.derived))) + if (s && s->attr.flavor != FL_DERIVED) { gfc_error ("The type '%s' cannot be host associated at %L " "because it is blocked by an incompatible object " |