Commit 310bbbf4 by Jim Wilson

(copy_constant): Copy operand of ADDR_EXPR if it is a constant.

From-SVN: r9164
parent 31c97f6a
......@@ -2568,12 +2568,18 @@ copy_constant (exp)
{
switch (TREE_CODE (exp))
{
case ADDR_EXPR:
/* For ADDR_EXPR, we do not want to copy the decl whose address
is requested. We do want to copy constants though. */
if (TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (exp, 0))) == 'c')
return build1 (TREE_CODE (exp), TREE_TYPE (exp),
copy_constant (TREE_OPERAND (exp, 0)));
else
return copy_node (exp);
case INTEGER_CST:
case REAL_CST:
case STRING_CST:
case ADDR_EXPR:
/* For ADDR_EXPR, we do not want to copy the decl
whose address is requested. */
return copy_node (exp);
case COMPLEX_CST:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment