===================================================================
@@ -2039,7 +2039,7 @@ initialize_argument_information (int num
function being called. */
rtx copy;
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE_UNIT (type)
|| TREE_CODE (TYPE_SIZE_UNIT (type)) != INTEGER_CST
|| (flag_stack_check == GENERIC_STACK_CHECK
&& compare_tree_int (TYPE_SIZE_UNIT (type),
===================================================================
@@ -13000,7 +13000,7 @@ aapcs_vfp_sub_candidate (const_tree type
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -13033,7 +13033,7 @@ aapcs_vfp_sub_candidate (const_tree type
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -13066,7 +13066,7 @@ aapcs_vfp_sub_candidate (const_tree type
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
===================================================================
@@ -5927,7 +5927,7 @@ aapcs_vfp_sub_candidate (const_tree type
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -5960,7 +5960,7 @@ aapcs_vfp_sub_candidate (const_tree type
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -5993,7 +5993,7 @@ aapcs_vfp_sub_candidate (const_tree type
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
===================================================================
@@ -11540,7 +11540,7 @@ rs6000_aggregate_candidate (const_tree t
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -11573,7 +11573,7 @@ rs6000_aggregate_candidate (const_tree t
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -11606,7 +11606,7 @@ rs6000_aggregate_candidate (const_tree t
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
===================================================================
@@ -2290,7 +2290,7 @@ riscv_flatten_aggregate_field (const_tre
{
case RECORD_TYPE:
/* Can't handle incomplete types nor sizes that are not fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
|| !tree_fits_uhwi_p (TYPE_SIZE (type)))
return -1;
@@ -2319,7 +2319,7 @@ riscv_flatten_aggregate_field (const_tre
/* Can't handle incomplete types nor sizes that are not fixed. */
if (n_subfields <= 0
- || !COMPLETE_TYPE_P (type)
+ || !TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
|| !index
|| !TYPE_MAX_VALUE (index)
===================================================================
@@ -10386,7 +10386,7 @@ rs6000_aggregate_candidate (const_tree t
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -10419,7 +10419,7 @@ rs6000_aggregate_candidate (const_tree t
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
@@ -10452,7 +10452,7 @@ rs6000_aggregate_candidate (const_tree t
/* Can't handle incomplete types nor sizes that are not
fixed. */
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
===================================================================
@@ -5300,7 +5300,7 @@ expand_assignment (tree to, tree from, b
needs to be done. Handling this in the normal way is safe because no
computation is done before the call. The same is true for SSA names. */
if (TREE_CODE (from) == CALL_EXPR && ! aggregate_value_p (from, from)
- && COMPLETE_TYPE_P (TREE_TYPE (from))
+ && TYPE_SIZE (TREE_TYPE (from))
&& TREE_CODE (TYPE_SIZE (TREE_TYPE (from))) == INTEGER_CST
&& ! (((VAR_P (to)
|| TREE_CODE (to) == PARM_DECL
@@ -7518,7 +7518,9 @@ safe_from_p (const_rtx x, tree exp, int
So we assume here that something at a higher level has prevented a
clash. This is somewhat bogus, but the best we can do. Only
do this when X is BLKmode and when we are at the top level. */
- || (top_p && TREE_TYPE (exp) != 0 && COMPLETE_TYPE_P (TREE_TYPE (exp))
+ || (top_p
+ && TREE_TYPE (exp) != 0
+ && TYPE_SIZE (TREE_TYPE (exp))
&& TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) != INTEGER_CST
&& (TREE_CODE (TREE_TYPE (exp)) != ARRAY_TYPE
|| TYPE_ARRAY_MAX_SIZE (TREE_TYPE (exp)) == NULL_TREE
@@ -10523,7 +10525,7 @@ expand_expr_real_1 (tree exp, rtx target
orig_op0 = op0
= expand_expr_real (tem,
(TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
- && COMPLETE_TYPE_P (TREE_TYPE (tem))
+ && TYPE_SIZE (TREE_TYPE (tem))
&& (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
!= INTEGER_CST)
&& modifier != EXPAND_STACK_PARM
===================================================================
@@ -2487,8 +2487,8 @@ initialize_data_dependence_relation (str
}
/* Try to approach equal type sizes. */
- if (!COMPLETE_TYPE_P (type_a)
- || !COMPLETE_TYPE_P (type_b)
+ if (!TYPE_SIZE_UNIT (type_a)
+ || !TYPE_SIZE_UNIT (type_b)
|| !tree_fits_uhwi_p (TYPE_SIZE_UNIT (type_a))
|| !tree_fits_uhwi_p (TYPE_SIZE_UNIT (type_b)))
break;
===================================================================
@@ -1988,9 +1988,9 @@ maybe_add_sra_candidate (tree var)
reject (var, "is volatile");
return false;
}
- if (!COMPLETE_TYPE_P (type))
+ if (!TYPE_SIZE (type))
{
- reject (var, "has incomplete type");
+ reject (var, "type size unknown");
return false;
}
if (!tree_fits_uhwi_p (TYPE_SIZE (type)))
@@ -4176,7 +4176,7 @@ find_param_candidates (void)
else if (!AGGREGATE_TYPE_P (type))
continue;
- if (!COMPLETE_TYPE_P (type)
+ if (!TYPE_SIZE (type)
|| !tree_fits_uhwi_p (TYPE_SIZE (type))
|| tree_to_uhwi (TYPE_SIZE (type)) == 0
|| (AGGREGATE_TYPE_P (type)
===================================================================
@@ -1182,7 +1182,8 @@ indirect_ref_may_alias_decl_p (tree ref1
/* If the size of the access relevant for TBAA through the pointer
is bigger than the size of the decl we can't possibly access the
decl via that pointer. */
- if (DECL_SIZE (base2) && COMPLETE_TYPE_P (TREE_TYPE (ptrtype1))
+ if (DECL_SIZE (base2)
+ && TYPE_SIZE (TREE_TYPE (ptrtype1))
&& poly_int_tree_p (DECL_SIZE (base2))
&& poly_int_tree_p (TYPE_SIZE (TREE_TYPE (ptrtype1)))
/* ??? This in turn may run afoul when a decl of type T which is
===================================================================
@@ -4412,7 +4412,7 @@ vrp_prop::check_mem_ref (location_t loca
not known. */
tree reftype = TREE_TYPE (arg);
if (POINTER_TYPE_P (reftype)
- || !COMPLETE_TYPE_P (reftype)
+ || !TYPE_SIZE_UNIT (reftype)
|| TREE_CODE (TYPE_SIZE_UNIT (reftype)) != INTEGER_CST
|| RECORD_OR_UNION_TYPE_P (reftype))
return;
===================================================================
@@ -243,8 +243,8 @@ warn_type_compatibility_p (tree prevaili
/* We can not use types_compatible_p because we permit some changes
across types. For example unsigned size_t and "signed size_t" may be
compatible when merging C and Fortran types. */
- if (COMPLETE_TYPE_P (prevailing_type)
- && COMPLETE_TYPE_P (type)
+ if (TYPE_SIZE (type)
+ && TYPE_SIZE (prevailing_type)
/* While global declarations are never variadic, we can recurse here
for function parameter types. */
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST