aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-01-21 16:12:31 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2012-01-21 16:12:31 +0100
commit076ec830bf9d00dfa216beb88fb7d58650fbfbc1 (patch)
tree6ac4f2d46cd98cc29351bdc7d83dbe13811f7a2c /gcc/fortran/interface.c
parent7eeb2aa717484ca0055e2274f50a49bc9565d1eb (diff)
downloadgcc-076ec830bf9d00dfa216beb88fb7d58650fbfbc1.zip
gcc-076ec830bf9d00dfa216beb88fb7d58650fbfbc1.tar.gz
gcc-076ec830bf9d00dfa216beb88fb7d58650fbfbc1.tar.bz2
re PR fortran/51913 ([OOP] bug when submitting a class pointer to a subroutine)
2012-01-21 Tobias Burnus <burnus@net-b.de> PR fortran/51913 * interface.c (compare_parameter): Fix CLASS comparison. 2012-01-21 Tobias Burnus <burnus@net-b.de> PR fortran/51913 * gfortran.dg/class_47.f90: New. From-SVN: r183368
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 94f767d..9acd1fb 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1706,7 +1706,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
return 0;
}
- /* F2003, 12.5.2.5. */
+ /* F2008, 12.5.2.5. */
if (formal->ts.type == BT_CLASS
&& (CLASS_DATA (formal)->attr.class_pointer
|| CLASS_DATA (formal)->attr.allocatable))
@@ -1718,8 +1718,8 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
formal->name, &actual->where);
return 0;
}
- if (CLASS_DATA (actual)->ts.u.derived
- != CLASS_DATA (formal)->ts.u.derived)
+ if (!gfc_compare_derived_types (CLASS_DATA (actual)->ts.u.derived,
+ CLASS_DATA (formal)->ts.u.derived))
{
if (where)
gfc_error ("Actual argument to '%s' at %L must have the same "