This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34541] New: ICE in template specialization using a typedef to an anonymous enum
- From: "rbuergel at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2007 22:46:33 -0000
- Subject: [Bug c++/34541] New: ICE in template specialization using a typedef to an anonymous enum
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
template<class _T2> struct X {
template<class _U2> X(_U2 __y){}
};
template <class T> class Y{};
template<> class Y<void> {
typedef enum {} Z;
Y():z(), x(z) {}
Z z;
X<Z> x;
};
g++-4.3.0 -c test.cpp
test.cpp: In constructor 'Y<void>::Y()':
test.cpp:10: internal compiler error: Segmentation fault
if "typedef enum {} Z;" is replaced by "enum Z {}", it compiles fine.
gcc-4.2.2 and 4.1.2 compile without problems
--
Summary: ICE in template specialization using a typedef to an
anonymous enum
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rbuergel at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34541