From patchwork Mon Aug 15 14:23:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 56749 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 8EA2B3858429 for ; Mon, 15 Aug 2022 14:24:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EA2B3858429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1660573456; bh=a3DjtyjLRJjWez8HBSxR6YbK+NkGF2gGR1cub0lJt0k=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gcITqFZBywJO9seUYMjvfIBZHuSNJ+6OOagsbnpoctDa6niJiuM2KNCNek1hjfwdV MWSJkUrG1BVHbHofdHV6FR7jS/SaQ+20fgjlXsJf2wCevC4otFgKx0D0WRVzq0pW3B IzqQSTc0OfSX1O9JTy8HDLhr6YhIubEX6NozeWnI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 788953857B81 for ; Mon, 15 Aug 2022 14:23:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 788953857B81 Received: by mail-pl1-x62c.google.com with SMTP id p18so6452846plr.8 for ; Mon, 15 Aug 2022 07:23:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc; bh=a3DjtyjLRJjWez8HBSxR6YbK+NkGF2gGR1cub0lJt0k=; b=sxexdyAN2A5Hr/vrrxKMjU3oWwAjJrgoOrBNBr8th6BpE32DMJXx6w7X9EZz9qIJZw LAtFchFz4JS+qjhari4Y2U15USUBSkPBLVq8UgDqg9Xfd4k61ZMa5JBJf9wlqV6C2U3N Yy+SGWvPnEB4DpptD7Z6TQ6pLK/oVd6p6ECMSQeAO3ECQ1PoswR4T+mzeSWhi+mTMsQ8 QE5pK6SPlgzwI7g6fGoes4JWnEGSw+pICZO09LEwIcSSRUdQb/yOI7vRWwbpMyw4tLuL met94OTAoKB6mDZMcySolTrKzucTvzXebPYO27Efx6FUhYQCx+ShmdEmE0y8MNGbdrIO lWFw== X-Gm-Message-State: ACgBeo14/J8mh+dLzCM/SAk7wdiYFqWmtQ9PN9vKzFj6dIF/BEalGvrl PIPc9sWRSSBnDo+MAJ6KvgkjEYC0zVk= X-Google-Smtp-Source: AA6agR6rfjfsuUQinp/Y6Twow8wJX/3WyL8rPAYmY4MAvAazxYjWXQxbBRgeYXvGR37rdp6qxoYBeA== X-Received: by 2002:a17:90a:e7d1:b0:1f5:665:4607 with SMTP id kb17-20020a17090ae7d100b001f506654607mr28414947pjb.77.1660573424248; Mon, 15 Aug 2022 07:23:44 -0700 (PDT) Received: from ?IPV6:2620:10d:c085:21cf::116f? ([2620:10d:c090:400::5:4a88]) by smtp.googlemail.com with ESMTPSA id z6-20020a170903018600b0016ccbc9db0fsm7162412plg.5.2022.08.15.07.23.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Aug 2022 07:23:43 -0700 (PDT) Message-ID: Date: Mon, 15 Aug 2022 10:23:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Content-Language: en-US To: GCC Patches , shiyulong@iscas.ac.cn Subject: c++: Fix module line no testcase X-Spam-Status: No, score=-3038.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: , X-Patchwork-Original-From: Nathan Sidwell via Gcc-patches From: Nathan Sidwell Reply-To: Nathan Sidwell Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Not all systems have the same injected headers, leading to line location table differences that are immaterial to the test. Fix the regexp more robustly. nathan From af088b32def1c56538f0f3aaea16f013e9292d64 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 15 Aug 2022 07:19:36 -0700 Subject: [PATCH] c++: Fix module line no testcase Not all systems have the same injected headers, leading to line location table differences that are immaterial to the test. Fix the regexp more robustly. gcc/testsuite/ * g++.dg/modules/loc-prune-4.C: Adjust regexp --- gcc/testsuite/g++.dg/modules/loc-prune-4.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/modules/loc-prune-4.C b/gcc/testsuite/g++.dg/modules/loc-prune-4.C index 765c378e51e..aa8f248b52b 100644 --- a/gcc/testsuite/g++.dg/modules/loc-prune-4.C +++ b/gcc/testsuite/g++.dg/modules/loc-prune-4.C @@ -18,5 +18,5 @@ int baz (int); // { dg-final { scan-lang-dump {Ordinary maps:2 locs:12288 range_bits:5} module } } // { dg-final { scan-lang-dump { 1 source file names\n Source file...=[^\n]*loc-prune-4.C\n} module } } -// { dg-final { scan-lang-dump { Span:0 ordinary \[2.....\+12288,\+4096\)->\[0,\+4096\)} module } } -// { dg-final { scan-lang-dump { Span:1 ordinary \[2.....\+40960,\+8192\)->\[4096,\+8192\)} module } } +// { dg-final { scan-lang-dump { Span:0 ordinary \[[0-9]+\+12288,\+4096\)->\[0,\+4096\)} module } } +// { dg-final { scan-lang-dump { Span:1 ordinary \[[0-9]+\+40960,\+8192\)->\[4096,\+8192\)} module } } -- 2.30.2