[LLVMbugs] [Bug 14898] New: Assertion failed: (LV == computeLVForDecl(this, false)), function getLinkageAndVisibility, file /Users/hhinnant/Development/llvm/tools/clang/lib/AST/Decl.cpp, line 630.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 10 09:27:42 PST 2013


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

             Bug #: 14898
           Summary: Assertion failed: (LV == computeLVForDecl(this,
                    false)), function getLinkageAndVisibility, file
                    /Users/hhinnant/Development/llvm/tools/clang/lib/AST/D
                    ecl.cpp, line 630.
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hhinnant at apple.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9855
  --> http://llvm.org/bugs/attachment.cgi?id=9855
Preprocessed test.cpp

Compiling the enclosed preprocessed test, using tip-of-trunk clang 

clang version 3.3 (trunk 172021)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

with:

/Users/hhinnant/Development/llvm/build/Debug+Asserts/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
test.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 137 -std=c++11
-fdeprecated-macro -ferror-limit 19 -fmessage-length 161 -stack-protector 1
-mstackrealign -fblocks -fobjc-runtime=macosx-10.8.0
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-x c++ test-uo5ZDf.cpp

results in:


Assertion failed: (LV == computeLVForDecl(this, false)), function
getLinkageAndVisibility, file
/Users/hhinnant/Development/llvm/tools/clang/lib/AST/Decl.cpp, line 630.
0  clang             0x0000000102dffa5e llvm::sys::PrintStackTrace(__sFILE*) +
46
1  clang             0x0000000102dffd6b _ZL28PrintStackTraceSignalHandlerPv +
27
2  clang             0x0000000102e000e8 _ZL13SignalHandleri + 408
3  libsystem_c.dylib 0x00007fff8d3488ea _sigtramp + 26
4  libsystem_c.dylib 0x00007fff5fab8318 _sigtramp + 18446744072945597000
5  clang             0x0000000102dffd9b raise + 27
6  clang             0x0000000102dffe52 abort + 18
7  clang             0x0000000102dffe31 __assert_rtn + 129
8  clang             0x00000001016b3065
clang::NamedDecl::getLinkageAndVisibility() const + 229
9  clang             0x00000001016be407 _ZL12getLVForDeclPKN5clang9NamedDeclEb
+ 39
10 clang             0x00000001016bf1cb
_ZL19getLVForClassMemberPKN5clang9NamedDeclEb + 363
11 clang             0x00000001016b3510
_ZL16computeLVForDeclPKN5clang9NamedDeclEb + 544
12 clang             0x00000001016b3086
clang::NamedDecl::getLinkageAndVisibility() const + 262
13 clang             0x00000001016b2f65 clang::NamedDecl::getLinkage() const +
21
14 clang             0x00000001016b85ef clang::FunctionDecl::isExternC() const
+ 31
15 clang             0x00000001007d0b48
clang::Sema::CheckFunctionDeclaration(clang::Scope*, clang::FunctionDecl*,
clang::LookupResult&, bool) + 200
16 clang             0x0000000100bacb99
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*, bool) + 4921
17 clang             0x0000000100baf77c
clang::TemplateDeclInstantiator::VisitCXXDestructorDecl(clang::CXXDestructorDecl*)
+ 44
18 clang             0x0000000100b9cea7
clang::DeclVisitor<clang::TemplateDeclInstantiator,
clang::Decl*>::Visit(clang::Decl*) + 1287
19 clang             0x0000000100b6bc7f
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 1391
20 clang             0x0000000100b6d5c8
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1992
21 clang             0x0000000100c10109
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1241
22 clang             0x0000000100c07c80
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
unsigned int) + 96
23 clang             0x00000001007d368a
clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) +
2618
24 clang             0x000000010062c8b4
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 1572
25 clang             0x000000010062b3e2
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1282
26 clang             0x0000000100627f02
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 498
27 clang             0x0000000100627cb8
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 936
28 clang             0x000000010067fdf1
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1857
29 clang             0x000000010067f565
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 133
30 clang             0x0000000100686680
clang::Parser::ParseCompoundStatementBody(bool) + 1488
31 clang             0x0000000100686085
clang::Parser::ParseCompoundStatement(bool, unsigned int) + 181
32 clang             0x000000010068190a
clang::Parser::ParseCompoundStatement(bool) + 42
33 clang             0x000000010067ff27
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 2167
34 clang             0x000000010067f565
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 133
35 clang             0x0000000100686680
clang::Parser::ParseCompoundStatementBody(bool) + 1488
36 clang             0x0000000100688268
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 312
37 clang             0x000000010069a054
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
3812
38 clang             0x000000010062b0c1
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 481
39 clang             0x000000010069915d
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1133
40 clang             0x00000001006988f1
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 161
41 clang             0x0000000100698071
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 3329
42 clang             0x0000000100697302
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 466
43 clang             0x000000010061d042 clang::ParseAST(clang::Sema&, bool,
bool) + 674
44 clang             0x0000000100231c89
clang::ASTFrontendAction::ExecuteAction() + 489
45 clang             0x000000010059c576 clang::CodeGenAction::ExecuteAction() +
1254
46 clang             0x00000001002317bf clang::FrontendAction::Execute() + 191
47 clang             0x00000001001ef0d7
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 967
48 clang             0x00000001001573cb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1931
49 clang             0x000000010013de02 cc1_main(char const**, char const**,
char const*, void*) + 994
50 clang             0x000000010014c317 main + 583
51 libdyld.dylib     0x00007fff8f0ae7e1 start + 0
Stack dump:
0.    Program arguments:
/Users/hhinnant/Development/llvm/build/Debug+Asserts/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
test.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 137 -resource-dir
/Users/hhinnant/Development/llvm/build/Debug+Asserts/bin/../lib/clang/3.3
-fmodule-cache-path
/var/folders/5q/jl417kxs70j1jn8pz_mclngm0000gn/T/clang-module-cache -std=c++11
-fdeprecated-macro -fdebug-compilation-dir /Users/hhinnant/Development/cljunk
-ferror-limit 19 -fmessage-length 161 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-backend-option -vectorize-loops -o
/var/folders/5q/jl417kxs70j1jn8pz_mclngm0000gn/T/test-6v4yg1.o -x c++
/Users/hhinnant/Desktop/test.cpp 
1.    test.cpp:13:50: current parser token ';'
2.    test.cpp:4:1: parsing function body 'main'
3.    test.cpp:4:1: in compound statement ('{}')
4.    test.cpp:10:5: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 172021)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
clang: 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: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/5q/jl417kxs70j1jn8pz_mclngm0000gn/T/test-uo5ZDf.cpp
clang: note: diagnostic msg:
/var/folders/5q/jl417kxs70j1jn8pz_mclngm0000gn/T/test-uo5ZDf.sh
clang: note: diagnostic msg: 

********************

This is a test in the libc++ test suite.  It is not a new test and has not been
previously failing.  It is testing <future>, which has not had any recent
changes.

-- 
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