diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/non-dependent8.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/non-dependent8.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/non-dependent8.C b/gcc/testsuite/g++.dg/template/non-dependent8.C new file mode 100644 index 00000000000..369e137317c --- /dev/null +++ b/gcc/testsuite/g++.dg/template/non-dependent8.C @@ -0,0 +1,21 @@ +// { dg-do compile } + +// Origin: Giovanni Bajo <giovannibajo@libero.it> + +// Two-phase name lookup for address of member: +// Detecting error during parsing + +struct S +{ + char i; +}; + +template<int S::*p> +struct X +{}; + +template <class T> +struct Foo +{ + X<&S::i> x; // { dg-error "convert|no type" } +}; |