]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/gimple.c
Merge in trunk.
[thirdparty/gcc.git] / gcc / gimple.c
index 55dd09106bba595155ca22f6caa03bbf442211e7..bd69fa647ec9ce69fa6aee9fb812696d7e669d79 100644 (file)
@@ -2684,16 +2684,16 @@ gimple_compare_field_offset (tree f1, tree f2)
   /* Fortran and C do not always agree on what DECL_OFFSET_ALIGN
      should be, so handle differing ones specially by decomposing
      the offset into a byte and bit offset manually.  */
-  if (host_integerp (DECL_FIELD_OFFSET (f1), 0)
-      && host_integerp (DECL_FIELD_OFFSET (f2), 0))
+  if (tree_fits_shwi_p (DECL_FIELD_OFFSET (f1))
+      && tree_fits_shwi_p (DECL_FIELD_OFFSET (f2)))
     {
       unsigned HOST_WIDE_INT byte_offset1, byte_offset2;
       unsigned HOST_WIDE_INT bit_offset1, bit_offset2;
-      bit_offset1 = TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (f1));
-      byte_offset1 = (TREE_INT_CST_LOW (DECL_FIELD_OFFSET (f1))
+      bit_offset1 = tree_to_hwi (DECL_FIELD_BIT_OFFSET (f1));
+      byte_offset1 = (tree_to_hwi (DECL_FIELD_OFFSET (f1))
                      + bit_offset1 / BITS_PER_UNIT);
-      bit_offset2 = TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (f2));
-      byte_offset2 = (TREE_INT_CST_LOW (DECL_FIELD_OFFSET (f2))
+      bit_offset2 = tree_to_hwi (DECL_FIELD_BIT_OFFSET (f2));
+      byte_offset2 = (tree_to_hwi (DECL_FIELD_OFFSET (f2))
                      + bit_offset2 / BITS_PER_UNIT);
       if (byte_offset1 != byte_offset2)
        return false;