Fix wrong use-after-scope sanitization for omp variable (PR sanitizer/85081).
authorJakub Jelinek <jakub@redhat.com>
Wed, 28 Mar 2018 14:45:21 +0000 (16:45 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 28 Mar 2018 14:45:21 +0000 (14:45 +0000)
commitd838c2d5a8b1844c7c78596b9689339ec60731f3
tree3bc231046d07cdde8d0c364d280ceeb49fe3a24d
parenta48b4234ddba56e6ac698a8a84f24176085dc099
Fix wrong use-after-scope sanitization for omp variable (PR sanitizer/85081).

2018-03-28  Jakub Jelinek  <jakub@redhat.com>
    Martin Liska  <mliska@suse.cz>

PR sanitizer/85081
* gimplify.c (asan_poison_variable): Don't do the check for
gimplify_omp_ctxp here.
(gimplify_decl_expr): Do it here.
(gimplify_target_expr): Likewise.
2018-03-28  Jakub Jelinek  <jakub@redhat.com>
    Martin Liska  <mliska@suse.cz>

PR sanitizer/85081
* g++.dg/asan/pr85081.C: New test.

Co-Authored-By: Martin Liska <mliska@suse.cz>
From-SVN: r258924
gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/asan/pr85081.C [new file with mode: 0644]