https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126084
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
void
bar ()
{
_BitInt(135) *p, *q;
{
_BitInt(135) a, b;
p = &a;
q = &b;
}
*p = 1;
*q = 2;
}
is a testcase for the stores after scope rather than loads after scope.
In any case, this is complicated to solve.
One idea would be to replace the large/huge _BitInt with just limb sized ones
and pretend the uses other than .ASAN_POISON_USE extend from the limb to the
full size at that point. The problem with that is that uses of .ASAN_POISON
lhs can be also GIMPLE_PHIs and in that case perhaps only some of PHI args will
be .ASAN_POISON uses but others might be something else. So, in that case we'd
need to insert the extensions there.
Yet another option would be if we detect any .ASAN_POISON calls with large/huge
_BitInt on lhs to do some kind of sanopt minipass at the start of bitint
lowering, which would
call asan_expand_poison_ifn on those.