On Thu, 21 Jun 2018, Jan Hubicka wrote: > Hi > with -flto -g -O2 -r -nostdlib -flinker-output=nolto-rel I get ICE on:
I can't reproduce the ICE on TOT with your patch applied. > ./xg++ t.ii -B. -g -flto -O2 -r -nostdlib -flinker-output=nolto-rel cc1plus: warning: command line option ‘-flinker-output=nolto-rel’ is valid for LTO but not for C++ t.ii: In function ‘b::C::d b::e(j, h)’: t.ii:20:75: warning: no return statement in function returning non-void [-Wreturn-type] template <typename j, typename h> b::C::d b::e(j m, h n) { c<a>::l(m, n); } ^ > class a; > namespace b { > template <typename> struct c; > struct C { > typedef a d; > }; > void e(); > } > template <typename f> class g : f { > public: > template <typename i> g(i); > }; > class a { > long k; > }; > namespace b { > template <> struct c<a> { template <typename j, typename h> static a l(j, h); > }; > } > template <typename j, typename h> b::C::d b::e(j m, h n) { c<a>::l(m, n); } > void o() { > g<a> p = 0; > a r(b::e(r, p)); > }