Commit 48d1f31d by Jan Hubicka Committed by Jan Hubicka

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
parent d3d684c6
2018-11-20 Jan Hubicka <hubicka@ucw.cz>
PR lto/84044
* ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
compare ENUM values.
2018-11-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87895
......@@ -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"
......
2018-11-20 Jan Hubicka <hubicka@ucw.cz>
PR lto/84044
* g++.dg/lto/odr-4_0.C: New testcase.
* g++.dg/lto/odr-4_1.C: New testcase.
2018-11-20 Jakub Jelinek <jakub@redhat.com>
PR c++/88110
......
// { dg-lto-do link }
// { dg-lto-options { -O2 -flto } }
struct B {
enum class E { V0, V1 };
virtual ~B();
E e;
};
B b;
int main() {}
struct B {
enum class E { V0, V1 };
virtual ~B();
E e;
};
B::~B() = default;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment