https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84340
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- There's example of how a check is optimized out: before the r257585: __attribute__((noinline)) void test() [with T = bool] () { bool x; struct Ptr ptr; bool * _8; <bb 2> [100.00%]: ASAN_MARK (UNPOISON, &ptr, 8); ASAN_MARK (UNPOISON, &x, 1); ptr.t = &x; ASAN_MARK (POISON, &x, 1); _8 = ptr.t; *_8 = 0; ASAN_MARK (POISON, &ptr, 8); return; } after: __attribute__((noinline)) test<bool> () { bool x; struct Ptr ptr; <bb 2> : ASAN_MARK (UNPOISON, &ptr, 8); ASAN_MARK (UNPOISON, &x, 1); ptr.t = &x; ASAN_MARK (POISON, &x, 1); x = 0; ASAN_MARK (POISON, &ptr, 8); return; }