https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119785

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
I also see:
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
/root/gcc/gcc/config/sparc/sparc.cc:12093:23
/root/gcc/gcc/config/sparc/sparc.cc:12093:23: runtime error: index 63 out of
bounds for type 'unsigned char [63]'
    #0 0x00000467e388 in sparc_rtx_costs
/root/gcc/gcc/config/sparc/sparc.cc:12093
    #1 0x000002d6aa54 in rtx_cost(rtx_def*, machine_mode, rtx_code, int, bool)
/root/gcc/gcc/rtlanal.cc:4615
    #2 0x00000142dd34 in set_src_cost(rtx_def*, machine_mode, bool)
/root/gcc/gcc/rtl.h:2967
    #3 0x00000142dd34 in init_expmed() /root/gcc/gcc/expmed.cc:288
    #4 0x0000031859b8 in backend_init_target /root/gcc/gcc/toplev.cc:1800
    #5 0x0000031859b8 in initialize_rtl() /root/gcc/gcc/toplev.cc:1867
    #6 0x00000173162c in init_function_start(tree_node*)
/root/gcc/gcc/function.cc:5026
    #7 0x000000ec3b60 in cgraph_node::expand() /root/gcc/gcc/cgraphunit.cc:1844
    #8 0x000000ec3b60 in cgraph_node::expand() /root/gcc/gcc/cgraphunit.cc:1812
    #9 0x000000ee1b0c in expand_all_functions /root/gcc/gcc/cgraphunit.cc:2042
    #10 0x000000ee1b0c in symbol_table::compile()
/root/gcc/gcc/cgraphunit.cc:2418
    #11 0x000000ee1b0c in symbol_table::compile()
/root/gcc/gcc/cgraphunit.cc:2327
    #12 0x000000ee429c in symbol_table::finalize_compilation_unit()
/root/gcc/gcc/cgraphunit.cc:2607
    #13 0x000003181bec in compile_file /root/gcc/gcc/toplev.cc:479
    #14 0x0000003f8bf4 in do_compile /root/gcc/gcc/toplev.cc:2208
    #15 0x0000003f8bf4 in toplev::main(int, char**)
/root/gcc/gcc/toplev.cc:2371
    #16 0x0000003fd52c in main /root/gcc/gcc/main.cc:39
    #17 0xfff800010132c660  (/usr/lib64/libc.so.6+0x2c660)
    #18 0xfff800010132c768 in __libc_start_main (/usr/lib64/libc.so.6+0x2c768)
    #19 0x0000003fd9fc in _start (/tmp/build/gcc/cc1+0x3fd9fc)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
/root/gcc/gcc/config/sparc/sparc.cc:12093:23
/root/gcc/gcc/config/sparc/sparc.cc:12093:23: runtime error: load of address
0x000007874c77 with insufficient space for an object of type 'const unsigned
char'
0x000007874c77: note: pointer points here
 0d 0d 0d 0d 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
00 00 00 00  00 00 00
             ^
    #0 0x00000467e368 in sparc_rtx_costs
/root/gcc/gcc/config/sparc/sparc.cc:12093
    #1 0x000002d6aa54 in rtx_cost(rtx_def*, machine_mode, rtx_code, int, bool)
/root/gcc/gcc/rtlanal.cc:4615
    #2 0x00000142dd34 in set_src_cost(rtx_def*, machine_mode, bool)
/root/gcc/gcc/rtl.h:2967
    #3 0x00000142dd34 in init_expmed() /root/gcc/gcc/expmed.cc:288
    #4 0x0000031859b8 in backend_init_target /root/gcc/gcc/toplev.cc:1800
    #5 0x0000031859b8 in initialize_rtl() /root/gcc/gcc/toplev.cc:1867
    #6 0x00000173162c in init_function_start(tree_node*)
/root/gcc/gcc/function.cc:5026
    #7 0x000000ec3b60 in cgraph_node::expand() /root/gcc/gcc/cgraphunit.cc:1844
    #8 0x000000ec3b60 in cgraph_node::expand() /root/gcc/gcc/cgraphunit.cc:1812
    #9 0x000000ee1b0c in expand_all_functions /root/gcc/gcc/cgraphunit.cc:2042
    #10 0x000000ee1b0c in symbol_table::compile()
/root/gcc/gcc/cgraphunit.cc:2418
    #11 0x000000ee1b0c in symbol_table::compile()
/root/gcc/gcc/cgraphunit.cc:2327
    #12 0x000000ee429c in symbol_table::finalize_compilation_unit()
/root/gcc/gcc/cgraphunit.cc:2607
    #13 0x000003181bec in compile_file /root/gcc/gcc/toplev.cc:479
    #14 0x0000003f8bf4 in do_compile /root/gcc/gcc/toplev.cc:2208
    #15 0x0000003f8bf4 in toplev::main(int, char**)
/root/gcc/gcc/toplev.cc:2371
    #16 0x0000003fd52c in main /root/gcc/gcc/main.cc:39
    #17 0xfff800010132c660  (/usr/lib64/libc.so.6+0x2c660)
    #18 0xfff800010132c768 in __libc_start_main (/usr/lib64/libc.so.6+0x2c768)
    #19 0x0000003fd9fc in _start (/tmp/build/gcc/cc1+0x3fd9fc)
```

Keeping that in this bug given it also comes via rtx_cost.

Reply via email to