This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran,patch] Get rid of some convert calls in favor of build_int_cst
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: gfortran <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>, Paul Brook <paul at codesourcery dot com>
- Date: Mon, 19 Jun 2006 16:53:49 -0700
- Subject: Re: [gfortran,patch] Get rid of some convert calls in favor of build_int_cst
- References: <4496F308.email@example.com>
On Mon, Jun 19, 2006 at 08:55:04PM +0200, FX Coudert wrote:
> Following a remark from Paul Brook that calls such as
> convert (foo_type, integer_zero_node);
> would better be replaced by
> build_int_cst (foo_type, 0);
> the attached patch performs this substitution for the cases I could spot
> in the Fortran front-end.
> Regtested on i686-linux, OK for mainline (and 4.1, to ease backporting)?
> 2006-06-19 Francois-Xavier Coudert <firstname.lastname@example.org>
> * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_unary_op,
> gfc_conv_cst_int_power, gfc_conv_string_tmp,
> gfc_conv_function_call): Replace calls to convert on constant
> integer nodes by build_int_cst.
> * trans-stmt.c (gfc_trans_do): Likewise.
> * trans-io.c (set_internal_unit, transfer_namelist_element):
> * trans-decl.c (build_entry_thunks): Likewise.
This looks to be a straight forward mechanic change.
It is OK for trunk. Please, let it sit in trunk for
at least a week before considering the patching of 4.1.
I'll note that I'm leary of non-bug changes going into
Also, does this change allow the remove of any of the
integer_zero_node, etc. nodes?