[Patch, Fortran] PR57530 (Part 2 of 3) Support TYPE => CLASS
Tobias Burnus
burnus@net-b.de
Sat Jul 27 19:51:00 GMT 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptr-assign-v2.diff
Type: text/x-patch
Size: 10834 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130727/90fb6dc6/attachment.bin>
More information about the Fortran
mailing list