[Bug c++/50853] New: Internal Compiler Error returning a template type using brace initialization
public at alisdairm dot net
gcc-bugzilla@gcc.gnu.org
Mon Oct 24 13:08:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853
Bug #: 50853
Summary: Internal Compiler Error returning a template type
using brace initialization
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: public@alisdairm.net
The following obscure code produces an ICE when the function template 'test' is
called:
template<int> struct MyType{};
template<int VAL>
auto test(MyType<VAL>) -> MyType<int{VAL}> { return {}; }
int main() {
MyType<int{256}>{};
test( MyType<256>{} ); // no error without this call
}
The ICE produced is:
internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13389
More information about the Gcc-bugs
mailing list