[Patch, fortran] PR59414 [4.8/4.9 Regression] [OOP] ICE in in gfc_conv_expr_descriptor on ALLOCATE inside SELECT TYPE
Paul Richard Thomas
paul.richard.thomas@gmail.com
Thu Jan 23 10:30:00 GMT 2014
Dear Janus,
....snip....
> well, actually the selector in the test case is not an array. And
> polymorphic arrays as such have been supported since 4.7.
duuh! Shows how time flies when you're having fun!
>
>> 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!
Thanks for the review.
>
>
>> 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 ...
I am debugging such a function but, for reasons that I have not yet
found, it recovers the original ICE :-(
Elsewhere, I have implemented the same removal of references in the
TREE_SSA representation for which there is a helper function. I must
check if that is not possible here.
Cheers
Paul
>
> Cheers,
> Janus
>
>
>
>> 2014-01-20 Paul Thomas <pault@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 <pault@gcc.gnu.org>
>>
>> PR fortran/59414
>> * gfortran.dg/allocate_class_3.f90 : New test
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
More information about the Fortran
mailing list