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


    I think that should still be the general case; if we're taking the address
    of, say, a struct returned from a function, we want to propagate
    TREE_SIDE_EFFECTS from the call to the ADDR_EXPR.

Oh, you're right.  I misread the code.  It only does that if the innermost
object is not a decl.  So I agree it should be there.

    But we should special-case COMPONENT_REF so that TREE_SIDE_EFFECTS is
    propagated from op0 to the ADDR_EXPR, not from the ref itself.  With
    appropriate recursion.

But that's what the code does: it ignores the TREE_SIDE_EFFECTS of the
COMPONENT_REF!


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