From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 3AE0C3858C27; Wed, 24 Nov 2021 11:50:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AE0C3858C27 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-9275] libstdc++: Add another testcase for std::unique_ptr printer [PR103086] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 7510c23c1ec53aa4a62705f0384079661342ff7b X-Git-Newrev: fa1ea255dba2d44ff22e434ed3d7778e8aaf4b91 Message-Id: <20211124115006.3AE0C3858C27@sourceware.org> Date: Wed, 24 Nov 2021 11:50:06 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 11:50:06 -0000 https://gcc.gnu.org/g:fa1ea255dba2d44ff22e434ed3d7778e8aaf4b91 commit r11-9275-gfa1ea255dba2d44ff22e434ed3d7778e8aaf4b91 Author: Jonathan Wakely Date: Tue Nov 23 21:35:40 2021 +0000 libstdc++: Add another testcase for std::unique_ptr printer [PR103086] libstdc++-v3/ChangeLog: PR libstdc++/103086 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with non-empty pointer and non-empty deleter. (cherry picked from commit c59ec55c3459fba619e05ee7f59480b71e85ffd7) Diff: --- libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc index 637246b3c12..fd50e8b028a 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc @@ -151,6 +151,17 @@ main() std::unique_ptr& rempty_ptr = empty_ptr; // { dg-final { note-test rempty_ptr {std::unique_ptr = {get() = {}}} } } + struct Deleter_pr103086 + { + int deleter_member = -1; + void operator()(int*) const noexcept { } + }; + + std::unique_ptr uniq_ptr; +// { dg-final { note-test uniq_ptr {std::unique_ptr = {get() = 0x0}} } } + std::unique_ptr& runiq_ptr = uniq_ptr; +// { 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}} } } ExTuple &rtpl = tpl;