diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error5.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/error5.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error5.C b/gcc/testsuite/g++.dg/other/error5.C new file mode 100644 index 000000000..c7a142fb5 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/error5.C @@ -0,0 +1,13 @@ +// { dg-do compile } +// Origin: Wolfgang Bangerth <bangerth@ices.utexas.edu> +// PR c++/11106: Error message gives partially mangled operator name + +template <typename T> struct S { + struct I {}; +}; + +template <typename T> struct S2 : S<T> { + using S<T>::operator typename S<T>::I*; // { dg-error "operator S\\<int\\>" "" } +}; + +template struct S2<int>; // { dg-message "instantiated" "" } |