This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 49671 volatile goes missing after inlining
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 25 Jul 2011 11:05:03 +0200
- Subject: Re: [PATCH] Fix PR 49671 volatile goes missing after inlining
- References: <CA+=Sn1mVRR=JOHo4AwEMDWhB9jMEc+jDA0wB8fVdAJKBiMU6bA@mail.gmail.com>
On Mon, Jul 25, 2011 at 1:34 AM, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
> ?There are two issues, first the inliner does not copy a volatile
> when creating a new tree in one case. ?The second issue is that
> IPA-SRA does not check if we are deferencing a pointer variable via a
> volatile type.
>
> OK? ?Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Ok.
Can you add a testcase?
Thanks,
Richard.
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * tree-inline.c (remap_gimple_op_r): Copy TREE_THIS_VOLATILE and
> TREE_THIS_NOTRAP into the inner most MEM_REF.
> Always copy TREE_THIS_VOLATILE.
> * tree-sra.c (ptr_parm_has_direct_uses): Check that the lhs, rhs and
> arguments are not volatile references.
>