aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2015-01-21 18:08:42 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2015-01-21 18:08:42 +0000
commit2f3c4b6968e969001578fddc4fac848b8726dde3 (patch)
treea28bfc2b90509e1767f3e542d283a603e77432da /gcc/gimplify.c
parentb6b782b967c8b3cdd1bcb3f6a8aa5581be86ffd7 (diff)
downloadgcc-2f3c4b6968e969001578fddc4fac848b8726dde3.zip
gcc-2f3c4b6968e969001578fddc4fac848b8726dde3.tar.gz
gcc-2f3c4b6968e969001578fddc4fac848b8726dde3.tar.bz2
gimplify.c (gimplify_function_tree): Check the no_sanitize_thread decl attribute.
gcc/ChangeLog: 2015-01-21 Bernd Edlinger <bernd.edlinger@hotmail.de> * gimplify.c (gimplify_function_tree): Check the no_sanitize_thread decl attribute. gcc/testsuite/ChangeLog 2015-01-21 Bernd Edlinger <bernd.edlinger@hotmail.de> * gcc/testsuite/c-c++-common/tsan/step.c: New testcase. From-SVN: r219961
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 947b0af..1353ada 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -9258,7 +9258,8 @@ gimplify_function_tree (tree fndecl)
bind = new_bind;
}
- if (flag_sanitize & SANITIZE_THREAD)
+ if ((flag_sanitize & SANITIZE_THREAD) != 0
+ && !lookup_attribute ("no_sanitize_thread", DECL_ATTRIBUTES (fndecl)))
{
gcall *call = gimple_build_call_internal (IFN_TSAN_FUNC_EXIT, 0);
gimple tf = gimple_build_try (seq, call, GIMPLE_TRY_FINALLY);