This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR32382 missed optimization in internal read - updated
Jerry,
> My attempts to use a wrapper function for this result in numerous
> regressions. I suspect because there are non EXEC_DO code blocks between the
> EXEC_DO. I think I prefer to leave the patch as-is.
>
I find that to be highly surprising - I'll have a stab at it myself.
Surely,
static tree
trans_code (gfc_code * code, tree cond)
{
.....
}
tree
gfc_trans_code_with_condition (gfc_code * code, tree cond)
{
return trans_code (code, cond)
}
tree
gfc_trans_code (gfc_code * code)
{
return trans_code (code, NULL_TREE)
}
works, doesn't it? This is functionally no different to all the calls
that you are making with cond == NULL_TREE.
Mind you, for me it's a no-matter-which-way :-) I would choose the
wrapper version just so that the logic of the calls to trans_code is
completely clear. However, we are living with other functions where
the API has been supplemented by arguments that only get used in one
place.
OK for trunk.
Cheers
Paul