From patchwork Wed Oct 2 15:01:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 1992054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gjlay.de header.i=@gjlay.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=RH3JmWw4; dkim=pass header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=45YSwrtW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XJdLb4TkTz1xt3 for ; Thu, 3 Oct 2024 01:01:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6ED923858283 for ; Wed, 2 Oct 2024 15:01:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.20]) by sourceware.org (Postfix) with ESMTPS id 6458E3858C33 for ; Wed, 2 Oct 2024 15:01:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6458E3858C33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6458E3858C33 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.20 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1727881280; cv=pass; b=U6fpdOF1ecqGHOMn6XBBafkxMKUFhz415t1NL66j7dXUeOVNGUJzoJxtsHg0gFr8y25X+pD6bRhaQdDA0VL1KyK03qNf3P1pdUwDDgSg0gkJN8yWwpch1Suc0f0xbILU5ELb+yu1CTjQd9fOzuel997zQoO/4BijSZjjyAGze1k= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1727881280; c=relaxed/simple; bh=AFchWy+fwV1JvkmgQ74ewnFJaiOQRTGTIuQRjXuV8jA=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:From: To:Subject; b=IEAcyyT++5V6z37WX1wr9AgupOP1AIJppiGNVXPsFXpMRoiPY9vALj4P1pglo1XCYOfSTGViMvfK6aJ0dTXFHQWQCHE4/9ZFPw1iyAIVHZ3JNHqMesou8qkz9JiWmbcFOle3tYkFAMO0nd+/5k3wjcY3popuM6q8HlSbSgl1QcM= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1727881276; cv=none; d=strato.com; s=strato-dkim-0002; b=KHvHr//9QZ/muaNqiKLRtGNOWEeX0blxf2ubbr7VrIIvh5b0a/H0ddifQsW636Lbkv 6/l53A+IKYnnBUJgL6sMjSYgLfx4v/3SWQt7aa/C6bxN0PlhROWVpLe844CA4kod/Yh5 XNMv2ZM4LLKwY18CXoMHhIBHoAd42tjSv5g3Y13nrFicIMrgAGoGdzA7eK48ydIsIamT PFOlEtj6w4C8iLl/LTm5zbjZ0KiDD0wSdbNMw5MRF9VV5V3j118+iAl0CNbUi0Vtqg1H uSgzuza2xem02+PM0lADE25UoEHc9sTBLalFexKV/xqc8YTE2NNYdlP0L0sM9SwKg7QB eArQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1727881276; s=strato-dkim-0002; d=strato.com; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=liTEhYIlsAbKZ6aolPwhW494/yEswKNZPVs7UFqynfc=; b=DJ/yf6HNGew8YQuz5pS2ki/yMMBg7BQGm+8zERTI9bnczAbOljbc0ZAkFEraRby1xS XuW9Yx+xAd3Y9vPUqPYFDfI/264p/vvcTk2wrQg2FCmcaVqKzj/KAFALHh3QXguySCzH hDsVQ9yiNVOM5boeFb3rA7vHEoDErU986OhTUJTZCKI9sVq1Duq76MLV+8/FR3PI2PF4 ZLvIoimDnPtvXnHpHtr9YuEHXix5JPdcG+JZCWT3s9iTHZKXxpTjUxsXgkg/L/pSGYjc s/EBj/PR0XYSD2Ac3qepmMHNH8TYzkOUOVPu+zc8r211KQ1368zkzAdbYMReh6JPBatf tznA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1727881276; s=strato-dkim-0002; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=liTEhYIlsAbKZ6aolPwhW494/yEswKNZPVs7UFqynfc=; b=RH3JmWw4vgaleZbfqOMPamRDV2S1vV250xdGRcJPcG1mWp3YyGnbLOBC4UygeYhBJb /nrb9ZA1K5KFO1n0XxZZtlZQDwRdIxSGCmm/3y3zuWjlH56dYMaQi5WtS55s4HFfcz1w t02ugsJ3c3s4Hbn0doJJ5MPuNTsNkt4i6cbWG1H9e2O3RuiFoRrep4csk+ERnoFS22mc uEH0RL0ZH2ySOHR+9ZZ9e5WSn2BZcneH7tY1WBCOVuYqCByeEECMSKGcrISuauoNNruo 7lGTwp1Hkn8hlP32eyeWr5tDlp5bngWLWZlPUkU7qDCSOezUZxGYEGiJKqiVTBdQnVEl lLww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1727881276; s=strato-dkim-0003; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=liTEhYIlsAbKZ6aolPwhW494/yEswKNZPVs7UFqynfc=; b=45YSwrtWR+GgySlgtMOeNosw7zwLrI+h/xuLdwjOcJtKPLoN/yN8xsWGx4EzpprWGL isdHJ4GPMacrvp+2qxCw== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKXKoq0dKoR0vVqyQb0R7G22gRW+Qr5Q==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 51.2.8 AUTH) with ESMTPSA id x2e25d092F1Fwa0 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 2 Oct 2024 17:01:15 +0200 (CEST) Message-ID: <9568b3e8-d080-41ac-b472-9c8e668a5167@gjlay.de> Date: Wed, 2 Oct 2024 17:01:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Georg-Johann Lay Content-Language: en-US To: "gcc-patches@gcc.gnu.org" , Tamar Christina Subject: [patch,testsuite,applied] Fix gcc.dg/signbit-6.c for int != 32-bit targets X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This test failed on int != 32-bit targets due to a[0] = b[0] = INT_MIN instead of using INT32_MIN. Johann --- testsuite/52641 - Fix gcc.dg/signbit-6.c for int != 32-bit targets. PR testsuite/52641 gcc/testsuite/ * gcc.dg/signbit-6.c (main): Initialize a[0] and b[0] with INT32_MIN (instead of with INT_MIN). { diff --git a/gcc/testsuite/gcc.dg/signbit-6.c b/gcc/testsuite/gcc.dg/signbit-6.c index da186624cfa..3a522893222 100644 --- a/gcc/testsuite/gcc.dg/signbit-6.c +++ b/gcc/testsuite/gcc.dg/signbit-6.c @@ -38,8 +38,10 @@ int main () TYPE a[N]; TYPE b[N]; - a[0] = INT_MIN; - b[0] = INT_MIN; + /* This will invoke UB due to -INT32_MIN. The test is supposed to pass + because GCC is supposed to handle this UB case in a predictable way. */ + a[0] = INT32_MIN; + b[0] = INT32_MIN; for (int i = 1; i < N; ++i)