re PR c++/55443 (ICE for some placement new expressions inside noexcept operator)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 18 Nov 2014 12:24:34 +0000 (12:24 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 18 Nov 2014 12:24:34 +0000 (12:24 +0000)
2014-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/55443
* g++.dg/cpp0x/noexcept26.C: New.
* g++.dg/cpp0x/noexcept27.C: Likewise.

From-SVN: r217711

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/noexcept26.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/noexcept27.C [new file with mode: 0644]

index 5abda800beb7dd1b8ebe1b3531df48fbdf801981..c4f26efba9cd9d3af0bbdba815c364e9b8ebfcd3 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/55443
+       * g++.dg/cpp0x/noexcept26.C: New.
+       * g++.dg/cpp0x/noexcept27.C: Likewise.
+
 2014-11-18  Paolo Carlini  <paolo.carlini@oracle.com>
 
        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 (file)
index 0000000..7c8b413
--- /dev/null
@@ -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 (file)
index 0000000..c44902d
--- /dev/null
@@ -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);