On 07/16/2015 03:27 AM, Richard Biener wrote:
On Wed, 15 Jul 2015, Andrew MacLeod wrote:
admittedly neither situation is very common I suspect, but it does seem like a
hidden gotchya waiting to happen.
I guess we either want to checking-assert that we never hit that
special marker or handle it appropriately. Or even better avoid
it in the first place (not sure why we have it - I suppose to allow
modifying immediate uses of the current stmt from inside
FOR_EACH_IMM_USE_STMT).
For me single_imm_use_1 crashed on the NULL USE_STMT at
if (!is_gimple_debug (USE_STMT (ptr)))
so I presume all was fine until debug stmts were introduced
(well, fine as in not crashing, not as in giving correct answers).
yes, It was probably still wrong, we just erred reporting that a real
single_use statemen't wasn't.
The marker is unique in that the STMT field is NULL, which can't
happen otherwise.
I'll think about how to efficiently get this right
Andrew