]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix warning in gcc.dg/plugin/expensive_selftests_plugin.c with !CHECKING_P
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 3 Jan 2018 19:01:15 +0000 (19:01 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 3 Jan 2018 19:01:15 +0000 (19:01 +0000)
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/expensive-selftests-1.c: Update regexp to handle
the !CHECKING_P case by expecting a note.
* gcc.dg/plugin/expensive_selftests_plugin.c (plugin_init): Issue
a note for the !CHECKING_P case, and move the return statement
outside of #if CHECKING_P guard.

From-SVN: r256183

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c
gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c

index 7777ee5e478440d91a295596734186b7b214ea0a..503a8397ab6ff08536674c7ed8531b572028be5e 100644 (file)
@@ -1,3 +1,12 @@
+2018-01-03  David Malcolm  <dmalcolm@redhat.com>
+
+       PR c/82050
+       * gcc.dg/plugin/expensive-selftests-1.c: Update regexp to handle
+       the !CHECKING_P case by expecting a note.
+       * gcc.dg/plugin/expensive_selftests_plugin.c (plugin_init): Issue
+       a note for the !CHECKING_P case, and move the return statement
+       outside of #if CHECKING_P guard.
+
 2018-01-03  Jeff Law  <law@redhat.com>
 
        PR middle-end/83654
index e46411700fa65f6628adcf47dfe68925f727f42a..64f168df3aee5a81a77acd29835e9743ad4f469c 100644 (file)
@@ -1,3 +1,3 @@
 int not_empty;
 
-/* { dg-regexp "expensive_selftests_plugin: .* pass\\(es\\) in .* seconds" } */
+/* { dg-regexp "expensive_selftests_plugin: .* pass\\(es\\) in .* seconds|not enabled in this build" } */
index 94707644101219701bf326f01045f23138a1349d..a7c67284d3c0a36a9488df621cbc4feb3bc91d91 100644 (file)
@@ -170,6 +170,8 @@ plugin_init (struct plugin_name_args *plugin_info,
                     PLUGIN_FINISH,
                     selftest::expensive_tests,
                     NULL); /* void *user_data */
-  return 0;
+#else
+  inform (UNKNOWN_LOCATION, "self-tests are not enabled in this build");
 #endif /* #if CHECKING_P */
+  return 0;
 }