From patchwork Sun Oct 24 13:31:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Sayle X-Patchwork-Id: 46573 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 638623857422 for ; Sun, 24 Oct 2021 13:31:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id 4E8F73858400 for ; Sun, 24 Oct 2021 13:31:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4E8F73858400 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rNclaMAE72EGi9K5fVQAa7uE/mxsa6DzJGR2/u3dynY=; b=V+PZEh7pPI4d2hRHBREtU433lm rBa5oshmM6bNtEnKH67iskT1V/soSo2t7sDJuGDB3N9UeZZwVWtnOIqoIH2e14d5sZPCN3ieeY+Lp h3BKQjTpk73oeK/TWyU674XG3W6Rqz7iSjVFADqktiqL5tit3fbMiWumktqG36WjlfOfHs9f1kgiI QplE8zP16o/uJ2P3NenQBbCwoGdwXA1WPNEWqGx69vRIKIyconDS9Lu93ZLpkmUqiBtieZ1+9MNpu NK7bOvU5JHlyuHd8OV5fHFbs1k2Mybh6FVQGCb14EiYdXht01CITaC/aP7v9EJpqKk6PP0qG3aY9U qevZaVVw==; Received: from [185.62.158.67] (port=51816 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1medan-0002Yh-J3 for gcc-patches@gcc.gnu.org; Sun, 24 Oct 2021 09:31:17 -0400 From: "Roger Sayle" To: "'GCC Patches'" Subject: [Committed] Correct testcase gcc.target/bfin/20090914-3.c Date: Sun, 24 Oct 2021 14:31:16 +0100 Message-ID: <007d01d7c8db$6cea81e0$46bf85a0$@nextmovesoftware.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdfI2sd1vHtyFeNoTXyRvx7B30HOGQ== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This patch cures the testsuite failure of bfin/20090914-3.c, which currently FAILs on bfin-elf with "(test for excess errors)" due to: 20090914-3.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int] which is obviously not what this code was intended to test. Fixed by turning the code into a function returning the final "fract32" result, as simply specifying an "int" return type for main, results in the entire function being optimized away, as the result is unused. Checked-in as obvious. 2021-10-24 Roger Sayle gcc/testsuite/ChangeLog * gcc.target/bfin/20090914-3.c: Tweak test case. Roger diff --git a/gcc/testsuite/gcc.target/bfin/20090914-3.c b/gcc/testsuite/gcc.target/bfin/20090914-3.c index fb0a9e1..6be5528 100644 --- a/gcc/testsuite/gcc.target/bfin/20090914-3.c +++ b/gcc/testsuite/gcc.target/bfin/20090914-3.c @@ -1,10 +1,11 @@ /* { dg-do compile { target bfin-*-* } } */ typedef long fract32; -main() { +fract32 foo() { fract32 val_tmp; fract32 val1 = 0x7FFFFFFF; fract32 val2 = 0x40000000; val_tmp = __builtin_bfin_mult_fr1x32x32 (0x06666667, val1); val2 = __builtin_bfin_mult_fr1x32x32 (0x79999999, val2); val2 = __builtin_bfin_add_fr1x32 (val_tmp, val2); + return val2; }