This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24448] New: Internal error: Segmentation fault (program cc1plus)
- From: "jkherciueh at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2005 23:21:19 -0000
- Subject: [Bug c++/24448] New: Internal error: Segmentation fault (program cc1plus)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following crashes g++:
enum Channel { A, enumMin = A, B, enumMax = B };
template < typename T >
struct enum_traits {
static T const first = T::enumMin;
};
template < typename Enum >
struct cb_handler {
typedef Enum channel_type;
typedef void(*callback_function)(void);
static channel_type const min_channel = enum_traits<channel_type>::first;
template < channel_type channel >
static
void forward ( void ) {}
public:
static
callback_function bad ( void ) {
return( forward<min_channel> );
}
}; // cb_handler;
typedef cb_handler<Channel> handler;
int main ( void ) {
handler::bad();
}
My settings:
> /added/pkg/gcc-4.0.1/usr/bin/g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.1/configure --prefix=/added/pkg/gcc-4.0.1/usr
Thread model: posix
gcc version 4.0.1
--
Summary: Internal error: Segmentation fault (program cc1plus)
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jkherciueh at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24448