On 2014.10.02 at 09:17 +0200, Markus Trippelsdorf wrote: > On 2014.09.26 at 16:31 -0400, Vladimir Makarov wrote: > > I guess we achieved the consensus about the following patch to fix PR61360 > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61360 > > > > The patch was successfully bootstrapped and tested (w/wo > > -march=amdfam10) on x86/x86-64. > > > > Is it ok to commit to trunk? > > I've tested your patch and unfortunately it doesn't work: > > In file included from > /var/tmp/moz-build-dir/js/src/shell/Unified_cpp_js_src_shell0.cpp:15:0: > /var/tmp/mozilla-central/js/src/shell/js.cpp: In function ‘void > Process(JSContext*, JSObject*, const char*, bool)’: > /var/tmp/mozilla-central/js/src/shell/js.cpp:592:1: internal compiler error: > in lra_update_insn_recog_data, at lra.c:1221 > } > ^ > 0xa9d9ec lra_update_insn_recog_data(rtx_insn*) > ../../gcc/gcc/lra.c:1220 > 0xab450f eliminate_regs_in_insn > ../../gcc/gcc/lra-eliminations.c:1077 > 0xab450f process_insn_for_elimination > ../../gcc/gcc/lra-eliminations.c:1344 > 0xab450f lra_eliminate(bool, bool) > ../../gcc/gcc/lra-eliminations.c:1408 > 0xa9f2da lra(_IO_FILE*) > ../../gcc/gcc/lra.c:2270 > 0xa5d659 do_reload > ../../gcc/gcc/ira.c:5311 > 0xa5d659 execute > ../../gcc/gcc/ira.c:5470
Testcase is attached: % g++ -c -march=amdfam10 -w -O2 js.ii js.ii: In function ‘void RunFile(C)’: js.ii:64:1: internal compiler error: in lra_update_insn_recog_data, at lra.c:1221 -- Markus
void printf(...); class A; template <typename> class B; class C { public: template <typename S> C(S); }; template <class> class D { public: void m_fn1(int); }; template <> class B<A> : public D<A> {}; typedef bool (*JSNative)(int *, unsigned, A *); class F { public: B<A> m_fn2(); }; struct G { JSNative a; }; struct H { H(int, int, int); }; class I { public: int m_fn3(); }; class J { public: enum Result {}; H helpOption; int usage; int ver; int descr; int descrWidth; int helpWidth; int nextArgument; int restArgument; J(int) : helpOption('h', 0, 0), usage(ver), descr(descrWidth), helpWidth(nextArgument), restArgument() {} Result m_fn4(); int m_fn5(); }; class OffThreadState { public: int m_fn6(); } d; int f, h; long PRMJ_Now(); static void RunFile(C) { long a = PRMJ_Now(); printf(double(a) / 0); } static void Process(int, int) { RunFile(0); } bool Now(int *, unsigned, A *) { F b; double c = PRMJ_Now(); b.m_fn2().m_fn1(c); } int InitWatchdog(); G e{Now}; static int Shell() { I g; if (g.m_fn3()) Process(0, 0); if (f) Process(0, 0); } main() { J i(0); switch (i.m_fn4()) case 0: return 0; if (i.m_fn5()) return 0; if (h) return 0; if (d.m_fn6()) return 0; if (InitWatchdog()) return 0; Shell(); }