diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-03-24 21:36:16 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-03-24 21:38:07 +0000 |
commit | f7c0b0fc4fdeaf034dc38356830625f7280d325d (patch) | |
tree | b9ca6f6ceffe9272a262f86190f272fabe777f20 /libstdc++-v3/testsuite | |
parent | 14c924333d7d0b2b6be8eee35d7bc7c2cb17aba2 (diff) | |
download | gcc-f7c0b0fc4fdeaf034dc38356830625f7280d325d.zip gcc-f7c0b0fc4fdeaf034dc38356830625f7280d325d.tar.gz gcc-f7c0b0fc4fdeaf034dc38356830625f7280d325d.tar.bz2 |
libstdc++: Add testcases for resolved bug [PR101527]
These tests were fixed by a front-end change r13-465-g4df735e01e3199 so
this just adds them to the testsuite to be sure we don't regress.
libstdc++-v3/ChangeLog:
PR libstdc++/101527
* testsuite/24_iterators/common_iterator/101527.cc: New test.
* testsuite/24_iterators/counted_iterator/101527.cc: New test.
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r-- | libstdc++-v3/testsuite/24_iterators/common_iterator/101527.cc | 14 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/24_iterators/counted_iterator/101527.cc | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/24_iterators/common_iterator/101527.cc b/libstdc++-v3/testsuite/24_iterators/common_iterator/101527.cc new file mode 100644 index 0000000..0a2a5e8 --- /dev/null +++ b/libstdc++-v3/testsuite/24_iterators/common_iterator/101527.cc @@ -0,0 +1,14 @@ +// { dg-do compile { target c++20 } } + +// PR libstdc++/101527 +// implementation of std::common_iterator and std::counted_iterator's +// operator== seems to be wrong + +#include <iterator> + +bool test_pr101527() +{ + std::common_iterator<int*, std::unreachable_sentinel_t> it1; + std::common_iterator<const int*, std::unreachable_sentinel_t> it2; + return it1 == it2; +} diff --git a/libstdc++-v3/testsuite/24_iterators/counted_iterator/101527.cc b/libstdc++-v3/testsuite/24_iterators/counted_iterator/101527.cc new file mode 100644 index 0000000..51c6e99 --- /dev/null +++ b/libstdc++-v3/testsuite/24_iterators/counted_iterator/101527.cc @@ -0,0 +1,14 @@ +// { dg-do compile { target c++20 } } + +// PR libstdc++/101527 +// implementation of std::common_iterator and std::counted_iterator's +// operator== seems to be wrong + +#include <iterator> + +bool test_pr101527() +{ + std::counted_iterator<int*> it1; + std::counted_iterator<const int*> it2; + return it1 == it2; +} |