This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]