https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85431
Bug ID: 85431 Summary: UBSAN: ../../gcc/dse.c:303:15: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int' Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: rsandifo at gcc dot gnu.org Target Milestone: --- Following causes UBSAN: $ UBSAN_OPTIONS="print_stacktrace=1" ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/pr85022.c -c -O ../../gcc/dse.c:303:15: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int' #0 0x2ecd348 in lowpart_bitmask ../../gcc/dse.c:303 #1 0x2ed2512 in record_store ../../gcc/dse.c:1649 #2 0x2ed89d4 in scan_insn ../../gcc/dse.c:2542 #3 0x2ed9251 in dse_step1 ../../gcc/dse.c:2657 #4 0x2eded20 in rest_of_handle_dse ../../gcc/dse.c:3574 #5 0x2edef5c in execute ../../gcc/dse.c:3632 #6 0x15a1a8b in execute_one_pass(opt_pass*) ../../gcc/passes.c:2497 #7 0x15a2255 in execute_pass_list_1 ../../gcc/passes.c:2586 #8 0x15a22cc in execute_pass_list_1 ../../gcc/passes.c:2587 #9 0x15a234c in execute_pass_list(function*, opt_pass*) ../../gcc/passes.c:2597 #10 0xc44bc3 in cgraph_node::expand() ../../gcc/cgraphunit.c:2139 #11 0xc45ad0 in expand_all_functions ../../gcc/cgraphunit.c:2275 #12 0xc47448 in symbol_table::compile() ../../gcc/cgraphunit.c:2624 #13 0xc479c9 in symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2717 #14 0x18b1667 in compile_file ../../gcc/toplev.c:480 #15 0x18b5448 in do_compile ../../gcc/toplev.c:2132 #16 0x18b592c in toplev::main(int, char**) ../../gcc/toplev.c:2267 #17 0x320b531 in main ../../gcc/main.c:39 #18 0x7ffff5ca9a86 in __libc_start_main (/lib64/libc.so.6+0x21a86) #19 0x8210c9 in _start (/home/marxin/Programming/gcc/objdir2/gcc/cc1+0x8210c9)