Attempting to compile the following file template<typename F> void foo() { }; template<typename F> struct foo<F> { };
results in bug.c++:2: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>. which is obviously undesirable. g++ --version g++ (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- Summary: Segfault on specialization using struct instead of template function. Product: gcc Version: 4.2.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: drahflow at gmx dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34089