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.

I wonder if the problem isn't here:

  if (TREE_CODE (node) == INDIRECT_REF)
    {
      /* If this is &((T*)0)->field, then this is a form of addition.  */
      if (TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST)
	UPDATE_TITCSE (node);

Shouldn't that last "node" be TREE_OPERAND (node, 0)?  We don't care about
the INDIRECT_REF here: all we care about is its operand.


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