diff options
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/template26.C | 18 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/crash45.C | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/parse/template26.C b/gcc/testsuite/g++.dg/parse/template26.C new file mode 100644 index 0000000..aab9763 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/template26.C @@ -0,0 +1,18 @@ +// PR c++/50864 + +namespace impl +{ + template <class T> T create(); +} + +template <class T, class U, __SIZE_TYPE__ + = sizeof(impl::create<T>()->*impl::create<U>())> +struct foo1; + +template <class T, class U, __SIZE_TYPE__ + = sizeof(impl::create<T>()->impl::create<U>())> // { dg-error "not a class member" } +struct foo2; + +template <class T, class U, __SIZE_TYPE__ + = sizeof(impl::create<T>().impl::create<U>())> // { dg-error "not a class member" } +struct foo3; diff --git a/gcc/testsuite/g++.dg/template/crash45.C b/gcc/testsuite/g++.dg/template/crash45.C index f138e3d..f67fd02 100644 --- a/gcc/testsuite/g++.dg/template/crash45.C +++ b/gcc/testsuite/g++.dg/template/crash45.C @@ -9,5 +9,5 @@ namespace N void bar(A *p) { - p->N::foo<0>; // { dg-error "not a member" } + p->N::foo<0>; // { dg-error "not a class member" } } |