This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60980] [4.9/4.10 Regression] ICE in build_special_member_call, at cp/call.c:7447
- From: "dany.dylan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Apr 2014 00:10:10 +0000
- Subject: [Bug c++/60980] [4.9/4.10 Regression] ICE in build_special_member_call, at cp/call.c:7447
- Auto-submitted: auto-generated
- References: <bug-60980-4 at http dot gcc dot gnu dot org/bugzilla/>
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.