From: Mike Stump Date: Fri, 31 May 1996 05:08:47 +0000 (+0000) Subject: tree.def (OFFSET_REF): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4a3f053b7352c763f8c2ad5df4d082f0ad6c1f8;p=gcc.git tree.def (OFFSET_REF): Remove. * tree.def (OFFSET_REF): Remove. * expr.c (expand_expr, case OFFSET_REF): Ditto. * tree.c (substitute_in_expr): Remove OFFSET_REF code. Remove some old cruft From-SVN: r12127 --- diff --git a/gcc/expr.c b/gcc/expr.c index f262443b9ab..071e38312e3 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5450,22 +5450,6 @@ expand_expr (exp, target, tmode, modifier) 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. */ diff --git a/gcc/tree.c b/gcc/tree.c index 4d65da50a39..16f42b9ec33 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2421,15 +2421,6 @@ substitute_in_expr (exp, f, r) 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; } } diff --git a/gcc/tree.def b/gcc/tree.def index efd0af3543a..e6dade464b8 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -349,12 +349,6 @@ DEFTREECODE (BIT_FIELD_REF, "bit_field_ref", "r", 3) /* 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)