https://llvm.org/bugs/show_bug.cgi?id=22959

            Bug ID: 22959
           Summary: Assertion `isInlined() && "expected to get called on
                    an inlined function!"' failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Repro:
template<typename T> class S;
const S<double> Foo();

template <typename T>
class S {
 public: 
  friend const S<double> Foo();
};
inline const S<double> Foo() { return S<double>(); }


clang-3.5: ../tools/clang/lib/AST/Decl.cpp:2724: bool
clang::FunctionDecl::isMSExternInline() const: Assertion `isInlined() &&
"expected to get called on an inlined function!"' failed.
#0 0x14be2aa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/clang-3.5+0x14be2aa)
#1 0x14bf78b SignalHandler(int) (/usr/local/bin/clang-3.5+0x14bf78b)
#2 0x7fd5d1c99340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#3 0x7fd5d11c5cc9 gsignal
/build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x7fd5d11c90d8 abort /build/buildd/eglibc-2.19/stdlib/abort.c:91:0
#5 0x7fd5d11beb86 __assert_fail_base
/build/buildd/eglibc-2.19/assert/assert.c:92:0
#6 0x7fd5d11bec32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#7 0x2787d61 (/usr/local/bin/clang-3.5+0x2787d61)
#8 0x270307d clang::ASTContext::GetGVALinkageForFunction(clang::FunctionDecl
const*) const (/usr/local/bin/clang-3.5+0x270307d)
#9 0x2703671 clang::ASTContext::DeclMustBeEmitted(clang::Decl const*)
(/usr/local/bin/clang-3.5+0x2703671)
#10 0x1935799 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(/usr/local/bin/clang-3.5+0x1935799)
#11 0x193839b clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(/usr/local/bin/clang-3.5+0x193839b)
#12 0x18da03f (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/bin/clang-3.5+0x18da03f)
#13 0x18ce947 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/bin/clang-3.5+0x18ce947)
#14 0x1e67c33 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/clang-3.5+0x1e67c33)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to