]>
git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid duplicate diagnostic in g++.dg/warn/Wuse-after-free3.C
We are diagnosing
operator delete (this_3(D));
A::f (this_3(D));
*this_3(D) ={v} CLOBBER;
where the CLOBBER appears at the end of the DTOR for C++11 and later.
The following avoids this by simply never diagnosing clobbers as
use-after-free.
* gimple-ssa-warn-access.cc (pass_waccess::check_pointer_uses):
Do not diagnose clobbers.
* g++.dg/warn/Wuse-after-free3.C: Remove expected duplicate
diagnostic.