<div dir="ltr"><div><div>The problem you are seeing is because clang is putting the global variables in address space 0, which in NVPTX means the generic address space.  PTX does not allow this, so the back-end *should* be printing an error for you.  Are you using trunk or 3.2?<br>
<br></div>Generally, clang won't be compatible with the CUDA Toolkit headers.  If you want to use the __constant__ modifier from CUDA in Clang, define it like so:<br><br></div>#define __constant__ __attribute__((address_space(2)))</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 18, 2013 at 6:31 PM, upit <span dir="ltr"><<a href="mailto:uday_pitambare@yahoo.com" target="_blank">uday_pitambare@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please find the .ll attached below . Yes, I am using the cuda_runtime.h from<br>
the toolkit.<br>
nbody.kernel.ll<br>
<<a href="http://llvm.1065342.n5.nabble.com/file/n56048/nbody.kernel.ll" target="_blank">http://llvm.1065342.n5.nabble.com/file/n56048/nbody.kernel.ll</a>><br>
- Uday<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://llvm.1065342.n5.nabble.com/UNREACHABLE-executed-error-while-trying-to-generate-PTX-tp56026p56048.html" target="_blank">http://llvm.1065342.n5.nabble.com/UNREACHABLE-executed-error-while-trying-to-generate-PTX-tp56026p56048.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the LLVM - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div>