http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50947
Bug #: 50947 Summary: ICE on armhf with llvm-2.x Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: konstantinos.margari...@linaro.org Created attachment 25678 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25678 minimal testcase produced using delta tool from lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp in llvm-2.x llvm-2.x fail to build from source on Debian armhf, all due to a g++ ICE: http://buildd.debian-ports.org/status/fetch.php?pkg=llvm-2.7&arch=armhf&ver=2.7-6.2&stamp=1311446819 http://buildd.debian-ports.org/status/fetch.php?pkg=llvm-2.8&arch=armhf&ver=2.8-7&stamp=1309205992 http://buildd.debian-ports.org/status/fetch.php?pkg=llvm-2.9&arch=armhf&ver=2.9%2Bdfsg-3&stamp=1309210849 Originally the bug appeared with g++-4.6.1-10 but it still fails with g++-4.6.2-3 (latest Debian/unstable). ... llvm[4]: Compiling ExternalFunctions.cpp for Release build if arm-linux-gnueabihf-g++ -I/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/include -I/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter -I/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/include -I/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/lib/ExecutionEngine/Interpreter -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -O2 -fomit-frame-pointer -fno-exceptions -fPIC -Woverloaded-virtual -Wcast-qual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -c -MMD -MP -MF "/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter/Release/ExternalFunctions.d.tmp" -MT "/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter/Release/ExternalFunctions.o" -MT "/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter/Release/ExternalFunc tions.d" /build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp -o /build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter/Release/ExternalFunctions.o ; \ then /bin/mv -f "/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter/Release/ExternalFunctions.d.tmp" "/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter/Release/ExternalFunctions.d"; else /bin/rm "/build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/build-llvm/lib/ExecutionEngine/Interpreter/Release/ExternalFunctions.d.tmp"; exit 1; fi /build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp: In member function 'llvm::GenericValue llvm::Interpreter::callExternalFunction(llvm::Function*, const std::vector<llvm::GenericValue>&)': /build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:293:1: error: insn does not satisfy its constraints: (insn 3133 3132 3135 306 (set (subreg:SI (reg:DI 1122) 0) (ior:SI (ashift:SI (reg:SI 1125) (const_int -24 [0xffffffffffffffe8])) (subreg:SI (reg:DI 1122) 0))) /build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/include/llvm/ADT/APInt.h:139 251 {*arith_shiftsi} (nil)) /build/buildd-llvm-2.8_2.8-7-armhf-yLsjcC/llvm-2.8-2.8/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:293:1: internal compiler error: in extract_constrain_insn_cached, at recog.c:2024 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions. I used the delta package to produce a minimal testcase for the ICE which I attach. You can reproduce the ICE with: g++ -O2 -fpermissive -w llvm_ExternalFunctions-min.i The bug has also been filed on the Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642127 Regards Konstantinos