4.0.3 20051008 ICEs while compiling ths, using Boost CVS-HEAD #include <boost/crc.hpp> // for boost::crc_basic, etc. // Run tests on CRCs below a byte in size (here, 3 bits) void small_crc_test1() { unsigned char const samples[4][4] = { { 0x3A, 0xC4, 0x08, 0x06 }, { 0x42, 0xC5, 0x0A, 0x41 }, { 0x4A, 0xC5, 0x08, 0x22 }, { 0x52, 0xC4, 0x08, 0x05 } }; boost::crc<3, 0x03, 0, 0, false, false>(samples[0], 4); } 3.4 and 4.1 accept this, I think 4.0 might have done until recently.
Created attachment 9938 [details] Pre-processed source, gzip-compressed
the mainline as of today ICEs.
Reducing.
Confirmed, reduced testcase: template< int Bits > struct uint_t { typedef unsigned short fast; }; template < int Bits > struct mask_uint_t { typedef typename uint_t< Bits >::fast fast; static const fast sig_bits = 1; static const fast sig_bits_fast = fast(sig_bits); }; template < int Bits> int checksum ( ) { return 1 & mask_uint_t<Bits>::sig_bits_fast; } int i = checksum<1>();
Subject: Bug 24277 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: mmitchel@gcc.gnu.org 2005-10-11 06:25:50 Modified files: gcc/cp : pt.c ChangeLog gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: static20.C Log message: PR c++/24277 * pt.c (instantiate_decl): Call finish_static_data_member_decl for static data members. PR c++/24277 * g++.dg/template/static20.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.978.2.29&r2=1.978.2.30 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.122&r2=1.4648.2.123 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static20.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.440&r2=1.5084.2.441
Subject: Bug 24277 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2005-10-11 06:26:04 Modified files: gcc/cp : pt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: static20.C Log message: PR c++/24277 * pt.c (instantiate_decl): Call finish_static_data_member_decl for static data members. PR c++/24277 * g++.dg/template/static20.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.1042&r2=1.1043 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static20.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6161&r2=1.6162
Fixed in 4.0.3.