From 7b74bfb1062e523c50ccbea6dd966e3cb93d8d91 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 4 Apr 2019 15:15:59 +0000 Subject: [PATCH] re PR c++/56643 (Failure to match noexcept specifier of friend template function in template class) 2019-04-04 Paolo Carlini PR c++/56643 * g++.dg/cpp0x/noexcept40.C: New. From-SVN: r270144 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/noexcept40.C | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/noexcept40.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 06aedbcc7a9..1195c4339eb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-04 Paolo Carlini + + PR c++/56643 + * g++.dg/cpp0x/noexcept40.C: New. + 2019-04-03 Dominique d'Humieres PR fortran/68567 diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept40.C b/gcc/testsuite/g++.dg/cpp0x/noexcept40.C new file mode 100644 index 00000000000..2effcef52d6 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept40.C @@ -0,0 +1,17 @@ +// PR c++/56643 +// { dg-do compile { target c++11 } } + +template +struct Test { + template + friend void test(Test& arg) noexcept(M == 0); +}; + +template +void test(Test& arg) noexcept(N == 0) {} + +int main() { + Test<0> t; + test(t); + return 0; +} -- 2.30.2