OSDN Git Service

* tree.def (OFFSET_REF): Remove.
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 May 1996 05:08:47 +0000 (05:08 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 May 1996 05:08:47 +0000 (05:08 +0000)
        * 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

gcc/expr.c
gcc/tree.c
gcc/tree.def

index f262443..071e383 100644 (file)
@@ -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.  */
index 4d65da5..16f42b9 100644 (file)
@@ -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;
        }
     }
 
index efd0af3..e6dade4 100644 (file)
@@ -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)