[llvm-bugs] [Bug 33503] New: Assertion `!Old || Old->getCachedLinkage() == D->getCachedLinkage()' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jun 18 23:27:10 PDT 2017


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

            Bug ID: 33503
           Summary: Assertion `!Old || Old->getCachedLinkage() ==
                    D->getCachedLinkage()' failed.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: octoploid at yandex.com
                CC: llvm-bugs at lists.llvm.org

% cat test.ii
namespace std {
inline namespace {
int to_string();
void to_string(int);
}
void to_string();
}
int std::to_string();

 % clang++ -c test.ii
clang-5.0: /home/markus/llvm/clang/lib/AST/Decl.cpp:1383: static
clang::LinkageInfo clang::LinkageComputer::getLVForDecl(const
clang::NamedDecl*, LVComputationKind): Assertion `!Old ||
Old->getCachedLinkage() == D->getCachedLinkage()' failed.
#0 0x00007f38fcde263a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/../lib/libLLVMSupport.so.5+0x11663a)
#1 0x00007f38fcde01c6 llvm::sys::RunSignalHandlers()
(/usr/local/bin/../lib/libLLVMSupport.so.5+0x1141c6)
#2 0x00007f38fcde052a SignalHandler(int)
(/usr/local/bin/../lib/libLLVMSupport.so.5+0x11452a)
#3 0x00007f38fc72f750 __restore_rt (/lib/libpthread.so.0+0x12750)
#4 0x00007f38fb3ff44e __GI_raise
/home/markus/glibc/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007f38fb400fd6 __GI_abort /home/markus/glibc/stdlib/abort.c:92:0
#6 0x00007f38fb3f795c __assert_fail_base
/home/markus/glibc/assert/assert.c:89:0
#7 0x00007f38fb3f79e2 (/lib/libc.so.6+0x2e9e2)
#8 0x00007f38fa52a3df clang::LinkageComputer::getLVForDecl(clang::NamedDecl
const*, LVComputationKind)
(/usr/local/bin/../lib/../lib/libclangAST.so.5+0x1ac3df)
#9 0x00007f38fa52ac6e clang::NamedDecl::getLinkageInternal() const
(/usr/local/bin/../lib/../lib/libclangAST.so.5+0x1acc6e)
#10 0x00007f38f97ffa68 clang::Sema::ActOnFunctionDeclarator(clang::Scope*,
clang::Declarator&, clang::DeclContext*, clang::TypeSourceInfo*,
clang::LookupResult&, llvm::MutableArrayRef<clang::TemplateParameterList*>,
bool&) (/usr/local/bin/../lib/../lib/libclangSema.so.5+0x24fa68)
#11 0x00007f38f980462a clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
(/usr/local/bin/../lib/../lib/libclangSema.so.5+0x25462a)
#12 0x00007f38f9804e1a clang::Sema::ActOnDeclarator(clang::Scope*,
clang::Declarator&) (/usr/local/bin/../lib/../lib/libclangSema.so.5+0x254e1a)
#13 0x00007f38f9f0bc2d
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/usr/local/bin/../lib/../lib/libclangParse.so.5+0x3bc2d)
#14 0x00007f38f9f1bf30 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/local/bin/../lib/../lib/libclangParse.so.5+0x4bf30)
#15 0x00007f38f9f9b779
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/usr/local/bin/../lib/../lib/libclangParse.so.5+0xcb779)
#16 0x00007f38f9f9bd91
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) [clone .part.167]
(/usr/local/bin/../lib/../lib/libclangParse.so.5+0xcbd91)
#17 0x00007f38f9fa141a
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/bin/../lib/../lib/libclangParse.so.5+0xd141a)
#18 0x00007f38f9fa22a0
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/usr/local/bin/../lib/../lib/libclangParse.so.5+0xd22a0)
#19 0x00007f38f9efdba2 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/../lib/../lib/libclangParse.so.5+0x2dba2)
#20 0x00007f38fc17ee80 clang::CodeGenAction::ExecuteAction()
(/usr/local/bin/../lib/libclangCodeGen.so.5+0x293e80)
#21 0x00007f38fbc9978e clang::FrontendAction::Execute()
(/usr/local/bin/../lib/libclangFrontend.so.5+0xd278e)
#22 0x00007f38fbc58eee
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/bin/../lib/libclangFrontend.so.5+0x91eee)
#23 0x00007f38ff26d931
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/bin/../lib/libclangFrontendTool.so.5+0x3931)
#24 0x0000000000410278 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/bin/clang-5.0+0x410278)
#25 0x000000000040b978 main (/usr/local/bin/clang-5.0+0x40b978)
#26 0x00007f38fb3e964c __libc_start_main
/home/markus/glibc/csu/../csu/libc-start.c:335:0
#27 0x000000000040c53a _start
/home/markus/glibc/csu/../sysdeps/x86_64/start.S:122:0
Stack dump:
0.      Program arguments: /usr/local/bin/clang-5.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test.ii -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-coverage-notes-file /tmp/test.gcno -resource-dir /usr/local/lib/clang/5.0.0
-fdeprecated-macro -fdebug-compilation-dir /tmp -ferror-limit 19
-fmessage-length 179 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c++-cpp-output
test.ii 
1.      test.ii:8:21: current parser token ';'
clang-5.0: error: unable to execute command: Aborted
clang-5.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-5.0: 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-5.0: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170619/4a31e404/attachment.html>


More information about the llvm-bugs mailing list