Last active
December 12, 2015 08:39
-
-
Save cscheid/4746185 to your computer and use it in GitHub Desktop.
This crashes g++ 4.2.1 (the default OS X 10.8 compiler) with an ICE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T> | |
void fun(T* obj) {} | |
template <typename T, void Fun(T*) = fun<T> > | |
struct S { | |
S(int m_sexp) {}; | |
}; | |
template <typename T> | |
S<T> ptr(int s) { return S<T>(s); } | |
void call(int s) { | |
S<int> p(ptr<int>(s)); | |
} | |
/* | |
$ g++ crash.cpp | |
crash.cpp: In function ‘S<T, fun<T> > ptr(int) [with T = int]’: | |
crash.cpp:10: internal compiler error: Segmentation fault: 11 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you post the file where c-reduce got stuck so we can work on that?