From 60dcf0e05338baa02e0857cfca2742072994817a Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 18 Nov 2014 12:24:34 +0000 Subject: [PATCH] re PR c++/55443 (ICE for some placement new expressions inside noexcept operator) 2014-11-18 Paolo Carlini PR c++/55443 * g++.dg/cpp0x/noexcept26.C: New. * g++.dg/cpp0x/noexcept27.C: Likewise. From-SVN: r217711 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/cpp0x/noexcept26.C | 11 +++++++++++ gcc/testsuite/g++.dg/cpp0x/noexcept27.C | 15 +++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/noexcept26.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/noexcept27.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5abda800beb..c4f26efba9c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-11-18 Paolo Carlini + + PR c++/55443 + * g++.dg/cpp0x/noexcept26.C: New. + * g++.dg/cpp0x/noexcept27.C: Likewise. + 2014-11-18 Paolo Carlini PR c++/60245 diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept26.C b/gcc/testsuite/g++.dg/cpp0x/noexcept26.C new file mode 100644 index 00000000000..7c8b4137b62 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept26.C @@ -0,0 +1,11 @@ +// PR c++/55443 +// { dg-do compile { target c++11 } } + +struct X +{ + constexpr X() { } + + void* operator new(__SIZE_TYPE__, void*) noexcept; +}; + +int main() { noexcept(new(0) X); } diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept27.C b/gcc/testsuite/g++.dg/cpp0x/noexcept27.C new file mode 100644 index 00000000000..c44902d862a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept27.C @@ -0,0 +1,15 @@ +// PR c++/55443 +// { dg-do compile { target c++11 } } + +struct X +{ + X() = default; + + X(int); + + void* operator new(__SIZE_TYPE__, void*) noexcept; +}; + +X x; + +bool b = noexcept(new(0) X); -- 2.30.2