aboutsummaryrefslogtreecommitdiff
path: root/gcc/tsan.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tsan.c')
-rw-r--r--gcc/tsan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tsan.c b/gcc/tsan.c
index 4d62234..1bc020e 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "asan.h"
#include "builtins.h"
#include "target.h"
+#include "diagnostic-core.h"
/* Number of instrumented memory accesses in the current function. */
@@ -500,6 +501,11 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
continue;
else
{
+ if (fcode == BUILT_IN_ATOMIC_THREAD_FENCE)
+ warning_at (gimple_location (stmt), OPT_Wtsan,
+ "%qs is not supported with %qs", "atomic_thread_fence",
+ "-fsanitize=thread");
+
tree decl = builtin_decl_implicit (tsan_atomic_table[i].tsan_fcode);
if (decl == NULL_TREE)
return;