Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.dg/debug/pr80461.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/g++.dg/debug/pr80461.C Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,42 @@ +// PR debug/80461 +// { dg-do compile } +// { dg-options "-g -O" } + +template <typename> class A; +struct B +{ + template <typename T, typename U> + static bool foo (U T::*) {} +}; +template <typename, typename> class J; +template <typename T, typename U, typename V, typename... W> +class J<V (W...), U T::*> : public J<void(), U T::*> {}; +template <typename T, typename U, typename... W> +class J<void(W...), U T::*> : public B {}; +template <typename V, typename... W> struct A<V (W...)> +{ + template <typename, typename> using K = int; + template <typename L, typename = K<int, void>, typename = K<int, void>> A (L); +}; +template <typename V, typename... W> +template <typename L, typename, typename> +A<V (W...)>::A (L x) { J<V (), L>::foo (x); } +struct N; +volatile int v; + +template <class O, class P> +void +bar () +{ + O q; + A<P> f = q; + v++; +} + +void +baz () +{ + bar<int (N::*) (...) &, int()> (); + bar<int (N::*) (...) const &, int()> (); + bar<int (N::*) (...) volatile &, int()> (); +}