https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71707
Bug ID: 71707 Summary: [regression] ICE in get_stridx_plus_constant Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: clyon at gcc dot gnu.org Target Milestone: --- As discussed in https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01975.html, commit 237841 (PR tree-optimization/71625) causes an ICE in get_stridx_plus_constant while building glibc on arm targets. I'm attaching ns_print.i, which was compiled with the following command: arm-none-linux-gnueabi-gcc ns_print.i -c -O2 -fPIC ns_print.c: In function 'ns_sprintrrf': ns_print.c:94:1: internal compiler error: in get_stridx_plus_constant, at tree-ssa-strlen.c:680 ns_sprintrrf(const u_char *msg, size_t msglen, ^~~~~~~~~~~~ 0xcb5a4f get_stridx_plus_constant /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree-ssa-strlen.c:680 0xcb5c91 get_addr_stridx /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree-ssa-strlen.c:197 0xcb5e9b get_stridx /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree-ssa-strlen.c:250 0xcba7a3 handle_pointer_plus /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree-ssa-strlen.c:2028 0xcba7a3 strlen_optimize_stmt /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree-ssa-strlen.c:2297 0xcba7a3 strlen_dom_walker::before_dom_children(basic_block_def*) /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree-ssa-strlen.c:2456 0x10dd6e7 dom_walker::walk(basic_block_def*) /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/domwalk.c:265 0xcb4cf1 execute /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree-ssa-strlen.c:2528 GCC was configured with: --target=arm-none-linux-gnueabi --with-float=soft --enable-build-with-cxx --with-mode=arm --with-cpu=cortex-a9