https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94991
Bug ID: 94991 Summary: ICE: Segmentation fault with option -mgeneral-regs-only Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: felix.yang at huawei dot com Target Milestone: --- Target: aarch64 Yet another ICE with -mgeneral-regs-only: foo.c struct S { float d; }; void bar (struct S); void f0 (int x) { struct S s = {.d = 0.0f }; ((char *) &s.d)[0] = x; s.d *= 7.0; bar (s); } $aarch64-linux-gnu-gcc -S -O2 -mgeneral-regs-only foo.c pr99999.c: In function ‘f0’: pr99999.c:8:12: error: ‘-mgeneral-regs-only’ is incompatible with the use of floating-point types 8 | struct S s = {.d = 0.0f }; | ^ pr99999.c:10:7: error: ‘-mgeneral-regs-only’ is incompatible with the use of floating-point types 10 | s.d *= 7.0; | ~~~~^~~~~~ pr99999.c:10:7: error: ‘-mgeneral-regs-only’ is incompatible with the use of floating-point types pr99999.c:10:7: error: ‘-mgeneral-regs-only’ is incompatible with the use of floating-point types during RTL pass: expand pr99999.c:10:7: internal compiler error: Segmentation fault 0x12a7a0b crash_signal ../../gcc-git/gcc/toplev.c:328 0xb05a70 single_set(rtx_insn const*) ../../gcc-git/gcc/rtl.h:3437 0xd1dd2f emit_move_insn(rtx_def*, rtx_def*) ../../gcc-git/gcc/expr.c:3858 0xb5c837 emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type, machine_mode, int, std::pair<rtx_def*, machine_mode>*) ../../gcc-git/gcc/calls.c:5597 0xb42dab emit_library_call_value(rtx_def*, rtx_def*, libcall_type, machine_mode, rtx_def*, machine_mode, rtx_def*, machine_mode) ../../gcc-git/gcc/rtl.h:4257 0x10f0ff3 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) ../../gcc-git/gcc/optabs.c:1831 0xd05133 expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool) ../../gcc-git/gcc/expmed.c:3568 0xd3291f expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc-git/gcc/expr.c:9046 0xd36c0f expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-git/gcc/expr.c:10054 0xd2f2e3 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-git/gcc/expr.c:8358 0xd10943 expand_normal ../../gcc-git/gcc/expr.h:288 0xd29ecb store_field ../../gcc-git/gcc/expr.c:7102 0xd2256b expand_assignment(tree_node*, tree_node*, bool) ../../gcc-git/gcc/expr.c:5374 0xb82f1b expand_gimple_stmt_1 ../../gcc-git/gcc/cfgexpand.c:3749 0xb83387 expand_gimple_stmt ../../gcc-git/gcc/cfgexpand.c:3847 0xb8ba73 expand_gimple_basic_block ../../gcc-git/gcc/cfgexpand.c:5887 0xb8d8d3 execute ../../gcc-git/gcc/cfgexpand.c:6542