From patchwork Tue Sep 1 17:22:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 142652 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0B3DF4BA2E36 for ; Tue, 1 Sep 2026 17:23:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B3DF4BA2E36 Authentication-Results: sourceware.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=Rpzjig+0; dkim=pass header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=rSEHivtP 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.24]) by sourceware.org (Postfix) with ESMTPS id 1DFCB4BA2E15 for ; Tue, 1 Sep 2026 17:22:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1DFCB4BA2E15 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1DFCB4BA2E15 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=85.215.255.24 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1788283360; cv=pass; b=f1p+to4HKW8JWK/R8iQm9Tsh7Oics6+PY7Ybjqjh3XKxwFkjBT7v4jr81g/DVx7PBHvP18YfzQUzSm/KipZuqLkFO++Vtp56aPy3Jhkmv13FyCMeUdzH+e3uI1sS8dclBXXA1W/FsJGdk9eEEjtPC/SIPMSXJFO89D1CQktaKjE= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1788283360; c=relaxed/simple; bh=OGtj4ThlfgoT0MVio33ahF9ZjqrepzETin1TILZuc48=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:To: From:Subject; b=g2hMn7f1MQXHyXfaGfQj/6Gg/7rKQX5KNd2fKBfsAKLk60IEuLX/8YthYpidGL4GGr/6t6ocRgxrTWCPKm22XqMLedvJBOv1FSSDkgxkIzhGKq/A+2PKQsw26LIXK6E1lHk57bZFMKY335aaDfxctSxDzBODZYWYX3m+cLt7KNA= ARC-Authentication-Results: i=2; sourceware.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=Rpzjig+0; dkim=pass header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=rSEHivtP DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DFCB4BA2E15 ARC-Seal: i=1; a=rsa-sha256; t=1788283358; cv=none; d=strato.com; s=strato-dkim-0002; b=GwlsQrmvVs9lek6S6QqcdT2MZywx7YHBwCdxh95jcA9xUSVp0qrsWU3cqs/KUV3zH8 hLE56qlzf95o6M0oaZ+negA0EddGVfPlHDyx/Pyp6oDvOcUdtQPhavhKYXfSbh5RZZfg DiOjQJPYwnYyr41ebLOMi8Du1kPvqlvtBvPgHTBRP93+U3fPrtzyFkrbDIKv4NIEHMWh XNUmqxpI0vO1sGtf2y9Dbbi4JZrdybj6KxNFx3SV6WQFLc/6ZP4A8GxuPRn21xyWsvUF TJ6RmXqJnZPKZlRJLwJFCj8tF84Bs8UMubLvlx20pRrKzgnLI5G2MUAV5Ey1lDUV5GbW uIXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1788283358; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=wfNrmuJCilLRGaT0xpZgmWrnZ/udztUWc3im8sjErhk=; b=tRZyJMixRzkUpIVMFWIfP8hG/RNWyrbDlj86X6+iv3/+1ap97pwOy9W8g7rfkXijm7 AcmLmFuX+UZE1MYJIQP+JvAAfb9a0taK7EBsctferz99Ey7XG3MdWqQ9bcb6oMQyfvtY rwj0pEW46f0ATzqM80mRlVPwpQ5IlhBvT71Z838dQMdC9yBzZSkRZqU/piNukye1bbP/ /S4oQbXeBA7G60+Kpjoie4TbTFJrEAuRA24z8mh9EM4vTWRph99Y2gJ6zbpf/0qBoBwO 1WaVFJD4yETRSoJ6MKPBKAS2PWnSyuwe1m1t8FWThBJxA6oP3lub15PDM6ptr0yalaHZ dsrQ== 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=1788283358; s=strato-dkim-0002; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=wfNrmuJCilLRGaT0xpZgmWrnZ/udztUWc3im8sjErhk=; b=Rpzjig+07KYCs96o2fyGbQWHGU7lipYeLeUXjswTjEdxVG8+3wGAl4L6k/yEEcS6FD f9xJ/RKTDEjrTqgP/1iUsplATzJOsq34CHL1tMv1xlPGZTErIG8YkidUhoDXKUhN5cU3 LQHPf7Xd8rQ+XPOLQmwafv7CuBeeBzkY4/kyTklH1KvMxwR7OYIrRKotJU1QMkNifzIG hweDoujRkLJps1xQNvZcRVrsPD7SYxIaO0D8WnLGEUxBhX7MyN3N54NlnzYREdpGrROr GmdcA63i0rSy+x/0Yqh7HRqNPjqVwrXkDMyLfRYQs/MNfasCtFps8RYG6k7WMAV4H33E F18g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1788283358; s=strato-dkim-0003; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=wfNrmuJCilLRGaT0xpZgmWrnZ/udztUWc3im8sjErhk=; b=rSEHivtPZ8WA+pZSSQ/RXhaLExhYK56xgbvC5Mwm75/tMfVeFS2HWw9PoCqaD8RsKZ 4r3qxfHOK//6M8zLztCA== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKXKoq0dKoR0vdoTJLPTbtkmyzs2x+1Vw=" Received: from [192.168.2.106] by smtp.strato.de (RZmta 55.6.2 DYNA|AUTH) with ESMTPSA id xba5ce281HMc5lp (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Tue, 1 Sep 2026 19:22:38 +0200 (CEST) Message-ID: Date: Tue, 1 Sep 2026 19:22:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US, de-DE To: "gcc-patches@gcc.gnu.org" From: Georg-Johann Lay Subject: [testsuite,pushed] Fix sloppy PR123109 tests X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on 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~patchwork=sourceware.org@gcc.gnu.org gcc.dg/pr123109-vector.c failed with FAIL: gcc.dg/pr123109-vector.c (test for excess errors) Excess errors: gcc.dg/pr123109-vector.c:9:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c:9:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c:12:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c:12:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c: pattern found 0 times FAIL: gcc.dg/pr123109-vector.c scan-tree-dump-times forwprop2 ">= { 0, 0, 0, 0 }" 2 in the obvious expectation that the vectors have 4 SImode elements. Hence use __[U]INT32_TYPE__ for the elements instead of [unsigned] int. Similarly, gcc.dg/pr123109-scalar.c failed with: FAIL: gcc.dg/pr123109-scalar.c (test for excess errors) Excess errors: gcc.dg/pr123109-scalar.c:5:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c:5:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c:8:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c:8:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c: pattern found 0 times FAIL: gcc.dg/pr123109-scalar.c scan-tree-dump-times optimized ">= 0" 2 gcc.dg/pr123109-scalar.c: pattern found 0 times FAIL: gcc.dg/pr123109-scalar.c scan-tree-dump-times optimized "< 0" 2 with a similar bogus assumption that int is int32plus. Johann --- gcc/testsuite/ PR testsuite/123109 * gcc.dg/pr123109-vector.c (v4si, v4usi): Use SImode elements. * gcc.dg/pr123109-vector.c: Use 32-bit integer types. sizeof(__INT32_TYPE__)))); #define TEST_NE(type) \ type test_ne_##type (type a) { return (a >> 31) != 0; } diff --git a/gcc/testsuite/gcc.dg/pr123109-scalar.c b/gcc/testsuite/gcc.dg/pr123109-scalar.c index dda903a2cee..138cbd7ca0b 100644 --- a/gcc/testsuite/gcc.dg/pr123109-scalar.c +++ b/gcc/testsuite/gcc.dg/pr123109-scalar.c @@ -7,10 +7,10 @@ #define TEST_EQ(type) \ type test_eq_##type (type a) { return (a >> 31) == 0; } -TEST_NE(int) -TEST_NE(unsigned) -TEST_EQ(int) -TEST_EQ(unsigned) +TEST_NE(__INT32_TYPE__) +TEST_NE(__UINT32_TYPE__) +TEST_EQ(__INT32_TYPE__) +TEST_EQ(__UINT32_TYPE__) /* { dg-final { scan-tree-dump-times ">= 0" 2 optimized } } */ /* { dg-final { scan-tree-dump-times "< 0" 2 optimized } } */ diff --git a/gcc/testsuite/gcc.dg/pr123109-vector.c b/gcc/testsuite/gcc.dg/pr123109-vector.c index 35a0f2eff62..19e944fe30b 100644 --- a/gcc/testsuite/gcc.dg/pr123109-vector.c +++ b/gcc/testsuite/gcc.dg/pr123109-vector.c @@ -2,8 +2,8 @@ /* { dg-options "-Wno-psabi -O2 -fdump-tree-forwprop2" } */ /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */ -typedef int v4si __attribute__((vector_size(4 * sizeof(int)))); -typedef unsigned int v4usi __attribute__((vector_size(4 * sizeof(unsigned int)))); +typedef __INT32_TYPE__ v4si __attribute__((vector_size(4 * sizeof(__INT32_TYPE__)))); +typedef __UINT32_TYPE__ v4usi __attribute__((vector_size(4 *