http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54690
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org, | |pault at gcc dot gnu.org --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-24 13:25:30 UTC --- "12.5.2.5 Allocatable and pointer dummy variables" has: "The actual argument shall be polymorphic if and only if the associated dummy argument is polymorphic, and either both the actual and dummy arguments shall be unlimited polymorphic, or the declared type of the actual argument shall be the same as the declared type of the dummy argument." Thus, the assert is okay: gcc_assert (fsym->ts.u.derived == e->ts.u.derived); If one looks at the name, one has: __class_soop_stars_class_Soop_stars_a (e->ts.u.derived->name) __class_soop_stars_class_Soop_stars (fsym->ts.u.derived->name) Thus, for some reason, the formal symbol is allocatable, but its type is not marked as such. Thus, the assert is fine, but the test is not: --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -3920,3 +3920,3 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, || (fsym->ts.type == BT_CLASS - && CLASS_DATA (e)->attr.allocatable))) + && CLASS_DATA (fsym)->attr.allocatable))) {