diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-15 14:54:05 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-15 14:54:05 +0000 |
commit | 09f9a3d5e60b6cc36e02bde0df4b9a5c08c896b7 (patch) | |
tree | dba3aa33fa9d8756b8c2f17e584103d18f2a26df /gcc/fortran | |
parent | de301bff5f3536ab51a10f9387e7a0e99db52255 (diff) | |
download | gcc-09f9a3d5e60b6cc36e02bde0df4b9a5c08c896b7.tar.gz |
2009-11-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/42048
* match.c (gfc_match_call): If we're inside a function with derived
type return value, allow calling a TBP of the result variable.
2009-11-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/42048
* gfortran.dg/typebound_call_11.f03: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154190 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/match.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6f1aaddc3db..19e4a293367 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2009-11-15 Janus Weil <janus@gcc.gnu.org> + + PR fortran/42048 + * match.c (gfc_match_call): If we're inside a function with derived + type return value, allow calling a TBP of the result variable. + 2009-11-12 Tobias Burnus <burnus@net-b.de> * intrinsic.texi (XOR): Refer also to .NEQV. diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 24e292bd4d6..13f68ab8c65 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -2975,7 +2975,7 @@ gfc_match_call (void) /* If this is a variable of derived-type, it probably starts a type-bound procedure call. */ - if (sym->attr.flavor != FL_PROCEDURE + if ((sym->attr.flavor != FL_PROCEDURE || sym == gfc_current_ns->proc_name) && (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)) return match_typebound_call (st); |