Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Error generating preprocessed source(s) #35013

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR36040
Status NEW
Importance P normal
Reported by Richard (rbarnes@umn.edu)
Reported on 2018-01-22 10:36:03 -0800
Last modified on 2019-03-14 07:50:12 -0700
Version unspecified
Hardware PC Linux
CC a.bataev@hotmail.com, Gheorghe-Teod.Bercea@ibm.com, hahnjo@hahnjo.de, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments fastscape_RB+PQ+GPU.cpp (14687 bytes, text/x-c++src)
Blocks
Blocked by
See also
Created attachment 19720
Soure code that caused problem

I am trying to compile some code (attached) using:

clang++ mycode.cpp CumulativeTimer.cpp Timer.cpp random.cpp -fopenmp -fopenmp-
targets=nvptx64-nvidia-cuda --cuda-path=/sw/summitdev/cuda/9.0.69 -std=c++11 -
DGIT_HASH="\"Unknown\"" -Wall

But I get the following output, which requests that I report the issue here:

clang-3.8:
/home/compteam/slave0/build_folder_trunk_ibm_inline/src/tools/clang/lib/CodeGen/CodeGenFunction.h:1989:
clang::CodeGen::Address
clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(const clang::VarDecl *):
Assertion `it != LocalDeclMap.end() && "Invalid argument to
GetAddrOfLocalVar(), no decl!"' failed.
#0 0x0000000011bb7148 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11bb7148)
#1 0x0000000011bb76b8 PrintStackTraceSignalHandler(void*) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11bb76b8)
#2 0x0000000011bb7a84 SignalHandler(int) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11bb7a84)
#3 0x00003fffa82b0478  0x478 __GI_abort
#4 0x00003fffa82b0478
#5 0x00003fffa82b0478 __assert_fail_base (+0x478)
#6 0x00003fffa7d70d70 __GI___assert_fail (/lib64/libc.so.6+0x40d70)
#7 0x00003fffa7d648a4
clang::CodeGen::CGOpenMPRuntimeNVPTX::createDataSharingInfo(clang::CodeGen::CodeGenFunction&)
(/lib64/libc.so.6+0x348a4)
#8 0x00003fffa7d64994
clang::CodeGen::CGOpenMPRuntimeNVPTX::registerParallelContext(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&) (/lib64/libc.so.6+0x34994)
#9 0x000000001210653c
emitCommonOMPParallelDirective(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&, unsigned int) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x1210653c)
#10 0x0000000012105484 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&)::$_100>(long, clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x12105484)
#11 0x0000000011e20b64
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const (/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-
rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e20b64)
#12 0x0000000011e4ee98 void llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&)>::callback_fn<clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, clang::CodeGen::RegionCodeGenTy const&)::$_64>(long,
clang::CodeGen::CodeGenFunction&) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e4ee98)
#13 0x00000000120a75fc
clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(clang::Stmt const&, bool,
clang::Expr const*, clang::Expr const*, clang::Expr const*,
llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&,
llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120a75fc)
#14 0x0000000011e4ed24
clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, clang::CodeGen::RegionCodeGenTy const&) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e4ed24)
#15 0x0000000011e225cc void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&)::$_67>(long, clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e225cc)
#16 0x0000000011e31998 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e31998)
#17 0x0000000011e4ee1c
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e4ee1c)
#18 0x00000000120e4edc
clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&) (/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-
rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120e4edc)
#19 0x00000000120d1ad4 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*) (/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-
rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120d1ad4)
#20 0x0000000011e321a0
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e321a0)
#21 0x0000000011e027e0
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e027e0)
#22 0x0000000011e0c22c
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e0c22c)
#23 0x0000000011e0b120 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*) (/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-
rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e0b120)
#24 0x0000000011e02e34 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::SourceLocation, llvm::Value*,
llvm::ArrayRef<llvm::Value*>)::$_31>(long, clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e02e34)
#25 0x0000000011e024d4 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e024d4)
#26 0x000000001212c294
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x1212c294)
#27 0x00000000120e4edc
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::SourceLocation, llvm::Value*,
llvm::ArrayRef<llvm::Value*>) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120e4edc)
#28 0x00000000120d1ad4
emitCommonOMPTeamsDirective(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&, unsigned int, unsigned int)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120d1ad4)
#29 0x00000000121109b0 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective const&)::$_88>(long,
clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x121109b0)
#30 0x0000000011e295c0 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e295c0)
#31 0x0000000011e53794
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&, bool, unsigned int, unsigned int, bool) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e53794)
#32 0x00000000120e4edc
clang::CodeGen::CGOpenMPRuntime::outlineTargetDirective(clang::OMPExecutableDirective
const&, llvm::StringRef, clang::CodeGen::RegionCodeGenTy const&) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120e4edc)
#33 0x0000000011e169b8
clang::CodeGen::CGOpenMPRuntimeNVPTX::outlineTargetDirective(clang::OMPExecutableDirective
const&, llvm::StringRef, clang::CodeGen::RegionCodeGenTy const&) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e169b8)
#34 0x00000000120d24a8
clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&, unsigned int) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120d24a8)
#35 0x0000000012106ba0
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitGenericKernel(clang::OMPExecutableDirective
const&, clang::CodeGen::CGOpenMPRuntimeNVPTX::TargetKernelProperties const&,
llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x12106ba0)
#36 0x00000000120d2874
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTargetOutlinedFunction(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&, unsigned int) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120d2874)
#37 0x0000000012107b20
clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective const&) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x12107b20)
#38 0x0000000012108240
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x12108240)
#39 0x0000000011e36284
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef) (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e36284)
#40 0x00000000120ddd70
clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(clang::GlobalDecl)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120ddd70)
#41 0x00000000120ddb58
clang::CodeGen::CGOpenMPRuntime::emitTargetGlobal(clang::GlobalDecl)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120ddb58)
#42 0x00000000120ddf2c
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120ddf2c)
#43 0x00000000120de39c
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x120de39c)
#44 0x0000000011e76c5c (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e76c5c)
#45 0x0000000011e7cb90
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x11e7cb90)
#46 0x00000000127c6d6c clang::ParseAST(clang::Sema&, bool, bool) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x127c6d6c)
#47 0x00000000127c4c4c clang::ASTFrontendAction::ExecuteAction() (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x127c4c4c)
#48 0x0000000012dd72a4 clang::CodeGenAction::ExecuteAction() (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x12dd72a4)
#49 0x00000000122fe2dc clang::FrontendAction::Execute() (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x122fe2dc)
#50 0x00000000127c36c0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x127c36c0)
#51 0x00000000122fda38
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x122fda38)
#52 0x00000000122b8238 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/autofs/nccs-svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-
rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x122b8238)
#53 0x00000000123c1358 main (/autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x123c1358)
#54 0x0000000010473ee0 generic_start_main.isra.0 (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x10473ee0)
#55 0x0000000010471b20 __libc_start_main (/autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8+0x10471b20)
0  clang-3.8 0x0000000011bb7148 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 120
1  clang-3.8 0x0000000011bb76b8
2  clang-3.8 0x0000000011bb7a84
3            0x00003fffa82b0478 __kernel_sigtramp_rt64 + 0
4  libc.so.6 0x00003fffa7d70d70 abort + 640
5  libc.so.6 0x00003fffa7d648a4
6  libc.so.6 0x00003fffa7d64994 __assert_fail + 100
7  clang-3.8 0x000000001210653c
clang::CodeGen::CGOpenMPRuntimeNVPTX::createDataSharingInfo(clang::CodeGen::CodeGenFunction&)
+ 4156
8  clang-3.8 0x0000000012105484
clang::CodeGen::CGOpenMPRuntimeNVPTX::registerParallelContext(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&) + 148
9  clang-3.8 0x0000000011e20b64
10 clang-3.8 0x0000000011e4ee98
11 clang-3.8 0x00000000120a75fc
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const + 220
12 clang-3.8 0x0000000011e4ed24
13 clang-3.8 0x0000000011e225cc
clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(clang::Stmt const&, bool,
clang::Expr const*, clang::Expr const*, clang::Expr const*,
llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&,
llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)> const&) + 1196
14 clang-3.8 0x0000000011e31998
clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, clang::CodeGen::RegionCodeGenTy const&) + 5320
15 clang-3.8 0x0000000011e4ee1c
16 clang-3.8 0x00000000120e4edc
17 clang-3.8 0x00000000120d1ad4
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool) + 388
18 clang-3.8 0x0000000011e321a0
clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&) + 304
19 clang-3.8 0x0000000011e027e0
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 1024
20 clang-3.8 0x0000000011e0c22c
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 172
21 clang-3.8 0x0000000011e0b120
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 352
22 clang-3.8 0x0000000011e02e34
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 260
23 clang-3.8 0x0000000011e024d4
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 244
24 clang-3.8 0x000000001212c294
25 clang-3.8 0x00000000120e4edc
26 clang-3.8 0x00000000120d1ad4
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool) + 388
27 clang-3.8 0x00000000121109b0
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::SourceLocation, llvm::Value*,
llvm::ArrayRef<llvm::Value*>) + 544
28 clang-3.8 0x0000000011e295c0
29 clang-3.8 0x0000000011e53794
30 clang-3.8 0x00000000120e4edc
31 clang-3.8 0x0000000011e169b8
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&, bool, unsigned int, unsigned int, bool) + 1656
32 clang-3.8 0x00000000120d24a8
clang::CodeGen::CGOpenMPRuntime::outlineTargetDirective(clang::OMPExecutableDirective
const&, llvm::StringRef, clang::CodeGen::RegionCodeGenTy const&) + 520
33 clang-3.8 0x0000000012106ba0
clang::CodeGen::CGOpenMPRuntimeNVPTX::outlineTargetDirective(clang::OMPExecutableDirective
const&, llvm::StringRef, clang::CodeGen::RegionCodeGenTy const&) + 448
34 clang-3.8 0x00000000120d2874
clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&, unsigned int) + 708
35 clang-3.8 0x0000000012107b20
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitGenericKernel(clang::OMPExecutableDirective
const&, clang::CodeGen::CGOpenMPRuntimeNVPTX::TargetKernelProperties const&,
llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&) + 288
36 clang-3.8 0x0000000012108240
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTargetOutlinedFunction(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&, unsigned int) + 208
37 clang-3.8 0x0000000011e36284
clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective const&) + 132
38 clang-3.8 0x00000000120ddd70
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef) + 976
39 clang-3.8 0x00000000120ddb58
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef) + 440
40 clang-3.8 0x00000000120ddf2c
clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(clang::GlobalDecl) + 284
41 clang-3.8 0x00000000120de39c
clang::CodeGen::CGOpenMPRuntime::emitTargetGlobal(clang::GlobalDecl) + 92
42 clang-3.8 0x0000000011e76c5c
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1004
43 clang-3.8 0x0000000011e7cb90
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 304
44 clang-3.8 0x00000000127c6d6c
45 clang-3.8 0x00000000127c4c4c
46 clang-3.8 0x0000000012dd72a4 clang::ParseAST(clang::Sema&, bool, bool) + 564
47 clang-3.8 0x00000000122fe2dc clang::ASTFrontendAction::ExecuteAction() + 236
48 clang-3.8 0x00000000127c36c0 clang::CodeGenAction::ExecuteAction() + 320
49 clang-3.8 0x00000000122fda38 clang::FrontendAction::Execute() + 152
50 clang-3.8 0x00000000122b8238
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 2088
51 clang-3.8 0x00000000123c1358
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4888
52 clang-3.8 0x0000000010473ee0 cc1_main(llvm::ArrayRef<char const*>, char
const*, void*) + 1760
53 clang-3.8 0x0000000010471b20 main + 12800
54 libc.so.6 0x00003fffa7d54700
55 libc.so.6 0x00003fffa7d548f4 __libc_start_main + 196
Stack dump:
0.  Program arguments: /autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-
mfo7hvcvzzejibsc566co7f345rfynat/bin/clang-3.8 -cc1 -triple nvptx64-nvidia-cuda
-aux-triple powerpc64le-unknown-linux-gnu -S -disable-free -main-file-name
fastscape_RB+PQ+GPU.cpp -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -fmath-errno -no-integrated-as -fuse-init-array -mlink-
cuda-bitcode /sw/summitdev/cuda/9.0.69/nvvm/libdevice/libdevice.10.bc -target-
feature +ptx42 -mlink-cuda-bitcode /sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-
mfo7hvcvzzejibsc566co7f345rfynat/omprtl/lib/libomptarget-nvptx.bc -target-cpu
sm_60 -dwarf-column-info -debugger-tuning=cuda-gdb -resource-dir /autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-
4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin/../lib/clang/3.8.0 -D
GIT_HASH="Unknown" -D GIT_HASH="Unknown" -I/sw/summitdev/cuda/9.0.69/include -c-
isystem /sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-
4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/omprtl -cxx-isystem
/sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-
4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/omprtl -internal-isystem
/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../include/c++/4.8.5 -internal-
isystem /usr/lib/gcc/ppc64le-redhat-
linux/4.8.5/../../../../include/c++/4.8.5/ppc64le-redhat-linux -internal-
isystem /usr/lib/gcc/ppc64le-redhat-
linux/4.8.5/../../../../include/c++/4.8.5/backward -internal-isystem
/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../include/c++/4.8.5 -internal-
isystem /usr/lib/gcc/ppc64le-redhat-
linux/4.8.5/../../../../include/c++/4.8.5/ppc64le-redhat-linux -internal-
isystem /usr/lib/gcc/ppc64le-redhat-
linux/4.8.5/../../../../include/c++/4.8.5/backward -internal-isystem
/usr/local/include -internal-isystem /autofs/nccs-svm1_sw/summitdev/.swci/0-
core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/clang-20170925-
mfo7hvcvzzejibsc566co7f345rfynat/bin/../lib/clang/3.8.0/include -internal-
externc-isystem /include -internal-externc-isystem /usr/include -internal-
isystem /usr/local/include -internal-isystem /autofs/nccs-
svm1_sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-
4.8.5/clang-20170925-
mfo7hvcvzzejibsc566co7f345rfynat/bin/../lib/clang/3.8.0/include -internal-
externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wall -Wall
-std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/ccs/home/spinyfan/quickscape -ferror-limit 19 -fmessage-length 140 -fopenmp -
fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o
/tmp/fastscape_RB+PQ+GPU-fa4c50.s -x c++ fastscape_RB+PQ+GPU.cpp -fopenmp-is-
device -fopenmp-host-ir-file-path /tmp/fastscape_RB+PQ+GPU-8da76f.bc
1.  fastscape_RB+PQ+GPU.cpp:379:1: current parser token 'int'
2.  fastscape_RB+PQ+GPU.cpp:59:14: LLVM IR generation of declaration 'FastScape'
3.  fastscape_RB+PQ+GPU.cpp:122:3: LLVM IR generation of compound statement
('{}')
clang-3.8: error: unable to execute command: Aborted (core dumped)
clang-3.8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.0 (ibmgithub:/CORAL-LLVM-Compilers/clang.git
fc73231cc1447f6163740eb12b6f3fd5c69c6a1a) (ibmgithub:/CORAL-LLVM-
Compilers/llvm.git 47cc905855d51360bcc523d2d290395073d87560)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-
ppc64le/gcc-4.8.5/clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin
clang-3.8: 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.8: note: diagnostic msg: Error generating preprocessed source(s).
Quuxplusone commented 6 years ago

Attached fastscape_RB+PQ+GPU.cpp (14687 bytes, text/x-c++src): Soure code that caused problem

Quuxplusone commented 6 years ago
(In reply to Richard from comment #0)
> But I get the following output, which requests that I report the issue here:
>
> [...]
>
> clang-3.8: error: unable to execute command: Aborted (core dumped)
> clang-3.8: error: clang frontend command failed due to signal (use -v to see
> invocation)
> clang version 3.8.0 (ibmgithub:/CORAL-LLVM-Compilers/clang.git
> fc73231cc1447f6163740eb12b6f3fd5c69c6a1a)
> (ibmgithub:/CORAL-LLVM-Compilers/llvm.git
> 47cc905855d51360bcc523d2d290395073d87560)
> Target: powerpc64le-unknown-linux-gnu
> Thread model: posix
> InstalledDir:
> /sw/summitdev/.swci/0-core/opt/spack/20170405/linux-rhel7-ppc64le/gcc-4.8.5/
> clang-20170925-mfo7hvcvzzejibsc566co7f345rfynat/bin
> clang-3.8: 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.8: note: diagnostic msg: Error generating preprocessed source(s).

Yeah, and IBM really shouldn't be doing this: That's not upstream Clang :-(

With (upstream) trunk I get the following error which doesn't look good either,
but is completely different:
fatal error: error in backend: Cannot select: 0x61d3a38: f64 = fpow 0x61cc230,
ConstantFP:f64<8.000000e-01>
  0x61cc230: f64,ch = load<LD8[%135]> 0x61ef118, 0x61d1500, undef:i64
    0x61d1500: i64 = add 0x61ccb88, 0x61d3c40
      0x61ccb88: i64,ch = load<LD8[%60]> 0x61ef118, 0x5f622b0, undef:i64
        0x5f622b0: i64,ch = CopyFromReg 0x48693c8, Register:i64 %5
          0x61d3898: i64 = Register %5
        0x61d0f50: i64 = undef
      0x61d3c40: i64 = shl 0x61cc848, Constant:i32<3>
        0x61cc848: i64,ch = load<LD4[%43](dereferenceable), sext from i32> 0x61ef118, FrameIndex:i64<25>, undef:i64
          0x5fb7838: i64 = FrameIndex<25>
          0x61d0f50: i64 = undef
        0x61ecb48: i32 = Constant<3>
    0x61d0f50: i64 = undef
  0x61ecef0: f64 = ConstantFP<8.000000e-01>
In function: __omp_outlined__12

Trying to debug with -v --save-temps:
error: Invalid cast (Producer: 'LLVM7.0.0svn' Reader: 'LLVM 7.0.0svn')
Quuxplusone commented 6 years ago
(In reply to Jonas Hahnfeld from comment #1)
> With (upstream) trunk I get the following error which doesn't look good
> either, but is completely different:
> [...]

Stack trace with debug build + assertions:
clang-7.0: <<<>>>/clang/src/trunk/lib/IR/Instructions.cpp:294: void
llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value
*>, ArrayRef<llvm::OperandBundleDef>, const llvm::Twine &): Assertion
`(Args.size() == FTy->getNumParams() || (FTy->isVarArg() && Args.size() > FTy-
>getNumParams())) && "Calling a function with bad signature!"' failed.
#0 0x00002b148e2eef09 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
<<<>>>/clang/src/trunk/lib/Support/Unix/Signals.inc:398:11
#1 0x00002b148e2ef129 PrintStackTraceSignalHandler(void*)
<<<>>>/clang/src/trunk/lib/Support/Unix/Signals.inc:462:1
#2 0x00002b148e2ebef7 llvm::sys::RunSignalHandlers()
<<<>>>/clang/src/trunk/lib/Support/Signals.cpp:0:5
#3 0x00002b148e2ef4b0 SignalHandler(int)
<<<>>>/clang/src/trunk/lib/Support/Unix/Signals.inc:252:1
#4 0x00002b148e96d5e0 __restore_rt (/lib64/libpthread.so.0+0xf5e0)
#5 0x00002b14909f61f7 __GI_raise (/lib64/libc.so.6+0x351f7)
#6 0x00002b14909f78e8 __GI_abort (/lib64/libc.so.6+0x368e8)
#7 0x00002b14909ef266 __assert_fail_base (/lib64/libc.so.6+0x2e266)
#8 0x00002b14909ef312 (/lib64/libc.so.6+0x2e312)
#9 0x00002b148cca3f54 llvm::CallInst::init(llvm::FunctionType*, llvm::Value*,
llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&)
<<<>>>/clang/src/trunk/lib/IR/Instructions.cpp:296:17
#10 0x00002b148f48741d llvm::CallInst::CallInst(llvm::FunctionType*,
llvm::Value*, llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::Instruction*) <<<>>>/clang/src/trunk/include/llvm/IR/Instructions.h:1956:1
#11 0x00002b148f4870bc llvm::CallInst::Create(llvm::FunctionType*,
llvm::Value*, llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::Instruction*) <<<>>>/clang/src/trunk/include/llvm/IR/Instructions.h:1443:5
#12 0x00002b148f4ebafd llvm::CallInst::Create(llvm::Value*,
llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::Instruction*) <<<>>>/clang/src/trunk/include/llvm/IR/Instructions.h:1415:5
#13 0x00002b148f4c497d llvm::IRBuilder<llvm::ConstantFolder,
clang::CodeGen::CGBuilderInserter>::CreateCall(llvm::Value*,
llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&,
llvm::MDNode*) <<<>>>/clang/src/trunk/include/llvm/IR/IRBuilder.h:1682:20
#14 0x00002b148f4b4f4d
clang::CodeGen::CodeGenFunction::EmitRuntimeCall(llvm::Value*,
llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGCall.cpp:3636:19
#15 0x00002b148f4b4e25
clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(llvm::Value*,
llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGCall.cpp:3597:19
#16 0x00002b148f71be81
clang::CodeGen::CGOpenMPRuntime::emitCall(clang::CodeGen::CodeGenFunction&,
llvm::Value*, llvm::ArrayRef<llvm::Value*>, clang::SourceLocation) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:8067:11
#17 0x00002b148f71bfd7
clang::CodeGen::CGOpenMPRuntime::emitOutlinedFunctionCall(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, llvm::Value*, llvm::ArrayRef<llvm::Value*>) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:8079:1
#18 0x00002b148f76627e
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, llvm::Value*, llvm::ArrayRef<llvm::Value*>) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:2418:20
#19 0x00002b148f75f6c0
clang::CodeGen::CGOpenMPRuntimeNVPTX::createDataSharingWrapper(llvm::Function*,
clang::OMPExecutableDirective const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:2511:3
#20 0x00002b148f75ec49
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:883:9
#21 0x00002b148f7a8274
emitCommonOMPParallelDirective(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&, llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&, clang::OMPExecutableDirective const&,
llvm::SmallVectorImpl<llvm::Value*>&)> const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:1224:8
#22 0x00002b148f7bbf24
emitInnerParallelForWhenCombined(clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:2126:1
#23 0x00002b148f7dd322 void llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)>::callback_fn<void
(clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)>(long,
clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)
<<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:98:5
#24 0x00002b148f7dd217 llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&, clang::OMPLoopDirective const&,
clang::CodeGen::CodeGenFunction::JumpDest)>::operator()(clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)
const <<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:115:5
#25 0x00002b148f7c2a2c
clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)>
const&, clang::Expr*)::$_58::operator()(clang::CodeGen::CodeGenFunction&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:3338:26
#26 0x00002b148f7c29c5 void llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&)>::callback_fn<clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)>
const&, clang::Expr*)::$_58>(long, clang::CodeGen::CodeGenFunction&)
<<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:98:5
#27 0x00002b148f7cbac7 llvm::function_ref<void
(clang::CodeGen::CodeGenFunction&)>::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/include/llvm/ADT/STLExtras.h:115:5
#28 0x00002b148f7a9184
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&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:1352:3
#29 0x00002b148f7b36f0
clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(clang::OMPLoopDirective
const&, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&,
clang::OMPLoopDirective const&, clang::CodeGen::CodeGenFunction::JumpDest)>
const&, clang::Expr*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:3335:9
#30 0x00002b148f7bbe7d
clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&)::$_28::operator()(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:2133:3
#31 0x00002b148f7bbe05 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&)::$_28>(long, clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.h:74:5
#32 0x00002b148f6ee7d9
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:741:5
#33 0x00002b148f71d2c8 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1167:3
#34 0x00002b148f71711d
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:5724:25
#35 0x00002b148f7ac847
clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(clang::OMPDistributeParallelForDirective
const&) <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:2135:26
#36 0x00002b148f77f76d clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:297:5
#37 0x00002b148f78c61c
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:389:42
#38 0x00002b148f78ba1e
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:380:10
#39 0x00002b148f77fa4c
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:353:33
#40 0x00002b148f77ee4e clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmt.cpp:53:7
#41 0x00002b148f7c5696 emitTargetTeamsRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&, clang::OMPTargetTeamsDirective
const&)::$_108::operator()(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4046:9
#42 0x00002b148f7c5595 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<emitTargetTeamsRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&, clang::OMPTargetTeamsDirective
const&)::$_108>(long, clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.h:74:5
#43 0x00002b148f6ee7d9
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:741:5
#44 0x00002b148f71d2c8 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1167:3
#45 0x00002b148f7a0ad5
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&) <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:581:18
#46 0x00002b148f6f4b21
emitParallelOrTeamsOutlinedFunction(clang::CodeGen::CodeGenModule&,
clang::OMPExecutableDirective const&, clang::CapturedStmt const*,
clang::VarDecl const*, clang::OpenMPDirectiveKind, llvm::StringRef,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1334:14
#47 0x00002b148f6f4c14
clang::CodeGen::CGOpenMPRuntime::emitTeamsOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1349:3
#48 0x00002b148f75f7ae
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:894:16
#49 0x00002b148f7b5ac0
emitCommonOMPTeamsDirective(clang::CodeGen::CodeGenFunction&,
clang::OMPExecutableDirective const&, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:3998:8
#50 0x00002b148f7c54c3 emitTargetTeamsRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&, clang::OMPTargetTeamsDirective const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4049:3
#51 0x00002b148f7c5428
clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective
const&)::$_69::operator()(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::PrePostActionTy&) const
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4059:3
#52 0x00002b148f7c53f5 void
clang::CodeGen::RegionCodeGenTy::CallbackFn<clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective const&)::$_69>(long,
clang::CodeGen::CodeGenFunction&, clang::CodeGen::PrePostActionTy&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.h:74:5
#53 0x00002b148f6ee7b6
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:739:3
#54 0x00002b148f71d2c8 (anonymous
namespace)::CGOpenMPRegionInfo::EmitBody(clang::CodeGen::CodeGenFunction&,
clang::Stmt const*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1167:3
#55 0x00002b148f7a0ad5
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&) <<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:581:18
#56 0x00002b148f717c21
clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:5897:3
#57 0x00002b148f75b00a
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitGenericKernel(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:328:7
#58 0x00002b148f75e7aa
clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTargetOutlinedFunction(clang::OMPExecutableDirective
const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool,
clang::CodeGen::RegionCodeGenTy const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:828:5
#59 0x00002b148f7b5e0f
clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(clang::CodeGen::CodeGenModule&,
llvm::StringRef, clang::OMPTargetTeamsDirective const&)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:4065:3
#60 0x00002b148f71878d
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:7329:7
#61 0x00002b148f718b89
clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions(clang::Stmt
const*, llvm::StringRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:0:5
#62 0x00002b148f718c54
clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(clang::GlobalDecl)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:7399:3
#63 0x00002b148f718f0d
clang::CodeGen::CGOpenMPRuntime::emitTargetGlobal(clang::GlobalDecl)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:7432:5
#64 0x00002b148f84bbbb
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenModule.cpp:1884:9
#65 0x00002b148f8517e2
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenModule.cpp:4208:38
#66 0x00002b148fa6bc02 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/ModuleBuilder.cpp:159:73
#67 0x00002b148f80c649
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenAction.cpp:168:12
#68 0x00002b149384161e clang::ParseAST(clang::Sema&, bool, bool)
<<<>>>/clang/src/trunk/tools/clang/lib/Parse/ParseAST.cpp:151:18
#69 0x00002b14901f53e1 clang::ASTFrontendAction::ExecuteAction()
<<<>>>/clang/src/trunk/tools/clang/lib/Frontend/FrontendAction.cpp:1007:1
#70 0x00002b148f806909 clang::CodeGenAction::ExecuteAction()
<<<>>>/clang/src/trunk/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:1
#71 0x00002b14901f4970 clang::FrontendAction::Execute()
<<<>>>/clang/src/trunk/tools/clang/lib/Frontend/FrontendAction.cpp:908:7
#72 0x00002b149011437f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
<<<>>>/clang/src/trunk/tools/clang/lib/Frontend/CompilerInstance.cpp:992:7
#73 0x00002b14902c4712
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
<<<>>>/clang/src/trunk/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:8
#74 0x000000000022c6c7 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) <<<>>>/clang/src/trunk/tools/clang/tools/driver/cc1_main.cpp:221:11
#75 0x000000000021b3d9 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
<<<>>>/clang/src/trunk/tools/clang/tools/driver/driver.cpp:309:5
#76 0x000000000021947f main
<<<>>>/clang/src/trunk/tools/clang/tools/driver/driver.cpp:389:5
#77 0x00002b14909e2c05 __libc_start_main (/lib64/libc.so.6+0x21c05)
#78 0x0000000000218029 _start (<<<>>>/clang/install/debug/bin/clang-
7.0+0x218029)
Quuxplusone commented 5 years ago
The code still does not compile because we missing full support for some math
functions:
fatal error: error in backend: Cannot select: t48: f64 = fpow t46,
ConstantFP:f64<8.000000e-01>
  t46: f64,ch = load<(load 8 from %ir.arrayidx23)> t38, t45, undef:i64
    t45: i64 = add t41, t44
      t41: i64,ch = load<(load 8 from %ir.8)> t38, t40, undef:i64
        t40: i64,ch = CopyFromReg t0, Register:i64 %4
          t39: i64 = Register %4
        t3: i64 = undef
      t44: i64 = shl t92, Constant:i32<3>
        t92: i64,ch = load<(dereferenceable load 4 from %ir.c), sext from i32> t38, FrameIndex:i64<26>, undef:i64
          t1: i64 = FrameIndex<26>
          t3: i64 = undef
        t96: i32 = Constant<3>
    t3: i64 = undef
  t47: f64 = ConstantFP<8.000000e-01>
In function: __omp_outlined__12
Quuxplusone commented 5 years ago

The patch that resolves this is here:

https://reviews.llvm.org/D47849

but it is not approved yet.

If you would like version of Clang which has the patch applied please go to:

https://github.com/clang-ykt

Clone the Clang, LLVM and OpenMP repos AND checkout the patched-upstream branches on all the three. Build like you normally would.

Thanks,

--Doru