From 8988cde62b4b1edc8fa6cdee6e02b09c6c9f15d4 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Thu, 3 Jan 2013 17:14:54 +0100 Subject: re PR fortran/55855 ([OOP] incorrect warning with procedure pointer component on pointer-valued base object) 2013-01-03 Janus Weil PR fortran/55855 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes of rvalue. Correct hyphenation in error message. 2013-01-03 Janus Weil PR fortran/55855 * gfortran.dg/assignment_1.f90: Modified. * gfortran.dg/assignment_4.f90: New. From-SVN: r194857 --- gcc/fortran/expr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/fortran/expr.c') diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 5c9ce11..2610784 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3151,9 +3151,8 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) /* This is possibly a typo: x = f() instead of x => f(). */ if (gfc_option.warn_surprising - && rvalue->expr_type == EXPR_FUNCTION - && rvalue->symtree->n.sym->attr.pointer) - gfc_warning ("POINTER valued function appears on right-hand side of " + && rvalue->expr_type == EXPR_FUNCTION && gfc_expr_attr (rvalue).pointer) + gfc_warning ("POINTER-valued function appears on right-hand side of " "assignment at %L", &rvalue->where); /* Check size of array assignments. */ -- cgit v1.1