aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2016-11-25 18:22:37 +0100
committerJanus Weil <janus@gcc.gnu.org>2016-11-25 18:22:37 +0100
commitf76c4d97aee6c1845baf764ae6b97a530f32858d (patch)
tree7847ca9dd8a61c308edda40281727f7bb36cc8cd /gcc/fortran/interface.c
parent27d0862e62b5af5cce218a32cfcf3db27c85d1f2 (diff)
downloadgcc-f76c4d97aee6c1845baf764ae6b97a530f32858d.zip
gcc-f76c4d97aee6c1845baf764ae6b97a530f32858d.tar.gz
gcc-f76c4d97aee6c1845baf764ae6b97a530f32858d.tar.bz2
re PR fortran/60853 ([OOP] Failure to disambiguate generic with unlimited polymorphic)
2016-11-25 Janus Weil <janus@gcc.gnu.org> PR fortran/60853 * interface.c (gfc_compare_interfaces): Remove bad special case for unlimited polymorphism. Refactor for loop. 2016-11-25 Janus Weil <janus@gcc.gnu.org> PR fortran/60853 * gfortran.dg/typebound_assignment_8.f90: New test case. From-SVN: r242880
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 4c8d671..f5d3f77 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1728,11 +1728,9 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol *s2, const char *name2,
This is also done when comparing interfaces for dummy procedures and in
procedure pointer assignments. */
- for (;;)
+ for (; f1 || f2; f1 = f1->next, f2 = f2->next)
{
/* Check existence. */
- if (f1 == NULL && f2 == NULL)
- break;
if (f1 == NULL || f2 == NULL)
{
if (errmsg != NULL)
@@ -1741,9 +1739,6 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol *s2, const char *name2,
return 0;
}
- if (UNLIMITED_POLY (f1->sym))
- goto next;
-
if (strict_flag)
{
/* Check all characteristics. */
@@ -1772,9 +1767,6 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol *s2, const char *name2,
return 0;
}
}
-next:
- f1 = f1->next;
- f2 = f2->next;
}
return 1;