https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81292
Bug ID: 81292
Summary: [8 regression] ICE in zero_length_string, at
tree-ssa-strlen.c:822
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: dimhen at gmail dot com
Target Milestone: ---
r249632 PASS
r249892 FAIL
$ cat x.ii
extern "C" unsigned long strlen(const char *);
int a(char *b) {
b[strlen(b)] = b[strlen(b)] = ' ';
return 0;
}
$ /usr/local/gcc_current/bin/g++ -fpreprocessed -O2 -c x.ii
during GIMPLE pass: strlen
x.ii: In function ‘int a(char*)’:
x.ii:2:5: internal compiler error: in zero_length_string, at
tree-ssa-strlen.c:822
int a(char *b) {
^
0x7b5ca9 zero_length_string
/home/dimhen/src/gcc_current/gcc/tree-ssa-strlen.c:822
0x1252dfa handle_pointer_plus
/home/dimhen/src/gcc_current/gcc/tree-ssa-strlen.c:2175
0x1252dfa strlen_optimize_stmt
/home/dimhen/src/gcc_current/gcc/tree-ssa-strlen.c:2546
0x1253641 strlen_dom_walker::before_dom_children(basic_block_def*)
/home/dimhen/src/gcc_current/gcc/tree-ssa-strlen.c:2728
0x186f85a dom_walker::walk(basic_block_def*)
/home/dimhen/src/gcc_current/gcc/domwalk.c:265
0x124dc5a execute
/home/dimhen/src/gcc_current/gcc/tree-ssa-strlen.c:2800
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.
$ /usr/local/gcc_current/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc_current/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-pc-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current --enable-checking=yes,df,fold,rtl
--enable-languages=c,c++,lto --disable-multilib --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl
--enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --with-tune=generic
Thread model: posix
gcc version 8.0.0 20170703 (experimental) [trunk revision 249892] (GCC)