This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12992] New: internal compiler error: segmentation fault for g++
- From: "scamel at elte dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Nov 2003 13:12:34 -0000
- Subject: [Bug c++/12992] New: internal compiler error: segmentation fault for g++
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling ends with segfault for the following simple code (tested on
several Linux 2.4 machines: Slackware, Suse, Debian):
---------------------------------------------------------------------
template <int v> struct Int2Type {
enum { value = v };
};
struct MyPtr { int getInt() { return 0; } };
template <class Type> Int2Type< sizeof(&Type::getInt) > NameDefined() {
return Int2Type< sizeof(&Type::getInt) >();
}
template <class Type> Int2Type<0> NameDefined(...) {
return Int2Type<0>();
}
int main() {
NameDefined<MyPtr>().value;
return 0;
}
--
Summary: internal compiler error: segmentation fault for g++
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: scamel at elte dot hu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12992