From 72df5daa5cffef2fb58bcf5cfd2d35f1bf923156 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 3 Jan 2018 19:01:15 +0000 Subject: [PATCH] Fix warning in gcc.dg/plugin/expensive_selftests_plugin.c with !CHECKING_P 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 | 9 +++++++++ gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c | 2 +- gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7777ee5e478..503a8397ab6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2018-01-03 David Malcolm + + 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 PR middle-end/83654 diff --git a/gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c b/gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c index e46411700fa..64f168df3ae 100644 --- a/gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c +++ b/gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c @@ -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" } */ diff --git a/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c b/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c index 94707644101..a7c67284d3c 100644 --- a/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c +++ b/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c @@ -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; } -- 2.30.2