[LLVMdev] UNREACHABLE executed! error while trying to generate PTX

upit uday_pitambare at yahoo.com
Wed Mar 20 08:29:10 PDT 2013

OK. That helps.
It does flash a warning though

[DEVICE-C++] nbody.kernel.cpp
nbody.kernel.cpp:29:9: warning: '__constant__' macro redefined
#define __constant__ __attribute__((address_space(2)))
/opt/cuda/include/host_defines.h:183:9: note: previous definition is here
#define __constant__ \
1 warning generated.

Another question is 
What about extern __shared__ ?

I can see that the error goes away if I replace "extern __shared__ float4
sharedPos[]" with "__shared__ float4* sharedPos;". Do I have to dynamically
allocate the shared memory  by specifying size in kernel Launch? If so, why
doesn't the second use of the same statement in another function cause the
error ?

I am using 3.2. 

View this message in context: http://llvm.1065342.n5.nabble.com/UNREACHABLE-executed-error-while-trying-to-generate-PTX-tp56026p56080.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.

More information about the llvm-dev mailing list