This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch/gfortran] PR18283
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 01 Jun 2005 10:44:25 +0200
- Subject: Re: [Patch/gfortran] PR18283
- References: <429B0809.3090402@wanadoo.fr> <429B496D.6080002@physik.uni-muenchen.de> <429B60F7.4080902@wanadoo.fr> <429B6445.8060200@physik.uni-muenchen.de> <000901c56553$ae060c10$0400000a@Paul> <429B79C5.50705@physik.uni-muenchen.de> <429B8695.8030108@wanadoo.fr> <429B8D76.7080602@physik.uni-muenchen.de> <429D48BB.80700@wanadoo.fr>
Paul Thomas wrote:
> > ! tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node, len,
> > ! convert (gfc_charlen_type_node, integer_one_node));
>
> build_int_cst (gfc_charlen_type_node, 1)
>
> > ! tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node,
>
> The convert is indeed all over the place in that file; in fact I cut and
> paste it from a few lines away What is your reason for preferring to
> replace it with build_int_cst (type, value)? On the face of it, I would
> have thought that the convert is better.
That is because the constants created with build_int_cst are shared, so we
don't get a new tree everytime this code is run.
- Tobi