Commit 84278ed9 by Jan Hubicka Committed by Jan Hubicka

re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pure_virtual)


	PR ipa/66223
	* ipa-devirt.c (maybe_record_node): Fix comment; use
	SANITIZE_UNREACHABLE instead of SANITIZE_UNDEFINED.

	* g++.dg/ipa/devirt-51.C: Use -fsanitize=unreachable.

From-SVN: r234762
parent d2aee115
2016-04-05 Jan Hubicka <hubicka@ucw.cz>
PR ipa/66223
* ipa-devirt.c (maybe_record_node): Fix comment; use
SANITIZE_UNREACHABLE instead of SANITIZE_UNDEFINED.
2016-04-05 Jakub Jelinek <jakub@redhat.com> 2016-04-05 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/70542 PR rtl-optimization/70542
......
...@@ -2438,9 +2438,9 @@ maybe_record_node (vec <cgraph_node *> &nodes, ...@@ -2438,9 +2438,9 @@ maybe_record_node (vec <cgraph_node *> &nodes,
{ {
gcc_assert (!target_node->global.inlined_to); gcc_assert (!target_node->global.inlined_to);
gcc_assert (target_node->real_symbol_p ()); gcc_assert (target_node->real_symbol_p ());
/* When sanitizing, do not asume that cxa_pure_virutal is not called /* When sanitizing, do not assume that __cxa_pure_virtual is not called
by valid program. */ by valid program. */
if (flag_sanitize & SANITIZE_UNDEFINED) if (flag_sanitize & SANITIZE_UNREACHABLE)
; ;
/* Only add pure virtual if it is the only possible target. This way /* Only add pure virtual if it is the only possible target. This way
we will preserve the diagnostics about pure virtual called in many we will preserve the diagnostics about pure virtual called in many
......
2016-04-05 Jan Hubicka <hubicka@ucw.cz>
PR ipa/66223
* g++.dg/ipa/devirt-51.C: Use -fsanitize=unreachable.
2016-04-05 Jakub Jelinek <jakub@redhat.com> 2016-04-05 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/70542 PR rtl-optimization/70542
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
variant. Either keeping virtual call or optimizing to cxa_pure_virtual variant. Either keeping virtual call or optimizing to cxa_pure_virtual
is fine. */ is fine. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fsanitize=undefined -fdump-tree-optimized" } */ /* { dg-options "-O2 -fsanitize=unreachable -fdump-tree-optimized" } */
namespace { namespace {
struct B { struct B {
B* self; B* self;
......
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