https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98508

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
There's no need to change the fn spec.  The simple (and safe) solution to this
request is to check calls to see if they're to IFN_ASAN_MARK, like this:

diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index 516a7bd2c99..c3718f96b55 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -209,6 +209,11 @@ check_defs (ao_ref *ref, tree vdef, void *data_)
 {
   check_defs_data *data = (check_defs_data *)data_;
   gimple *def_stmt = SSA_NAME_DEF_STMT (vdef);
+  if (is_gimple_call (def_stmt)
+      && gimple_call_internal_p (def_stmt)
+      && gimple_call_internal_fn (def_stmt) == IFN_ASAN_MARK)
+    return false;
+
   /* If this is a clobber then if it is not a kill walk past it.  */
   if (gimple_clobber_p (def_stmt))
     {

Reply via email to