https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121814
--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Here I am getting failure regardless of modref
jh@shroud:~/trunk/build/stage1-gcc> g++ t.C -O2 -fno-ipa-modref
jh@shroud:~/trunk/build/stage1-gcc> ./a.out
terminate called after throwing an instance of 'std::runtime_error'
what(): check fail
Aborted (core dumped)
jh@shroud:~/trunk/build/stage1-gcc> g++ t.C -O0 -fno-ipa-modref
jh@shroud:~/trunk/build/stage1-gcc> ./a.out
I do see the flags on __vv
parm 1 flags: no_direct_clobber no_indirect_clobber no_direct_escape
no_indirect_escape no_direct_read no_indirect_re
Tracking is dumped here
Analyzing flags of ssa name: __vv_10(D)
Analyzing stmt: __v_11 = (long unsigned int) __vv_10(D);
Analyzing flags of ssa name: __v_11
Analyzing stmt: __u_7 = PHI <__v_11(2), __u_19(5)>
Analyzing flags of ssa name: __u_7
Analyzing stmt: __u_19 = __u_7 >> 4;
Analyzing flags of ssa name: __u_19
Analyzing stmt: __u_7 = PHI <__v_11(2), __u_19(5)>
Cycle in SSA graph
Will propgate from ssa_name 7 to 19
current flags of __u_19 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
Analyzing stmt: if (__u_19 != 0)
current flags of __u_19 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
flags of ssa name __u_19 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
Will propgate from ssa_name 19 to 7
current flags of __u_7 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
Analyzing stmt: _1 = __u_7 & 15;
Analyzing flags of ssa name: _1
Analyzing stmt: _2 = ss_out_atoms[_1];
current flags of _1 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
flags of ssa name _1 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
current flags of __u_7 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
flags of ssa name __u_7 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
Will propgate from ssa_name 7 to 11
current flags of __v_11 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
flags of ssa name __v_11 no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
Will propgate from ssa_name 11 to 10
current flags of __vv_10(D) no_direct_clobber no_indirect_clobber
no_direct_escape no_indirect_escape not_returned_directly
not_returned_indirectly no_direct_read no_indirect_read
So I think the problem is that analysis does not consider
Analyzing stmt: _2 = ss_out_atoms[_1];
as possible escape. So right fix should be to handle loads with a address
containing a given SSA name as possibly passing the value to RHS.