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]

Re: c++/8572: [3.3 regression] ICE with external definition of conversion operator to internal class within template class


The regression reported in PR c++/8572 showed up starting with this
patch, which might merely uncover an existing problem:

2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>

        PR c++/4361
        * mangle.c (struct globals) Add internal_mangling_p member.
        (write_template_param): Do internal mangling, if needed.
        (mangle_conv_op_name_for_type): Request internal mangling.

Here's a small test case that causes the ICE, which occurs in the
mainline but not in the 3.2 branch:

---------------
template <typename T> struct A
{
  struct B { B() {} };
  operator B* () const;
};

template <typename T> A<T>::operator typename A<T>::B*() const { return
0;
}
---------------

Compiler output from the mainline with this test:

8572.C:7: internal compiler error: in mangle_conv_op_name_for_type, at
   cp/mangle.c:2612
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8572




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