From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1436 invoked by alias); 3 Jan 2018 19:10:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 130650 invoked by uid 89); 3 Jan 2018 19:10:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*i:sk:87o9mc9, H*f:sk:87o9mc9 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Jan 2018 19:10:12 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9595D61B9C; Wed, 3 Jan 2018 19:10:11 +0000 (UTC) Received: from c64.redhat.com (ovpn-112-35.phx2.redhat.com [10.3.112.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id A68CA5D9C8; Wed, 3 Jan 2018 19:10:10 +0000 (UTC) From: David Malcolm To: Andreas Schwab Cc: gcc-patches@gcc.gnu.org, David Malcolm Subject: [committed] Fix warning in gcc.dg/plugin/expensive_selftests_plugin.c with !CHECKING_P Date: Wed, 03 Jan 2018 19:10:00 -0000 Message-Id: <1515006846-51525-1-git-send-email-dmalcolm@redhat.com> In-Reply-To: <87o9mc9ffb.fsf@linux-m68k.org> References: <87o9mc9ffb.fsf@linux-m68k.org> X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00166.txt.bz2 On Tue, 2018-01-02 at 21:25 +0100, Andreas Schwab wrote: > /daten/gcc/gcc- > 20180101/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c:175 > :1: warning: no return statement in function returning non-void [- > Wreturn-type] > > Andreas. Thanks. I forgot to handle the --enable-checking=release case here; sorry. I've committed the following patch to trunk to fix this (as r256183), under the "obvious fixes" rule, borrowing the note from toplev::run_self_tests to give the dg-regexp something to look for for the !CHECKING_P case. Tested with and without --enable-checking=release. 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. --- gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c | 2 +- gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c b/gcc/testsuite/gcc.dg/plugin/expensive-selftests-1.c index e464117..64f168d 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 9470764..a7c6728 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; } -- 1.8.5.3