OSDN Git Service

PR c/43893
[pf3gnuchains/gcc-fork.git] / gcc / varasm.c
index 35b65a9..fc0eb8a 100644 (file)
@@ -2802,11 +2802,6 @@ decode_addr_const (tree exp, struct addr_const *value)
                     * tree_low_cst (TREE_OPERAND (target, 1), 0));
          target = TREE_OPERAND (target, 0);
        }
-      else if (TREE_CODE (target) == INDIRECT_REF
-              && TREE_CODE (TREE_OPERAND (target, 0)) == NOP_EXPR
-              && TREE_CODE (TREE_OPERAND (TREE_OPERAND (target, 0), 0))
-                 == ADDR_EXPR)
-       target = TREE_OPERAND (TREE_OPERAND (TREE_OPERAND (target, 0), 0), 0);
       else
        break;
     }
@@ -2899,18 +2894,6 @@ const_hash_1 (const tree exp)
       return (const_hash_1 (TREE_REALPART (exp)) * 5
              + const_hash_1 (TREE_IMAGPART (exp)));
 
-    case VECTOR_CST:
-      {
-       tree link;
-
-       hi = 7 + TYPE_VECTOR_SUBPARTS (TREE_TYPE (exp));
-
-       for (link = TREE_VECTOR_CST_ELTS (exp); link; link = TREE_CHAIN (link))
-           hi = hi * 563 + const_hash_1 (TREE_VALUE (link));
-
-       return hi;
-      }
-
     case CONSTRUCTOR:
       {
        unsigned HOST_WIDE_INT idx;
@@ -3039,27 +3022,6 @@ compare_constant (const tree t1, const tree t2)
       return (compare_constant (TREE_REALPART (t1), TREE_REALPART (t2))
              && compare_constant (TREE_IMAGPART (t1), TREE_IMAGPART (t2)));
 
-    case VECTOR_CST:
-      {
-        tree link1, link2;
-
-        if (TYPE_VECTOR_SUBPARTS (TREE_TYPE (t1))
-           != TYPE_VECTOR_SUBPARTS (TREE_TYPE (t2)))
-         return 0;
-
-       link2 = TREE_VECTOR_CST_ELTS (t2);
-       for (link1 = TREE_VECTOR_CST_ELTS (t1);
-            link1;
-            link1 = TREE_CHAIN (link1))
-         {
-           if (!compare_constant (TREE_VALUE (link1), TREE_VALUE (link2)))
-             return 0;
-           link2 = TREE_CHAIN (link2);
-         }
-       
-       return 1;
-      }
-
     case CONSTRUCTOR:
       {
        VEC(constructor_elt, gc) *v1, *v2;
@@ -3120,34 +3082,11 @@ compare_constant (const tree t1, const tree t2)
     case FDESC_EXPR:
       {
        struct addr_const value1, value2;
-       enum rtx_code code;
-       int ret;
 
        decode_addr_const (t1, &value1);
        decode_addr_const (t2, &value2);
-
-       if (value1.offset != value2.offset)
-         return 0;
-
-       code = GET_CODE (value1.base);
-       if (code != GET_CODE (value2.base))
-         return 0;
-
-       switch (code)
-         {
-         case SYMBOL_REF:
-           ret = (strcmp (XSTR (value1.base, 0), XSTR (value2.base, 0)) == 0);
-           break;
-
-         case LABEL_REF:
-           ret = (CODE_LABEL_NUMBER (XEXP (value1.base, 0))
-                  == CODE_LABEL_NUMBER (XEXP (value2.base, 0)));
-           break;
-
-         default:
-           gcc_unreachable ();
-         }
-       return ret;
+       return (value1.offset == value2.offset
+               && strcmp (XSTR (value1.base, 0), XSTR (value2.base, 0)) == 0);
       }
 
     case PLUS_EXPR:
@@ -3208,10 +3147,6 @@ copy_constant (tree exp)
       return build1 (TREE_CODE (exp), TREE_TYPE (exp),
                     copy_constant (TREE_OPERAND (exp, 0)));
 
-    case VECTOR_CST:
-      return build_vector (TREE_TYPE (exp),
-                          copy_list (TREE_VECTOR_CST_ELTS (exp)));
-
     case CONSTRUCTOR:
       {
        tree copy = copy_node (exp);