https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78596
Bug ID: 78596 Summary: combine.c:12561:14: runtime error: left shift of negative value -9 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- markus@x4 mplayer % cat demux_mkv.i extern void fn2(); void fn1() { int a = fn1, b = 8; if (a > 18446744073709551615UL - b) fn2(); } markus@x4 mplayer % UBSAN_OPTIONS=print_stacktrace=1 /var/tmp/gcc_ubsan/usr/local/bin/gcc -w -O2 -c demux_mkv.i ../../gcc/gcc/combine.c:12561:14: runtime error: left shift of negative value -9 #0 0x361d796 in simplify_comparison ../../gcc/gcc/combine.c:12561 #1 0x3620ed6 in simplify_set ../../gcc/gcc/combine.c:6652 #2 0x3627f5f in combine_simplify_rtx ../../gcc/gcc/combine.c:6187 #3 0x3632a35 in subst ../../gcc/gcc/combine.c:5487 #4 0x3641bd4 in try_combine ../../gcc/gcc/combine.c:3269 #5 0x36561b7 in combine_instructions ../../gcc/gcc/combine.c:1265 #6 0x36561b7 in rest_of_handle_combine ../../gcc/gcc/combine.c:14581 #7 0x36561b7 in execute ../../gcc/gcc/combine.c:14626 #8 0x195ad78 in execute_one_pass(opt_pass*) ../../gcc/gcc/passes.c:2370 #9 0x195cc0b in execute_pass_list_1 ../../gcc/gcc/passes.c:2459 #10 0x195cc34 in execute_pass_list_1 ../../gcc/gcc/passes.c:2460 #11 0x195ccc4 in execute_pass_list(function*, opt_pass*) ../../gcc/gcc/passes.c:2470 #12 0xc75e4b in cgraph_node::expand() ../../gcc/gcc/cgraphunit.c:2001 #13 0xc7b35a in expand_all_functions ../../gcc/gcc/cgraphunit.c:2137 #14 0xc7b35a in symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2494 #15 0xc85517 in symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2587 #16 0xc85517 in symbol_table::finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2584 #17 0x1d3ead0 in compile_file ../../gcc/gcc/toplev.c:488 #18 0x629a34 in do_compile ../../gcc/gcc/toplev.c:1983 #19 0x629a34 in toplev::main(int, char**) ../../gcc/gcc/toplev.c:2117 #20 0x62c066 in main ../../gcc/gcc/main.c:39 #21 0x7f40bae26310 in __libc_start_main ../csu/libc-start.c:286 #22 0x62c489 in _start (/var/tmp/gcc_ubsan/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/cc1+0x62c489)