.../testsuite/libstdc++-prettyprinters/compat.cc | 36 +++++++++++++++++++++- .../testsuite/libstdc++-prettyprinters/cxx11.cc | 2 +- .../testsuite/libstdc++-prettyprinters/cxx17.cc | 2 +- .../libstdc++-prettyprinters/filesystem-ts.cc | 2 +- .../libstdc++-prettyprinters/libfundts.cc | 2 +- 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc index 2ef5979834f..35ec5cf2398 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc @@ -1,7 +1,7 @@ // { dg-options "-g -O0" } // { dg-do run { target c++11 } } -// Copyright (C) 2014-2025 Free Software Foundation, Inc. +// Copyright (C) 2014-2026 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -88,6 +88,30 @@ namespace std this->_M_payload._M_engaged = true; } }; + + using uintptr_t = __UINTPTR_TYPE__; + template struct shared_ptr; + template struct atomic; + template<> struct atomic { uintptr_t _M_i; }; + template struct sp_atomic; + struct sp_counts { int _M_use_count; int _M_weak_count; }; + + // Old representation of std::atomic>, before GCC 16 + template + struct sp_atomic> + { + T* _M_ptr = nullptr; + struct Impl { + atomic _M_val; + using pointer = sp_counts*; + } _M_refcount; + }; + template + struct atomic> + { + sp_atomic> _M_impl; + }; + } // namespace std int @@ -110,6 +134,16 @@ main() optional op{nullptr}; // { dg-final { note-test op {std::optional = {[contained value] = 0x0}} } } + std::atomic> aspe{}; +// { dg-final { note-test aspe {std::atomic> (empty) = {get() = 0x0}} } } + + std::sp_counts counts{ 1, 3 }; + std::sp_atomic>::Impl::pointer p = &counts; + std::atomic> asp{}; + asp._M_impl._M_ptr = reinterpret_cast(0x1234abcd); + asp._M_impl._M_refcount._M_val._M_i = reinterpret_cast(p); +// { dg-final { note-test asp {std::atomic> (use count 1, weak count 2) = {get() = 0x1234abcd}} } } + __builtin_puts(""); return 0; // Mark SPOT } diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc index 23f6d97ddd4..61ea24e7bb2 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc @@ -1,7 +1,7 @@ // { dg-do run { target c++11 } } // { dg-options "-g -O0" } -// Copyright (C) 2011-2025 Free Software Foundation, Inc. +// Copyright (C) 2011-2026 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc index 6dd2b60c0a5..3a8dd925dd6 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc @@ -1,7 +1,7 @@ // { dg-options "-g -O0" } // { dg-do run { target c++17 } } -// Copyright (C) 2014-2025 Free Software Foundation, Inc. +// Copyright (C) 2014-2026 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/filesystem-ts.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/filesystem-ts.cc index 3221f2df90d..0bae706c9a3 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/filesystem-ts.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/filesystem-ts.cc @@ -2,7 +2,7 @@ // { dg-do run { target c++11 } } // { dg-require-filesystem-ts "" } -// Copyright (C) 2020-2025 Free Software Foundation, Inc. +// Copyright (C) 2020-2026 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc index bfb86885457..265fd6ffafe 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc @@ -1,7 +1,7 @@ // { dg-do run { target c++14 } } // { dg-options "-g -O0" } -// Copyright (C) 2014-2025 Free Software Foundation, Inc. +// Copyright (C) 2014-2026 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the