diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-21 12:50:56 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-21 12:50:56 +0000 |
commit | 60e91af4cf1337f3ce8d61b5c8d6b23aec89b4dd (patch) | |
tree | 8c272f3218f0e29691939ff45b3f7f5bd4e1a7af /gcc/fortran/trans-expr.c | |
parent | bc5cd04e5abf132003d84c8b0fb9420479b70d35 (diff) |
2016-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69566
* resolve.c (fixup_array_ref): New function.
(resolve_select_type): Gather up the rank and array reference,
if any, from the selector. Fix up the 'associate name' and the
'associate entities' as necessary.
* trans-expr.c (gfc_conv_class_to_class): If the symbol backend
decl is a FUNCTION_DECL, use the 'fake_result_decl' instead.
2016-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69566
* gfortran.dg/select_type_37.f03: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 6b974db5e7f0..2f8ea22e643f 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1033,8 +1033,13 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts, && e->symtree && e->symtree->n.sym->ts.type == BT_CLASS) { tmp = e->symtree->n.sym->backend_decl; + + if (TREE_CODE (tmp) == FUNCTION_DECL) + tmp = gfc_get_fake_result_decl (e->symtree->n.sym, 0); + if (DECL_LANG_SPECIFIC (tmp) && GFC_DECL_SAVED_DESCRIPTOR (tmp)) tmp = GFC_DECL_SAVED_DESCRIPTOR (tmp); + slen = integer_zero_node; } else |