[PATCH] CONSTANT_ALIGNMENT is missed in builtins.c
Richard Guenther
richard.guenther@gmail.com
Fri Sep 1 10:52:00 GMT 2006
On 9/1/06, Roger Sayle <roger@eyesopen.com> wrote:
>
> Hi Adam,
>
> On Thu, 31 Aug 2006, Adam Nemet wrote:
> > * tree.h (extract_array_ref): Declare it.
> > * fold-const.c (extract_array_ref): Export it.
> > * builtins.c (get_pointer_alignment): Use extract_array_ref to
> > handle ARRAY_REFs.
>
> This patch is not bad, but I wonder whether its possible to implement
> this without requiring calls to fold_buildN; ideally it should be possible
> to determine pointer alignment without having to allocate temporary trees.
Isn't this PR27226 (which has a patch)?
> > + /* Lower ARRAY_REFs into pointer arithmetic. */
> > + if (extract_array_ref (exp, &base, &offset))
We have get_inner_reference or get_ref_base_and_extent for this,
which should avoid creating new trees.
So if 27226 finally is a regression the patch in there looks more complete.
Can you verify it works for you?
Thanks,
Richard.
More information about the Gcc-patches
mailing list