<font size=2 face="sans-serif">All,</font>
<br>
<br><font size=2 face="sans-serif">I've encountered an ICE with clang built
from the recent updates (thanks!) when I attempt to use certain CNK syscalls.
Has anyone else seen this? Is there a workaround?</font>
<br>
<br><font size=2 face="sans-serif">Here's my code and the clang output:</font>
<br>
<br><font size=2 face="sans-serif">====</font>
<br>
<br><tt><font size=2>.../test> cat personality_ice.cc </font></tt>
<br>
<br><tt><font size=2>#include <kernel/location.h></font></tt>
<br>
<br><tt><font size=2>int main ()</font></tt>
<br><tt><font size=2>{</font></tt>
<br><tt><font size=2> Personality_t personality;</font></tt>
<br><tt><font size=2> Kernel_GetPersonality(&personality, sizeof(Personality_t));</font></tt>
<br>
<br><tt><font size=2> return 0;</font></tt>
<br><tt><font size=2>};</font></tt>
<br>
<br><tt><font size=2>.../test> /bghome/blocksom/development/llvm/bgclang++
-ferror-limit=10 -I../include -I /bgsys/drivers/ppcfloor -I /bgsys/drivers/ppcfloor/spi/include
-I /bgsys/drivers/ppcfloor/spi/include/kernel/cnk -std=c++11 -stdlib=libc++
-fno-exceptions -v -c personality_ice.cc -o personality_ice.o</font></tt>
<br><tt><font size=2>clang version 3.3 (trunk 170456)</font></tt>
<br><tt><font size=2>Target: powerpc64-bgq-linux</font></tt>
<br><tt><font size=2>Thread model: posix</font></tt>
<br><tt><font size=2> "/bghome/blocksom/development/llvm/install/bin/clang"
-cc1 -triple powerpc64-bgq-linux -S -disable-free -main-file-name personality_ice.cc
-static-define -mrelocation-model static -mdisable-fp-elim -fmath-errno
-ffp-contract=fast -mconstructor-aliases -target-cpu a2q -target-linker-version
2.20.51.0.2 -momit-leaf-frame-pointer -v -coverage-file /tmp/personality_ice-m3wqVS.s
-resource-dir /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3
-I ../include -I /bgsys/drivers/ppcfloor -I /bgsys/drivers/ppcfloor/spi/include
-I /bgsys/drivers/ppcfloor/spi/include/kernel/cnk -fmodule-cache-path /var/tmp/clang-module-cache
-internal-isystem /usr/include/c++/v1 -internal-isystem /usr/local/include
-internal-isystem /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/bghome/blocksom/development/boost-pami/next/test -ferror-limit 10 -fmessage-length
231 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -isystem /bghome/blocksom/development/llvm/install/libc++/include
-isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6
-isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6/powerpc64-bgq-linux
-isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/sys-include
-mllvm -enable-misched -mllvm -enable-aa-sched-mi -mllvm -ilp-window=0
-o /tmp/personality_ice-m3wqVS.s -x c++ personality_ice.cc</font></tt>
<br><tt><font size=2>clang -cc1 version 3.3 based upon LLVM 3.3svn default
target powerpc64-unknown-linux-gnu</font></tt>
<br><tt><font size=2>ignoring nonexistent directory "/usr/include/c++/v1"</font></tt>
<br><tt><font size=2>ignoring nonexistent directory "/include"</font></tt>
<br><tt><font size=2>#include "..." search starts here:</font></tt>
<br><tt><font size=2>#include <...> search starts here:</font></tt>
<br><tt><font size=2> ../include</font></tt>
<br><tt><font size=2> /bgsys/drivers/ppcfloor</font></tt>
<br><tt><font size=2> /bgsys/drivers/ppcfloor/spi/include</font></tt>
<br><tt><font size=2> /bgsys/drivers/ppcfloor/spi/include/kernel/cnk</font></tt>
<br><tt><font size=2> /bghome/blocksom/development/llvm/install/libc++/include</font></tt>
<br><tt><font size=2> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6</font></tt>
<br><tt><font size=2> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6/powerpc64-bgq-linux</font></tt>
<br><tt><font size=2> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/sys-include</font></tt>
<br><tt><font size=2> /usr/local/include</font></tt>
<br><tt><font size=2> /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include</font></tt>
<br><tt><font size=2> /usr/include</font></tt>
<br><tt><font size=2>End of search list.</font></tt>
<br><tt><font size=2>Instruction uses an allocated register</font></tt>
<br><tt><font size=2>UNREACHABLE executed at /bghome/blocksom/development/llvm/src/lib/CodeGen/RegAllocFast.cpp:351!</font></tt>
<br><tt><font size=2>0 clang 0x0000000011f55b1c</font></tt>
<br><tt><font size=2>1 clang 0x0000000011f56924</font></tt>
<br><tt><font size=2>2 0x00000fff962e0418
__kernel_sigtramp_rt64 + 0</font></tt>
<br><tt><font size=2>3 libc.so.6 0x00000080dbd86ef8 abort + 18446744073708064168</font></tt>
<br><tt><font size=2>4 clang 0x0000000011f38df4 llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 18446744073696340212</font></tt>
<br><tt><font size=2>5 clang 0x00000000118fa8c4</font></tt>
<br><tt><font size=2>6 clang 0x00000000118fb77c</font></tt>
<br><tt><font size=2>7 clang 0x000000001189498c llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
+ 18446744073689552652</font></tt>
<br><tt><font size=2>8 clang 0x0000000011edaa98 llvm::FPPassManager::runOnFunction(llvm::Function&)
+ 18446744073695968280</font></tt>
<br><tt><font size=2>9 clang 0x0000000011edabdc llvm::FPPassManager::runOnModule(llvm::Module&)
+ 18446744073695968588</font></tt>
<br><tt><font size=2>10 clang 0x0000000011eda60c llvm::MPPassManager::runOnModule(llvm::Module&)
+ 18446744073695967132</font></tt>
<br><tt><font size=2>11 clang 0x0000000011edbf64 llvm::PassManagerImpl::run(llvm::Module&)
+ 18446744073695973428</font></tt>
<br><tt><font size=2>12 clang 0x0000000011edc074 llvm::PassManager::run(llvm::Module&)
+ 18446744073695973684</font></tt>
<br><tt><font size=2>13 clang 0x000000001044851c clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
18446744073668788412</font></tt>
<br><tt><font size=2>14 clang 0x00000000104453f4</font></tt>
<br><tt><font size=2>15 clang 0x00000000105db3d0 clang::ParseAST(clang::Sema&,
bool, bool) + 18446744073670399680</font></tt>
<br><tt><font size=2>16 clang 0x00000000102a0b50 clang::ASTFrontendAction::ExecuteAction()
+ 18446744073667099648</font></tt>
<br><tt><font size=2>17 clang 0x0000000010443028 clang::CodeGenAction::ExecuteAction()
+ 18446744073668767224</font></tt>
<br><tt><font size=2>18 clang 0x00000000102a1024 clang::FrontendAction::Execute()
+ 18446744073667100756</font></tt>
<br><tt><font size=2>19 clang 0x000000001027ed64 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
+ 18446744073666962340</font></tt>
<br><tt><font size=2>20 clang 0x000000001025f704 clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
+ 18446744073666839428</font></tt>
<br><tt><font size=2>21 clang 0x0000000010255998 cc1_main(char
const**, char const**, char const*, void*) + 18446744073666799576</font></tt>
<br><tt><font size=2>22 clang 0x000000001025daf0 main + 18446744073666832256</font></tt>
<br><tt><font size=2>23 libc.so.6 0x00000080dbd6bcf8</font></tt>
<br><tt><font size=2>24 libc.so.6 0x00000080dbd6bef0 __libc_start_main
+ 18446744073707958816</font></tt>
<br><tt><font size=2>Stack dump:</font></tt>
<br><tt><font size=2>0. Program arguments:
/bghome/blocksom/development/llvm/install/bin/clang -cc1 -triple powerpc64-bgq-linux
-S -disable-free -main-file-name personality_ice.cc -static-define -mrelocation-model
static -mdisable-fp-elim -fmath-errno -ffp-contract=fast -mconstructor-aliases
-target-cpu a2q -target-linker-version 2.20.51.0.2 -momit-leaf-frame-pointer
-v -coverage-file /tmp/personality_ice-m3wqVS.s -resource-dir /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3
-I ../include -I /bgsys/drivers/ppcfloor -I /bgsys/drivers/ppcfloor/spi/include
-I /bgsys/drivers/ppcfloor/spi/include/kernel/cnk -fmodule-cache-path /var/tmp/clang-module-cache
-internal-isystem /usr/include/c++/v1 -internal-isystem /usr/local/include
-internal-isystem /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/bghome/blocksom/development/boost-pami/next/test -ferror-limit 10 -fmessage-length
231 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -isystem /bghome/blocksom/development/llvm/install/libc++/include
-isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6
-isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/include/c++/4.4.6/powerpc64-bgq-linux
-isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/sys-include
-mllvm -enable-misched -mllvm -enable-aa-sched-mi -mllvm -ilp-window=0
-o /tmp/personality_ice-m3wqVS.s -x c++ personality_ice.cc </font></tt>
<br><tt><font size=2>1. <eof>
parser at end of file</font></tt>
<br><tt><font size=2>2. Code generation</font></tt>
<br><tt><font size=2>3. Running pass
'Function Pass Manager' on module 'personality_ice.cc'.</font></tt>
<br><tt><font size=2>4. Running pass
'Fast Register Allocator' on function '@main'</font></tt>
<br><tt><font size=2>clang: error: unable to execute command: Aborted (core
dumped)</font></tt>
<br><tt><font size=2>clang: error: clang frontend command failed due to
signal (use -v to see invocation)</font></tt>
<br><tt><font size=2>clang version 3.3 (trunk 170456)</font></tt>
<br><tt><font size=2>Target: powerpc64-bgq-linux</font></tt>
<br><tt><font size=2>Thread model: posix</font></tt>
<br><tt><font size=2>clang: note: diagnostic msg: PLEASE submit a bug report
to </font></tt><a href=http://llvm.org/bugs/><tt><font size=2>http://llvm.org/bugs/</font></tt></a><tt><font size=2>
and include the crash backtrace, preprocessed source, and associated run
script.</font></tt>
<br><tt><font size=2>clang: note: diagnostic msg: </font></tt>
<br><tt><font size=2>********************</font></tt>
<br>
<br><tt><font size=2>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:</font></tt>
<br><tt><font size=2>Preprocessed source(s) and associated run script(s)
are located at:</font></tt>
<br><tt><font size=2>clang: note: diagnostic msg: /tmp/personality_ice-hApwmA.cpp</font></tt>
<br><tt><font size=2>clang: note: diagnostic msg: /tmp/personality_ice-hApwmA.sh</font></tt>
<br><tt><font size=2>clang: note: diagnostic msg: </font></tt>
<br>
<br><tt><font size=2>********************</font></tt>
<br>
<br><font size=2 face="sans-serif">====</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Michael Blocksome</font>
<br>