[Bug c++/52237] New: Template specialization and operator overloading causes Segmentation Fault
achille at justin dot tv
gcc-bugzilla@gcc.gnu.org
Mon Feb 13 18:24:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52237
Bug #: 52237
Summary: Template specialization and operator overloading
causes Segmentation Fault
Classification: Unclassified
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: achille@justin.tv
Created attachment 26652
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26652
Processed source
The following code snipet makes G++ 4.6.1 Segfault on Ubuntu 11.10 64bits.
Command line: g++ <file> -std=c++0x
Compiler output:
/tmp/test.cpp: In lambda function:
/tmp/test.cpp:14:22: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccxSIRSc.out file, please attach this to
your bugreport.
Code:
template < typename T, typename Signature >
class __lambda
{
};
template < typename T, typename R, typename... Args >
class __lambda<T, R(Args...)>
{
public:
R operator()(Args&... args)
{
return _t(args...);
}
private:
T _t;
};
int main()
{
return 0;
}
More information about the Gcc-bugs
mailing list