http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60769
Bug ID: 60769 Summary: [4.8 Regression] ICE: Max. number of generated reload insns per insn is achieved (90) Product: gcc Version: 4.8.3 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Hello, the following seems already fixed in 4.9, but it would be great to backport it (I don't know which patch) to 4.8. For many bugs, it is often possible to find a workaround, but for allocation bugs, it is quite mysterious what fragile changes I have to make to my code to work around it. I tested with debian's current gcc-4.8, which is essentially r207828 from gcc-4_8-branch. Compile with g++-4.8 -c -O ouin.ii: ouin.ii: In function ‘void fn3(N&)’: ouin.ii:38:1: internal compiler error: Max. number of generated reload insns per insn is achieved (90) } ^ template <class T> void fun(T); struct B {}; struct R { int *x; B f; }; R v(int &, R); void rfun(R &); struct A { void m_fn2(R p1) { R a = p1; rfun(p1); fun(this); fun(a); } }; struct J { A ep; A ap; int c2a; void m_fn1(R &p2) { R d, e, b; v(c2a, p2); e = v(c2a, b); ap.m_fn2(e); v(c2a, p2); d = v(c2a, b); ep.m_fn2(d); } }; struct N { int &p_; J cfo; }; void fn3(N&n) { R h; n.cfo.m_fn1(h); } extern N &c; void fn1() { fn3(c); }