aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2020-02-03 10:00:07 +0100
committerTobias Burnus <tobias@codesourcery.com>2020-02-03 10:00:07 +0100
commitae86ede8e988d1863b92a19f35d5f7c6b998bf8c (patch)
tree4aab7841fde78e7f5cb65d86a4774d2df59003c6 /gcc/fortran/resolve.c
parentf626ae5478887b0cec886160dcfc4d59bf6fda07 (diff)
downloadgcc-ae86ede8e988d1863b92a19f35d5f7c6b998bf8c.zip
gcc-ae86ede8e988d1863b92a19f35d5f7c6b998bf8c.tar.gz
gcc-ae86ede8e988d1863b92a19f35d5f7c6b998bf8c.tar.bz2
[Fortran] Fix to strict associate check (PR93427)
PR fortran/93427 * resolve.c (resolve_assoc_var): Remove too strict check. * gfortran.dg/associate_51.f90: Update test case. PR fortran/93427 * gfortran.dg/associate_52.f90: New.
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index e840aec..8f5267f 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -8846,8 +8846,7 @@ resolve_assoc_var (gfc_symbol* sym, bool resolve_target)
if (tsym->attr.subroutine
|| tsym->attr.external
- || (tsym->attr.function
- && (tsym->result != tsym || tsym->attr.recursive)))
+ || (tsym->attr.function && tsym->result != tsym))
{
gfc_error ("Associating entity %qs at %L is a procedure name",
tsym->name, &target->where);