PR c++/91581 - ICE in exception-specification of defaulted ctor.
authorMarek Polacek <polacek@redhat.com>
Fri, 25 Oct 2019 19:11:58 +0000 (19:11 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 25 Oct 2019 19:11:58 +0000 (19:11 +0000)
* g++.dg/cpp0x/noexcept55.C: New test.

From-SVN: r277462

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

index ddf575ba8c35bf54c9c14d5e57e3e010139702a3..38ac851a4e6d096cadcb6177d7259407613cc513 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-25  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/91581 - ICE in exception-specification of defaulted ctor.
+       * g++.dg/cpp0x/noexcept55.C: New test.
+
 2019-10-25  Cesar Philippidis <cesar@codesourcery.com>
            Tobias Burnus  <tobias@codesourcery.com>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept55.C b/gcc/testsuite/g++.dg/cpp0x/noexcept55.C
new file mode 100644 (file)
index 0000000..f46320d
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/91581 - ICE in exception-specification of defaulted ctor.
+// { dg-do compile { target c++11 } }
+
+struct A {
+    A() noexcept(sizeof(A)) = default;
+};
+
+A a;