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: 61421 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1097342wrd; Fri, 24 Feb 2023 11:19:29 -0800 (PST) X-Google-Smtp-Source: AK7set+CIjg0mEMogRekhOWwALX6Ri9S+aHY9G2L1zq31NHResU++xcV/Je3/uEOJoCI65j/NiYD X-Received: by 2002:a17:906:ce38:b0:8b2:8876:6a3c with SMTP id sd24-20020a170906ce3800b008b288766a3cmr27667786ejb.29.1677266369315; Fri, 24 Feb 2023 11:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677266369; cv=none; d=google.com; s=arc-20160816; b=t47bU9HUuuByJaPE8PFh75sFADXoTqkPWsu/3j4+Ez010uGJp48F90RxiBKq6XulCV 9tmzIQNv0zKBK1VY9sGLIP1iSuMjbotfa5E19SsUpmH5gRZICEAM2y5XqhIt3AH5q++w Arl/mMGB+fpRMWU9KMP8MXn6y6AFohwQGHO/BvGUY4RE+AS7SeyptQZTM6EH/i5t1dL1 UulNSz3I+8QqkQ00VThCI9HvMG3Sag9zKpPTdxXJWj4wtOfj1HOH75jukROmr15dHshM 0z1G3LS0QZFXBGPv7eGLNOJIOK6ZNCkY42jPhKTJTdXYfntg16RB9arN6yg8tb65QQq+ q2XQ== 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:date:message-id :content-transfer-encoding:mime-version:subject:to:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=eVPwrq4jX+Bs3axYfIV9Fiv36r2Kfr9EknjeytUL5Bw=; b=RdMxcEBnQM/EffzV4BzWvK94J1faUAkt8eDrdyxMBg+h8cGwg5QLStE6LNprTKd51e HUrycfy1W70Bk6Qaz0oBAYhHgRd7dgpMYbBmSLbvULBjgIRCFtZ1obc66jNlrb0shAib p5XRBCJGsYbbCOTwC5nyjC/KtndXNkPDM3H64SVxnknFxBpvUAhGZ5s9JDLTauRUGWU/ 07KZ0q11wGf/+jRSN/H8CFhVMX2EaS7oh0O6QWPrcl6bpLBvaST1grRAazdlv0QQrkab r9/idYh3A7mxHttMMak83ut7EN3n3acnUY1Lh/+8PswDngkeRHKcFMZPLnBzL8wCxMyv sVMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=njOwuU92; 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 30-20020a17090600de00b008c0f93e4de3si25805278eji.99.2023.02.24.11.19.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 11:19:29 -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=@gcc.gnu.org header.s=default header.b=njOwuU92; 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 239363851C03 for ; Fri, 24 Feb 2023 19:19:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 239363851C03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677266368; bh=eVPwrq4jX+Bs3axYfIV9Fiv36r2Kfr9EknjeytUL5Bw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=njOwuU929z3YN0XD21tE+QxjCDrko8ejKKAs8uXPd0K/ICgEuFOriEuzS4N5+MsKv CUZunqGVha5qtuSpsazhr9JOENew55gd+V6UNgnFXxwHDwMgkSMsmMh7+e2ie3bp1J Gz0NjbRv6SWaUSNzxxKntK8hhYuH229K+Oir7flQ= 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758741260612250445?= X-GMAIL-MSGID: =?utf-8?q?1758741260612250445?= 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 "" } */