https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91831
Bug ID: 91831 Summary: [10 Regression] ICE in expand_expr_real_1, at expr.c:10062 after r275982 Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: marxin at gcc dot gnu.org, mjambor at suse dot cz Target Milestone: --- After the revision I see the following issue: $ cat ice.C struct A { virtual void m_fn1(); }; struct B { virtual void *m_fn2(int, int) = 0; }; struct C : A, B { void *m_fn2(int, int) { return this; } }; void *fn1(B &p1) { return p1.m_fn2(0, 0); } int main() { C c; fn1(c); return 0; } $ gcc ice.C -O2 --param uninlined-thunk-insns=1000 -c during RTL pass: expand ice.C: In function ‘_ZThn8_N1C5m_fn2Eii.artificial_thunk.0’: ice.C:8:9: internal compiler error: in expand_expr_real_1, at expr.c:10062 8 | void *m_fn2(int, int) { return this; } | ^~~~~ 0x6f5e79 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /home/marxin/Programming/gcc/gcc/expr.c:10062 0xcaace4 expand_expr /home/marxin/Programming/gcc/gcc/expr.h:281 0xcaace4 expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, rtx_def**, expand_modifier) /home/marxin/Programming/gcc/gcc/expr.c:7887 0xcb2627 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /home/marxin/Programming/gcc/gcc/expr.c:8783 0xca1c41 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /home/marxin/Programming/gcc/gcc/expr.c:9993 0xb88fed expand_expr /home/marxin/Programming/gcc/gcc/expr.h:281 0xb88fed expand_return /home/marxin/Programming/gcc/gcc/cfgexpand.c:3639 0xb88fed expand_gimple_stmt_1 /home/marxin/Programming/gcc/gcc/cfgexpand.c:3748 0xb88fed expand_gimple_stmt /home/marxin/Programming/gcc/gcc/cfgexpand.c:3875 0xb8e6d1 expand_gimple_basic_block /home/marxin/Programming/gcc/gcc/cfgexpand.c:5915 0xb903d7 execute /home/marxin/Programming/gcc/gcc/cfgexpand.c:6555 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.