Hi Paul, > This is a straightforward patch that is completely described in the > ChangeLog entry. I am surprised that this could be a 4.8 regression > since, as far as I am aware, SELECT_TYPE was not capable of handling > array selectors before... Nonetheless, it flagged it up for me :-)
well, actually the selector in the test case is not an array. And polymorphic arrays as such have been supported since 4.7. > Bootstrapped and regtested on FC17/x86_64 - OK for trunk and, after a > decent delay, 4.8? Yes, looks good to me. Thanks for the patch! > PS I know of at least one other place where this manoeuvre had to be > done. If I find a third, I will turn it into a function in class.c. > It might be worth doing anyway? I tend to agree. Up to you ... Cheers, Janus > 2014-01-20 Paul Thomas <pa...@gcc.gnu.org> > > PR fortran/59414 > * trans-stmt.c (gfc_trans_allocate): Before the pointer > assignment to transfer the source _vptr to a class allocate > expression, the final class reference should be exposed. The > tail that includes the _data and array references is stored. > This reduced expression is transferred to 'lhs' and the _vptr > added. Then the tail is restored to the allocate expression. > > 2014-01-20 Paul Thomas <pa...@gcc.gnu.org> > > PR fortran/59414 > * gfortran.dg/allocate_class_3.f90 : New test