This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix PR middle-end/17885, gimplifing of volatile &a->b
- From: Jeffrey A Law <law at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 18 Oct 2004 13:48:14 -0600
- Subject: Re: [PATCH] fix PR middle-end/17885, gimplifing of volatile &a->b
- Organization: Red Hat, Inc
- References: <75B2AC4A-2111-11D9-B4B8-000A95D692F4@physics.uc.edu>
- Reply-to: law at redhat dot com
On Mon, 2004-10-18 at 08:24, Andrew Pinski wrote:
> The problem here is that we don't handle taking the address of
> volatile pointers to structs' members, aka we don't handle
> when we have volatile types but the expression it self is not
> volatile. This fixes the problem by handling them.
>
> OK? Bootstrapped and tested on powerpc-darwin with no regressions.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * gimplify.c (gimplify_expr): Handle ADDR_EXPR when
> we have volatile types but the expression it self is
> not volatile.
So can you explain a little more about how this patch actually
fixes the problem? How does adding a second call to
gimplify_addr_expr change anything? All you've done is avoid
the default case which aborts -- you haven't (as far as I can tell)
changed the gimple code we produce all.
It seems to me you really wanted to call gimplify_expr to remove
the embedded volatile reference.
jeff