http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61040
Bug ID: 61040
Summary: internal compiler error: in
gimplify_init_ctor_preeval, at gimplify.c:3320
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: b.r.longbons at gmail dot com
The following valid program ICEs with g++ 4.9.0.
Previous versions (4.6.4, 4.7.3, 4.8.2) compile it just fine.
Older versions did not implement constexpr.
// compile with -std=c++0x
struct VString
{
VString();
};
struct IP4Address
{
unsigned int _addr;
constexpr IP4Address() : _addr{} {}
};
struct mmo_char_server
{
VString name;
IP4Address ip;
};
mmo_char_server& get_ref();
void parse_login(void)
{
get_ref() = mmo_char_server{};
}