tra added a comment. Following code compiles with nvcc, but errors out with clang and this patch due to InitExpr check in CodeGenModule.cpp. It looks like the check needs to be more selective. struct c { c() {} }; __shared__ c var; http://reviews.llvm.org/D12241