This is the mail archive of the
mailing list for the GCC project.
Re: [patch] for PR23509
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, dnovillo at redhat dot com
- Date: Sat, 27 Aug 2005 14:31:16 +0200
- Subject: Re: [patch] for PR23509
- References: <20050827121657.GA15625@atrey.karlin.mff.cuni.cz>
On 8/27/05, Zdenek Dvorak <email@example.com> wrote:
> the patch
> removed the check that prevents propagation of pointers
> when phi nodes are removed during basic block merging.
> This PR occurs in situation like
> p = phi(q);
> # VUSE (something)
> use (*p);
> when q is not dereferenced anywhere. The pointers that are
> not dereferenced at all have neither name_mem_tag nor type_mem_tag
> set. Therefore, when the code is replaced with
> we lose the VUSE, which could in worst case lead to misscompilations.
> In this particular case it only confuses ivopts that expect name_mem_tag
> or type_mem_tag to be set for every dereferenced pointer, and leads to
> This patch puts the check that prevents the propagation of pointers
> back. The patch also adds the assert that dereferenced pointers have a tag
> set to get_ref_tag, so that the problem is caught before it causes
> memory corruption in get_expr_operands.
Please try to add a testcase for this.