[Bug c++/60980] [4.9/4.10 Regression] ICE in build_special_member_call, at cp/call.c:7447
dany.dylan at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 30 00:10:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60980
Daniel Dylan <dany.dylan at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dany.dylan at gmail dot com
--- Comment #5 from Daniel Dylan <dany.dylan at gmail dot com> ---
The problem seems to be an interaction between the default constructor in x0
and the use of an array of x0 in x1, but then the problem only occurs at the
call site to create an x1 in method x3.
A workaround is to replace the explicit defaulted constructor with a
handcrafted one or, in this case, letting the compiler implicitly create one
solves the problem.
The following works:
struct x0
{
x0 () {}
};
struct x1
{
x0 x2[1];
void x3 ()
{
x1 ();
}
};
BTW the use case where x3 is a free function (or a static class method)
returning an x1:
struct x0
{
x0() = default;
};
struct x1
{
x0 x2[1];
};
x1 x3()
{
return x1();
}
Still exhibits the problem.
More information about the Gcc-bugs
mailing list