https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90241
Bug ID: 90241 Summary: [UBSAN]: in ao_ref_init_from_ptr_and_size Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Following on from PR 85164, where I tried a UBSAN version of gcc trunk over the testsuite, for file c-c++-common/Warray-bounds-2.c, I got: ../../trunk/gcc/poly-int.h:1107:5: runtime error: signed integer overflow: 8 * -9223372036854775796 cannot be represented in type 'long int' #0 0x2ddd587 in poly_int<1u, poly_result<if_nonpoly<int, int, poly_int_traits<int>::is_poly>::type, long, poly_coeff_pair_traits<if_nonpoly<int, int, poly_int_traits<int>::is_poly>::type, long>::result_kind>::type> operator*<1u, int, long>(int const&, poly_int_pod<1u, long> const&) ../../trunk/gcc/poly-int.h:1107 #1 0x2ddd587 in ao_ref_init_from_ptr_and_size(ao_ref*, tree_node*, tree_node*) ../../trunk/gcc/tree-ssa-alias.c:703 #2 0x2ea1f49 in initialize_ao_ref_for_dse ../../trunk/gcc/tree-ssa-dse.c:106 #3 0x2ea1f49 in initialize_ao_ref_for_dse ../../trunk/gcc/tree-ssa-dse.c:91 #4 0x2ea784b in dse_dom_walker::dse_optimize_stmt(gimple_stmt_iterator*) ../../trunk/gcc/tree-ssa-dse.c:851 #5 0x2eab4ba in dse_dom_walker::before_dom_children(basic_block_def*) ../../trunk/gcc/tree-ssa-dse.c:944 #6 0x4e831f6 in dom_walker::walk(basic_block_def*) ../../trunk/gcc/domwalk.c:312