https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68064
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-10-23 CC| |hubicka at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- markus@x4 Release % cat typer.ii template <class Config> class A { public: class B; typedef typename Config::template D<A>::type TypeHandle; static A *Tagged() { return B::New(B::kTagged); } static TypeHandle Union(TypeHandle); static TypeHandle Representation(TypeHandle, typename Config::Region *); bool Is(); }; template <class Config> class A<Config>::B { friend A; enum { kTaggedPointer = 1 << 31, kTagged = kTaggedPointer }; static A *New(int p1) { return Config::from_bitset(p1); } }; struct C { typedef int Region; template <class> struct D { typedef A<C> *type; }; static A<C> *from_bitset(unsigned); }; A<C> *C::from_bitset(unsigned p1) { return reinterpret_cast<A<C> *>(p1); } namespace { int *a; void fn1(A<C> *p1) { A<C>::Union(A<C>::Representation(p1, a)); } } void fn2() { A<C> b; A<C> *c = b.Is() ? 0 : A<C>::Tagged(); fn1(c); } markus@x4 Release % g++ -c -O2 typer.ii typer.ii:33:1: internal compiler error: in meet_with, at ipa-cp.c:874