http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466
Bug #: 54466 Summary: Recursive Type Alias, Member Function Pointer, Segmentation Fault Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: mattyclark...@gmail.com Created attachment 28122 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28122 The preprocessed dump from the error. The following code fails with a segmentation fault: #include <memory> template<typename T> using CallbackPtr = const std::shared_ptr<const T>; template<typename C, typename T> using CallbackFunPtr = void (C::*)(CallbackPtr<T>); int main () { return 0; } [matt test] g++ --std=c++11 -Wall -Wextra -Werror -pedantic -pedantic-errors main.cpp main.cpp:7:49: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccuw4zjD.out file, please attach this to your bugreport. However changing CallbackFunPtr to: template<typename C, typename T> using CallbackFunPtr = void (C::*)(const std::shared_ptr<const T>); It's OK. [matt test] uname -r 3.5.2-3.fc17.x86_64 [matt test] gcc --version gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) Copyright (C) 2012 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.