re PR c++/87125 (ICE in tsubst_copy starting with r261084)
authorJakub Jelinek <jakub@redhat.com>
Fri, 21 Dec 2018 12:11:57 +0000 (13:11 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 21 Dec 2018 12:11:57 +0000 (13:11 +0100)
PR c++/87125
* g++.dg/cpp0x/pr87125.C: New test.

From-SVN: r267324

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

index 1569e7aaa0f9eaaa498b126aba0a818820cccc24..749a7b71f35c3c2b5ea3a00c4f17dfe1f57a9cfb 100644 (file)
@@ -1,3 +1,8 @@
+2018-12-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/87125
+       * g++.dg/cpp0x/pr87125.C: New test.
+
 2018-12-21  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
 
        * gcc.target/arm/size-optimization-ieee-1.c: Skip if passing
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr87125.C b/gcc/testsuite/g++.dg/cpp0x/pr87125.C
new file mode 100644 (file)
index 0000000..a24196b
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/87125
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct S {
+  template <typename U>
+  constexpr S (U) noexcept (T ()) {}
+};
+struct V : S<int> { using S::S; };
+
+bool
+foo ()
+{
+  return noexcept (V (0));
+}