From ec121f15f68b73d0c43d5fb485c93cf6dca4bc4d Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sat, 22 Jun 2019 15:51:49 +0000 Subject: [PATCH] re PR c++/66256 (noexcept evaluation done before end of class) PR c++/66256 * g++.dg/cpp0x/noexcept54.C: New test. From-SVN: r272588 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/noexcept54.C | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/noexcept54.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b122c6075d..d1226e6c370 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-06-22 Marek Polacek + + PR c++/66256 + * g++.dg/cpp0x/noexcept54.C: New test. + 2019-06-22 Jan Hubicka * gcc.dg/tree-ssa/alias-access-path-6.c: New testcase. diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept54.C b/gcc/testsuite/g++.dg/cpp0x/noexcept54.C new file mode 100644 index 00000000000..20d844b8e89 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept54.C @@ -0,0 +1,10 @@ +// PR c++/66256 - noexcept-specifier is a complete-class context. +// { dg-do compile { target c++11 } } + +void swap(int&, int&); + +int& get(); + +struct pair { + void swap(pair&) noexcept(noexcept(swap(get(), get()))) { } // { dg-error "no matching function for call" } +}; -- 2.30.2