summaryrefslogtreecommitdiff
path: root/gcc/ipa-devirt.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-11-21 03:38:43 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2018-11-21 02:38:43 +0000
commit48d1f31d1b7131e8f809ede8256e4f1eb6c5c3ae (patch)
treed9521deeb7ea397d51336ba8b4f0c535f582706b /gcc/ipa-devirt.c
parentd3d684c642943cb5a481fcc38e0ee46ee8b1223c (diff)
re PR lto/84044 (Spurious -Wodr warning with -flto)
PR lto/84044 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to compare ENUM values. * g++.dg/lto/odr-4_0.C: New testcase. * g++.dg/lto/odr-4_1.C: New testcase. From-SVN: r266334
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r--gcc/ipa-devirt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 229eebcb65f..b72789c72bb 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -1343,7 +1343,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned,
" 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"