* expr.c (expand_expr, case OFFSET_REF): Ditto.
* tree.c (substitute_in_expr): Remove OFFSET_REF code.
Remove some old cruft
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12127
138bc75d-0d04-0410-961f-
82ee72b054a4
return target;
}
- case OFFSET_REF:
- {
- tree base = build1 (ADDR_EXPR, type, TREE_OPERAND (exp, 0));
- tree addr = build (PLUS_EXPR, type, base, TREE_OPERAND (exp, 1));
- op0 = expand_expr (addr, NULL_RTX, VOIDmode, EXPAND_SUM);
- temp = gen_rtx (MEM, mode, memory_address (mode, op0));
- MEM_IN_STRUCT_P (temp) = 1;
- MEM_VOLATILE_P (temp) = TREE_THIS_VOLATILE (exp);
-#if 0 /* It is incorrect to set RTX_UNCHANGING_P here, because the fact that
- a location is accessed through a pointer to const does not mean
- that the value there can never change. */
- RTX_UNCHANGING_P (temp) = TREE_READONLY (exp);
-#endif
- return temp;
- }
-
/* Intended for a reference to a buffer of a file-object in Pascal.
But it's not certain that a special tree code will really be
necessary for these. INDIRECT_REF might work for them. */
new = fold (build1 (code, TREE_TYPE (exp), op0));
break;
-
- case OFFSET_REF:
- op0 = substitute_in_expr (TREE_OPERAND (exp, 0), f, r);
- op1 = substitute_in_expr (TREE_OPERAND (exp, 1), f, r);
- if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1))
- return exp;
-
- new = fold (build (code, TREE_TYPE (exp), op0, op1));
- break;
}
}
/* C unary `*' or Pascal `^'. One operand, an expression for a pointer. */
DEFTREECODE (INDIRECT_REF, "indirect_ref", "r", 1)
-/* Reference to the contents of an offset
- (a value whose type is an OFFSET_TYPE).
- Operand 0 is the object within which the offset is taken.
- Operand 1 is the offset. */
-DEFTREECODE (OFFSET_REF, "offset_ref", "r", 2)
-
/* Pascal `^` on a file. One operand, an expression for the file. */
DEFTREECODE (BUFFER_REF, "buffer_ref", "r", 1)