[PATCH] Fix PR36509, re-enable alias warnings from PTA

H.J. Lu hjl.tools@gmail.com
Thu Dec 4 17:46:00 GMT 2008


On Wed, Dec 3, 2008 at 1:59 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This re-implements alias warnings from PTA in a way to only warn if
> we are sure the warning is not a false positive and in a way aware
> of TBAA pruning done by PTA.  The previous implementation was
> pretty much ineffective after TBAA pruning was fixed.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, I plan to apply
> this tomorrow in case of no further comments.
>
> Thanks,
> Richard.
>
> 2008-12-03  Richard Guenther  <rguenther@suse.de>
>
>        PR middle-end/36509
>        PR c++/38334
>        * Makefile.in (tree-ssa-alias-warnings.o): Remove.
>        (tree-ssa-structalias.o): Remove errors.h dependency.
>        (tree-ssa-reassoc.o): Likewise.
>        * tree-ssa-reassoc.c: Do not include errors.h.
>        * tree-ssa-alias-warnings.c: Remove.
>        * tree-ssa-alias.c (compute_may_aliases): Remove call to
>        strict_aliasing_warning_backend.
>        * tree-ssa-structalias.c (emit_pointer_definition): New function.
>        (emit_alias_warning): Likewise.
>        (set_uids_in_ptset): Warn for clear cases of type-punning.
>        * tree-inline.c (remap_gimple_op_r): Preserve TREE_NO_WARNING
>        on INDIRECT_REFs.
>
>        cp/
>        * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
>        pointer access with TREE_NO_WARNING.
>
>        * gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: Adjust, remove XFAIL.
>        * gcc.dg/Wstrict-aliasing-converted-assigned.c: Adjust.
>        * g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Likewise.
>

Hi,

It caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38406


H.J.



More information about the Gcc-patches mailing list