From patchwork Tue Dec 20 09:22:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Yong <10walls@gmail.com> X-Patchwork-Id: 1717736 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=NUFX7/Go; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NbrhG2y0Wz1ydb for ; Tue, 20 Dec 2022 20:22:33 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1BE283858D32 for ; Tue, 20 Dec 2022 09:22:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BE283858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671528146; bh=PDl/nbY6jrwRiwU6Ee5HETRo6NLF89g3E2xlZFwmyFw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=NUFX7/GosX0RqjuBRQimk+QtDSlKvwy5Fxqo4W8rMjwqUgLdqzfPo0A8RbUbHKz2a 5nbP9EA0tDJmlOGie6Jz7xgyEDutkjovzQ6KzF5SqxNur4hgvv4oSYZBGt5tRCHbIv 1bnEGC5+5JkXtjIsO1PkytnpY6kCvyRD2/6Bf8Xk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 6E6323858D1E for ; Tue, 20 Dec 2022 09:22:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6E6323858D1E Received: by mail-pj1-x1036.google.com with SMTP id k88-20020a17090a4ce100b00219d0b857bcso11527719pjh.1 for ; Tue, 20 Dec 2022 01:22:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PDl/nbY6jrwRiwU6Ee5HETRo6NLF89g3E2xlZFwmyFw=; b=DZIBhgm6g/nRyASS2u7jFvdo8+BlaHzA9/8cIi5aFrjR6eSstWbE8WQhqLsPZUGV4n em4P0voALOX332TZoDdp6tsZLCGsr021ukejJJM5+HzUK07IXeu+H8GBQ73xD4lrIUPv K3DOjfn+ZFPDOUeX/HBwCCfjhgNlW9a7QGvBTq3BlYvUfbCV7Ya6nWWqpxMf0rGhXmlF NYDYzBfuSNKKZ6Rr/DKDzAAZMhPILA36m0NWHTOW6OBKisx397HQEE0dZtp18CSGyonA t4p28mLYY7to81mkHyDWpOC2Mxj7Py/0x69ZHE50ej150IB0ZwGvaZeRA0jBSgnXse9c +2/Q== X-Gm-Message-State: ANoB5pkDwmfKDAyy1njAOCVRNdwCgIP19RSiDBSs3KvYlrqXkhO2FQs7 olbeexOQlFdlrHjY+Fi9bZJmVDLtIyE= X-Google-Smtp-Source: AA0mqf63/Eaeu6qIdpzmZouQ+8aMCFmZM2FLihJgiCAM2sn47t5x8D5VdPT9RCaz3eFtfjHmb+WnYw== X-Received: by 2002:a17:90a:ba0e:b0:210:ccdf:2952 with SMTP id s14-20020a17090aba0e00b00210ccdf2952mr47734998pjr.28.1671528123392; Tue, 20 Dec 2022 01:22:03 -0800 (PST) Received: from ?IPV6:2001:f40:91b::951? ([2001:f40:91b::951]) by smtp.gmail.com with ESMTPSA id b13-20020a17090a5a0d00b0021806f631ccsm7293896pjd.30.2022.12.20.01.22.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Dec 2022 01:22:02 -0800 (PST) Message-ID: Date: Tue, 20 Dec 2022 09:22:04 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-US To: Gcc Patch List Subject: testsuite: Fix pr55569.c excess errors X-Spam-Status: No, score=-3038.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , X-Patchwork-Original-From: Jonathan Yong via Gcc-patches From: Jonathan Yong <10walls@gmail.com> Reply-To: Jonathan Yong <10walls@gmail.com> Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This fixes the following: Excess errors: gcc/testsuite/gcc.c-torture/compile/pr55569.c:13:12: warning: overflow in conversion from 'long long unsigned int' to 'long int' changes value from '4611686018427387903' to '-1' [-Woverflow] gcc/testsuite/gcc.c-torture/compile/pr55569.c:13:34: warning: iteration 2147483647 invokes undefined behavior [-Waggressive-loop-optimizations] Patch OK? From 11cc6c38c4b44849110240da3ed553fcc3b35d05 Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10walls@gmail.com> Date: Tue, 20 Dec 2022 09:16:16 +0000 Subject: [PATCH] testsuite: Fix pr55569.c excess errors This fixes the following: Excess errors: gcc/testsuite/gcc.c-torture/compile/pr55569.c:13:12: warning: overflow in conversion from 'long long unsigned int' to 'long int' changes value from '4611686018427387903' to '-1' [-Woverflow] gcc/testsuite/gcc.c-torture/compile/pr55569.c:13:34: warning: iteration 2147483647 invokes undefined behavior [-Waggressive-loop-optimizations] gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr55569.c: fix excess errors. Signed-off-by: Jonathan Yong <10walls@gmail.com> --- gcc/testsuite/gcc.c-torture/compile/pr55569.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55569.c b/gcc/testsuite/gcc.c-torture/compile/pr55569.c index cf274cdbb99..6c2c7c7b6f7 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr55569.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr55569.c @@ -4,7 +4,7 @@ int *bar (void); void foo (void) { - long x; + __INTPTR_TYPE__ x; int *y = bar (); /* The loop below may be optimized to a call to memset with a size -- 2.39.0