From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id DEA87385740F; Mon, 10 May 2021 14:55:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEA87385740F 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 r12-677] libstdc++: Adjust expected errors in tests when compiled as C++20 X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 695776733785973e809c89a739f3fa8d4c9b9d4e X-Git-Newrev: 23972128c83e62011b583f06b32c8501c096b7d8 Message-Id: <20210510145532.DEA87385740F@sourceware.org> Date: Mon, 10 May 2021 14:55:32 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2021 14:55:33 -0000 https://gcc.gnu.org/g:23972128c83e62011b583f06b32c8501c096b7d8 commit r12-677-g23972128c83e62011b583f06b32c8501c096b7d8 Author: Jonathan Wakely Date: Mon May 10 15:10:45 2021 +0100 libstdc++: Adjust expected errors in tests when compiled as C++20 libstdc++-v3/ChangeLog: * testsuite/20_util/scoped_allocator/69293_neg.cc: Add dg-error for additional errors in C++20. * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc: Likewise. * testsuite/20_util/uses_allocator/69293_neg.cc: Likewise. * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise. Diff: --- libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc | 1 + .../specialized_algorithms/memory_management_tools/destroy_neg.cc | 2 ++ libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc | 2 +- libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc index 5efd849ff36..fd37374447f 100644 --- a/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc +++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc @@ -47,6 +47,7 @@ test01() auto p = sa.allocate(1); sa.construct(p); // this is required to be ill-formed // { dg-error "failed: .* uses_allocator is true" "" { target *-*-* } 0 } + // { dg-error "too many initializers for 'X'" "" { target c++2a } 0 } } // Needed because of PR c++/92193 diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc index b17c6a0b90c..626f2e1c6ee 100644 --- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc +++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc @@ -48,3 +48,5 @@ test02() } // { dg-error "value type is destructible" "" { target *-*-* } 0 } +// { dg-error "use of deleted function" "" { target c++20 } 0 } +// { dg-error "is private within this context" "" { target c++20 } 0 } diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc index 921ebbc87de..2c5a62190e8 100644 --- a/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc +++ b/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc @@ -45,5 +45,5 @@ test01() alloc_type a; std::tuple t(std::allocator_arg, a); // this is required to be ill-formed // { dg-error "failed: .* uses_allocator is true" "" { target *-*-* } 0 } - // { dg-error "no matching function for call" "" { target c++2a } 0 } + // { dg-error "too many initializers for 'X'" "" { target c++2a } 0 } } diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc index c5cda776477..e858e3508bd 100644 --- a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc +++ b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc @@ -33,3 +33,4 @@ void foo(std::iostream& s) { s >> p; // { dg-error "no match" } } // { dg-prune-output "no type .*enable_if" } +// { dg-prune-output "template constraint failure" }