> Happens with UBSAN compiler for:
>
> $ gcc gcc/testsuite/gcc.c-torture/execute/pr71494.c -O1 -flto
> ...
> /home/marxin/Programming/gcc/gcc/ipa-modref-tree.h:550:33: runtime error: load
> of value 255, which is not a valid value for type 'bool'
> #0 0x18acc38 in modref_tree<tree_node*>::merge(modref_tree<tree_node*>*,
> vec<modref_parm_map, va_heap, vl_ptr>*, modref_parm_map*, bool)
> /home/marxin/Programming/gcc/gcc/ipa-modref-tree.h:550
> #1 0x188452c in modref_propagate_in_scc
At 4385 I have:
changed |= cur_summary_lto->stores->merge
(callee_summary_lto->stores, &parm_map, &chain_map, !first);
parm-map is the vector, however there is no read of it.
There is bool which is relevant only when parm_index is not unknown, so
I suspect it may a full copy with uninitialized bool which would be
harmless. We had similar issues with asan before.
How do you build ubsan compiler?
Honza