------- Comment #4 from bangerth at gmail dot com 2009-02-13 00:12 ------- Confirmed, it also ICEs on mainline.
That's a much more serious case. I'm not entirely sure whether the code is valid: you do template<typename Z> static Z& y(); template<typename Y> static char test(typeof(y<Y>())*); with Y=int, i.e. the argument to test() would be of type typeof(int&)* or pointer-to-reference, which is not valid. One may argue that if template substitution fails that the second overload of test should be chosen, though: template<typename Y> static int test(...); Since typeof is not part of the C++ standard, I doubt that anything normative is available for this case. Regardless of the validity of the testcase, since it used to work before and now no longer does I would appreciate more eyes on it. W. -- bangerth at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu dot org Summary|Segmentation fault |[4.3/4.4 regression] ICE | |with typeof() http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39070