Created attachment 28740 [details] Reproducible testcase $ g++-snapshot --version g++-snapshot (Debian 20120915-1) 4.8.0 20120915 (experimental) [trunk revision 191353] When attempting to compile this program: struct foo { template<int*> void bar(); }; template<int*...> void foo::bar() {} int main() { extern int i; foo {}.bar<&i>(); } GCC complains: main.cpp: In function 'int main()': main.cpp:12:21: internal compiler error: Segmentation fault foo {}.bar<&i>(); ^ Some casual investigating suggests that this happens every time the definition for a member template is exactly the same as its declaration save for the fact that a non-type parameter is made variadic. Otherwise, e.g. if the parameter in question is a type or template parameter in the declaration or if the template is declared taking int and defined taking long... then GCC correctly reports that the definition doesn't have a match.
Happens even with r188998.
Lately we wrongly accepts the code.
We reject this: struct foo { template<int*> void bar(); }; template<int*, int> void foo::bar() {} But incorrectly accepts: struct foo { template<int*> void bar(); }; template<int*...> void foo::bar() {}