http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50361
Bug #: 50361
Summary: gcc 4.6 ICE probably relating to std::initializer_list
and template argument deduction
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 25243
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25243
preprocessed source output
Error is:
gcc_test/test.cpp: In function ‘int main()’:
gcc_test/test.cpp:67: 1: internal compiler error: in fold_convert_loc, at
fold-const.c:2028
Please submit a full bug report,
with preprocessed source if appropriate.
I was running into this in a fairly convoluted case, but pulled parts of it out
until I had a fairly minimal repro.
A hint here appears to be that if you define the constructors inside the class
instead of outside the class the ICE goes away. Also removing the union member
removes the ICE.