[Bug c++/46807] [4.6 Regression] internal compiler error: in synthesized_method_walk

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 21 19:46:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46807

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> 2011-01-21 19:26:12 UTC ---
Much further reduced:

struct A
{
  A() {}
  template <class T> A(T&);
};

struct B
{
  mutable A a;
};

int main()
{
  B b;
  B b2(b);
}

The problem is that 'mutable' makes us choose the template constructor for
copying the A field of B.  This is a change of semantics, and definitely needs
to be fixed.



More information about the Gcc-bugs mailing list