The following program causes an internal compiler error when compiled with
gcc-3.4.3 or gcc-4.0 (CVS):
template <typename T>
class C
{
public:
void foo();
};
template <typename T>
void
C<T>::foo()
{
union {
struct {
};
};
};
int main()
{
return 0;
}
--
Summary: ICE when C++ template function contains anonymous union
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: us15 at os dot inf dot tu-dresden dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-slackware-linux
GCC host triplet: i486-slackware-linux
GCC target triplet: i486-slackware-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153