From patchwork Sun Sep 4 18:47:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Fent X-Patchwork-Id: 954 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp1645977wro; Sun, 4 Sep 2022 11:49:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4kId1dnkNyo4RcvpEaVln4SNZA0YLxfF/qScMFf6SzBJhDdSL7MBbQ0aIXg9+LzQNn5nsA X-Received: by 2002:a17:907:94c2:b0:73d:c534:1ac0 with SMTP id dn2-20020a17090794c200b0073dc5341ac0mr34437497ejc.461.1662317358301; Sun, 04 Sep 2022 11:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662317358; cv=none; d=google.com; s=arc-20160816; b=ZwyPkpEdOMUhX1QwNWTBQA6ocOg+ME0SNsMZo6CIRg3g3oM6PFzq/E76e1dUlqayCa 47kCu7HXhlgYkOF+oP74PQ68FrRVN/dzMy2GK80wv1Rm8Dh0oufIhWdEa3W1qgMWWROp tsl7hfHN6Y8Qs+TYkanJJ5VqgpMVHPoZ+gJ8NaN5FJWKgYHXinPsdK+13gfMTWttbUI4 +QUgX1BIvrfFfknPJYi7kO9OVrsO0eBr1bB8sHc2lfDKmieqT385A1Z3soXaXpCrla9q CTeG/WU3fOb88mEP1X3jWktKQvRTi2GKEElSpYQMr8fw1ALyU8L8ZXSgrY0GYThYhy6x Bxag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=eDvVcvcWBiQ7v3MmLkYvjRawkDBvcAKs4kN0ENXKOO0=; b=U4KiNu0cJLmPILJTmKuUvGsyn/2TulIsxSAeIt9KZqa7PT/SvOKD/YUuGRToj114qi Fx64vXbiKqX+Gp2xoG4CcjlHL0NXklkkj4a0F2mE/BINmFd3kLGwoIMaNoHwsdOo0PxE q8UsP0O+0g03D2GaDKVDOJMXq18kWPflFAn26z1EU3Dn+n6glccL0iH8vk/KkfO9HVyl NY80OVz4wsVezfFnhCdZkR9emOl17HRNb6Ehu6TSIeJOX8kxugPI8JocD6ASvvd3XK9s xB7ZxQfu+wvLGHrYNQBVXa7TVq9AAKFFaTbsOO+1QHzWaKNEvC5XNu+osjirhU+oAK8r MXHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="kPpS/vPd"; 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 di15-20020a170906730f00b00730cd86905dsi4880051ejc.80.2022.09.04.11.49.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 11:49:18 -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="kPpS/vPd"; 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 96DE4385415C for ; Sun, 4 Sep 2022 18:48:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96DE4385415C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662317313; bh=eDvVcvcWBiQ7v3MmLkYvjRawkDBvcAKs4kN0ENXKOO0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=kPpS/vPdCddvQGsCRpIWWKlwwMt0gLmexnTJNKigywmWjllZoZ0LMP2ToM41OH6y8 lgns5tkyyhyPFuq7IKjIuYsY0h1lpjcG4tIeRgGG0RyyMuTj2m1TSFI0/2Ah9GiidM NB+6pqOg8dxiQ+QHdPePt+BH22G6u41mtFl3z0PM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mailout1.rbg.tum.de (mailout1.rbg.tum.de [131.159.0.201]) by sourceware.org (Postfix) with ESMTPS id 4B1223858D32; Sun, 4 Sep 2022 18:47:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B1223858D32 Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [IPv6:2a09:80c0:254::14]) by mailout1.rbg.tum.de (Postfix) with ESMTPS id 3396490; Sun, 4 Sep 2022 20:47:47 +0200 (CEST) Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id 2EF531AFE; Sun, 4 Sep 2022 20:47:47 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id 0E6C91AFD; Sun, 4 Sep 2022 20:47:47 +0200 (CEST) Received: from mail.in.tum.de (vmrbg426.in.tum.de [131.159.0.73]) by mailrelay1.rbg.tum.de (Postfix) with ESMTPS id 0CD241AFC; Sun, 4 Sep 2022 20:47:47 +0200 (CEST) Received: by mail.in.tum.de (Postfix, from userid 112) id 0936B4A0321; Sun, 4 Sep 2022 20:47:47 +0200 (CEST) Received: (Authenticated sender: fent) by mail.in.tum.de (Postfix) with ESMTPSA id 8167A4A027E; Sun, 4 Sep 2022 20:47:46 +0200 (CEST) (Extended-Queue-bit xtech_hb@fff.in.tum.de) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] libstdc++: Fix pretty printer tests of tuple indexes Date: Sun, 4 Sep 2022 20:47:34 +0200 Message-Id: <20220904184735.177348-1-fent@in.tum.de> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: Philipp Fent via Gcc-patches From: Philipp Fent Reply-To: Philipp Fent Cc: Philipp Fent 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?1743066086069579826?= X-GMAIL-MSGID: =?utf-8?q?1743066086069579826?= Signed-off-by: Philipp Fent --- libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc | 2 +- libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc index cc91803e247..af335d0d3c7 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc @@ -29,7 +29,7 @@ main() // { dg-final { note-test t1 {empty std::tuple} } } std::tuple> t2{ "Johnny", 5, {} }; -// { dg-final { regexp-test t2 {std::tuple containing = {\[1\] = "Johnny", \[2\] = 5, \[3\] = empty std::tuple}} } } +// { dg-final { regexp-test t2 {std::tuple containing = {\[0\] = "Johnny", \[1\] = 5, \[2\] = empty std::tuple}} } } std::cout << "\n"; return 0; // Mark SPOT diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc index f97640a0189..bc5978ee69d 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc @@ -166,9 +166,9 @@ main() // { dg-final { note-test runiq_ptr {std::unique_ptr = {get() = 0x0}} } } ExTuple tpl(6,7); -// { dg-final { note-test tpl {std::tuple containing = {[1] = 6, [2] = 7}} } } +// { dg-final { note-test tpl {std::tuple containing = {[0] = 6, [1] = 7}} } } ExTuple &rtpl = tpl; -// { dg-final { note-test rtpl {std::tuple containing = {[1] = 6, [2] = 7}} } } +// { dg-final { note-test rtpl {std::tuple containing = {[0] = 6, [1] = 7}} } } std::error_code e0; // { dg-final { note-test e0 {std::error_code = { }} } } From patchwork Sun Sep 4 18:47:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Fent X-Patchwork-Id: 955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp1646036wro; Sun, 4 Sep 2022 11:49:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR62WtMxK/kzS8qMeVKQlI/Nzk7gjAFLINg2T5JtPguuotKTFrU+M4xSqusRIQAmboUN5Lur X-Received: by 2002:a17:907:2d86:b0:741:662f:f1f7 with SMTP id gt6-20020a1709072d8600b00741662ff1f7mr25211712ejc.34.1662317379744; Sun, 04 Sep 2022 11:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662317379; cv=none; d=google.com; s=arc-20160816; b=oJiS18ovTB3CnSsRw56bmCOvScZdET1co6k+4LG4VCKlgic0bofnO8pKaqQVWU5WJo u701EKcfAN2bFTHTexrROl5JQ57Ml1lZ9+Aadhy7yuYgeAW48X3ceohqLTVyDK17NSUO lG4Ds64s5U1DFtMdsZ+Yul/Xcq7h6EanDUriG62I0Gl4HMQm32WbzP96eg047PHS+Hrb 5/7O7+VnSU67pbqgBsEwml1WF4ckjesECqe/kNblrByggI/Xc6FqA69mNwwML3Ure+re yaDq+Uby/gl++S+KCtmg1VQi4qBV8n51CWSSHSpVYR7/Gtjt8qYBhqhSQvWSJEYQsvR8 XQdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=FO65aQJ6VjbqPu87JNmANcNDLrvTCWtIsMdtmXbsaxg=; b=CvKdIhgMllR2cbXQ/0Dzo4g5ZAoKzx3FddIzbjYtEmu4IZqo+aKjowM2xJdv+EGOES OMtMfhUoRO5JQrqTfBV6rJm/xhZ+veZ1TqwulkwCKgfVGFPefxbUEHJCbaFnG5K1sIqp bqTsz7WXAF4WscPkJrvs/IdQ4I2gQY5c3DwFlFVF/NE7nvYIdw3q4xCWunPhfVdyKg5y FbeKU/cQSQty0mZyi6KsuWAi1+y5Xma7AMShnGz3kemByxYnnmZI+4wogNX9rmt+i0Z/ 6kYSfP1DnhNCqXplKUfRIt58frHuCExS7wLsZlfQ865bqzdfnK+DTrTJWqdxi4bkGFIe A6Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=bNoCUltE; 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 h4-20020a0564020e8400b0044dbb9afe1fsi2795485eda.467.2022.09.04.11.49.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 11:49:39 -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=bNoCUltE; 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 522373854169 for ; Sun, 4 Sep 2022 18:48:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 522373854169 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662317328; bh=FO65aQJ6VjbqPu87JNmANcNDLrvTCWtIsMdtmXbsaxg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=bNoCUltE44C5VDtjMIoSeEIS4jaDf7Alo0sI/m2oRWj73++cgv3q2yQCjtK/37vT1 26o7mu2dsUhmIXF5gYw93dxzluu7/HZk6NLPDxXqvHqd7Uo8TpAp3ulcivcgxMXESd vc28dtqEoDeK2vyXh/0GvLR5XPKQEVQcGQrJ/Sr8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mailout1.rbg.tum.de (mailout1.rbg.tum.de [131.159.0.201]) by sourceware.org (Postfix) with ESMTPS id 75FCA3856962; Sun, 4 Sep 2022 18:48:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 75FCA3856962 Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [131.159.254.14]) by mailout1.rbg.tum.de (Postfix) with ESMTPS id 9870690; Sun, 4 Sep 2022 20:48:03 +0200 (CEST) Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id 95B251AFE; Sun, 4 Sep 2022 20:48:03 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id 753BE1AFD; Sun, 4 Sep 2022 20:48:03 +0200 (CEST) Received: from mail.in.tum.de (vmrbg426.in.tum.de [131.159.0.73]) by mailrelay1.rbg.tum.de (Postfix) with ESMTPS id 739541AFC; Sun, 4 Sep 2022 20:48:03 +0200 (CEST) Received: by mail.in.tum.de (Postfix, from userid 112) id 70CA34A04C4; Sun, 4 Sep 2022 20:48:03 +0200 (CEST) Received: (Authenticated sender: fent) by mail.in.tum.de (Postfix) with ESMTPSA id E455A4A0321; Sun, 4 Sep 2022 20:48:02 +0200 (CEST) (Extended-Queue-bit xtech_to@fff.in.tum.de) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] libstdc++: Add pretty printer for std::stringstream Date: Sun, 4 Sep 2022 20:47:35 +0200 Message-Id: <20220904184735.177348-2-fent@in.tum.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220904184735.177348-1-fent@in.tum.de> References: <20220904184735.177348-1-fent@in.tum.de> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: Philipp Fent via Gcc-patches From: Philipp Fent Reply-To: Philipp Fent Cc: Philipp Fent 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?1743066109020009492?= X-GMAIL-MSGID: =?utf-8?q?1743066109020009492?= Signed-off-by: Philipp Fent --- libstdc++-v3/python/libstdcxx/v6/printers.py | 37 +++++++++++++++++++ .../libstdc++-prettyprinters/debug.cc | 5 +++ .../libstdc++-prettyprinters/simple.cc | 5 +++ .../libstdc++-prettyprinters/simple11.cc | 5 +++ 4 files changed, 52 insertions(+) diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index d70c8d5d616..5083f693387 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -969,6 +969,39 @@ class StdStringPrinter: def display_hint (self): return 'string' +class StdStringBufPrinter: + "Print a std::basic_stringbuf" + + def __init__(self, _, val): + self.val = val + + def to_string(self): + pbase = self.val['_M_out_beg'] + pptr = self.val['_M_out_cur'] + egptr = self.val['_M_in_end'] + # Logic from basic_stringbuf::_M_high_mark() + if pptr: + if not egptr or pptr > egptr: + return pbase.string(length = pptr - pbase) + else: + return pbase.string(length = pptr - egptr) + return self.val['_M_string'] + + def display_hint(self): + return 'string' + +class StdStringStreamPrinter: + "Print a std::basic_stringstream" + + def __init__(self, _, val): + self.val = val + + def to_string(self): + return self.val['_M_stringbuf'] + + def display_hint(self): + return 'string' + class Tr1HashtableIterator(Iterator): def __init__ (self, hashtable): self.buckets = hashtable['_M_buckets'] @@ -2232,6 +2265,10 @@ def build_libstdcxx_dictionary (): libstdcxx_printer.add_version('std::', 'initializer_list', StdInitializerListPrinter) libstdcxx_printer.add_version('std::', 'atomic', StdAtomicPrinter) + libstdcxx_printer.add_version('std::', 'basic_stringbuf', StdStringBufPrinter) + libstdcxx_printer.add_version('std::__cxx11::', 'basic_stringbuf', StdStringBufPrinter) + libstdcxx_printer.add_version('std::', 'basic_stringstream', StdStringStreamPrinter) + libstdcxx_printer.add_version('std::__cxx11::', 'basic_stringstream', StdStringStreamPrinter) # std::regex components libstdcxx_printer.add_version('std::__detail::', '_State', diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc index 98bbc182551..7efec6d0f8b 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -110,6 +111,10 @@ main() __gnu_cxx::slist::iterator slliter = sll.begin(); // { dg-final { note-test slliter {47} } } + std::stringstream sstream; + sstream << "abc"; +// { dg-final { note-test sstream "\"abc\"" } } + std::cout << "\n"; return 0; // Mark SPOT } diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc index 1f85775bff0..584989ce09f 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -169,6 +170,10 @@ main() __gnu_cxx::slist::iterator slliter0; // { dg-final { note-test slliter0 {non-dereferenceable iterator for __gnu_cxx::slist} } } + std::stringstream sstream; + sstream << "abc"; +// { dg-final { note-test sstream "\"abc\"" } } + std::cout << "\n"; return 0; // Mark SPOT } diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc index 6f21675cf41..6edd7e929fe 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -162,6 +163,10 @@ main() __gnu_cxx::slist::iterator slliter0; // { dg-final { note-test slliter0 {non-dereferenceable iterator for __gnu_cxx::slist} } } + std::stringstream sstream; + sstream << "abc"; +// { dg-final { note-test sstream "\"abc\"" } } + std::cout << "\n"; return 0; // Mark SPOT }