line. */
SET_TYPE_MODE (type, BLKmode);
- if (! tree_fits_uhwi_p (TYPE_SIZE (type)))
+ poly_uint64 type_size;
+ if (!poly_int_tree_p (TYPE_SIZE (type), &type_size))
return;
/* A record which has any BLKmode members must itself be
if (TREE_CODE (field) != FIELD_DECL)
continue;
+ poly_uint64 field_size;
if (TREE_CODE (TREE_TYPE (field)) == ERROR_MARK
|| (TYPE_MODE (TREE_TYPE (field)) == BLKmode
&& ! TYPE_NO_FORCE_BLK (TREE_TYPE (field))
&& !(TYPE_SIZE (TREE_TYPE (field)) != 0
&& integer_zerop (TYPE_SIZE (TREE_TYPE (field)))))
- || ! tree_fits_uhwi_p (bit_position (field))
+ || !tree_fits_poly_uint64_p (bit_position (field))
|| DECL_SIZE (field) == 0
- || ! tree_fits_uhwi_p (DECL_SIZE (field)))
+ || !poly_int_tree_p (DECL_SIZE (field), &field_size))
return;
/* If this field is the whole struct, remember its mode so
that, say, we can put a double in a class into a DF
register instead of forcing it to live in the stack. */
- if (simple_cst_equal (TYPE_SIZE (type), DECL_SIZE (field))
+ if (known_eq (field_size, type_size)
/* Partial int types (e.g. __int20) may have TYPE_SIZE equal to
wider types (e.g. int32), despite precision being less. Ensure
that the TYPE_MODE of the struct does not get set to the partial
For UNION_TYPE, if the widest field is MODE_INT then use that mode.
If the widest field is MODE_PARTIAL_INT, and the union will be passed
by reference, then use that mode. */
- poly_uint64 type_size;
if ((TREE_CODE (type) == RECORD_TYPE
|| (TREE_CODE (type) == UNION_TYPE
&& (GET_MODE_CLASS (mode) == MODE_INT
(pack_cumulative_args (0),
function_arg_info (type, mode, /*named=*/false)))))))
&& mode != VOIDmode
- && poly_int_tree_p (TYPE_SIZE (type), &type_size)
&& known_eq (GET_MODE_BITSIZE (mode), type_size))
;
else