aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2011-07-02 13:08:41 +0200
committerJanus Weil <janus@gcc.gnu.org>2011-07-02 13:08:41 +0200
commit49860194e29e3cb2d571e9f9a413b1858967953e (patch)
tree194e50799fdad51cd3329c541e98334d6d907ca8 /gcc/fortran
parentfe8ac8e43d54eaaef142de4ce74864bf0eb1c3b3 (diff)
downloadgcc-49860194e29e3cb2d571e9f9a413b1858967953e.zip
gcc-49860194e29e3cb2d571e9f9a413b1858967953e.tar.gz
gcc-49860194e29e3cb2d571e9f9a413b1858967953e.tar.bz2
re PR fortran/49562 ([OOP] assigning value to type-bound function)
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. From-SVN: r175779
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/expr.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 055c15d..e2d5d12 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-02 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/49562
+ * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
+
2011-06-30 Jakub Jelinek <jakub@redhat.com>
PR fortran/49540
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 4a7a951..6dcfda1 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)
{