1 Reply Latest reply on Nov 2, 2018 9:59 AM by jesse_amd

    AOCC Error: Loc.isValid() && "point of instantiation must be valid!

    dribbroc

      Hi

       

      when  using AOCC-1.2.1 on a centos 7.5 machine, the compiler crashes with the following error message.

      When compiling the same code with clang 6 pure, no error occurs at all

       

      Thanks in Advance

      Dirk

       

      clang-6.0: /home/amd/JENKINS/workspace/CPUPC_AMD_LLVM-6-0-0-M7_Branch/llvm/tools/clang/include/clang/AST/DeclTemplate.h:1769: void clang::ClassTemplateSpecializationDecl::setPointOfInstantiation(clang::SourceLocation): Assertion `Loc.isValid() && "point of instantiation must be valid!"' failed.

      #0 0x00002b3652b64eca llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/../lib/libLLVM-6.0.so+0x711eca)

      #1 0x00002b3652b62fae llvm::sys::RunSignalHandlers() (/sfw/aocc/AOCC-1.2.1-Compiler/bin/../lib/libLLVM-6.0.so+0x70ffae)

      #2 0x00002b3652b63112 SignalHandler(int) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/../lib/libLLVM-6.0.so+0x710112)

      #3 0x00002b36522466d0 __restore_rt (/lib64/libpthread.so.0+0xf6d0)

      #4 0x00002b3656086277 __GI_raise (/lib64/libc.so.6+0x36277)

      #5 0x00002b3656087968 __GI_abort (/lib64/libc.so.6+0x37968)

      #6 0x00002b365607f096 __assert_fail_base (/lib64/libc.so.6+0x2f096)

      #7 0x00002b365607f142 (/lib64/libc.so.6+0x2f142)

      #8 0x000000000150bb33 clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*, clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&, clang::TemplateSpecializationKind, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x150bb33)

      #9 0x000000000150bcdb clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation, clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x150bcdb)

      #10 0x000000000155a011 clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::TypeDiagnoser*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x155a011)

      #11 0x00000000011d17fa clang::Sema::IsDerivedFrom(clang::SourceLocation, clang::QualType, clang::QualType) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x11d17fa)

      #12 0x00000000014afa6c CheckOriginalCallArgDeduction(clang::Sema&, clang::sema::TemplateDeductionInfo&, clang::Sema::OriginalCallArg, clang::QualType) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14afa6c)

      #13 0x00000000014e2e96 clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*, llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool, llvm::function_ref<bool ()>) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14e2e96)

      #14 0x00000000014e6e4f clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool, llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14e6e4f)

      #15 0x00000000014008c9 clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*, clang::DeclAccessPair, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14008c9)

      #16 0x0000000001401449 AddOverloadedCallCandidate(clang::Sema&, clang::DeclAccessPair, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1401449)

      #17 0x00000000014016e4 clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14016e4)

      #18 0x00000000014018c6 clang::Sema::buildOverloadedCallSet(clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::OverloadCandidateSet*, clang::ActionResult<clang::Expr*, true>*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14018c6)

      #19 0x0000000001415f06 clang::Sema::BuildOverloadedCallExpr(clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1415f06)

      #20 0x0000000001294285 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1294285)

      #21 0x00000000014fa434 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14fa434) #22 0x00000000014f477a clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x14f477a)

      #23 0x0000000001516452 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1516452)

      #24 0x00000000015177f0 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x15177f0)

      #25 0x000000000151791b clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x151791b)

      #26 0x00000000015164f2 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x15164f2)

      #27 0x00000000015189c1 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformForStmt(clang::ForStmt*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x15189c1) #28 0x0000000001516425 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1516425)

      #29 0x00000000015177f0 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x15177f0)

      #30 0x000000000151791b clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x151791b) #31 0x00000000015164f2 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x15164f2) #32 0x000000000151bc58 clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList const&) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x151bc58) #33 0x0000000001531697 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1531697) #34 0x0000000001531b1b clang::Sema::PerformPendingInstantiations(bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1531b1b) #35 0x0000000001530fa5 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1530fa5) #36 0x0000000001531b1b clang::Sema::PerformPendingInstantiations(bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1531b1b) #37 0x0000000001530fa5 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1530fa5) #38 0x0000000001531b1b clang::Sema::PerformPendingInstantiations(bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x1531b1b) #39 0x00000000010ae026 clang::Sema::ActOnEndOfTranslationUnit() (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x10ae026) #40 0x0000000000edc7bb clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0xedc7bb) #41 0x0000000000ed4a1b clang::ParseAST(clang::Sema&, bool, bool) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0xed4a1b) #42 0x0000000000cf38bf clang::CodeGenAction::ExecuteAction() (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0xcf38bf) #43 0x0000000000c5b3e6 clang::FrontendAction::Execute() (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0xc5b3e6) #44 0x0000000000c2fd9e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0xc2fd9e) #45 0x0000000000cede2b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0xcede2b) #46 0x000000000083b308 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x83b308) #47 0x00000000008354ab main (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x8354ab) #48 0x00002b3656072445 __libc_start_main (/lib64/libc.so.6+0x22445) #49 0x00000000008366fe _start (/sfw/aocc/AOCC-1.2.1-Compiler/bin/clang-6.0+0x8366fe)