blob: 0793d64b1017a3cc8f5da4cd1a029aad7db227de [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
3// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device \
4// RUN: -fcuda-target-overloads -fsyntax-only -verify %s
Eli Benderskyf2787a02014-09-30 17:38:34 +00005
6#include "Inputs/cuda.h"
7
8// expected-no-diagnostics
9__device__ void __threadfence_system() {
Artem Belevich9674a642015-09-22 17:23:05 +000010 // This shouldn't produce an error, since __nvvm_membar_sys should be
11 // __device__ and thus callable from device code.
Eli Benderskyf2787a02014-09-30 17:38:34 +000012 __nvvm_membar_sys();
13}