On Wed, Oct 31, 2012 at 11:00:17PM -0700, Xinliang David Li wrote: > > + /* Below are things we do not instrument > > + (no possibility of races or not implemented yet). */ > > + if (/* Compiler-emitted artificial variables. */ > > + (DECL_P (expr) && DECL_ARTIFICIAL (expr)) > > + /* The var does not live in memory -> no possibility of races. */ > > + || (tcode == VAR_DECL > > + && TREE_ADDRESSABLE (expr) == 0 > > ==> !TREE_ADDRESSABLE (expr) > > > + && TREE_STATIC (expr) == 0) > > > To detect stack varaible, TREE_STATIC can not be used. Use > !DECL_EXTERNAL instead.
TREE_STATIC is right for that. Jakub