Commit 2f3c4b69 by Bernd Edlinger Committed by Bernd Edlinger

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
parent b6b782b9
2015-01-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gimplify.c (gimplify_function_tree): Check the no_sanitize_thread
decl attribute.
2015-01-21 David Sherwood <david.sherwood@arm.com>
Tejas Belagod <Tejas.Belagod@arm.com>
......
......@@ -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);
......
2015-01-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc/testsuite/c-c++-common/tsan/step.c: New testcase.
2015-01-21 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/aarch64/advsimd-intrinsics/vqdmull_n.c: New file.
......
/* { dg-do compile } */
extern int sched_yield (void);
static volatile int serial = 0;
__attribute__((no_sanitize_thread))
void step (int i)
{
while (__atomic_load_n (&serial, __ATOMIC_ACQUIRE) != i - 1)
sched_yield ();
__atomic_store_n (&serial, i, __ATOMIC_RELEASE);
}
/* { dg-final { scan-assembler-not "__tsan_func_entry" } } */
/* { dg-final { scan-assembler-not "__tsan_func_exit" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment