https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82185
Bug ID: 82185 Summary: ICE: Segmentation fault in expand_binop gcc/optabs.c:1137 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: translation Assignee: unassigned at gcc dot gnu.org Reporter: jcmvbkbc at gcc dot gnu.org Target Milestone: --- Created attachment 42157 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42157&action=edit preprocessed source that triggers the issue Compiling the attached source for xtensa I get the following ICE with the current gcc mainline: drivers/staging/rtl8188eu/core/rtw_ap.c: In function ‘expire_timeout_chk’: drivers/staging/rtl8188eu/core/rtw_ap.c:266:41: internal compiler error: Segmentation fault if ((psta->sta_stats.last_rx_data_pkts + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ psta->sta_stats.last_rx_ctrl_pkts) == ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0xe6f4ab crash_signal ../../gcc/gcc/toplev.c:341 0xd11ec7 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) ../../gcc/gcc/optabs.c:1137 0xd1397e expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) ../../gcc/gcc/optabs.c:1632 0xa4385d expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc/gcc/expr.c:9613 0x8dcf75 expand_gimple_stmt_1 ../../gcc/gcc/cfgexpand.c:3691 0x8dd1c7 expand_gimple_stmt ../../gcc/gcc/cfgexpand.c:3751 0x8e4667 expand_gimple_basic_block ../../gcc/gcc/cfgexpand.c:5750 0x8e5e85 execute ../../gcc/gcc/cfgexpand.c:6357 Reproducible with the attached preprocessed source and the following command line: cc1 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -ffreestanding -mlongcalls -mforce-no-pic -fno-delete-null-pointer-checks -Wno-frame-address -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init rtw_ap.i