https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93187
Bug ID: 93187 Summary: [10 Regression] ICE in extract_insn, at recog.c:2294 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: doko at debian dot org Target Milestone: --- seen on x86_64-linux-gnu building pdns-recursor with r279880, and hardening options. $ cat syncres.ii # 1 "" 3 class a; class b; struct c { operator()(b, const b &); }; struct d { typedef *aa; }; struct e { c g; }; struct h { typedef h ab; h(d::aa); friend operator==(ab &, const &); }; template <typename i, typename> class j { typedef d *k; e l; k ac(); i ad; public: typedef h ae; ae m(k, const i &); ae ag(const i &); }; template <typename i, typename f> h j<i, f>::m(k n, const i &o) { while (n) if (l.g(ad, o)) n = 0; return 0; } template <typename i, typename f> h j<i, f>::ag(const i &n) { d *r = ac(); ae p = m(r, n); return p == 0 ? 0 : p; } template <typename, typename f> class s { j<b, f> al; public: b &q; void ag() { al.ag(q); } }; enum am { an }; template <typename, am = an> class ao; template <int> class G { public: using ar = s<int, a>; ar *operator->() { ar *as = static_cast<ao<s<int, a>> *>(this)->at(); return as; } }; template <typename, am au> class ao : public G<au> { public: using ar = s<int, a>; ar *at() { return av; } ar *av; int aw; }; class b { public: ax(); }; class t { struct ba { ao<int> bb; } static thread_local bc; bd() const; }; thread_local t::ba t::bc; b be; t::bd() const { do bc.bb->ag(); while (be.ax()); } $ g++ -c -O2 -Wall syncres.ii : In member function 'int t::bd() const': :79:1: error: unrecognizable insn: (insn 125 3 99 2 (parallel [ (set (mem/v/f/c:DI (plus:DI (reg/f:DI 7 sp) (const_int 24 [0x18])) [13 D.2787+0 S8 A64]) (unspec:DI [ (mem/v/f:DI (const_int 40 [0x28]) [14 MEM[(<address-space-1> long unsigned int *)40B]+0 S8 A64 AS1]) ] UNSPEC_SP_SET)) (set (reg:DI 0 ax [105]) (const:DI (unspec:DI [ (symbol_ref:DI ("_ZN1t2bcE") [flags 0x2a] <var_decl 0x7fd376c83480 bc>) ] UNSPEC_NTPOFF))) (clobber (reg:CC 17 flags)) ]) -1 (expr_list:REG_UNUSED (reg:CC 17 flags) (nil))) during RTL pass: cprop_hardreg :79:1: internal compiler error: in extract_insn, at recog.c:2294 0x5c6f01 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../src/gcc/rtl-error.c:108 0x5c6f23 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../src/gcc/rtl-error.c:116 0x5c605c extract_insn(rtx_insn*) ../../src/gcc/recog.c:2294 0xb7a0ef extract_constrain_insn(rtx_insn*) ../../src/gcc/recog.c:2193 0xb82f9c copyprop_hardreg_forward_1 ../../src/gcc/regcprop.c:802 0xb83e26 execute ../../src/gcc/regcprop.c:1367 Please submit a full bug report, with preprocessed source if appropriate.