This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gfc_build_addr_expr vs. build_fold_addr_expr{,_with_type}
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 14 Dec 2005 10:34:05 -0800
- Subject: Re: gfc_build_addr_expr vs. build_fold_addr_expr{,_with_type}
- References: <Pine.LNX.4.63.0512121722390.6048@t148.fhfr.qr>
On Mon, Dec 12, 2005 at 05:26:10PM +0100, Richard Guenther wrote:
>
> Always interesting to compare seemingly duplicates. The variant
> from fold-const.c seems to be more strict with types and sets
> TREE_ADDRESSABLE on the base component, while the gfc variant
> sets it on the passed tree itself. Other than that, the gfc variant
> uses convert () to do typecasting. And the gfc variant has
> parameters swapped compared to the fold-const.c variant which may
> cause confusion if we switch.
>
> Would a patch be accepted to convert the gfc_build_addr_expr to
> build_fold_addr_expr{,_with_type}?
>
Richard,
First, I think this type of decision would come down to
Paul Brook and Steven Bosscher, so you should probably
discuss it with them.
IMHO, I think this type of patch is desirable if it brings
gfortran into line with other parts of GCC for consistency.
The obvious advantage is that others, who don't normally
work on gfortran, can easily read, understand, and potentially
spot problems.
Of course, a patch like this would need not only regression
testing on your platform of choice, but probably several others
including cygwin, aix, MacOs, and hp-ux which tend to uncover
problems.
The only downside I see with this type of patch is that backporting
fixes from trunk to 4.1 will be more difficult. With only a small
group of active gfortran hackers, this may place 4.1 into position
of low maintenance.
--
Steve