+2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR lto/84805
+ * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
+ incomplete types.
+
2018-03-13 Martin Liska <mliska@suse.cz>
PR ipa/84658.
gcc_assert (!TYPE_BINFO (type));
}
-/* Compare T2 and T2 based on name or structure. */
+/* Compare T1 and T2 based on name or structure. */
static bool
odr_subtypes_equivalent_p (tree t1, tree t2,
return false;
/* For ODR types be sure to compare their names.
- To support -wno-odr-type-merging we allow one type to be non-ODR
+ To support -Wno-odr-type-merging we allow one type to be non-ODR
and other ODR even though it is a violation. */
if (types_odr_comparable (t1, t2, true))
{
therefore which call will report the ODR violation, if any. */
if (!odr_type_p (t1)
|| !odr_type_p (t2)
+ || !COMPLETE_TYPE_P (t1)
+ || !COMPLETE_TYPE_P (t2)
|| (!get_odr_type (t1, true)->odr_violated
&& !get_odr_type (t2, true)->odr_violated))
return true;