From patchwork Wed Jan 3 19:14:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 855188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-470095-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="g3QgU5a/"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zBgVj2SF3z9s83 for ; Thu, 4 Jan 2018 06:10:21 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=XC6XhWwneInIvsCOVuYayHvx0xpXygte0Kzzz0rHvYjZ24nl76NzT tiA5KAcb95GdOtxKcv+0p5vjJovMpRofxBKRU4yLyLsvxC8ZlziEVJKqsSXRx824 zstePRZiZHXrVEqP9jMMGkJB1sC5qdcdb+Npo5yptqS4CaKFcUILGU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=oyE8w4lRjK3ZWSnVABE2izd9K50=; b=g3QgU5a/FYGL3zzjg6GD Qrfhd90XAQjRptZfoMwr0ZdBiR36O5Er2048A/93rr0BbgoxEqeYwT9IcCg1rP7M iSRzw5rlQIKjn3w8Sp3iSRldSopeO1c1O+QQrYnQGUqchC4Zv2VyIcwq9tx/7AdE TYceWTlLcRxoK7DmabCASvs= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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, 3 Jan 2018 14:14:06 -0500 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 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; }