Disallow -fvtable-verify and -flto to be used together.
authorCaroline Tice <cmtice@google.com>
Wed, 4 Sep 2019 22:33:27 +0000 (15:33 -0700)
committerCaroline Tice <ctice@gcc.gnu.org>
Wed, 4 Sep 2019 22:33:27 +0000 (15:33 -0700)
Vtable verification currently does not work properly with
link time optimization.  Until this can be fixed users should
not be allowed to specify both options together.

2019-09-04  Caroline Tice  <cmtice@google.com>

        *  opts.c (finish_options):  Disallow -fvtable-verify and -flto to be
           specified together.

From-SVN: r275388

gcc/ChangeLog
gcc/opts.c

index 0f4b61da6b826107dd6c310aa43aef8601811643..f620ffd9a2949b9a1a5f95e0aa293900b9b53d3e 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-04  Caroline Tice  <cmtice@google.com>
+
+       * opts.c (finish_options): Disallow -fvtable-verify and -flto to be
+       specified together.
+
 2019-09-04  Marek Polacek  <polacek@redhat.com>
 
        * doc/invoke.texi: Remove -fdeduce-init-list documentation.
index 1417dba8e4ca1eac5730ad8a15cc3dde20e38bf9..07f701c26a544c4a68ec561c08364d9f69b8e093 100644 (file)
@@ -1226,6 +1226,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
   if (opts->x_flag_live_patching && opts->x_flag_lto)
     sorry ("live patching is not supported with LTO");
 
+  /* Currently vtable verification is not supported for LTO */
+  if (opts->x_flag_vtable_verify && opts->x_flag_lto)
+    sorry ("vtable verification is not supported with LTO");
+
   /* Control IPA optimizations based on different -flive-patching level.  */
   if (opts->x_flag_live_patching)
     {