This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18793] [4.0 regression] ICE in cp_expr_size
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2004 20:12:50 -0000
- Subject: [Bug c++/18793] [4.0 regression] ICE in cp_expr_size
- References: <20041202195715.18793.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-12-02 20:12 -------
That's as short as I can get it for now:
----------------------
#include <string>
struct Record
{
unsigned int a, b, c, d, e;
std::string description;
};
template <typename T>
void foobar ()
{
const Record record = {0,0,0,0,0,std::string()};
}
template void foobar<int> ();
---------------------------
source/a.cc: In function 'void foobar() [with T = int]':
source/a.cc:14: instantiated from here
source/a.cc:12: warning: unused variable 'record'
source/a.cc:12: internal compiler error: in cp_expr_size, at
cp/cp-objcp-common.c:86
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Surprisingly, the number of elements in the structure do make a difference!
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18793