@@ -1,3 +1,11 @@
+2014-07-19 Andre Vehreschild <vehre@gmx.de>
+
+ PR fortran/60414
+ * interface.c (compare_parameter): Fix compile bug: During resolution
+ of generic an array reference in the actual argument was not
+ respected. Fixed by checking, if the ref member is non-null. Testcase
+ unlimited_polymorphism_18.f90 add.
+
2014-06-15 Tobias Burnus <burnus@net-b.de>
* symbol.c (check_conflict): Add codimension conflict with
@@ -2156,7 +2156,10 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
if (symbol_rank (formal) == actual->rank || symbol_rank (formal) == -1)
return 1;
+ /* Only check ranks compatibility, if actual is not an array reference,
+ i.e., actual(i) indicated by actual->ref being set. */
if (actual->ts.type == BT_CLASS && CLASS_DATA (actual)->as
+ && !actual->ref
&& CLASS_DATA (actual)->as->rank == symbol_rank (formal))
return 1;
@@ -1,3 +1,8 @@
+2014-07-19 Andre Vehreschild <vehre@gmx.de>
+
+ * gfortran.dg/unlimited_polymorphism_18.f90: Check according to
+ PR 60414
+
2014-07-17 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.target/mips/umips-lwp-1.c (foo): Use a shift/add sequence