https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90242
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> --- $ gcc -c ./gcc/testsuite/c-c++-common/Warray-bounds.c -g -O2 /var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/poly-int.h:502:21: runtime error: signed integer overflow: 9223372036854775804 + 4 cannot be represented in type 'long int' #0 0x55b988111824 in poly_int<1u, long>& poly_int<1u, long>::operator+=<long>(poly_int<1u, long> const&) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/poly-int.h:502 #1 0x55b988111824 in vn_reference_compute_hash /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-ssa-sccvn.cc:733 #2 0x55b988158458 in vn_reference_lookup(tree_node*, tree_node*, vn_lookup_kind, vn_reference_s**, bool, tree_node**, tree_node*, bool) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-ssa-sccvn.cc:4097 #3 0x55b9881651a4 in visit_reference_op_load /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-ssa-sccvn.cc:5873 #4 0x55b9881651a4 in visit_stmt /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-ssa-sccvn.cc:6391 #5 0x55b988167376 in process_bb /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-ssa-sccvn.cc:8243 #6 0x55b98816d18e in do_rpo_vn_1 /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-ssa-sccvn.cc:8716 #7 0x55b988179363 in execute /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-ssa-sccvn.cc:8990 #8 0x55b9870d0730 in execute_one_pass(opt_pass*) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/passes.cc:2648 #9 0x55b9870d35b0 in execute_pass_list_1 /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/passes.cc:2757 #10 0x55b9870d35f7 in execute_pass_list_1 /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/passes.cc:2758 #11 0x55b9870d36bc in execute_pass_list(function*, opt_pass*) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/passes.cc:2768 #12 0x55b9870d7a76 in do_per_function_toporder(void (*)(function*, void*), void*) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/passes.cc:1782 #13 0x55b9870d814b in do_per_function_toporder(void (*)(function*, void*), void*) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/plugin.h:194 #14 0x55b9870d814b in execute_ipa_pass_list(opt_pass*) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/passes.cc:3106 #15 0x55b985d0a224 in ipa_passes /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/cgraphunit.cc:2228 #16 0x55b985d0a224 in symbol_table::compile() /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/cgraphunit.cc:2351 #17 0x55b985d0cf30 in symbol_table::compile() /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/cgraphunit.cc:2329 #18 0x55b985d0cf30 in symbol_table::finalize_compilation_unit() /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/cgraphunit.cc:2608 #19 0x55b9877476d0 in compile_file /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/toplev.cc:480 #20 0x55b9854db054 in do_compile /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/toplev.cc:2220 #21 0x55b9854db054 in toplev::main(int, char**) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/toplev.cc:2383 #22 0x55b9854de864 in main /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/main.cc:39 #23 0x7faf0f0277ca (/usr/lib64/libc.so.6+0x277ca) #24 0x7faf0f027879 in __libc_start_main (/usr/lib64/libc.so.6+0x27879) #25 0x55b9854ded64 in _start (/usr/libexec/gcc/x86_64-pc-linux-gnu/16/cc1+0x7372d64) [...] (In reply to David Binderman from comment #0) > ./c-c++-common/Warray-bounds.c, with flags -g -O3 -march=native -Wall, I got FWIW, while it didn't matter here, you should share expanded -march=native or reduce whatever -march=native expands to (even better), otherwise it's not very meaningful on someone else's machine ;)