https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84044
--- Comment #11 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Warning from #9 is caused by fact that I compare pointers rather than test for equality so when the enums are not merged, they triggers the warning even if the values are in fact equivalent. The following silences the warning but enums should be really merged here, so I need to look into why. Concerning the original bug I believe it was fixed a while ago when we cleaned up the BINFO streaming. Index: ipa-devirt.c =================================================================== --- ipa-devirt.c (revision 266325) +++ ipa-devirt.c (working copy) @@ -1343,7 +1343,7 @@ odr_types_equivalent_p (tree t1, tree t2 " is defined in another translation unit")); return false; } - if (TREE_VALUE (v1) != TREE_VALUE (v2)) + if (!operand_equal_p (TREE_VALUE (v1), TREE_VALUE (v2), 0)) { warn_odr (t1, t2, NULL, NULL, warn, warned, G_("an enum with different values is defined"