From patchwork Mon May 22 18:26:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 1784607 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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gjlay.de header.i=@gjlay.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=moQKGajp; dkim=fail reason="signature verification failed" header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=aGI3i7QD; 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 4QQ5WM1rZZz2020 for ; Tue, 23 May 2023 04:26:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 61C713857710 for ; Mon, 22 May 2023 18:26:35 +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 [81.169.146.221]) by sourceware.org (Postfix) with ESMTPS id 5F5ED3858D35 for ; Mon, 22 May 2023 18:26:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F5ED3858D35 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-Seal: i=1; a=rsa-sha256; t=1684779979; cv=none; d=strato.com; s=strato-dkim-0002; b=FR88xIqrdc4T1STxfB+5AM6gjwkElHhREQkHwY6Kcizu0Bcz6/ORUq2OkSIwtEgX5K m/J2o2KHLTSBR+aO+xyQ1j2L8uiodygZ8DmD0yGzYq83dZJ8k+rymq0hHdPsURK2giv8 v/Is0TvQ8jekQdtKkobZitoqE1GlTK8EaHzQhQvo6ZZwHog8xeoBGWofXnLVaQ5wTW80 HCvJvRHrT9HgCNXCkNHZ+xyk/R8rRKlGkFh4NoqV+8f0V1drTtI+so1nZH5XQ08JtP6h S7BdwvRQC0fm6f1MA3g2rQaaOE+ca2Rmqq/RCbEGwMDd7nO1xv5NqfkaHY5PZaxfpqPK V5ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684779979; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=HYyXEppGEFX2Ainlq9+MfTTY8Q+p1GDQxvVPLsqM5Qg=; b=E+wLJMNvVIe1oEt/XfdewaFZ44CXStdTiI+uZpQdrNby6DOToUVdCXSHVoluSZzvyj HNKYzKugdVNm90f3BNCR/dlXaFRiHGRX0PCMulQb5uZWGhIUTTdzJWk94oeMK2Y7huMA HjzZL3VR3QS9zpLbzjppOco79Z8UZjn9QMmnDTsZ8rcjZpc0xztADpHOjvWWF3L7tefq nKZZSSPNaiDSqoBxedIylTo67trJkyvaWVjSI6RUR2dJxSwA6orjQ9GHSEvgoSGGo7SJ OoTSODyzrR1raTScLHbBGclBPy29UC1eeT8ZN+Vyt05omhnsRnRjMK5VJatU1IEfxSIK 8uBQ== 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=1684779979; s=strato-dkim-0002; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=HYyXEppGEFX2Ainlq9+MfTTY8Q+p1GDQxvVPLsqM5Qg=; b=moQKGajp8UkNgLDcv8vrTzhT5aWdoLtNm1eQQs51eBlTdlOm4ortYhl9wHSEBsJorj b3LKSqULEL0H83HgBbLghg0PNyUoFwRgcWlDO3Q8NMQB7h1x96F7/lTQJcP33HApjNqQ IVzwJoU8y14g9W7s44d/adjrabfd9tz2owMJdBX2+TfrxrPsVngkryLN2aoNSySt6zzK WibpVUQ3tpXrx0iXIUdLn5wxEBDWYCDNRn6IZXUQ7wkuofHcMzSKcJomZD2U2+aGOeaN jM7npw/FJtKKcbl+OIxrGwc7xSY5j8TiuhV3Bd0EVm3OYg/2fUGzJWjwf56146v06VuX SEUQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684779979; s=strato-dkim-0003; d=gjlay.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=HYyXEppGEFX2Ainlq9+MfTTY8Q+p1GDQxvVPLsqM5Qg=; b=aGI3i7QDjDFNQPqOOQUT1AcoPSX8n0ashFj00f8pgsOhGuHPIc0QU2A0wx57NctOb3 DCgY4zQa6SZhQ3J5ykBQ== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkRmM69o2y+LiO3MutATA==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id z691f1z4MIQIaur (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Mon, 22 May 2023 20:26:18 +0200 (CEST) Message-ID: Date: Mon, 22 May 2023 20:26:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: gcc-patches@gcc.gnu.org From: Georg-Johann Lay Subject: [testsuite,committed]: PR52614: Fix more of the int=32 assumption fallout. X-Spam-Status: No, score=-9.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_H2, 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.29 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 Sender: "Gcc-patches" Applied more of the int=32 assumption fallout. Johann --- testsuite/52641: Fix more of implicit int=32 assumption fallout. gcc/testsuite/ PR testsuite/52641 * gcc.c-torture/compile/pr108892.c: Require int32. * gcc.c-torture/compile/pr98199.c: Require int32plus. * gcc.dg/analyzer/call-summaries-pr107072.c: Same. * gcc.dg/analyzer/null-deref-pr105755.c: Same. * gcc.dg/tree-ssa/pr102232.c: Same. * gcc.dg/tree-ssa/pr105860.c: Same. * gcc.dg/tree-ssa/pr96730.c: Same. * gcc.dg/tree-ssa/pr96779-disabled.c: Same. * gcc.dg/tree-ssa/pr96779.c: Same. * gcc.dg/tree-ssa/pr98513.c: Same. * gcc.dg/tree-ssa/ssa-sink-18.c * gcc.dg/analyzer/coreutils-cksum-pr108664.c: Require int32plus, size24plus. * gcc.dg/analyzer/doom-s_sound-pr108867.c: Require size32plus. * gcc.dg/analyzer/malloc-CWE-590-examples.c: Same. * gcc.dg/debug/btf/btf-bitfields-4.c: Same. * gcc.dg/tree-ssa/pr93435.c: Same. * gcc.dg/analyzer/null-deref-pr102671-1.c: Require ptr_eq_long: * gcc.dg/analyzer/null-deref-pr102671-2.c: Same. * gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c: Same. * gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c: Same. * gcc.dg/tree-ssa/pr103345.c: Use uint32_t. * gcc.dg/tree-ssa/ssa-ccp-41.c [sizeof(int)==2]: Same. * gcc.dg/tree-ssa/pr109031-1.c: Use uint16_t, uint32_t. * gcc.dg/tree-ssa/pr109031-2.c: Same. * gcc.dg/Warray-bounds-49.c (dg-warning): Discriminate int != short. * gcc.dg/Warray-bounds-52.c (dg-warning): Discriminate avr. * gcc.dg/Warray-bounds-33.c: Skip target avr. * gcc.dg/analyzer/fd-access-mode-target-headers.c: Same. * gcc.dg/analyzer/flex-with-call-summaries.c: Same. * gcc.dg/analyzer/isatty-1.c: Same. * gcc.dg/analyzer/pipe-glibc.c: Same. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr108892.c b/gcc/testsuite/gcc.c-torture/compile/pr108892.c index d7fecd54ecf..fb0a258cdba 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr108892.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr108892.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target int32 } */ + typedef char __attribute__((__vector_size__ (64))) U; typedef int __attribute__((__vector_size__ (64))) V; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr98199.c b/gcc/testsuite/gcc.c-torture/compile/pr98199.c index b5c8d204f0e..6605d38788c 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr98199.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr98199.c @@ -1,4 +1,5 @@ /* PR tree-optimization/98199 */ +/* { dg-require-effective-target int32plus } */ struct A { long a; short d; int c, f, e, g; }; struct B { int a, i; short j; struct A k; signed : 20; int e, g; } __attribute__((packed)); diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-33.c b/gcc/testsuite/gcc.dg/Warray-bounds-33.c index 28f14b4722c..13efabe33b6 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-33.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-33.c @@ -2,6 +2,7 @@ an object of incomplete type { dg-do compile } { dg-options "-O2 -Wall" } */ +/* { dg-skip-if "acessing data memory with program memory address" { "avr-*-*" } } */ struct S { diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-49.c b/gcc/testsuite/gcc.dg/Warray-bounds-49.c index f271dd526b8..9335f1507e8 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-49.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-49.c @@ -17,7 +17,8 @@ void test_a0 (void) // The first three elements fit in the tail padding. a0.a2[0] = 0; a0.a2[1] = 1; a0.a2[2] = 2; - a0.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" } + a0.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -27,7 +28,8 @@ void test_a1 (void) { a1.a2[0] = 0; a1.a2[1] = 1; a1.a2[2] = 2; - a1.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" } + a1.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -37,7 +39,8 @@ void test_a2 (void) { a2.a2[0] = 0; a2.a2[1] = 1; a2.a2[2] = 2; - a2.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" } + a2.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -47,7 +50,8 @@ void test_a3 (void) { a3.a2[0] = 0; a3.a2[1] = 1; a3.a2[2] = 2; - a3.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" } + a3.a2[3] = 3; // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -57,7 +61,8 @@ void test_a4 (void) { a4.a2[0] = 0; a4.a2[1] = 1; a4.a2[2] = 2; a4.a2[3] = 3; - a4.a2[4] = 4; // { dg-warning "array subscript 4 is above array bounds of 'short int\\\[]'" } + a4.a2[4] = 4; // { dg-warning "array subscript 4 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 4 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -67,7 +72,8 @@ void test_a5 (void) { a5.a2[0] = 0; a5.a2[1] = 1; a5.a2[2] = 2; a5.a2[3] = 3; a5.a2[4] = 4; - a5.a2[5] = 5; // { dg-warning "array subscript 5 is above array bounds of 'short int\\\[]'" } + a5.a2[5] = 5; // { dg-warning "array subscript 5 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 5 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -78,7 +84,8 @@ void test_a6 (void) a6.a2[0] = 0; a6.a2[1] = 1; a6.a2[2] = 2; a6.a2[3] = 3; a6.a2[4] = 4; a6.a2[5] = 5; - a6.a2[6] = 6; // { dg-warning "array subscript 6 is above array bounds of 'short int\\\[]'" } + a6.a2[6] = 6; // { dg-warning "array subscript 6 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 6 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -89,7 +96,8 @@ void test_a7 (void) a7.a2[0] = 0; a7.a2[1] = 1; a7.a2[2] = 2; a7.a2[3] = 3; a7.a2[4] = 4; a7.a2[5] = 5; a7.a2[5] = 5; a7.a2[6] = 6; - a7.a2[7] = 7; // { dg-warning "array subscript 7 is above array bounds of 'short int\\\[]'" } + a7.a2[7] = 7; // { dg-warning "array subscript 7 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 7 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -100,7 +108,8 @@ void test_a8 (void) a8.a2[0] = 0; a8.a2[1] = 1; a8.a2[2] = 2; a8.a2[3] = 3; a8.a2[4] = 4; a8.a2[5] = 5; a8.a2[5] = 5; a8.a2[6] = 6; a8.a2[7] = 7; - a8.a2[8] = 8; // { dg-warning "array subscript 8 is above array bounds of 'short int\\\[]'" } + a8.a2[8] = 8; // { dg-warning "array subscript 8 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 8 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } @@ -111,5 +120,6 @@ void test_a9 (void) a8.a2[0] = 8; a8.a2[1] = 7; a8.a2[2] = 6; a8.a2[3] = 5; a8.a2[4] = 4; a8.a2[5] = 3; a8.a2[5] = 2; a8.a2[6] = 1; a8.a2[7] = 0; - a8.a2[9] = 8; // { dg-warning "array subscript 9 is above array bounds of 'short int\\\[]'" } + a8.a2[9] = 8; // { dg-warning "array subscript 9 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } } + // { dg-warning "array subscript 9 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 } } diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-52.c b/gcc/testsuite/gcc.dg/Warray-bounds-52.c index 69dc15ace2d..d3aab3cbe94 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-52.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-52.c @@ -59,9 +59,9 @@ void ptr_idx_cst (void) T (-1, (int[]){ 1 }); // { dg-warning "array subscript -1 is outside array bounds of 'int\\\[1]'" } T ( 0, (int[]){ 1 }); T (+1, (int[]){ 1 }); // { dg-warning "array subscript 1 is outside array bounds of 'int\\\[1]'" } - T (INT_MIN, (int[]){ 1 }); // { dg-warning "array subscript -\[0-9\]+ is outside array bounds of 'int\\\[1]'" "lp64" { xfail ilp32 } } - T (INT_MAX, (int[]){ 1 }); // { dg-warning "array subscript \[0-9\]+ is outside array bounds of 'int\\\[1]'" "not-ilp32" { target { ! ilp32 } } } - // { dg-warning "array subscript -1 is outside array bounds of 'int\\\[1]'" "ilp32" { target ilp32 } .-1 } + T (INT_MIN, (int[]){ 1 }); // { dg-warning "array subscript -\[0-9\]+ is outside array bounds of 'int\\\[1]'" "lp64" { xfail { ilp32 || avr-*-* } } } + T (INT_MAX, (int[]){ 1 }); // { dg-warning "array subscript \[0-9\]+ is outside array bounds of 'int\\\[1]'" "not-ilp32" { target { ! { ilp32 || avr-*-* } } } } + // { dg-warning "array subscript -1 is outside array bounds of 'int\\\[1]'" "ilp32-or-avr" { target { ilp32 || avr-*-* } } .-1 } T (SIZE_MAX, (int[]){ 1 }); // { dg-warning "array subscript -?\[0-9\]+ is outside array bounds of 'int\\\[1]'" } } diff --git a/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c b/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c index 1e689b3860c..6e583d0228f 100644 --- a/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c +++ b/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* { dg-additional-options "-fanalyzer-call-summaries --param analyzer-min-snodes-for-call-summary=0" } */ /* There need to be at least two calls to a function for the diff --git a/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c b/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c index 27eef8369e2..62698f3d148 100644 --- a/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c +++ b/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c @@ -1,3 +1,6 @@ +/* { dg-require-effective-target int32plus } */ +/* { dg-require-effective-target size24plus } */ + /* Reduced from coreutils's cksum.c: cksum_slice8 */ typedef long unsigned int size_t; diff --git a/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c b/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c index ebbfed2982a..ae58f03d3b3 100644 --- a/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c +++ b/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c @@ -1,6 +1,7 @@ /* Reduced from Doom's linuxdoom-1.10/s_sound.c, which is GPLv2 or later. */ /* { dg-additional-options "-fno-analyzer-call-summaries -Wno-analyzer-too-complex" } */ +/* { dg-require-effective-target size32plus } */ typedef struct _IO_FILE FILE; extern FILE* stderr; diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c index cf273b217d1..b57b9fa2279 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c @@ -1,4 +1,5 @@ /* { dg-skip-if "" { powerpc*-*-aix* || newlib } } */ +/* { dg-skip-if "" { avr-*-* } } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c b/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c index 79f2f8e1879..45edacf0e53 100644 --- a/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c +++ b/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c @@ -2,6 +2,7 @@ script. */ /* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { "avr-*-*" } } */ /* { dg-additional-options "-fanalyzer-call-summaries" } */ /* { dg-additional-options "-Wno-analyzer-too-complex" } */ diff --git a/gcc/testsuite/gcc.dg/analyzer/isatty-1.c b/gcc/testsuite/gcc.dg/analyzer/isatty-1.c index 389d2cdf3f1..3bb12c0db25 100644 --- a/gcc/testsuite/gcc.dg/analyzer/isatty-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/isatty-1.c @@ -1,4 +1,5 @@ /* { dg-skip-if "" { powerpc*-*-aix* } } */ +/* { dg-skip-if "" { "avr-*-*" } } */ #include #include "analyzer-decls.h" diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c b/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c index 036f8889a92..9434f2df75f 100644 --- a/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c +++ b/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c @@ -1,4 +1,5 @@ /* { dg-additional-options "-Wno-free-nonheap-object" } */ +/* { dg-require-effective-target size32plus } */ /* Examples adapted from https://cwe.mitre.org/data/definitions/590.html which states "Copyright © 2006–2022, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation." diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c index 12a0a48d658..3fe061bdbd8 100644 --- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target ptr_eq_long } */ /* { dg-additional-options "-O2 -Wno-shift-count-overflow" } */ struct lisp; diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c index 5108182a6c3..298e4839b98 100644 --- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c +++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target ptr_eq_long } */ /* { dg-additional-options "-O2 -Wno-shift-count-overflow" } */ struct lisp; diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c index f6bf3830908..2b0ba292e00 100644 --- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c +++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* { dg-additional-options "-Wno-analyzer-too-complex -O2" } */ typedef long int ptrdiff_t; diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c index 2a9c715c32c..cb46827ab65 100644 --- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c +++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c @@ -1,5 +1,6 @@ /* Reduced from haproxy's src/ssl_sample.c */ +/* { dg-require-effective-target ptr_eq_long } */ /* { dg-additional-options "-O2" } */ union sample_value { diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c index d83af19788c..fbacb6ca2d3 100644 --- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c +++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c @@ -1,5 +1,7 @@ /* Reduced from haproxy's src/ssl_sample.c */ +/* { dg-require-effective-target ptr_eq_long } */ + union sample_value { long long int sint; /* [...snip...] */ diff --git a/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c b/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c index 5a794c8c690..60558a870b9 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c +++ b/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c @@ -1,5 +1,7 @@ /* Example of pipe usage from glibc manual. */ +/* { dg-skip-if "" { "avr-*-*" } } */ + #include #include #include diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c index af91845726f..c00c8b3d87f 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c @@ -10,6 +10,7 @@ /* { dg-do compile } */ /* { dg-options "-O0 -gbtf -dA" } */ +/* { dg-require-effective-target size32plus } */ /* Struct with 3 members and no bitfield (kind_flag not set). */ /* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c index 62bca6922ab..59ec52ad199 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c @@ -1,6 +1,7 @@ /* PR tree-optimization/102232 */ /* { dg-do run } */ /* { dg-options "-O -fdump-tree-optimized" } */ +/* { dg-require-effective-target int32plus } */ int __attribute__ ((noipa)) foo (int a, int b) { @@ -49,4 +50,4 @@ main (void) /* Verify that multiplication and division has been removed. */ /* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */ -/* { dg-final { scan-tree-dump-not " / " "optimized" } } */ \ No newline at end of file +/* { dg-final { scan-tree-dump-not " / " "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c index dc8810ab5af..87b237bdb53 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-bswap-details" } */ -typedef unsigned int uint32_t; +typedef __UINT32_TYPE__ uint32_t; typedef unsigned char uint8_t; uint32_t load_le_32_or(const uint8_t *ptr) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c b/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c index 77bcb4a6739..bbfaa45d967 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O1" } */ +/* { dg-require-effective-target int32plus } */ struct S1 { unsigned int _0; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c index 84e1a08be29..9e85f108f79 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ unsigned char uc; -unsigned short us; +__UINT16_TYPE__ us; void testuc() { unsigned int g = 0; @@ -18,9 +18,9 @@ void testuc() { } void testus() { - unsigned int g = 0; - unsigned int *p1 = &g; - unsigned short *p2 = &us; + __UINT32_TYPE__ g = 0; + __UINT32_TYPE__ *p1 = &g; + __UINT16_TYPE__ *p2 = &us; do { (*p1)++; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c index 6f28b3b5ed8..51f4b7a74ef 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fwrapv" } */ signed char sc; -signed short ss; +__INT16_TYPE__ ss; void testsc() { unsigned int g = 0; @@ -18,9 +18,9 @@ void testsc() { } void testss() { - unsigned int g = 0; - unsigned int *p1 = &g; - signed short *p2 = &ss; + __UINT32_TYPE__ g = 0; + __UINT32_TYPE__ *p1 = &g; + __INT16_TYPE__ *p2 = &ss; do { (*p1)++; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c b/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c index cb8e7495b15..ca2e091ed25 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target size32plus } */ typedef signed char int8_T; typedef int int32_T; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c index 39a06846529..8eb2006d0a9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O1" } */ +/* { dg-require-effective-target int32plus } */ struct a { int b; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c index 205133d8e0c..968620582af 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c @@ -1,6 +1,7 @@ /* PR tree-optimization/96779 */ /* { dg-do run } */ /* { dg-options "-O -fdump-tree-optimized -fwrapv" } */ +/* { dg-require-effective-target int32plus } */ #include diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c index 0d46e8eeb15..03618bf81d2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c @@ -1,6 +1,7 @@ /* PR tree-optimization/96779 */ /* { dg-do run } */ /* { dg-options "-O -fdump-tree-optimized" } */ +/* { dg-require-effective-target int32plus } */ #include diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c b/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c index c15d6bd708e..859d7ac4ac1 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -fgimple" } */ +/* { dg-require-effective-target int32plus } */ __attribute__((noipa)) void __GIMPLE (ssa,startwith("evrp")) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c index d2b054e9355..e0a0b6b8e00 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c @@ -1,11 +1,15 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ +#if __SIZEOF_INT__ == 2 +#define int __INT32_TYPE__ +#endif + int foo(int x) { int p = x & 24; int r = 1 << p; - return r & (1<<17); + return r & ((int)1<<17); } /* { dg-final { scan-tree-dump "return 0;" "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c index 9ac0fc6e4de..fd6c8677212 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-sink-stats" } */ +/* { dg-require-effective-target int32plus } */ #include