aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2018-03-12 10:02:36 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-03-12 10:02:36 +0100
commitb270a5215a4ed5a99efa93ed34a98eab75fe13c7 (patch)
tree4817908d63ae61064278465da17fb050491cb896 /gcc
parentb79fa2f609c70a70125c979e363176002d1f9acd (diff)
downloadgcc-b270a5215a4ed5a99efa93ed34a98eab75fe13c7.zip
gcc-b270a5215a4ed5a99efa93ed34a98eab75fe13c7.tar.gz
gcc-b270a5215a4ed5a99efa93ed34a98eab75fe13c7.tar.bz2
re PR c++/84813 (internal compiler error: Segmentation fault with lambdas and constexpr variables)
PR c++/84813 * g++.dg/debug/pr84813.C: New test. From-SVN: r258445
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/debug/pr84813.C33
2 files changed, 39 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 883fbb0c..69c00d1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,7 +1,12 @@
+2018-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84813
+ * g++.dg/debug/pr84813.C: New test.
+
2018-03-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84546
- * gfortran.dg/unlimited_polymorphic_29.f90 : New test.
+ * gfortran.dg/unlimited_polymorphic_29.f90: New test.
2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
diff --git a/gcc/testsuite/g++.dg/debug/pr84813.C b/gcc/testsuite/g++.dg/debug/pr84813.C
new file mode 100644
index 0000000..af23b30
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr84813.C
@@ -0,0 +1,33 @@
+// PR c++/84813
+// { dg-do compile }
+// { dg-options "-g -std=c++14" }
+
+template <typename>
+struct P {};
+
+template <int>
+struct F {
+ using type = int;
+};
+
+template <typename T>
+void
+apply ()
+{
+ constexpr int N = T::N;
+ [] (typename F<N>::type)
+ {
+ auto f = [] () {};
+ P<decltype (f)>{};
+ };
+}
+
+struct A {
+ static constexpr int N = 1;
+};
+
+void
+instantiate ()
+{
+ apply<A> ();
+}