diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-02 11:08:41 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-02 11:08:41 +0000 |
commit | d9fd8d25223bfbfc2259c0a392e3fe525e806fbf (patch) | |
tree | 194e50799fdad51cd3329c541e98334d6d907ca8 /gcc/fortran/expr.c | |
parent | d6176b5f34faf006335ace15685eeb226bbcb173 (diff) | |
download | gcc-d9fd8d25223bfbfc2259c0a392e3fe525e806fbf.tar.gz |
2011-07-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/49562
* expr.c (gfc_check_vardef_context): Handle type-bound procedures.
2011-07-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/49562
* gfortran.dg/typebound_proc_23.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 4a7a951b6d6..6dcfda1e53a 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4394,8 +4394,8 @@ gfc_check_vardef_context (gfc_expr* e, bool pointer, bool alloc_obj, sym = e->value.function.esym ? e->value.function.esym : e->symtree->n.sym; } - if (!pointer && e->expr_type == EXPR_FUNCTION - && sym->result->attr.pointer) + attr = gfc_expr_attr (e); + if (!pointer && e->expr_type == EXPR_FUNCTION && attr.pointer) { if (!(gfc_option.allow_std & GFC_STD_F2008)) { @@ -4432,7 +4432,6 @@ gfc_check_vardef_context (gfc_expr* e, bool pointer, bool alloc_obj, /* Find out whether the expr is a pointer; this also means following component references to the last one. */ - attr = gfc_expr_attr (e); is_pointer = (attr.pointer || attr.proc_pointer); if (pointer && !is_pointer) { |