http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52031
Bug #: 52031 Summary: G++ crashes when std::size_t is initalized with a float inside a template Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: joseph.h.gar...@gmail.com The following code snippet will crash G++ 4.6.1 #include <cstddef> template<class T> class B { static const std::size_t A = 1.5; }; Output: ../crash.H:6:34: internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:1562 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/ccdymJZR.out file, please attach this to your bugreport. The mentioned file is attached. Note that it must be a templated class for the crash to occur.