1 // RUN: %clang_cc1 -std=gnu++11 -triple nvptx64-unknown-unknown -fsyntax-only -verify %s
2 
3 #include "Inputs/cuda.h"
4 
5 // expected-no-diagnostics
__threadfence_system()6 __device__ void __threadfence_system() {
7   // This shouldn't produce an error, since __nvvm_membar_sys is inferred to
8   // be __host__ __device__ and thus callable from device code.
9   __nvvm_membar_sys();
10 }
11