https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88900
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> --- I first isolated minimal test-case for which I can see the miscompilation of the benchmark compiler: $ cat scilab.c int a, b, c, d; void e() { a = (d >= c ? d : c) - 1 + b; } $ bash -x ./reduce-ice.sh scilab.c + TC1=scilab.c + /home/marxin/Programming/cpu2017/benchspec/CPU/502.gcc_r/build/build_peak_gcc7-m64.0000/cpugcc_r scilab.c -fpic -o 1.s + test 0 = 0 + /tmp/502gcc/build/build_peak_gcc7-m64.0000/cpugcc_r scilab.c -fpic -o 2.s + test 0 = 0 + diff -u 1.s 2.s --- 1.s 2019-01-23 12:36:20.815829891 +0100 +++ 2.s 2019-01-23 12:36:20.831830396 +0100 @@ -4,26 +4,23 @@ .globl e .type e, @function e: + call __i686.get_pc_thunk.cx + addl $_GLOBAL_OFFSET_TABLE_, %ecx pushl %ebp movl %esp, %ebp - pushl %ebx - call __i686.get_pc_thunk.bx - addl $_GLOBAL_OFFSET_TABLE_, %ebx - movl b@GOT(%ebx), %eax - movl (%eax), %ecx - movl d@GOT(%ebx), %eax - subl $1, %ecx + movl d@GOT(%ecx), %eax movl (%eax), %edx - movl c@GOT(%ebx), %eax + movl c@GOT(%ecx), %eax ... Not I'm going to find a minimal set of LTO object files needed.