From patchwork Fri Feb 24 19:18:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 65617 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E9A538555A1 for ; Fri, 24 Feb 2023 19:19:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E9A538555A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677266353; bh=eVPwrq4jX+Bs3axYfIV9Fiv36r2Kfr9EknjeytUL5Bw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=e/85/CPEhAfeGVRLguhtEK8WtdMWjXhEcFUvv1GkEJdiNUMOgYD5DZo2Kb6czWQWk DRWrCTjRbkEzlw93hYBxC9RR3viDLZCVoih3N6jCI42KGJhQk8/utY2CUCSgX3vxGC MNZ1e/ji0xzCKEFWx2PduDR/qz3aIXkzC/oODui0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 8CE2F385840F for ; Fri, 24 Feb 2023 19:18:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CE2F385840F To: Subject: [PATCH 2/2] testsuite: Fix gcc.dg/analyzer/allocation-size-multiline-3.c MIME-Version: 1.0 Message-ID: <20230224191843.729A520444@pchp3.se.axis.com> Date: Fri, 24 Feb 2023 20:18:43 +0100 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, 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: Hans-Peter Nilsson via Gcc-patches From: Hans-Peter Nilsson Reply-To: Hans-Peter Nilsson Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" I'll install this as obvious provided that the prerequisite multiline.exp patch is approved. -- >8 -- For 32-bit newlib targets (such as cris-elf and pru-elf), that int32_t is "long int". See other regexps in the testsuite matching "aka (long )?int" (with single-quotes where needed) where the pattern in allocation-size-multiline-3.c matches plain "int". Uses the special syntax recently introduced for multi-line patterns. testsuite: * gcc.dg/analyzer/allocation-size-multiline-3.c: Handle int32_t being "long int". --- gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e27364a8e839..b3de582368fc 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c @@ -21,7 +21,7 @@ void test_constant_99 (void) | ^~~~~~ | | | (1) allocated 99 bytes here - | (2) assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (2) assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */ @@ -39,6 +39,6 @@ void test_symbolic (int n) | ^~~~~~ | | | (1) allocated 'n * 2' bytes here - | (2) assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4' + | (2) assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4' | { dg-end-multiline-output "" } */