This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13740] New: ICE when mangling template which uses typeof
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2004 14:54:08 -0000
- Subject: [Bug c++/13740] New: ICE when mangling template which uses typeof
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I get an ICE when compiling this test case with the current mainline:
template<int n> class X {template<class Y> typeof(Y::y) foo(typeof(Y::y));};
class Y { public: static int y; };
typeof(Y::y) X<0>::foo<Y>(typeof(Y::y)) { }
foo4.cc:3: internal compiler error: in write_type, at cp/mangle.c:1558
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Note that the current mangling ABI doesn't specify how to handle typeof, which
is after all a GNU extension. I think that mangling this name will require an
extension to the mangling ABI. I think this could be handled by adding a new
unary operator, ty, which represents typeof applied to its argument.
Alternatively, the use of typeof could be replaced by the resulting type when
mangling the template name. I suppose that would some types of templates
equivalent although they didn't look equivalent. It's hard to know how to
handle an extension like this.
--
Summary: ICE when mangling template which uses typeof
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ian at airs dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13740