diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-05-14 13:24:12 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-05-14 13:24:12 +0200 |
commit | f05627d404038368b99e92ac4df4c29f4ae4a5fa (patch) | |
tree | d3e94366cfe4484f1b706a75715632aa969171b9 | |
parent | 36ecd44bd2aa2623e12af6b7c8cf433a4f29aa57 (diff) | |
download | gcc-f05627d404038368b99e92ac4df4c29f4ae4a5fa.zip gcc-f05627d404038368b99e92ac4df4c29f4ae4a5fa.tar.gz gcc-f05627d404038368b99e92ac4df4c29f4ae4a5fa.tar.bz2 |
testsuite: Add testcase for already fixed PR [PR88872]
2021-05-14 Jakub Jelinek <jakub@redhat.com>
* g++.dg/cpp1y/pr88872.C: New test.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/pr88872.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr88872.C b/gcc/testsuite/g++.dg/cpp1y/pr88872.C new file mode 100644 index 0000000..3719e39 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr88872.C @@ -0,0 +1,24 @@ +// PR c++/88872 +// { dg-do compile { target c++14 } } + +struct a { + template <typename b> constexpr a(b) : c() {} + int c; +}; +void d(); +template <char...> constexpr a operator"" _n() { return d; } +struct e; +struct f { + e operator[](int); +}; +struct g { + void h(); + f i; +}; +template <typename> struct j { + void k() { [](auto) { constexpr auto l = 2_n; }(keywords); } + int keywords; +}; +using m = j<int>; +class e : public m {}; +void g::h() { i[0].k(); } |