https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85081
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-03-27 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Martin, this is because of: /* When within an OMP context, do not emit ASAN_MARK internal fns. */ if (gimplify_omp_ctxp) return; in asan_poison_variable. Not really sure why exactly it has been added, but if we can't emit the ASAN_UNPOISON, we can't emit the corresponding ASAN_POISON either. So something like: --- gcc/gimplify.c.jj 2018-03-16 13:43:14.831910333 +0100 +++ gcc/gimplify.c 2018-03-27 20:11:27.680195380 +0200 @@ -1689,7 +1689,8 @@ gimplify_decl_expr (tree *stmt_p, gimple && !TREE_STATIC (decl) && !DECL_HAS_VALUE_EXPR_P (decl) && DECL_ALIGN (decl) <= MAX_SUPPORTED_STACK_ALIGNMENT - && dbg_cnt (asan_use_after_scope)) + && dbg_cnt (asan_use_after_scope) + && !gimplify_omp_ctxp) { asan_poisoned_variables->add (decl); asan_poison_variable (decl, false, seq_p); @@ -6614,7 +6615,8 @@ gimplify_target_expr (tree *expr_p, gimp } if (asan_poisoned_variables && DECL_ALIGN (temp) <= MAX_SUPPORTED_STACK_ALIGNMENT - && dbg_cnt (asan_use_after_scope)) + && dbg_cnt (asan_use_after_scope) + && !gimplify_omp_ctxp) { tree asan_cleanup = build_asan_poison_call_expr (temp); if (asan_cleanup) fixes it from me, but not really sure about the reasons why the above check is in there. Martin?