diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/debug/pr84813.C | 33 |
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> (); +} |