This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Refactor type handling in get_alias_set, fix PR58513
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 24 Sep 2013 11:52:38 -0700
- Subject: Re: [PATCH] Refactor type handling in get_alias_set, fix PR58513
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1309241258510 dot 29411 at zhemvz dot fhfr dot qr>
On Tue, Sep 24, 2013 at 4:00 AM, Richard Biener <rguenther@suse.de> wrote:
>
> As noted in PR58513 the alias type comparison in operand_equal_p for
> MEM_REF and TARGET_MEM_REF is overly restrictive. The following
> adds a new alias_ptr_types_compatible_p helper for a less conservative
> comparison and refactors get_alias_set and reference_alias_ptr_type
> to share code and behave in a more similar manner.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
>
> Richard.
>
> 2013-09-24 Richard Biener <rguenther@suse.de>
>
> PR middle-end/58513
> * tree.c (reference_alias_ptr_type): Move ...
> * alias.c (reference_alias_ptr_type): ... here and implement
> in terms of the new reference_alias_ptr_type_1.
> (ref_all_alias_ptr_type_p): New helper.
> (get_deref_alias_set_1): Drop flag_strict_aliasing here,
> use ref_all_alias_ptr_type_p.
> (get_deref_alias_set): Add flag_strict_aliasing check here.
> (reference_alias_ptr_type_1): New function, split out from ...
> (get_alias_set): ... here.
> (alias_ptr_types_compatible_p): New function.
> * alias.h (reference_alias_ptr_type): Declare.
> (alias_ptr_types_compatible_p): Likewise.
> * tree.h (reference_alias_ptr_type): Remove.
> * fold-const.c (operand_equal_p): Use alias_ptr_types_compatible_p
> to compare MEM_REF alias types.
>
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58521
--
H.J.