My code is: //----------------------------------------------- #include <iostream>
template < int I > struct _integer { enum { _value = I }; typedef _integer<_value> _type; }; #define _I(Int) \ typename _integer<Int>::_type template< class type > void hi(type) { std::cout << std::endl; } int main() { hi(_I(1)()); //Bug report here. return 0; } //------------------------------------------- And my gcc command is: g++ -O2 test.cpp -o test //------------------------------------------- The bug report is: test.cpp: In function int main(): test.cpp:72: internal compiler error: Segmentation fault -- Summary: Gcc segmentation fault Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: babydavid at sjtu dot edu dot cn http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26665