This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR36509, re-enable alias warnings from PTA
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Richard Guenther" <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 4 Dec 2008 09:45:30 -0800
- Subject: Re: [PATCH] Fix PR36509, re-enable alias warnings from PTA
- References: <alpine.LNX.2.00.0812031057410.5167@zhemvz.fhfr.qr>
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.