blob: dba26c553912e3332e96e865eaf91c95cc2faf0d [file] [log] [blame]
Artem Belevich9674a642015-09-22 17:23:05 +00001// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device \
2// RUN: -fsyntax-only -verify %s
Eli Benderskyf2787a02014-09-30 17:38:34 +00003
4#include "Inputs/cuda.h"
5
6// expected-no-diagnostics
7__device__ void __threadfence_system() {
Artem Belevich9674a642015-09-22 17:23:05 +00008 // This shouldn't produce an error, since __nvvm_membar_sys should be
9 // __device__ and thus callable from device code.
Eli Benderskyf2787a02014-09-30 17:38:34 +000010 __nvvm_membar_sys();
11}