This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Remove bogus optimization from may_alias_p
- From: "Diego Novillo" <dnovillo at google dot com>
- To: "Richard Guenther" <rguenther at suse dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 20 Oct 2008 10:37:28 -0400
- Subject: Re: [PATCH] Remove bogus optimization from may_alias_p
- References: <alpine.LNX.firstname.lastname@example.org>
2008/10/19 Richard Guenther <email@example.com>:
> This removes a test where one subtest is always false and the
> other one is always true if unmodifiable_var_p (var) is true,
> which is obviously bogus. On the trunk this causes false
> TBAA pruning of points-to sets.
This also prunes the case where a regular pointer is made to point to
a read-only variable. The user gets a warning about mismatched const
settings. So TBAA should be able to prune this.
You also need a test case.