[Bug c++/17826] New: ICE in cp_tree_equal
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Oct 4 07:21:00 GMT 2004
struct A
{
template <bool B> struct C { static const bool c = false; };
template <class T> static T &foo ();
};
struct D
{
template <class T, bool B> struct E { };
};
template <class T, bool B>
class E
{
public:
E (const T &t) : e (t) { }
private:
T e;
};
template <class T>
void bar (const T &t)
{
typedef typename D::E <T, A::C <(sizeof (foo (A::foo <T*> ()))
== sizeof (A::C <true>))>::c> F;
new E <T, !A::C <(sizeof (foo (A::foo <T*> ()))
== sizeof (A::C <true>))>::c> (t);
}
works in G++ 3.3.x, ICEs in cp_tree_equal in 3.4.2 and on HEAD, with -O0 or -O2,
on both {i386,x86_64}-redhat-linux.
--
Summary: ICE in cp_tree_equal
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: x86_64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17826
More information about the Gcc-bugs
mailing list