https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85496
Bug ID: 85496 Summary: [6/7/8 Regression] internal compiler error: in emit_move_insn, at expr.c:3722 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- template <typename> class complex; template <typename _Tp> complex<_Tp> operator*(complex<_Tp>, complex<_Tp>); template <> struct complex<float> { _Complex float _M_value; }; class A { complex<float> _f0, _f1; public: complex<float> &m_fn1() { return _f1; } }; complex<float> a; void cos() { A b; complex<float> c; b.m_fn1() = c * a; } $ ./cc1plus -quiet x.C -O during RTL pass: expand x.C: In function ‘void cos()’: x.C:14:19: internal compiler error: in emit_move_insn, at expr.c:3722 b.m_fn1() = c * a; ^ 0xc5e00f emit_move_insn(rtx_def*, rtx_def*) /home/marek/src/gcc/gcc/expr.c:3721 0xc38e53 store_bit_field_1 /home/marek/src/gcc/gcc/expmed.c:804 0xc3a697 store_bit_field(rtx_def*, poly_int<1u, unsigned long>, poly_int<1u, unsigned long>, poly_int<1u, unsigned long>, poly_int<1u, unsigned long>, machine_mode, rtx_def*, bool) /home/marek/src/gcc/gcc/expmed.c:1154 0xc6ccc0 store_field /home/marek/src/gcc/gcc/expr.c:7073 0xc63f46 expand_assignment(tree_node*, tree_node*, bool) /home/marek/src/gcc/gcc/expr.c:5251 0xae2116 expand_call_stmt /home/marek/src/gcc/gcc/cfgexpand.c:2688 0xae55bf expand_gimple_stmt_1 /home/marek/src/gcc/gcc/cfgexpand.c:3624 0xae5cb5 expand_gimple_stmt /home/marek/src/gcc/gcc/cfgexpand.c:3790 0xaee461 expand_gimple_basic_block /home/marek/src/gcc/gcc/cfgexpand.c:5819 0xaefe42 execute /home/marek/src/gcc/gcc/cfgexpand.c:6425 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Target: x86_64-pc-linux-gnu