https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87645
Bug ID: 87645 Summary: gcc hangs up on vr_values::vrp_visit_assignment_or_call Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: konstantin.vladimirov at gmail dot com Target Milestone: --- Reproduction (after creduce, sorry for that code): typedef unsigned a[8]; a b, g; int c, d, e, f; int h() { unsigned i = 2; for (; i < 8; i++) b[i] = 0; for (; f;) { d = 1; for (; d < 14; d += 3) { e = 0; for (; e < 8; e++) { i = 2; for (; i < 8; i++) b[i] = 5 - (c - g[e] + b[i]); } } } } Compiler: > gcc -v Reading specs from /apps/gcc/8.1.0/.bin/../lib64/gcc/x86_64-suse-linux/8.1.0/specs COLLECT_GCC=/apps/gcc/8.1.0/.bin/gcc COLLECT_LTO_WRAPPER=/apps/gcc/8.1.0/.bin/../libexec/gcc/x86_64-suse-linux/8.1.0/lto-wrapper Target: x86_64-suse-linux Configured with: ./configure --prefix=/apps/gcc/8.1.0 --libdir=/apps/gcc/8.1.0/lib64 --libexecdir=/apps/gcc/8.1.0/libexec --bindir=/apps/gcc/8.1.0/bin --with-isl=/apps/gcc/8.1.0 --with-libelf=/apps/gcc/8.1.0 --with-mpfr=/apps/gcc/8.1.0 --with-gmp=/apps/gcc/8.1.0 --with-mpc=/apps/gcc/8.1.0 --disable-gnu-unique-object --enable-gold=yes --enable-lto --enable-languages=c,c++,objc,fortran --build=x86_64-suse-linux --host=x86_64-suse-linux --target=x86_64-suse-linux --enable-libotm --disable-multilib --disable-bootstrap --disable-libstdcxx-pch Thread model: posix gcc version 8.1.0 (GCC) Try to compile like this: gcc -S -O3 test.c gcc hangs up gcc -S -O2 test.c passes ok This might look similar with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87087 but in this case it doesn't consume too much memory and gdb shows vrp, not unroll.