[PATCH, fortran, ping] PR60289 was: PR fortran/60255 Deferred character length + PR60289 Also deferred char len.
Paul Richard Thomas
paul.richard.thomas@gmail.com
Thu Feb 5 14:15:00 GMT 2015
Dear Andre,
That's fine to commit to trunk.
Thanks for the patch
Paul
On 30 January 2015 at 11:19, Andre Vehreschild <vehre@gmx.de> wrote:
> Hi Paul,
>
> thanks for the review. Meanwhile I reread the patch myself and figured, that
> the comment in the second patch-block was ill-placed and formulated. I therefore
> changed it to look like this now:
>
> diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
> index 52caaa4..24fab5c 100644
> --- a/gcc/fortran/trans-stmt.c
> +++ b/gcc/fortran/trans-stmt.c
> @@ -5166,7 +5166,16 @@ gfc_trans_allocate (gfc_code * code)
> se_sz.expr = gfc_evaluate_now (se_sz.expr, &se.pre);
> gfc_add_block_to_block (&se.pre, &se_sz.post);
> /* Store the string length. */
> - tmp = al->expr->ts.u.cl->backend_decl;
> + if ((expr->symtree->n.sym->ts.type == BT_CLASS
> + || expr->symtree->n.sym->ts.type == BT_DERIVED)
> + && expr->ts.u.derived->attr.unlimited_polymorphic)
> + /* For unlimited polymorphic entities get the backend_decl of
> + the _len component for that. */
> + tmp = gfc_class_len_get (gfc_get_symbol_decl (
> + expr->symtree->n.sym));
> + else
> + /* Else use what is stored in the charlen->backend_decl. */
> + tmp = al->expr->ts.u.cl->backend_decl;
> gfc_add_modify (&se.pre, tmp, fold_convert (TREE_TYPE (tmp),
> se_sz.expr));
> tmp = TREE_TYPE (gfc_typenode_for_spec (&code->ext.alloc.ts));
>
> I still hope this is ok for commit. As a newbie, I don't want to mess it up in
> the beginning and therefore ask one more time for permission.
>
> On Thu, 29 Jan 2015 20:13:49 +0000
> Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
>
>> I must apologise. I have been working so hard on my own projects that
>> I failed completely to notice that your patch had not been applied.
>
> No problem. Hadn't I been asked, I would have forgotten about it, too. I am
> working on a bunch of class-array issues starting with pr60322 currently. I
> hope to be able to submit a patch for it today.
>
> Regards,
> Andre
> --
> Andre Vehreschild * Email: vehre ad gmx dot de
--
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.
Groucho Marx
More information about the Fortran
mailing list