This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix PR middle-end/17885, gimplifing of volatile &a->b


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]