This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR57530 (Part 2 of 3) Support TYPE => CLASS
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Janus Weil <janus at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Mon, 29 Jul 2013 10:38:33 +0200
- Subject: Re: [Patch, Fortran] PR57530 (Part 2 of 3) Support TYPE => CLASS
- References: <51F1A31F dot 3040404 at net-b dot de> <CAKwh3qhS45WkQKMSJp9=QjJ1fhVU4VQK5LG0v-0Vf-r+QMWupg at mail dot gmail dot com> <51F39827 dot 8020607 at net-b dot de> <51F3BAAF dot 8040005 at net-b dot de> <51F3D986 dot 9050300 at net-b dot de> <51F424BC dot 6080002 at net-b dot de>
Dear Tobias,
I think that Janus's OK of the 27th was already enough :-)
The tweaks that you have made since make it look much cleaner. So,
once more - OK for trunk.
Thanks for the patch
Paul
On 27 July 2013 21:51, Tobias Burnus <burnus@net-b.de> wrote:
> Tobias Burnus wrote:
>>
>> Giving up on the class.c version, would be the following change okay?
>>
>> + if (expr1->ts.type == BT_DERIVED && expr2->ts.type == BT_CLASS
>> + && expr2->expr_type != EXPR_FUNCTION)
>> + {
>> + gfc_add_data_component (expr2);
>> + /* The following is required as gfc_add_data_component doesn't
>> + update ts.type if there is a tailing REF_ARRAY. */
>> + expr2->ts.type = BT_DERIVED;
>> + }
>>
>> It still feels a bit like a hack - but it is definitely much cleaner than
>> my previous band aid.
>> Built and regtested on x86-64-gnu-linux.
>> OK?
>
>
> Attached is now the patch which does what I wrote above.
>
> OK?
>
> Tobias
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy