From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 8C1DB3858D20; Wed, 20 Sep 2023 07:22:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C1DB3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-CSE-ConnectionGUID: D6sZ/z69SmKqMWVMzKFnYQ== X-CSE-MsgGUID: CHVx2iA0S6i3/mFfHBefuQ== X-IronPort-AV: E=Sophos;i="6.02,161,1688457600"; d="scan'208";a="17325060" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 19 Sep 2023 23:22:21 -0800 IronPort-SDR: SKydcYwzkeTomSVRtzbcp6JMv97XEZvylwSLBIutJ2Q0KMzAFF4BIB/Zuzt9B2gNQf/oI1mtrI YhVzg0k8MH3Ij6OnkKec0wxLD4hk5dCrqq8dkMm42bsnZoNQgG/59V/wYyL9OT6puLZm+yLOrI ffLnc7aNudY/QgjqG/7w2YxJY/zLqi2ydTQBi6OKRBfbK07Kx3GOes+kA172uowsicqrEBs+hO Ts1DRDV0snITbwtYZub1+w1eOK2KRXgkMycOeEKjAOQG0HG36kZiu1WHFPEuKFsp77VWjJPr2x Wag= From: Thomas Schwinge To: =?utf-8?Q?Fran=C3=A7ois?= Dumont CC: , , Jonathan Wakely Subject: Re: Attempt to fix g++.dg tests failures in gnu-versioned-namespace mode In-Reply-To: <602a9594-eb22-117a-0372-9cdbaa0d2672@gmail.com> References: <602a9594-eb22-117a-0372-9cdbaa0d2672@gmail.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Wed, 20 Sep 2023 09:22:11 +0200 Message-ID: <87v8c55mxo.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On 2023-09-20T07:08:25+0200, Fran=C3=A7ois Dumont via Gcc = wrote: > I've configured libstdc++ with --enable-symvers=3Dgnu-versioned-namespace I can't comment on that option... > and run make check-c++. > > A number of failures are like this one: > > /home/fdumont/dev/gcc/git/gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-= 00-bad-op-new.C: > In function 'coro1 f()': > /home/fdumont/dev/gcc/git/gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-= 00-bad-op-new.C:9:1: > error: 'operator new' is provided by > 'std::__8::__n4861::__coroutine_traits_impl::promise_type' > {aka 'co > ro1::promise_type'} but is not usable with the function signature 'coro1 > f()' > compiler exited with status 1 > FAIL: g++.dg/coroutines/coro-bad-alloc-00-bad-op-new.C (test for > errors, line 9) > FAIL: g++.dg/coroutines/coro-bad-alloc-00-bad-op-new.C (test for excess > errors) > Excess errors: > /home/fdumont/dev/gcc/git/gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-= 00-bad-op-new.C:9:1: > error: 'operator new' is provided by > 'std::__n4861::__coroutine_traits_impl::promise_type' {aka > 'coro1::promise_type'} but is not usable with the function signature > 'coro1 f()' > > The '__8' is messing with expected output. > > So I've added: > > # Ignore optional version namespace from libstdc++. > regsub -all "std::__8::" $text "std::" text ..., and whether that's conceptually the correct solution... > in testsuite/lib/prune.exp prune_gcc_output. > > But it had no impact, same failures. > > What am I missing ? ..., but I can answer that one: pruning happens after scanning for 'dg-error' etc. (..., which are captured in 'dg-messages'). See DejaGnu 'dg.exp:dg-test': [...] set results [${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_= flags ${dg-extra-tool-flags}"] set comp_output [lindex $results 0] set output_file [lindex $results 1] foreach i ${dg-messages} { verbose "Scanning for message: $i" 4 # Remove all error messages for the line [lindex $i 0] # in the source file. If we find any, success! [...] } # Remove messages from the tool that we can ignore. set comp_output [prune_warnings $comp_output] [...] if {$comp_output ne ""} { fail "$name (test for excess errors)" send_log "Excess errors:\n$comp_output\n" } else { pass "$name (test for excess errors)" } [...] So you'll have to have your 's%std::__8::%std::' work on 'dg-messages', I suppose? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955