Created attachment 14277 [details] preprocessed source for magick/feature.c from ImageMagick The file magick/feature.c from ImageMagick-6.9.1-2 ICEs on -fopenmp=libiomp5 -Xclang -fopenmp=libiomp5 but not with clang-omp. # clang-3.7 -DHAVE_CONFIG_H -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp=libiomp5 -O2 -g -Xclang -fopenmp=libiomp5 -L/sw/opt/llvm-3.7.0/lib -Wall -march=penryn -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -c feature.i -fno-common -DPIC clang-3.7: warning: argument unused during compilation: '-fopenmp=libiomp5' clang-3.7: warning: argument unused during compilation: '-L/sw/opt/llvm-3.7.0/lib' magick/feature.c:317:60: warning: extra tokens at the end of '#pragma omp parallel for' are ignored [-Wextra-tokens] #pragma omp parallel for schedule(static,4) shared(status) magick_threads(edge_image,edge_image,edge_image->rows,1) ^ magick/feature.c:429:60: warning: extra tokens at the end of '#pragma omp parallel for' are ignored [-Wextra-tokens] #pragma omp parallel for schedule(static,4) shared(status) magick_threads(edge_image,edge_image,edge_image->rows,1) ^ 0 clang-3.7 0x000000010c63e819 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 57 1 clang-3.7 0x000000010c63f26b SignalHandler(int) + 443 2 libsystem_platform.dylib 0x00007fff96ea3f1a _sigtramp + 26 3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1763033344 4 clang-3.7 0x000000010caf247f getStaticDeclName(clang::CodeGen::CodeGenModule&, clang::VarDecl const&) + 319 5 clang-3.7 0x000000010caf1e0f clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(clang::VarDecl const&, llvm::GlobalValue::LinkageTypes) + 447 6 clang-3.7 0x000000010caf1867 clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(clang::VarDecl const&, llvm::GlobalValue::LinkageTypes) + 215 7 clang-3.7 0x000000010cb9e34b clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 731 8 clang-3.7 0x000000010cb9da82 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 178 9 clang-3.7 0x000000010cba52cb clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 91 10 clang-3.7 0x000000010cba4907 clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 327 11 clang-3.7 0x000000010cb9e248 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 472 12 clang-3.7 0x000000010cb9da82 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 178 13 clang-3.7 0x000000010cb9fe4c clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt const&, llvm::ArrayRef<clang::Attr const*>) + 1740 14 clang-3.7 0x000000010cb9dbf5 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 549 15 clang-3.7 0x000000010cba52cb clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 91 16 clang-3.7 0x000000010cba4907 clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 327 17 clang-3.7 0x000000010cb9e248 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 472 18 clang-3.7 0x000000010cb9da82 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 178 19 clang-3.7 0x000000010cbab1f1 clang::CodeGen::CodeGenFunction::EmitOMPLoopBody(clang::OMPLoopDirective const&, bool) + 625 20 clang-3.7 0x000000010cbb238a void llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)>::callback_fn<clang::CodeGen::CodeGenFunction::EmitOMPForOuterLoop(clang::OpenMPScheduleClauseKind, clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::OMPPrivateScope&, llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*)::$_12>(long, clang::CodeGen::CodeGenFunction&) + 26 21 clang-3.7 0x000000010cbab610 clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(clang::Stmt const&, bool, clang::Expr const*, clang::Expr const*, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&) + 944 22 clang-3.7 0x000000010cbac42a clang::CodeGen::CodeGenFunction::EmitOMPForOuterLoop(clang::OpenMPScheduleClauseKind, clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::OMPPrivateScope&, llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*) + 2954 23 clang-3.7 0x000000010cbad453 clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(clang::OMPLoopDirective const&) + 3427 24 clang-3.7 0x000000010cbb1e58 void llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)>::callback_fn<clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(clang::OMPParallelForDirective const&)::$_21>(long, clang::CodeGen::CodeGenFunction&) + 24 25 clang-3.7 0x000000010cb92737 (anonymous namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&, clang::Stmt const*) + 87 26 clang-3.7 0x000000010cba7c60 clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(clang::CapturedStmt const&) + 1712 27 clang-3.7 0x000000010cb87df8 clang::CodeGen::CGOpenMPRuntime::emitParallelOutlinedFunction(clang::OMPExecutableDirective const&, clang::VarDecl const*, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&) + 248 28 clang-3.7 0x000000010cbaae89 emitCommonOMPParallelDirective(clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&) + 153 29 clang-3.7 0x000000010cbaf004 clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(clang::OMPParallelForDirective const&) + 244 30 clang-3.7 0x000000010cb9dc7f clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 687 31 clang-3.7 0x000000010cba52cb clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 91 32 clang-3.7 0x000000010cbc5e51 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 1361 33 clang-3.7 0x000000010cbd3827 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) + 1495 34 clang-3.7 0x000000010cbd0a50 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) + 352 35 clang-3.7 0x000000010cbd4ef9 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 169 36 clang-3.7 0x000000010cc368cf (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 111 37 clang-3.7 0x000000010cbc0cbc clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 156 38 clang-3.7 0x000000010cf249c3 clang::ParseAST(clang::Sema&, bool, bool) + 371 39 clang-3.7 0x000000010c85404e clang::FrontendAction::Execute() + 62 40 clang-3.7 0x000000010c822223 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 883 41 clang-3.7 0x000000010c890231 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4289 42 clang-3.7 0x000000010bde8128 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 808 43 clang-3.7 0x000000010bde7282 main + 11410 44 libdyld.dylib 0x00007fff96d425c9 start + 1 45 libdyld.dylib 0x0000000000000039 start + 1764481649 Stack dump: 0. Program arguments: /sw/opt/llvm-3.7.0/bin/clang-3.7 -cc1 -triple x86_64-apple-macosx10.10.0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name feature.i -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 242 -gdwarf-2 -dwarf-column-info -fno-unique-section-names -coverage-file /sw/src/fink.build/imagemagick8-shlibs-6.9.1-1/ImageMagick-6.9.1-2/feature.i -resource-dir /sw/opt/llvm-3.7.0/bin/../lib/clang/3.7.0 -O2 -Wall -fdebug-compilation-dir /sw/src/fink.build/imagemagick8-shlibs-6.9.1-1/ImageMagick-6.9.1-2 -ferror-limit 19 -fmessage-length 196 -pthread -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature -fexceptions -fmax-type-align=16 -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -fopenmp=libiomp5 -o feature.o -x cpp-output feature.i 1. magick/feature.c:619:1: current parser token 'static' 2. magick/feature.c:241:49: LLVM IR generation of declaration 'CannyEdgeImage' 3. magick/feature.c:241:49: Generating code for declaration 'CannyEdgeImage' 4. magick/feature.c:321:3: LLVM IR generation of compound statement ('{}') 5. magick/feature.c:338:5: LLVM IR generation of compound statement ('{}') clang-3.7: error: unable to execute command: Segmentation fault: 11 clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.7.0 (trunk) Target: x86_64-apple-darwin14.4.0 Thread model: posix clang-3.7: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-3.7: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
I can confirm that at 236592 with... http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150504/128555.html http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150504/128561.html http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150504/128567.html applied builds ImageMagick-6.9.1-2 successfully with openmp support enabled on x86_64-apple-darwin14.
Fixed in revision 236701.