This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26665] New: Gcc segmentation fault
- From: "babydavid at sjtu dot edu dot cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2006 14:46:40 -0000
- Subject: [Bug c++/26665] New: Gcc segmentation fault
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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