diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/explicit1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/explicit1.C | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/explicit1.C b/gcc/testsuite/g++.dg/parse/explicit1.C new file mode 100644 index 00000000000..ced2adc3dc0 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/explicit1.C @@ -0,0 +1,11 @@ +// { dg-do compile } + +// Origin: stefaandr@hotmail.com + +// PR c++/12403: ICE when explicit specialization is not in +// namespace scope. + +struct foo { + template<typename T> void bar (T &t) {} + template<> void bar<double>(double &t) {} // { dg-error "explicit|non-namespace|member" } +}; |