[LLVMbugs] [Bug 8965] New: clang fails assertion "Unable to find instantiation of declaration!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 12 12:53:33 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=8965

           Summary: clang fails assertion "Unable to find instantiation of
                    declaration!"
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ps at kr.tuwien.ac.at
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=5999)
 --> (http://llvm.org/bugs/attachment.cgi?id=5999)
slightly reduced input that creates the problem, bz2 compressed

$ clang++ -v
clang version 2.9 (trunk 123293)
Target: x86_64-unknown-linux-gnu
Thread model: posix

clang: SemaTemplateInstantiateDecl.cpp:2885: clang::NamedDecl*
clang::Sema::FindInstantiatedDecl(clang::SourceLocation, clang::NamedDecl*,
const clang::MultiLevelTemplateArgumentList&): Assertion `(Result ||
isa<UsingShadowDecl>(D) || D->isInvalidDecl() ||
cast<Decl>(ParentDC)->isInvalidDecl()) && "Unable to find instantiation of
declaration!"' failed.
0  clang           0x00000000015b496f
1  clang           0x00000000015b54ba
2  libpthread.so.0 0x00007f1f4721db40
3  libc.so.6       0x00007f1f4651bba5 gsignal + 53
4  libc.so.6       0x00007f1f4651f6b0 abort + 384
5  libc.so.6       0x00007f1f46514a71 __assert_fail + 241
6  clang           0x0000000000aca647
clang::Sema::FindInstantiatedDecl(clang::SourceLocation, clang::NamedDecl*,
clang::MultiLevelTemplateArgumentList const&) + 391
...
132 clang           0x000000000072aa84 clang::CodeGenAction::ExecuteAction() +
68
133 clang           0x0000000000623865
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
134 clang           0x000000000060052a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1098
135 clang           0x00000000005f6725 cc1_main(char const**, char const**,
char const*, void*) + 549
136 clang           0x00000000005ff57c main + 4956
137 libc.so.6       0x00007f1f46506d8e __libc_start_main + 254
138 clang           0x00000000005f6319
Stack dump:
0.      Program arguments: /var/lib/buildbot/instdirs/clang-trunk/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name fail.smaller.cpp -mrelocation-model static -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-target-linker-version 2.20.51 -resource-dir
/var/lib/buildbot/instdirs/clang-trunk/bin/../lib/clang/2.9 -ferror-limit 19
-fmessage-length 189 -fexceptions -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o fail.smaller.o -x c++ fail.smaller.cpp
1.      ../../testsuite/TestMCSIE.cpp:422:13: at annotation token
2.      ../../testsuite/TestMCSIE.cpp:339:1: parsing function body 'main'
3.      ../../testsuite/TestMCSIE.cpp:339:1: in compound statement ('{}')
4.      ../../testsuite/TestMCSIE.cpp:421:3: in compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

(full backtrace attached)

I also attached the input "fail.smaller.cpp", it's reduced from 5MB to 3MB,
sorry that it's still that large.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list