This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran,patch] Get rid of some convert calls in favor of build_int_cst

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)?
> FX

> 2006-06-19  Francois-Xavier Coudert  <>
> 	* 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):
> 	Likewise.
> 	* 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]