Add incremental prettyprinter update patches from GTS 15 to GTS 16. Resolves: RHEL-169098 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
121 lines
5.0 KiB
Diff
121 lines
5.0 KiB
Diff
.../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<typename T> struct shared_ptr;
|
|
+ template<typename T> struct atomic;
|
|
+ template<> struct atomic<uintptr_t> { uintptr_t _M_i; };
|
|
+ template<typename T> struct sp_atomic;
|
|
+ struct sp_counts { int _M_use_count; int _M_weak_count; };
|
|
+
|
|
+ // Old representation of std::atomic<std::shared_ptr<T>>, before GCC 16
|
|
+ template<typename T>
|
|
+ struct sp_atomic<shared_ptr<T>>
|
|
+ {
|
|
+ T* _M_ptr = nullptr;
|
|
+ struct Impl {
|
|
+ atomic<uintptr_t> _M_val;
|
|
+ using pointer = sp_counts*;
|
|
+ } _M_refcount;
|
|
+ };
|
|
+ template<typename T>
|
|
+ struct atomic<shared_ptr<T>>
|
|
+ {
|
|
+ sp_atomic<shared_ptr<T>> _M_impl;
|
|
+ };
|
|
+
|
|
} // namespace std
|
|
|
|
int
|
|
@@ -110,6 +134,16 @@ main()
|
|
optional<void*> op{nullptr};
|
|
// { dg-final { note-test op {std::optional = {[contained value] = 0x0}} } }
|
|
|
|
+ std::atomic<std::shared_ptr<int>> aspe{};
|
|
+// { dg-final { note-test aspe {std::atomic<std::shared_ptr<int>> (empty) = {get() = 0x0}} } }
|
|
+
|
|
+ std::sp_counts counts{ 1, 3 };
|
|
+ std::sp_atomic<std::shared_ptr<int>>::Impl::pointer p = &counts;
|
|
+ std::atomic<std::shared_ptr<int>> asp{};
|
|
+ asp._M_impl._M_ptr = reinterpret_cast<int*>(0x1234abcd);
|
|
+ asp._M_impl._M_refcount._M_val._M_i = reinterpret_cast<std::uintptr_t>(p);
|
|
+// { dg-final { note-test asp {std::atomic<std::shared_ptr<int>> (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
|