<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px; widows: 1; background-color: rgb(255, 255, 255);" class="">Hi, all</p><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px; widows: 1; background-color: rgb(255, 255, 255);" class="">I try to run codes below to get a block address (not entry block)</p><pre style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; word-wrap: normal; color: rgb(34, 34, 34); widows: 1; background-color: rgb(238, 238, 238);" class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">BasicBlock *bb = BasicBlock::Create(context, "label", func);
Value *alloca = builder.CreateAlloca(builder.getInt8PtrTy(), 0);
builder.CreateStore(BlockAddress::get(bb), alloca);
</code></pre><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px; widows: 1; background-color: rgb(255, 255, 255);" class="">But every time I get an error:</p><pre style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; word-wrap: normal; color: rgb(34, 34, 34); widows: 1; background-color: rgb(238, 238, 238);" class=""><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">Unknown constant pointer type!
UNREACHABLE executed at /tmp/llvm20150903-18194-1kmlx72/llvm-3.6.2.src/lib/ExecutionEngine/ExecutionEngine.cpp:825!
Abort trap: 6
</code></pre><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px; widows: 1; background-color: rgb(255, 255, 255);" class="">It is wired that this problem only happens if I use <code style="margin: 0px; padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);" class="">ExecutableEngine.runFunctionAsMain</code> to run <code style="margin: 0px; padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);" class="">func</code><br class="">If I dump my codes to a llvm IR file first and use llvm tool <code style="margin: 0px; padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);" class="">lli</code> to run IR file, it works</p><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px; widows: 1; background-color: rgb(255, 255, 255);" class="">Is it a <code style="margin: 0px; padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);" class="">just-in-time</code> problem ? I am confused.</p><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px; widows: 1; background-color: rgb(255, 255, 255);" class="">Thanks, Allen.</p></body></html>