diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2012-01-09 20:25:55 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2012-01-09 20:25:55 +0000 |
commit | efd2e969f2571ba3e1bf9a04b88da7ee2144e1d9 (patch) | |
tree | 2d3d71ea917fc7d37ec5ce84aab423428e961b02 /gcc/fortran/resolve.c | |
parent | 3881a3dee847b26d88355db35090214a0b5a7d43 (diff) | |
download | gcc-efd2e969f2571ba3e1bf9a04b88da7ee2144e1d9.zip gcc-efd2e969f2571ba3e1bf9a04b88da7ee2144e1d9.tar.gz gcc-efd2e969f2571ba3e1bf9a04b88da7ee2144e1d9.tar.bz2 |
re PR fortran/51791 ([OOP] Failure to resolve typebound function call with base object in parentheses.)
2012-01-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/51791
* interface.c (matching_typebound_op): Drill down through
possible parentheses to obtain base expression. Do not test for
'class_ok' but, instead for the class structure components.
* resolve.c (resolve_ordinary_assign): Extend error message for
polymorphic assignment to advise checking for specific
subroutine.
PR fortran/51792
* resolve.c (resolve_typebound_function): Restore 'static' to
declaration.
2012-01-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/51791
* gfortran.dg/typebound_operator_7.f03: Insert parentheses
around base object in first assignment in main program.
* gfortran.dg/typebound_operator_10.f03: New test.
From-SVN: r183032
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 79245ce..c48e2b1 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5887,7 +5887,7 @@ resolve_compcall (gfc_expr* e, const char **name) /* Resolve a typebound function, or 'method'. First separate all the non-CLASS references by calling resolve_compcall directly. */ -gfc_try +static gfc_try resolve_typebound_function (gfc_expr* e) { gfc_symbol *declared; @@ -9208,8 +9208,9 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns) and coindexed; cf. F2008, 7.2.1.2 and PR 43366. */ if (lhs->ts.type == BT_CLASS) { - gfc_error ("Variable must not be polymorphic in assignment at %L", - &lhs->where); + gfc_error ("Variable must not be polymorphic in assignment at %L " + "- check that there is a matching specific subroutine " + "for '=' operator", &lhs->where); return false; } |