https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84944
Bug ID: 84944 Summary: UBSAN: gcc/optabs.c:6550:26: runtime error: load of value 131075, which is not a valid value for type 'memmodel' Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- $ UBSAN_OPTIONS="print_stacktrace=1 halt_on_error=1" ./xgcc -B. /home/marxin/Programming/gcc2/gcc/testsuite/gcc.target/i386/hle-clear-rel.c ../../gcc/optabs.c:6550:26: runtime error: load of value 131075, which is not a valid value for type 'memmodel' #0 0x186dc79 in expand_atomic_store(rtx_def*, rtx_def*, memmodel, bool) ../../gcc/optabs.c:6550 #1 0x9f34ab in expand_builtin_atomic_clear ../../gcc/builtins.c:6352 #2 0xa15c41 in expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc/builtins.c:7644 #3 0xf5c974 in expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10999 #4 0xaa6132 in expand_expr ../../gcc/expr.h:276 #5 0xaa6132 in expand_call_stmt ../../gcc/cfgexpand.c:2690 #6 0xaa6132 in expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3624 #7 0xaa6132 in expand_gimple_stmt ../../gcc/cfgexpand.c:3790 #8 0xaabfe9 in expand_gimple_basic_block ../../gcc/cfgexpand.c:5819 #9 0xac4f59 in execute ../../gcc/cfgexpand.c:6425 #10 0x18f5250 in execute_one_pass(opt_pass*) ../../gcc/passes.c:2497 #11 0x18f85bb in execute_pass_list_1 ../../gcc/passes.c:2586 #12 0x18f8674 in execute_pass_list(function*, opt_pass*) ../../gcc/passes.c:2597 #13 0xbe01ae in cgraph_node::expand() ../../gcc/cgraphunit.c:2139 #14 0xbe4fed in output_in_order ../../gcc/cgraphunit.c:2381 #15 0xbe4fed in symbol_table::compile() ../../gcc/cgraphunit.c:2623 #16 0xbeee87 in symbol_table::compile() ../../gcc/cgraphunit.c:2720 #17 0xbeee87 in symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2717 #18 0x1d10338 in compile_file ../../gcc/toplev.c:480 #19 0x639d9c in do_compile ../../gcc/toplev.c:2132 #20 0x639d9c in toplev::main(int, char**) ../../gcc/toplev.c:2267 #21 0x63c7fa in main ../../gcc/main.c:39 #22 0x7ffff5cafa86 in __libc_start_main (/lib64/libc.so.6+0x21a86) #23 0x63c929 in _start (/home/marxin/Programming/gcc/objdir2/gcc/cc1+0x63c929) It's caused by fact that #define IX86_HLE_ACQUIRE (1 << 16) #define IX86_HLE_RELEASE (1 << 17) are not defined in memmodel enum.