From patchwork Tue Aug 8 15:01:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 132527 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2180692vqr; Tue, 8 Aug 2023 08:02:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNLi2VRYJoGruM6qIi4K+XsrFB4rSy4uvSLq8Ea3QzqoIYmL3lUc4mkZ5u1R+r/9PORC3+ X-Received: by 2002:aa7:d858:0:b0:522:2dcc:afb6 with SMTP id f24-20020aa7d858000000b005222dccafb6mr84003eds.7.1691506952676; Tue, 08 Aug 2023 08:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691506952; cv=none; d=google.com; s=arc-20160816; b=jwy+hcd4bxVbkHPA4Gz+mlz5EYSNvYpPZXw9rBG899vUEpixlIgY3OABOxF4ZNgEI+ 9alrfMVRn26JXye+aieLVlJiX0yeFD+rvQ+A2XCy0CYZmgVucDv4zlYionKdxaZfRBDV Hl19R6WI4f3j5S7D+F9hAoyi+ZpsAD359gX2ApD5LfwJRlME2BEyAcwQux2HbVnPvCsx DSDH8C3gJE0Xd3feOcufr73eA9qNImi3A4LDKrZoBwIrIvvkVzMxMgVpAmp2OpgsTh5q YPTzqy7qV/A1rt+/6ou0/8XstytzUokXktxalwQRdmWkMtMky/j1XJQdqwVGNcOF9NnT HYtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=ukqaP3Q06ZkngscI5dEQeSPOmf/u47deLTQlLpd701c=; fh=YZxP1/cX4LUIIJ+x57oWxrA/KeNQSoDKaB2n2UCp2yg=; b=bf1SmpBTCZJ15nQSv3Q5CB26PmCU3ma6iTbzYpuSfO9kL1joUBkn9q1vtMCcsZGX52 3GbqQWvkuRyvLFSRGdZvs6vPgPulWKwUShf9FaZjec7yQMhnV9OgpIExBcDp9Yr0ytZ5 dag6j5X6E6iz8p6trV2robKeWB0HKt+y0nPHXDZQYJkHNtsSyh93TLne7IjViaT7XSve 8W3DVKs0LBBwZSlJ3DUSEEfEZB4DEQPsDOl6iynmq+R1ZfnC7L4KVKcaaXuxUK/d888G vj7Bg14+RBYnuxWsNCSFG0UAYv94/naE06Z4gr9JSA1mVA+2SAbG9AYGoVgTwEz05Naw dyEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=RRj60m58; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 bc18-20020a056402205200b005233ff6dfc3si2030662edb.642.2023.08.08.08.02.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 08:02:32 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=RRj60m58; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54E453858431 for ; Tue, 8 Aug 2023 15:02:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54E453858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691506951; bh=ukqaP3Q06ZkngscI5dEQeSPOmf/u47deLTQlLpd701c=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=RRj60m58PHs7NWr//IEmqRlhOqQBtyjeIB1PJoPBzVnhxcfEK/TlyFlvihIKjDjWg 2uvkQnhtoXao2NFroHIUmeia39gMgyViRkssnYdt8HojISIUo1ezLgWY8mUTEY72Yy lARdggln0SlC8Fs1TuJ7qUA+HBCPqymtzRph7SJs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by sourceware.org (Postfix) with ESMTPS id 6AD513858D33 for ; Tue, 8 Aug 2023 15:01:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6AD513858D33 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1bbafe6fd8fso4119697fac.3 for ; Tue, 08 Aug 2023 08:01:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691506901; x=1692111701; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ukqaP3Q06ZkngscI5dEQeSPOmf/u47deLTQlLpd701c=; b=X9MiGb/Rke5XqyHqoC8Nm0HQDdKM1D4Y5f5wmKWqkc34gtLHQAhw0AwPgxRH6p/Mv7 BeAy+azU18nGL5U9+riZ4VkvjHFfVKHvoWEGjvWmCSSGGQ0VOlDnjvSDVBqQVM+PGqc3 vSLJHmYor4UBoE6GiU6pBHl7M1P+nzt4MW7y0CdlxW0tPgDfs36gf7k61a75aEZp4Dqs fDjenoT8WTy6HJig49UjTfa0Dr1temTiObpmbm/MIFa+XSg+HTxSr5BZAfAYNOXoGg3A 5Brie9j4rxM5uJAaX6McTPfeaKmXHCAo1yJ0BWMm2OddNH9HMkdCS4afs+YJlBQB4SZv qy+g== X-Gm-Message-State: AOJu0YyK5kaQD6MIJqVVViGf+pVtq9W35g0PSlJ20Tm2gD+0m1PyOhse C0gIkEIVswUXXpNyztT1YnIgamj7/wdaq1PMBJzz5Q== X-Received: by 2002:a05:6870:6122:b0:1b3:f1f7:9958 with SMTP id s34-20020a056870612200b001b3f1f79958mr14388579oae.46.1691506901168; Tue, 08 Aug 2023 08:01:41 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id s11-20020a056870628b00b001b3538afd01sm6063681oan.51.2023.08.08.08.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 08:01:40 -0700 (PDT) To: gcc-patches@gcc.gnu.org, dmalcolm@redhat.com Cc: Christophe Lyon Subject: [PATCH] testsuite: Fix gcc.dg/analyzer/allocation-size-multiline-[123].c [PR 110426] Date: Tue, 8 Aug 2023 15:01:21 +0000 Message-Id: <20230808150121.318595-1-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230804202251.1447735-1-dmalcolm@redhat.com> References: <20230804202251.1447735-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 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_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: Christophe Lyon via Gcc-patches From: Christophe Lyon Reply-To: Christophe Lyon Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773673594328762439 X-GMAIL-MSGID: 1773673594328762439 For 32-bit newlib targets (e.g. arm-eabi) int32_t is "long int". Like previous patches in these tests, update the matching regexps to match "aka (long )?int". Tested on arm-eabi and aarch64-linux-gnu. 2023-08-08 Christophe Lyon gcc/testsuite/ PR analyzer/110426 * gcc.dg/analyzer/allocation-size-multiline-1.c: Handle int32_t being "long int". * gcc.dg/analyzer/allocation-size-multiline-2.c: Likewise. * gcc.dg/analyzer/allocation-size-multiline-3.c: Likewise. --- gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c | 6 +++--- gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c | 6 +++--- gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c index 9938ba237a0..b56e4b4e8e1 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c @@ -16,7 +16,7 @@ void test_constant_1 (void) | int32_t *ptr = __builtin_malloc (1); | ^~~~~~~~~~~~~~~~~~~~ | | - | (1) allocated 1 bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 1 bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ @@ -34,7 +34,7 @@ void test_constant_2 (void) | int32_t *ptr = __builtin_malloc (2); | ^~~~~~~~~~~~~~~~~~~~ | | - | (1) allocated 2 bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 2 bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ @@ -52,6 +52,6 @@ void test_symbolic (int n) | int32_t *ptr = __builtin_malloc (n * 2); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | - | (1) allocated 'n * 2' bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 'n * 2' bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c index 9e1269cbb7a..8912913a78c 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c @@ -16,7 +16,7 @@ void test_constant_1 (void) | int32_t *ptr = __builtin_alloca (1); | ^~~~~~~~~~~~~~~~~~~~ | | - | (1) allocated 1 bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 1 bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ @@ -33,7 +33,7 @@ void test_constant_2 (void) | int32_t *ptr = __builtin_alloca (2); | ^~~~~~~~~~~~~~~~~~~~ | | - | (1) allocated 2 bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 2 bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ @@ -50,7 +50,7 @@ void test_symbolic (int n) | int32_t *ptr = __builtin_alloca (n * 2); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | - | (1) allocated 'n * 2' bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 'n * 2' bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c index 71790d91753..88fc8edee7f 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c @@ -20,7 +20,7 @@ void test_constant_99 (void) | int32_t *ptr = alloca (99); | ^~~~~~ | | - | (1) allocated 99 bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 99 bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ @@ -37,6 +37,6 @@ void test_symbolic (int n) | int32_t *ptr = alloca (n * 2); | ^~~~~~ | | - | (1) allocated 'n * 2' bytes and assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (1) allocated 'n * 2' bytes and assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */