This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR59414 [4.8/4.9 Regression] [OOP] ICE in in gfc_conv_expr_descriptor on ALLOCATE inside SELECT TYPE
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Jan 2014 11:30:38 +0100
- Subject: Re: [Patch, fortran] PR59414 [4.8/4.9 Regression] [OOP] ICE in in gfc_conv_expr_descriptor on ALLOCATE inside SELECT TYPE
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiKPMF3mkRAfV_jk3jb24M5Cm_LD6O2bC7Rh7aZD6eqB1Q at mail dot gmail dot com> <CAKwh3qjBdZ5_ZBFqukXQdAXyPd4daOZv5v5wDBqr37-b=OfU+Q at mail dot gmail dot com>
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