===================================================================
@@ -592,6 +592,10 @@ #define POINTER_TYPE_P(TYPE) \
#define FUNCTION_POINTER_TYPE_P(TYPE) \
(POINTER_TYPE_P (TYPE) && TREE_CODE (TREE_TYPE (TYPE)) == FUNCTION_TYPE)
+/* Nonzero if this type is "definite"; that is, if we have enough information
+ to create objects of that type. The type might be sized or sizeless. */
+#define DEFINITE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE)
+
/* Nonzero if this type is a complete type. */
#define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE)
@@ -5796,12 +5800,12 @@ type_with_alias_set_p (const_tree t)
if (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE)
return false;
- if (COMPLETE_TYPE_P (t))
+ if (DEFINITE_TYPE_P (t))
return true;
/* Incomplete types can not be accessed in general except for arrays
where we can fetch its element despite we have no array bounds. */
- if (TREE_CODE (t) == ARRAY_TYPE && COMPLETE_TYPE_P (TREE_TYPE (t)))
+ if (TREE_CODE (t) == ARRAY_TYPE && DEFINITE_TYPE_P (TREE_TYPE (t)))
return true;
return false;
===================================================================
@@ -922,15 +922,15 @@ get_alias_set (tree t)
if (TYPE_ALIAS_SET_KNOWN_P (t))
return TYPE_ALIAS_SET (t);
- /* We don't want to set TYPE_ALIAS_SET for incomplete types. */
- if (!COMPLETE_TYPE_P (t))
+ /* We don't want to set TYPE_ALIAS_SET for indefinite types. */
+ if (!DEFINITE_TYPE_P (t))
{
/* For arrays with unknown size the conservative answer is the
alias set of the element type. */
if (TREE_CODE (t) == ARRAY_TYPE)
return get_alias_set (TREE_TYPE (t));
- /* But return zero as a conservative answer for incomplete types. */
+ /* But return zero as a conservative answer for indefinite types. */
return 0;
}
@@ -1006,7 +1006,7 @@ get_alias_set (tree t)
for (p = t; POINTER_TYPE_P (p)
|| (TREE_CODE (p) == ARRAY_TYPE
&& (!TYPE_NONALIASED_COMPONENT (p)
- || !COMPLETE_TYPE_P (p)
+ || !DEFINITE_TYPE_P (p)
|| TYPE_STRUCTURAL_EQUALITY_P (p)))
|| TREE_CODE (p) == VECTOR_TYPE;
p = TREE_TYPE (p))
===================================================================
@@ -1950,7 +1950,7 @@ initialize_argument_information (int num
machine_mode mode;
/* Replace erroneous argument with constant zero. */
- if (type == error_mark_node || !COMPLETE_TYPE_P (type))
+ if (type == error_mark_node || !DEFINITE_TYPE_P (type))
args[i].tree_value = integer_zero_node, type = integer_type_node;
/* If TYPE is a transparent union or record, pass things the way
===================================================================
@@ -200,7 +200,7 @@ gen_stdcall_or_fastcall_suffix (tree dec
HOST_WIDE_INT parm_size;
HOST_WIDE_INT parm_boundary_bytes = PARM_BOUNDARY / BITS_PER_UNIT;
- if (! COMPLETE_TYPE_P (arg))
+ if (! DEFINITE_TYPE_P (arg))
break;
parm_size = int_size_in_bytes (arg);
===================================================================
@@ -521,9 +521,9 @@ convert_to_integer_1 (tree type, tree ex
unsigned int outprec = element_precision (type);
location_t loc = EXPR_LOCATION (expr);
- /* An INTEGER_TYPE cannot be incomplete, but an ENUMERAL_TYPE can
- be. Consider `enum E = { a, b = (enum E) 3 };'. */
- if (!COMPLETE_TYPE_P (type))
+ /* An INTEGER_TYPE cannot be indefinite (incomplete), but an
+ ENUMERAL_TYPE can be. Consider `enum E = { a, b = (enum E) 3 };'. */
+ if (!DEFINITE_TYPE_P (type))
{
error ("conversion to incomplete type");
return error_mark_node;
===================================================================
@@ -1881,7 +1881,7 @@ dbxout_type (tree type, int full)
and either that's all we want or that's the best we could do,
don't repeat the cross reference.
Sun dbx crashes if we do. */
- if (! full || !COMPLETE_TYPE_P (type)
+ if (! full || !DEFINITE_TYPE_P (type)
/* No way in DBX fmt to describe a variable size. */
|| ! tree_fits_uhwi_p (TYPE_SIZE (type)))
return;
@@ -1906,7 +1906,7 @@ dbxout_type (tree type, int full)
&& ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& DECL_IGNORED_P (TYPE_NAME (type)))
&& !full)
- || !COMPLETE_TYPE_P (type)
+ || !DEFINITE_TYPE_P (type)
/* No way in DBX fmt to describe a variable size. */
|| ! tree_fits_uhwi_p (TYPE_SIZE (type)))
{
@@ -2164,7 +2164,7 @@ dbxout_type (tree type, int full)
&& ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& DECL_IGNORED_P (TYPE_NAME (type)))
&& !full)
- || !COMPLETE_TYPE_P (type)
+ || !DEFINITE_TYPE_P (type)
/* No way in DBX fmt to describe a variable size. */
|| ! tree_fits_uhwi_p (TYPE_SIZE (type)))
{
@@ -2289,7 +2289,7 @@ dbxout_type (tree type, int full)
&& ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& DECL_IGNORED_P (TYPE_NAME (type)))
&& !full)
- || !COMPLETE_TYPE_P (type))
+ || !DEFINITE_TYPE_P (type))
{
stabstr_S ("xe");
dbxout_type_name (type);
@@ -2815,7 +2815,7 @@ dbxout_symbol (tree decl, int local ATTR
from explicit ones that might be found in C. */
&& DECL_ARTIFICIAL (decl)
/* Do not generate a tag for incomplete records. */
- && COMPLETE_TYPE_P (type)
+ && DEFINITE_TYPE_P (type)
/* Do not generate a tag for records of variable size,
since this type can not be properly described in the
DBX format, and it confuses some tools such as objdump. */
@@ -2864,13 +2864,13 @@ dbxout_symbol (tree decl, int local ATTR
did_output = 1;
}
- /* Don't output a tag if this is an incomplete type. This prevents
- the sun4 Sun OS 4.x dbx from crashing. */
+ /* Don't output a tag if this is an indefinite (incomplete) type.
+ This prevents the sun4 Sun OS 4.x dbx from crashing. */
if (tag_needed && TYPE_NAME (type) != 0
&& (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE
|| (DECL_NAME (TYPE_NAME (type)) != 0))
- && COMPLETE_TYPE_P (type)
+ && DEFINITE_TYPE_P (type)
&& !TREE_ASM_WRITTEN (TYPE_NAME (type)))
{
/* For a TYPE_DECL with no name, but the type has a name,
===================================================================
@@ -11306,7 +11306,7 @@ add_pubtype (tree decl, dw_die_ref die)
if ((TREE_PUBLIC (decl)
|| is_cu_die (die->die_parent) || is_namespace_die (die->die_parent))
- && (die->die_tag == DW_TAG_typedef || COMPLETE_TYPE_P (decl)))
+ && (die->die_tag == DW_TAG_typedef || DEFINITE_TYPE_P (decl)))
{
tree scope = NULL;
const char *scope_name = "";
@@ -13448,7 +13448,7 @@ gen_generic_params_dies (tree t)
dw_die_ref die = NULL;
int non_default;
- if (!t || (TYPE_P (t) && !COMPLETE_TYPE_P (t)))
+ if (!t || (TYPE_P (t) && !DEFINITE_TYPE_P (t)))
return;
if (TYPE_P (t))
@@ -20924,7 +20924,7 @@ add_subscript_info (dw_die_ref type_die,
{
if (upper)
add_bound_info (subrange_die, DW_AT_upper_bound, upper, NULL);
- else if ((is_c () || is_cxx ()) && COMPLETE_TYPE_P (type))
+ else if ((is_c () || is_cxx ()) && DEFINITE_TYPE_P (type))
/* Zero-length array. */
add_bound_info (subrange_die, DW_AT_count,
build_int_cst (TREE_TYPE (lower), 0), NULL);
@@ -27011,7 +27011,7 @@ gen_scheduled_generic_parms_dies (void)
return;
FOR_EACH_VEC_ELT (*generic_type_instances, i, t)
- if (COMPLETE_TYPE_P (t))
+ if (DEFINITE_TYPE_P (t))
gen_generic_params_dies (t);
generic_type_instances = NULL;
===================================================================
@@ -979,7 +979,7 @@ assign_temp (tree type_or_decl, int memo
/* Allocating temporaries of TREE_ADDRESSABLE type must be done in the front
end. See also create_tmp_var for the gimplification-time check. */
- gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
+ gcc_assert (!TREE_ADDRESSABLE (type) && DEFINITE_TYPE_P (type));
if (mode == BLKmode || memory_required)
{
===================================================================
@@ -476,7 +476,7 @@ create_tmp_var (tree type, const char *p
The processing for variable sizes is performed in gimple_add_tmp_var,
point at which it really matters and possibly reached via paths not going
through this function, e.g. after direct calls to create_tmp_var_raw. */
- gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
+ gcc_assert (!TREE_ADDRESSABLE (type) && DEFINITE_TYPE_P (type));
tmp_var = create_tmp_var_raw (type, prefix);
gimple_add_tmp_var (tmp_var);
===================================================================
@@ -12421,7 +12421,7 @@ gimplify_expr (tree *expr_p, gimple_seq
*expr_p = NULL;
}
- else if (COMPLETE_TYPE_P (TREE_TYPE (*expr_p))
+ else if (DEFINITE_TYPE_P (TREE_TYPE (*expr_p))
&& TYPE_MODE (TREE_TYPE (*expr_p)) != BLKmode)
{
/* Historically, the compiler has treated a bare reference
===================================================================
@@ -650,7 +650,7 @@ #define odr_types (*odr_types_ptr)
set_type_binfo (tree type, tree binfo)
{
for (; type; type = TYPE_NEXT_VARIANT (type))
- if (COMPLETE_TYPE_P (type))
+ if (DEFINITE_TYPE_P (type))
TYPE_BINFO (type) = binfo;
else
gcc_assert (!TYPE_BINFO (type));
@@ -1171,7 +1171,8 @@ warn_types_mismatch (tree t1, tree t2, l
if (TREE_CODE (t1) == TREE_CODE (t2))
{
if (TREE_CODE (t1) == ARRAY_TYPE
- && COMPLETE_TYPE_P (t1) && COMPLETE_TYPE_P (t2))
+ && DEFINITE_TYPE_P (t1)
+ && DEFINITE_TYPE_P (t2))
{
tree i1 = TYPE_DOMAIN (t1);
tree i2 = TYPE_DOMAIN (t2);
@@ -1513,7 +1514,7 @@ odr_types_equivalent_p (tree t1, tree t2
tree f1, f2;
/* For aggregate types, all the fields must be the same. */
- if (COMPLETE_TYPE_P (t1) && COMPLETE_TYPE_P (t2))
+ if (DEFINITE_TYPE_P (t1) && DEFINITE_TYPE_P (t2))
{
if (TYPE_BINFO (t1) && TYPE_BINFO (t2)
&& polymorphic_type_binfo_p (TYPE_BINFO (t1))
@@ -1641,7 +1642,8 @@ odr_types_equivalent_p (tree t1, tree t2
"is defined in another translation unit"));
return false;
}
- if (COMPLETE_TYPE_P (t1) && COMPLETE_TYPE_P (t2)
+ if (DEFINITE_TYPE_P (t1)
+ && DEFINITE_TYPE_P (t2)
&& TYPE_ALIGN (t1) != TYPE_ALIGN (t2))
{
warn_odr (t1, t2, NULL, NULL, warn, warned,
@@ -1698,12 +1700,12 @@ add_type_duplicate (odr_type val, tree t
build_bases = true;
}
/* Always prefer complete type to be the leader. */
- else if (!COMPLETE_TYPE_P (val->type) && COMPLETE_TYPE_P (type))
+ else if (!DEFINITE_TYPE_P (val->type) && DEFINITE_TYPE_P (type))
{
prevail = true;
build_bases = TYPE_BINFO (type);
}
- else if (COMPLETE_TYPE_P (val->type) && !COMPLETE_TYPE_P (type))
+ else if (DEFINITE_TYPE_P (val->type) && !DEFINITE_TYPE_P (type))
;
else if (TREE_CODE (val->type) == ENUMERAL_TYPE
&& TREE_CODE (type) == ENUMERAL_TYPE
@@ -1740,7 +1742,8 @@ add_type_duplicate (odr_type val, tree t
vec_safe_push (val->types, type);
/* If both are class types, compare the bases. */
- if (COMPLETE_TYPE_P (type) && COMPLETE_TYPE_P (val->type)
+ if (DEFINITE_TYPE_P (type)
+ && DEFINITE_TYPE_P (val->type)
&& TREE_CODE (val->type) == RECORD_TYPE
&& TREE_CODE (type) == RECORD_TYPE
&& TYPE_BINFO (val->type) && TYPE_BINFO (type))
@@ -1879,7 +1882,8 @@ add_type_duplicate (odr_type val, tree t
gcc_assert (val->odr_violated || !odr_must_violate);
/* Sanity check that all bases will be build same way again. */
if (flag_checking
- && COMPLETE_TYPE_P (type) && COMPLETE_TYPE_P (val->type)
+ && DEFINITE_TYPE_P (type)
+ && DEFINITE_TYPE_P (val->type)
&& TREE_CODE (val->type) == RECORD_TYPE
&& TREE_CODE (type) == RECORD_TYPE
&& TYPE_BINFO (val->type) && TYPE_BINFO (type)
@@ -2059,7 +2063,7 @@ get_odr_type (tree type, bool insert)
val->anonymous_namespace = type_in_anonymous_namespace_p (type);
else
val->anonymous_namespace = 0;
- build_bases = COMPLETE_TYPE_P (val->type);
+ build_bases = DEFINITE_TYPE_P (val->type);
insert_to_odr_array = true;
if (slot)
*slot = val;
===================================================================
@@ -1584,8 +1584,8 @@ sem_item::add_type (const_tree type, inc
}
else if (RECORD_OR_UNION_TYPE_P (type))
{
- /* Incomplete types must be skipped here. */
- if (!COMPLETE_TYPE_P (type))
+ /* Indefinite types must be skipped here. */
+ if (!DEFINITE_TYPE_P (type))
{
hstate.add_int (RECORD_TYPE);
return;
===================================================================
@@ -593,8 +593,8 @@ lhd_omp_firstprivatize_type_sizes (struc
bool
lhd_omp_mappable_type (tree type)
{
- /* Mappable type has to be complete. */
- if (type == error_mark_node || !COMPLETE_TYPE_P (type))
+ /* Mappable type has to be definite. */
+ if (type == error_mark_node || !DEFINITE_TYPE_P (type))
return false;
return true;
}
===================================================================
@@ -1023,7 +1023,7 @@ scan_sharing_clauses (tree clauses, omp_
break;
}
gcc_assert (is_taskreg_ctx (ctx));
- gcc_assert (!COMPLETE_TYPE_P (TREE_TYPE (decl))
+ gcc_assert (!DEFINITE_TYPE_P (TREE_TYPE (decl))
|| !is_variable_sized (decl));
/* Global variables don't need to be copied,
the receiver side will use them directly. */
@@ -1429,7 +1429,7 @@ scan_sharing_clauses (tree clauses, omp_
if ((OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
|| OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_POINTER)
&& TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
- && !COMPLETE_TYPE_P (TREE_TYPE (decl)))
+ && !DEFINITE_TYPE_P (TREE_TYPE (decl)))
{
tree new_decl = lookup_decl (decl, ctx);
TREE_TYPE (new_decl)
===================================================================
@@ -1424,7 +1424,7 @@ fully_constant_vn_reference_p (vn_refere
/* Simplify reads from constants or constant initializers. */
else if (BITS_PER_UNIT == 8
- && COMPLETE_TYPE_P (ref->type)
+ && DEFINITE_TYPE_P (ref->type)
&& is_gimple_reg_type (ref->type))
{
poly_int64 off = 0;
===================================================================
@@ -6523,7 +6523,8 @@ type_cache_hasher::equal (type_hash *a,
/* Be careful about comparing arrays before and after the element type
has been completed; don't compare TYPE_ALIGN unless both types are
complete. */
- if (COMPLETE_TYPE_P (a->type) && COMPLETE_TYPE_P (b->type)
+ if (DEFINITE_TYPE_P (a->type)
+ && DEFINITE_TYPE_P (b->type)
&& (TYPE_ALIGN (a->type) != TYPE_ALIGN (b->type)
|| TYPE_MODE (a->type) != TYPE_MODE (b->type)))
return 0;
@@ -8083,7 +8084,7 @@ build_function_type (tree value_type, tr
TYPE_CANONICAL (t) = build_function_type (TYPE_CANONICAL (value_type),
canon_argtypes);
- if (!COMPLETE_TYPE_P (t))
+ if (!DEFINITE_TYPE_P (t))
layout_type (t);
return t;
}
@@ -8242,7 +8243,7 @@ build_method_type_directly (tree basetyp
= build_method_type_directly (TYPE_CANONICAL (basetype),
TYPE_CANONICAL (rettype),
canon_argtypes);
- if (!COMPLETE_TYPE_P (t))
+ if (!DEFINITE_TYPE_P (t))
layout_type (t);
return t;
@@ -8282,7 +8283,7 @@ build_offset_type (tree basetype, tree t
hashval_t hash = type_hash_canon_hash (t);
t = type_hash_canon (hash, t);
- if (!COMPLETE_TYPE_P (t))
+ if (!DEFINITE_TYPE_P (t))
layout_type (t);
if (TYPE_CANONICAL (t) == t)
@@ -8328,7 +8329,7 @@ build_complex_type (tree component_type,
/* We created a new type. The hash insertion will have laid
out the type. We need to check the canonicalization and
maybe set the name. */
- gcc_checking_assert (COMPLETE_TYPE_P (t)
+ gcc_checking_assert (DEFINITE_TYPE_P (t)
&& !TYPE_NAME (t)
&& TYPE_CANONICAL (t) == t);
@@ -13216,12 +13217,12 @@ #define verify_variant_match(flag)
else
verify_variant_match (TYPE_SATURATING);
/* FIXME: This check trigger during libstdc++ build. */
- if (RECORD_OR_UNION_TYPE_P (t) && COMPLETE_TYPE_P (t) && 0)
+ if (RECORD_OR_UNION_TYPE_P (t) && DEFINITE_TYPE_P (t) && 0)
verify_variant_match (TYPE_FINAL_P);
/* tree_type_common checks. */
- if (COMPLETE_TYPE_P (t))
+ if (DEFINITE_TYPE_P (t))
{
verify_variant_match (TYPE_MODE);
if (TREE_CODE (TYPE_SIZE (t)) != PLACEHOLDER_EXPR
@@ -13274,7 +13275,7 @@ #define verify_variant_match(flag)
debug_tree (tv);
return false;
}
- if ((TREE_CODE (t) == ENUMERAL_TYPE && COMPLETE_TYPE_P (t))
+ if ((TREE_CODE (t) == ENUMERAL_TYPE && DEFINITE_TYPE_P (t))
|| TREE_CODE (t) == INTEGER_TYPE
|| TREE_CODE (t) == BOOLEAN_TYPE
|| TREE_CODE (t) == REAL_TYPE
@@ -13293,7 +13294,7 @@ #define verify_variant_match(flag)
or even type's main variant. This is needed to make bootstrap pass
and the bug seems new in GCC 5.
C++ FE should be updated to make this consistent and we should check
- that TYPE_BINFO is always NULL for !COMPLETE_TYPE_P and otherwise there
+ that TYPE_BINFO is always NULL for !DEFINITE_TYPE_P and otherwise there
is a match with main variant.
Also disable the check for Java for now because of parser hack that builds
@@ -13323,7 +13324,7 @@ #define verify_variant_match(flag)
/* Permit incomplete variants of complete type. While FEs may complete
all variants, this does not happen for C++ templates in all cases. */
else if (RECORD_OR_UNION_TYPE_P (t)
- && COMPLETE_TYPE_P (t)
+ && DEFINITE_TYPE_P (t)
&& TYPE_FIELDS (t) != TYPE_FIELDS (tv))
{
tree f1, f2;
@@ -13625,7 +13626,7 @@ gimple_canonical_types_compatible_p (con
/* Don't try to compare variants of an incomplete type, before
TYPE_FIELDS has been copied around. */
- if (!COMPLETE_TYPE_P (t1) && !COMPLETE_TYPE_P (t2))
+ if (!DEFINITE_TYPE_P (t1) && !DEFINITE_TYPE_P (t2))
return true;
@@ -13723,7 +13724,8 @@ verify_type (const_tree t)
error_found = true;
}
- if (COMPLETE_TYPE_P (t) && TYPE_CANONICAL (t)
+ if (DEFINITE_TYPE_P (t)
+ && TYPE_CANONICAL (t)
&& TYPE_MODE (t) != TYPE_MODE (TYPE_CANONICAL (t)))
{
error ("TYPE_MODE of TYPE_CANONICAL is not compatible");
@@ -13897,7 +13899,7 @@ verify_type (const_tree t)
}
else if (RECORD_OR_UNION_TYPE_P (t))
{
- if (TYPE_FIELDS (t) && !COMPLETE_TYPE_P (t) && in_lto_p)
+ if (TYPE_FIELDS (t) && !DEFINITE_TYPE_P (t) && in_lto_p)
{
error ("TYPE_FIELDS defined in incomplete type");
error_found = true;
===================================================================
@@ -2118,7 +2118,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
Var are also built later with the fields of the final type, the
aliasing machinery may consider that the accesses are distinct
if the FIELD_DECLs are distinct as objects. */
- if (COMPLETE_TYPE_P (gnu_fat_type))
+ if (DEFINITE_TYPE_P (gnu_fat_type))
{
tem = TYPE_FIELDS (gnu_fat_type);
TREE_TYPE (tem) = ptr_type_node;
===================================================================
@@ -2004,7 +2004,7 @@ build_simple_component_ref (tree record,
tree type = TYPE_MAIN_VARIANT (TREE_TYPE (record));
tree ref;
- gcc_assert (RECORD_OR_UNION_TYPE_P (type) && COMPLETE_TYPE_P (type));
+ gcc_assert (RECORD_OR_UNION_TYPE_P (type) && DEFINITE_TYPE_P (type));
/* Try to fold a conversion from another record or union type unless the type
contains a placeholder as it might be needed for a later substitution. */
===================================================================
@@ -1059,7 +1059,7 @@ gfc_build_qualified_array (tree decl, gf
type = TREE_TYPE (type);
}
- if (! COMPLETE_TYPE_P (type) && GFC_TYPE_ARRAY_SIZE (type))
+ if (!DEFINITE_TYPE_P (type) && GFC_TYPE_ARRAY_SIZE (type))
{
tree size, range;
@@ -2542,7 +2542,7 @@ create_function_arglist (gfc_symbol * sy
&& TREE_CODE (type) == POINTER_TYPE
&& GFC_ARRAY_TYPE_P (type)
&& f->sym->as->type != AS_ASSUMED_SIZE
- && ! COMPLETE_TYPE_P (TREE_TYPE (type)))
+ && !DEFINITE_TYPE_P (TREE_TYPE (type)))
{
if (f->sym->attr.flavor == FL_PROCEDURE)
type = build_pointer_type (gfc_get_function_type (f->sym));
===================================================================
@@ -787,8 +787,8 @@ lto_symtab_merge_decls_1 (symtab_node *f
{
for (e = prevailing->next_sharing_asm_name;
e; e = e->next_sharing_asm_name)
- if (!COMPLETE_TYPE_P (TREE_TYPE (prevailing->decl))
- && COMPLETE_TYPE_P (TREE_TYPE (e->decl))
+ if (!DEFINITE_TYPE_P (TREE_TYPE (prevailing->decl))
+ && DEFINITE_TYPE_P (TREE_TYPE (e->decl))
&& lto_symtab_symbol_p (e))
prevailing = e;
}