[Bug c++/47541] [4.5/4.6 Regression] For integer pointers, the value of ++*p is not written back to memory
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 31 17:00:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47541
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-31 16:28:19 UTC ---
Hmm. We have
D.10321_19 = MEM[(const struct RefCount &)ptr_3(D) + 8].count_;
MEM[(struct RefCount *)D.9717_8 + 8B].count_ = D.10321_19;
D.10322_20 = MEM[(struct RefCount *)D.9717_8 + 8B].count_;
...
MEM[(int *)D.10322_20] = D.10324_22;
so _19 isn't used at this point (as in, dereferenced) directly.
Constraints:
PARM_NOALIAS.204.64+64 = NONLOCAL
PARM_NOALIAS.204.128+64 = NONLOCAL
ptr = &PARM_NOALIAS.204.64+64
D.10321_19 = *ptr + 128
*D.9717_8 + 128 = D.10321_19
D.10322_20 = *D.9717_8 + 128
D.10323_21 = *D.10322_20
Note the funny fact that no constraint is there for
the subvar starting at 0. And we end up with
# PT = nonlocal escaped
D.10320_18 = MEM[(const struct RefCount &)ptr_3(D) + 8].ptr_;
MEM[(struct RefCount *)D.9717_8 + 8B].ptr_ = D.10320_18;
# PT =
D.10321_19 = MEM[(const struct RefCount &)ptr_3(D) + 8].count_;
MEM[(struct RefCount *)D.9717_8 + 8B].count_ = D.10321_19;
# PT = nonlocal escaped
D.10322_20 = MEM[(struct RefCount *)D.9717_8 + 8B].count_;
which means that we think we access PARM_NOALIAS.204.196+64 when
loading from count_. This looks like a type issue to me, related to
pass-by-reference + restrict handling. Eventually related to
how inheritance is represented.
More information about the Gcc-bugs
mailing list