re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pur...
authorJan Hubicka <hubicka@ucw.cz>
Tue, 5 Apr 2016 20:58:56 +0000 (22:58 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 5 Apr 2016 20:58:56 +0000 (20:58 +0000)
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

gcc/ChangeLog
gcc/ipa-devirt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/devirt-51.C

index df63cc59b8d104d10e0c349eef30601a98299be6..e9f5b1e89737bea8ab67eba92f3632d7cccfc3fb 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        PR rtl-optimization/70542
index 22ece9f76afcd4a305c91f1c046f6a27bba28fce..2cf018bdf39f31d334cbca530c3e0d11d6bca5ae 100644 (file)
@@ -2438,9 +2438,9 @@ maybe_record_node (vec <cgraph_node *> &nodes,
     {
       gcc_assert (!target_node->global.inlined_to);
       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.  */
-      if (flag_sanitize & SANITIZE_UNDEFINED)
+      if (flag_sanitize & SANITIZE_UNREACHABLE)
        ;
       /* Only add pure virtual if it is the only possible target.  This way
         we will preserve the diagnostics about pure virtual called in many
index ab6935c72fb1b183c978c1204f7d311c89598bf2..f121683b0850b69b855672546d2130dca753b65d 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        PR rtl-optimization/70542
index fadf9e2e089f06b450bdf02d444f8d6d844ca7c6..236635af23ef4968b77c835b64f37b4f513fa2ac 100644 (file)
@@ -2,7 +2,7 @@
    variant.  Either keeping virtual call or optimizing to cxa_pure_virtual
    is fine.  */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fsanitize=undefined -fdump-tree-optimized"  } */
+/* { dg-options "-O2 -fsanitize=unreachable -fdump-tree-optimized"  } */
 namespace {
   struct B {
         B* self;