From patchwork Sat Jan 6 18:36:05 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: 185669 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp235739dyq; Sat, 6 Jan 2024 10:36:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEavlcaK3/pbl0+uTFzEucW+bODIcObA4O7tlWmXP/pwmg+INuioD9UzVV3vk5Ql+Bchfpe X-Received: by 2002:a05:6214:130a:b0:680:d1d6:807d with SMTP id pn10-20020a056214130a00b00680d1d6807dmr6273570qvb.27.1704566207598; Sat, 06 Jan 2024 10:36:47 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1704566207; cv=pass; d=google.com; s=arc-20160816; b=U0tUq3XjvsM1zlNOLRyIkThN9o26O/1s+L/8FS54N9yIo3RYSfjCf8JSxzubJqcjPe ZQ1sEeyauW9wE5nDRP49VXZzfVUjBjvWUZWIg5hwDGCW5FGGAhLOe6+ysSnWFJIw7GcR p3g0/6/1Iv14LSbLGBOzL1tgjv+ND/Ow5rdmUIpjChaat1UAr8Co3Xbg+M+c4QNvZNGg U0hD6Z0A98WOlnkE2C8y0cj6iEuWB7NptPLI2ZfIr9uqCwK+OWBAlF23LyU3jhrCFXgu 73L4s5u9nny7RQltwOrp+mPtmHhDcobbXolyGCkOmUGHOfcQUSiVlj8SBQYQyZuniERr KG+g== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :subject:from:to:content-language:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=Fi4gtemzNnmRgdR3COZ5zqif4sDpssG/vLThq5EkVNw=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=cAgi7ns0iNAt9j3SK9Wc08btD/xx+A0Ev0ya4AnUa3LY2fcfOIYPsK4At9OrGIYQHh quhilvIkYZnmT8gxrFeEpJFR5HanNXxqvgpPvo+fS5aNml5jgmoRnros4/Pt4vIS+5rn iQgoZ0sEj4FdeJFF7MHrUFNY7I4AYEHPZWUZfRcp2+RQUs9Jsnttfr5yorGEDb3XHTBF s+bYEgtmXTBYwS1COSDNf8xKE1VNZcQWu2j3yAU2U7bxGElTACzwctyhjSFH68q1wUfw W5TgGeGig55W7qICTML97919htC174BToc372J5UiqnRPJXEBvLhQEwPt5WLghnIFBjx pkMQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=OVsaSwbe; dkim=neutral (no key) header.i=@gjlay.de header.s=strato-dkim-0003; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g4-20020a0cf084000000b0067f94768e7bsi4339930qvk.246.2024.01.06.10.36.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 10:36:47 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=OVsaSwbe; dkim=neutral (no key) header.i=@gjlay.de header.s=strato-dkim-0003; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4CDCB3858018 for ; Sat, 6 Jan 2024 18:36:47 +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.24]) by sourceware.org (Postfix) with ESMTPS id E40243858D1E for ; Sat, 6 Jan 2024 18:36:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E40243858D1E 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 E40243858D1E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.24 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1704566170; cv=pass; b=JmY8tPY59A1OiOkwTZp1hpDrQWErpoBYmHctlQucdsKdDl5muyifH4uVXi/WYdM3gvezCxwrr4kRqnJGXVxVFUFxU5u+/D2Zhk7l9dJm6aULEGHUTRZP775pItwWfyGvRZ//NQoAg/ntIZryCzXkkByacFYgzv046iGVqS1qGJQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1704566170; c=relaxed/simple; bh=h2nxFR4pqCluL5UuDkFG39Cqz6i7zY7H//TjWgdl4fY=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:To: From:Subject; b=WNaDxIkPpR8FtNldiEGoAW25c1ZgktA5gD6azFPOEgqmJvqTd2U0iLMzsJJzOLD0C5Tg18ao3BF2MmG/ncjQbOzDvVyCua9lo8ylnD+W2Denu506dKYubVyiOMvpJ4QqkLd71WaaY4Qd9niCLOTQMO70hwVYiLK3H5yRiKQvSGc= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1704566166; cv=none; d=strato.com; s=strato-dkim-0002; b=QdXTmvqtY7Pxjuc/IRkk2o87lC11eIVQkufYaAAwJ2vELEQDNP6DtBMacn5a/7oK0/ u1pWowz9Ck7mzQDcZOjfuAFsuY31F/DRJPda+A7PWzgIt9kT2HbDDYb6kIfMIgq8+D3Z eUxPXv4dI69P+6Qe7rvV6s3muy3dhehvUzXCk2e5QPPoX1zxkHZRn2FxV2Iq5XPanXf1 Ac4EtVcFS2QYPkpjm+cfwOIsQhELsyor/26lHnHVBRbfoaXQ8Q4K95krsVy4y+vcPNFq TEifI6IDnyFuMeHkFTJD3uloDeGuXlOWYhTw7UYH25XTLtWlHSkXGHaDXaYg/J9mGfdp YTpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1704566166; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=Fi4gtemzNnmRgdR3COZ5zqif4sDpssG/vLThq5EkVNw=; b=S1Cd0MCkGpI7nbLkMLIVtD9iLnLUF4So5waMOOnbcCdzZX07S7c6v4wAcvSMto8BGf ba4WsyJC6nq5PseRqwxp3m0rYpO/6MZR+bOuZ9G7z9fMy/AfdxRva65/yo1LDO+bBd4k Q3vvpgBvjX5N4t68Bzs5nTm4Pr5od1usWsWeJatRgAzFGebNjnJH/fVuRvJu4MP9Y2WQ 4uPst/fVYwCuC6yMboAVCCF7ZOwSTNYXktadhZcSMaufIBs90eBQGpcviyI4h4gdLhQd 5F11yfoBbZ4rE3q9oAAoPaoFinc9yPA5QYJaxF81/lZfa4eNaNzzU5px3gj9WjFAjQrg 5dSw== 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=1704566166; s=strato-dkim-0002; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=Fi4gtemzNnmRgdR3COZ5zqif4sDpssG/vLThq5EkVNw=; b=OVsaSwbem7Ke9XhdiFYL2b2QC+z4ZWWXFpDiCtK2mwW+TsBkq2EFdkdeFpe4CS5bZo YS5PaEPe1Ku2FTkBkdttEW5/6nxYVTT+bUcqyyx7/9C0QP9NWSMe+3TH19II2Mgr679o X2sAulBq9Vumi/RixwtQzajf/H4h2Nci9aTx+9+mHGmNTkQtRIW5uJhgvv2zXDau1dct 5wdVRX3IEwKNDyd7n98xmPqQnVSuVvdJuB9/gACDZzpSp3/ITn8IJewtZv0dIfKrH2WL ckC20kXmvmQgvnjPwhQDABex3hhwnrtHZO+ND7geuWFVrLLEIiQKrxwwo7/mP293fmKX 6gyw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1704566166; s=strato-dkim-0003; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=Fi4gtemzNnmRgdR3COZ5zqif4sDpssG/vLThq5EkVNw=; b=MMSho/Za6VPc8rMe8g1mPCO6yOgN5JByJnH8A/PlTiHaEdNGfK7oCOPUR3nXz7ImPl RslpfenYIVhqNb2uxlBg== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkSjsSjo3O/MHXSz1aalw==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 49.10.2 DYNA|AUTH) with ESMTPSA id 641e88006Ia5Hqp (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Sat, 6 Jan 2024 19:36:05 +0100 (CET) Message-ID: <74b65293-8db4-46c5-9795-db42e99c1c5e@gjlay.de> Date: Sat, 6 Jan 2024 19:36:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches@gcc.gnu.org From: Georg-Johann Lay Subject: [patch,testsuite,applied] PR52641: Fix more sloppy tests X-Spam-Status: No, score=-10.2 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_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787367215684708930 X-GMAIL-MSGID: 1787367215684708930 This fixes more of the sloppy tests that assume sizeof(int) = 4 etc. Johann --- testsuite/52641: Fix sloppy tests that did not care for sizeof(int)=2 etc. gcc/testsuite/ PR testsuite/52641 * gcc.c-torture/compile/attr-complex-method-2.c [target=avr]: Check for "divsc3" as double = float per default. * gcc.c-torture/compile/pr106537-1.c: Use __INTPTR_TYPE__ instead of hard-coded "long". * gcc.c-torture/compile/pr106537-2.c: Same. * gcc.c-torture/compile/pr106537-3.c: Same. * gcc.c-torture/execute/20230630-3.c: Use __INT32_TYPE__ for bit-field wider than 16 bits. * gcc.c-torture/execute/20230630-4.c: Same. * gcc.c-torture/execute/pr109938.c: Require int32plus. * gcc.c-torture/execute/pr109986.c: Same. * gcc.dg/fold-ior-4.c: Same. * gcc.dg/fold-ior-5.c: Same * gcc.dg/fold-parity-5.c: Same. * gcc.dg/fold-popcount-5.c: Same. * gcc.dg/builtin-bswap-13.c [sizeof(int) < 4]: Use __INT32_TYPE__ instead of int. * gcc.dg/builtin-bswap-14.c: Use __INT32_TYPE__ instead of int where required by code. * gcc.dg/c23-constexpr-9.c: Require large_double. * gcc.dg/c23-nullptr-1.c [target=avr]: xfail. * gcc.dg/loop-unswitch-10.c: Require size32plus. * gcc.dg/loop-unswitch-14.c: Same. * gcc.dg/loop-unswitch-11.c: Require int32. * gcc.dg/pr101836.c: Use __SIZEOF_INT instead of hard-coded 4. * gcc.dg/pr101836_1.c: Same. * gcc.dg/pr101836_2.c: Same. * gcc.dg/pr101836_3.c: Same. diff --git a/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c b/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c index 0c5311ec675..dc28e2c99c6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c @@ -8,4 +8,5 @@ void do_div (_Complex double *a, _Complex double *b) *a = *b / (4.0 - 5.0fi); } -/* { dg-final { scan-tree-dump "__(?:gnu_)?divdc3" "optimized" } } */ +/* { dg-final { scan-tree-dump "__(?:gnu_)?divdc3" "optimized" { target { ! { avr-*-* } } } } } */ +/* { dg-final { scan-tree-dump "__(?:gnu_)?divsc3" "optimized" { target { avr-*-* } } } } */ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c b/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c index b67b6090dc3..a53fe2e35f3 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c @@ -3,7 +3,7 @@ This testcase checks that warn_compare_distinct_pointer_types is enabled by default. */ -typedef int __u32; +typedef __INT32_TYPE__ __u32; struct xdp_md { @@ -13,8 +13,8 @@ struct xdp_md int xdp_context (struct xdp_md *xdp) { - void *data = (void *)(long)xdp->data; - __u32 *metadata = (void *)(long)xdp->data_meta; + void *data = (void *)(__INTPTR_TYPE__)xdp->data; + __u32 *metadata = (void *)(__INTPTR_TYPE__)xdp->data_meta; __u32 ret; if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer types" } */ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c b/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c index d4223c25c94..d5a2afa163c 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-Wcompare-distinct-pointer-types" } */ -typedef int __u32; +typedef __INT32_TYPE__ __u32; struct xdp_md { @@ -11,8 +11,8 @@ struct xdp_md int xdp_context (struct xdp_md *xdp) { - void *data = (void *)(long)xdp->data; - __u32 *metadata = (void *)(long)xdp->data_meta; + void *data = (void *)(__INTPTR_TYPE__)xdp->data; + __u32 *metadata = (void *)(__INTPTR_TYPE__)xdp->data_meta; __u32 ret; if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer types" } */ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c b/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c index 73c9b251824..13876eab337 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O0 -Wno-compare-distinct-pointer-types" } */ -typedef int __u32; +typedef __INT32_TYPE__ __u32; struct xdp_md { @@ -11,8 +11,8 @@ struct xdp_md int xdp_context (struct xdp_md *xdp) { - void *data = (void *)(long)xdp->data; - __u32 *metadata = (void *)(long)xdp->data_meta; + void *data = (void *)(__INTPTR_TYPE__)xdp->data; + __u32 *metadata = (void *)(__INTPTR_TYPE__)xdp->data_meta; __u32 ret; if (metadata + 1 > data) /* There shouldn't be a warning here. */ diff --git a/gcc/testsuite/gcc.c-torture/execute/20230630-3.c b/gcc/testsuite/gcc.c-torture/execute/20230630-3.c index fc106c97b5b..735cb9b2ede 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20230630-3.c +++ b/gcc/testsuite/gcc.c-torture/execute/20230630-3.c @@ -1,5 +1,5 @@ struct S { - int i : 24; + __INT32_TYPE__ i : 24; char c1 : 1; char c2 : 1; char c3 : 1; diff --git a/gcc/testsuite/gcc.c-torture/execute/20230630-4.c b/gcc/testsuite/gcc.c-torture/execute/20230630-4.c index df33c18a8cd..e300cd42e0a 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20230630-4.c +++ b/gcc/testsuite/gcc.c-torture/execute/20230630-4.c @@ -5,7 +5,7 @@ #endif struct S { - int i : 24; + __INT32_TYPE__ i : 24; char c1 : 1; char c2 : 1; char c3 : 1; diff --git a/gcc/testsuite/gcc.c-torture/execute/pr109938.c b/gcc/testsuite/gcc.c-torture/execute/pr109938.c index a65d13b305d..668d4ca19a9 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr109938.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr109938.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* PR tree-opt/109938 */ #include "../../gcc.dg/tree-ssa/pr109938.c" diff --git a/gcc/testsuite/gcc.c-torture/execute/pr109986.c b/gcc/testsuite/gcc.c-torture/execute/pr109986.c index 00ee9888539..c4c96452801 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr109986.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr109986.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* PR middle-end/109986 */ #include "../../gcc.dg/tree-ssa/pr109986.c" diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-13.c b/gcc/testsuite/gcc.dg/builtin-bswap-13.c index 6dc4c15b450..4f5bc9735f9 100644 --- a/gcc/testsuite/gcc.dg/builtin-bswap-13.c +++ b/gcc/testsuite/gcc.dg/builtin-bswap-13.c @@ -1,6 +1,10 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +#if __SIZEOF_INT__ < 4 +#define int __INT32_TYPE__ +#endif + int test_s32_0_1(int x) { return __builtin_bswap32(x) & 1; } int test_s32_0_2(int x) { return __builtin_bswap32(x) & 2; } int test_s32_0_240(int x) { return __builtin_bswap32(x) & 240; } diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-14.c b/gcc/testsuite/gcc.dg/builtin-bswap-14.c index 62711d8ef64..0abf4666ef1 100644 --- a/gcc/testsuite/gcc.dg/builtin-bswap-14.c +++ b/gcc/testsuite/gcc.dg/builtin-bswap-14.c @@ -5,11 +5,11 @@ extern void abort (void); __attribute__ ((noinline, noclone)) -static int rt32 (int x, int y, int z) { +static __INT32_TYPE__ rt32 (__INT32_TYPE__ x, int y, __INT32_TYPE__ z) { return (__builtin_bswap32(x) >> y) & z; } #define TEST32(X,Y,Z) if(((__builtin_bswap32(X)>>Y)&Z)!=rt32(X,Y,Z)) abort() -void test32(int x) +void test32(__INT32_TYPE__ x) { TEST32(x,0,1); TEST32(x,0,255); diff --git a/gcc/testsuite/gcc.dg/c23-constexpr-9.c b/gcc/testsuite/gcc.dg/c23-constexpr-9.c index 137058376e8..8dadb18725c 100644 --- a/gcc/testsuite/gcc.dg/c23-constexpr-9.c +++ b/gcc/testsuite/gcc.dg/c23-constexpr-9.c @@ -3,6 +3,7 @@ /* { dg-options "-std=c23 -pedantic-errors" } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target inff } */ +/* { dg-require-effective-target large_double } */ /* A conversion from signaling NaN to quiet NaN in a different format or type is not valid for constexpr. */ diff --git a/gcc/testsuite/gcc.dg/c23-nullptr-1.c b/gcc/testsuite/gcc.dg/c23-nullptr-1.c index a1b9dea2521..00ca7bd362b 100644 --- a/gcc/testsuite/gcc.dg/c23-nullptr-1.c +++ b/gcc/testsuite/gcc.dg/c23-nullptr-1.c @@ -2,6 +2,7 @@ /* { dg-do run } */ // { dg-require-effective-target thread_fence } /* { dg-options "-std=c23 -pedantic-errors -Wall -Wextra -Wno-unused-variable" } */ +/* { dg-xfail-if "__atomic not supported" { "avr-*-*" } } */ #include diff --git a/gcc/testsuite/gcc.dg/fold-ior-4.c b/gcc/testsuite/gcc.dg/fold-ior-4.c index 8f7213eb6c9..17a2a4dc419 100644 --- a/gcc/testsuite/gcc.dg/fold-ior-4.c +++ b/gcc/testsuite/gcc.dg/fold-ior-4.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target int32plus } */ unsigned int test_ior(unsigned char i) { diff --git a/gcc/testsuite/gcc.dg/fold-ior-5.c b/gcc/testsuite/gcc.dg/fold-ior-5.c index 8de56976da9..8352fdd9393 100644 --- a/gcc/testsuite/gcc.dg/fold-ior-5.c +++ b/gcc/testsuite/gcc.dg/fold-ior-5.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target int32plus } */ unsigned int test_ior(unsigned char i) { diff --git a/gcc/testsuite/gcc.dg/fold-parity-5.c b/gcc/testsuite/gcc.dg/fold-parity-5.c index 69d3a6a54ca..e30cd2f68e4 100644 --- a/gcc/testsuite/gcc.dg/fold-parity-5.c +++ b/gcc/testsuite/gcc.dg/fold-parity-5.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target int32plus } */ int test_and4(unsigned int a) { diff --git a/gcc/testsuite/gcc.dg/fold-popcount-5.c b/gcc/testsuite/gcc.dg/fold-popcount-5.c index 943726f0902..4963a4d02a5 100644 --- a/gcc/testsuite/gcc.dg/fold-popcount-5.c +++ b/gcc/testsuite/gcc.dg/fold-popcount-5.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-require-effective-target int32plus } */ int test_and4(unsigned int a) { diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-10.c b/gcc/testsuite/gcc.dg/loop-unswitch-10.c index 395167ee6f8..20f5d87ea28 100644 --- a/gcc/testsuite/gcc.dg/loop-unswitch-10.c +++ b/gcc/testsuite/gcc.dg/loop-unswitch-10.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-optimized" } */ +/* { dg-require-effective-target size32plus } */ int __attribute__((noipa)) diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-11.c b/gcc/testsuite/gcc.dg/loop-unswitch-11.c index 422a94227b2..e9441316d0d 100644 --- a/gcc/testsuite/gcc.dg/loop-unswitch-11.c +++ b/gcc/testsuite/gcc.dg/loop-unswitch-11.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-optimized" } */ +/* { dg-require-effective-target int32 } */ int foo(double *a, double *b, double *c, double *d, double *r, int size, int order) diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-14.c b/gcc/testsuite/gcc.dg/loop-unswitch-14.c index d9d31680cb8..e1225f6890f 100644 --- a/gcc/testsuite/gcc.dg/loop-unswitch-14.c +++ b/gcc/testsuite/gcc.dg/loop-unswitch-14.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-optimized --param=max-unswitch-insns=1000" } */ +/* { dg-require-effective-target size32plus } */ int __attribute__((noipa)) diff --git a/gcc/testsuite/gcc.dg/pr101836.c b/gcc/testsuite/gcc.dg/pr101836.c index 096196d9b7f..75349a83e12 100644 --- a/gcc/testsuite/gcc.dg/pr101836.c +++ b/gcc/testsuite/gcc.dg/pr101836.c @@ -46,8 +46,8 @@ void __attribute__((__noinline__)) stuff( struct trailing_array_3 *trailing_0, struct trailing_array_4 *trailing_flex) { - expect(__builtin_object_size(normal->c, 1), 16); - expect(__builtin_object_size(trailing_1->c, 1), 4); + expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__); + expect(__builtin_object_size(trailing_1->c, 1), __SIZEOF_INT__); expect(__builtin_object_size(trailing_0->c, 1), 0); expect(__builtin_object_size(trailing_flex->c, 1), -1); } diff --git a/gcc/testsuite/gcc.dg/pr101836_1.c b/gcc/testsuite/gcc.dg/pr101836_1.c index e2931ce1012..19e63205a6c 100644 --- a/gcc/testsuite/gcc.dg/pr101836_1.c +++ b/gcc/testsuite/gcc.dg/pr101836_1.c @@ -46,8 +46,8 @@ void __attribute__((__noinline__)) stuff( struct trailing_array_3 *trailing_0, struct trailing_array_4 *trailing_flex) { - expect(__builtin_object_size(normal->c, 1), 16); - expect(__builtin_object_size(trailing_1->c, 1), 4); + expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__); + expect(__builtin_object_size(trailing_1->c, 1), __SIZEOF_INT__); expect(__builtin_object_size(trailing_0->c, 1), 0); expect(__builtin_object_size(trailing_flex->c, 1), -1); } diff --git a/gcc/testsuite/gcc.dg/pr101836_2.c b/gcc/testsuite/gcc.dg/pr101836_2.c index 78974187721..09079e6c023 100644 --- a/gcc/testsuite/gcc.dg/pr101836_2.c +++ b/gcc/testsuite/gcc.dg/pr101836_2.c @@ -46,8 +46,8 @@ void __attribute__((__noinline__)) stuff( struct trailing_array_3 *trailing_0, struct trailing_array_4 *trailing_flex) { - expect(__builtin_object_size(normal->c, 1), 16); - expect(__builtin_object_size(trailing_1->c, 1), 4); + expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__); + expect(__builtin_object_size(trailing_1->c, 1), __SIZEOF_INT__); expect(__builtin_object_size(trailing_0->c, 1), -1); expect(__builtin_object_size(trailing_flex->c, 1), -1); } diff --git a/gcc/testsuite/gcc.dg/pr101836_3.c b/gcc/testsuite/gcc.dg/pr101836_3.c index 0e69388e81f..63f50f75797 100644 --- a/gcc/testsuite/gcc.dg/pr101836_3.c +++ b/gcc/testsuite/gcc.dg/pr101836_3.c @@ -46,7 +46,7 @@ void __attribute__((__noinline__)) stuff( struct trailing_array_3 *trailing_0, struct trailing_array_4 *trailing_flex) { - expect(__builtin_object_size(normal->c, 1), 16); + expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__); expect(__builtin_object_size(trailing_1->c, 1), -1); expect(__builtin_object_size(trailing_0->c, 1), -1); expect(__builtin_object_size(trailing_flex->c, 1), -1);