From c98eece2bac43f80f8f3b1edeae253e3935d5df1 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 10 Mar 2019 14:02:48 +0100 Subject: [PATCH] re PR c++/89648 (rejects-valid error starting with r268850) PR c++/89648 * g++.dg/cpp0x/lambda/lambda-89648.C: New test. From-SVN: r269554 --- gcc/testsuite/ChangeLog | 5 ++ .../g++.dg/cpp0x/lambda/lambda-89648.C | 60 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cb07129671f..e5f1da7f567 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-10 Jakub Jelinek + + PR c++/89648 + * g++.dg/cpp0x/lambda/lambda-89648.C: New test. + 2019-03-10 Thomas Koenig PR fortran/66089 diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C new file mode 100644 index 00000000000..c7a3e84c284 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C @@ -0,0 +1,60 @@ +// PR c++/89648 +// { dg-do compile { target c++11 } } + +template struct A { static const T e = U; }; +template struct B; +template struct C; +template using E = typename C::k; +template struct F {}; +template using G = F; +template using H = F; +template using I = G; +template class J {}; +template struct B> : A {}; +template +struct C> : C> {}; +template struct C<0, J> { typedef T k; }; +template E> qux (J); +struct D { template void foo (T) {} }; +void bar (...); +struct K { void baz (int &); int l; D m; int *n, o; }; +template +void quux (int, int *, D x, int *, int, int, T, U, V y, H) { + x.foo ([=] { bar (qux (y)...); }); +} +void K::baz (int &x) { + J p; + int q, r; + long s; + quux (x, &l, m, n, o, r, s, q, p, I::e> ()); +} +// PR c++/89648 +// { dg-do compile { target c++11 } } + +template struct A { static const T e = U; }; +template struct B; +template struct C; +template using E = typename C::k; +template struct F {}; +template using G = F; +template using H = F; +template using I = G; +template class J {}; +template struct B> : A {}; +template +struct C> : C> {}; +template struct C<0, J> { typedef T k; }; +template E> qux (J); +struct D { template void foo (T) {} }; +void bar (...); +struct K { void baz (int &); int l; D m; int *n, o; }; +template +void quux (int, int *, D x, int *, int, int, T, U, V y, H) { + x.foo ([=] { bar (qux (y)...); }); +} +void K::baz (int &x) { + J p; + int q, r; + long s; + quux (x, &l, m, n, o, r, s, q, p, I::e> ()); +} -- 2.30.2