This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR33122, wrong types with pointer-plus
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "Richard Guenther" <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Aug 2007 01:48:29 -0700
- Subject: Re: [PATCH] Fix PR33122, wrong types with pointer-plus
- References: <Pine.LNX.4.64.0708211020450.13885@s68.fhfr.qr>
On 8/21/07, Richard Guenther <rguenther@suse.de> wrote:
> - /* index +p PTR -> PTR +p index */
> - if (POINTER_TYPE_P (TREE_TYPE (arg1))
> - && INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
> - return fold_build2 (POINTER_PLUS_EXPR, type,
> - fold_convert (type, arg1), fold_convert (sizetype, arg0));
Wait how is this wrong again?
Type will always be pointer, if it is not then that is a bug as
pointer plus will only work with resulting point types.
This seems like a bug in the front-end producing the wrong types in
the first place. Can you please revert this patch until bootstrap was
fixed for libstdc++ because you could not have tested it?
Thanks,
Andrew Pinski