[PATCH] Canonicalize &a to &a[0] during fold
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Mon Apr 25 09:11:00 GMT 2005
On Sun, 24 Apr 2005, Richard Henderson wrote:
> On Sun, Apr 24, 2005 at 07:15:01PM +0200, Richard Guenther wrote:
> > * fold-const.c (fold_unary): Fold decayed array a to &a[0].
>
> I'd kinda prefer this get fixed in the front ends instead of doing
> this in fold...
I would have come up with followups that also replace
(a + i) with &a[i]. Should this also be fixed in the frontends?
I.e. the C frontend currently would need tweaking.
The downside is that we "tie" the frontends closer to the middle-end
this way.
I'll prepare a patch for the C frontend.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
More information about the Gcc-patches
mailing list