Skip to content
Snippets Groups Projects
Commit dc35778a authored by Richard Biener's avatar Richard Biener
Browse files

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.
parent 40c1352c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment