4ntoine / clang

AVR frontend for the LLVM project
http://clang.llvm.org/
Other
9 stars 1 forks source link

Crash on file compilation: diags #10

Closed 4ntoine closed 9 years ago

4ntoine commented 9 years ago

./clang -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -Davr=105 -I/Applications/avr.app/Contents/Resources/Java/hardware/avr/cores/avr -I/Applications/avr.app/Contents/Resources/Java/hardware/avr/variants/standard -I/Applications/avr.app/Contents/Resources/Java/hardware/tools/avr/avr/include --target=avr /Applications/avr.app/Contents/Resources/Java/hardware/avr/cores/avr/Stream.cpp -o /tmp/avr_test1/Stream.cpp.o

Assertion failed: (NextVal != ArgumentEnd && "Value for integer select modifier was" " larger than the number of options in the diagnostic string!"), function HandleSelectModifier, file /Users/asmirnov/Documents/dev/src/llvm_dylan/tools/clang/lib/Basic/Diagnostic.cpp, line 437.
0  clang                    0x000000010bab0bce llvm::sys::PrintStackTrace(__sFILE*) + 46
1  clang                    0x000000010bab1f7b PrintStackTraceSignalHandler(void*) + 27
2  clang                    0x000000010bab23c5 SignalHandler(int) + 565
3  libsystem_platform.dylib 0x00007fff903a15aa _sigtramp + 26
4  libsystem_platform.dylib 0x00007fff54edcec0 _sigtramp + 3300112688
5  clang                    0x000000010bab1fab raise + 27
6  clang                    0x000000010bab2062 abort + 18
7  clang                    0x000000010bab2041 __assert_rtn + 129
8  clang                    0x000000010bc9a4b2 HandleSelectModifier(clang::Diagnostic const&, unsigned int, char const*, unsigned int, llvm::SmallVectorImpl<char>&) + 162
9  clang                    0x000000010bc98c17 clang::Diagnostic::FormatDiagnostic(char const*, char const*, llvm::SmallVectorImpl<char>&) const + 3543
10 clang                    0x000000010bc97e35 clang::Diagnostic::FormatDiagnostic(llvm::SmallVectorImpl<char>&) const + 213
11 clang                    0x000000010bfe3343 clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level, clang::Diagnostic const&) + 131
12 clang                    0x000000010bca7677 clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&, clang::DiagnosticIDs::Level) const + 151
13 clang                    0x000000010bca749f clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 815
14 clang                    0x000000010bc9e071 clang::DiagnosticsEngine::ProcessDiag() + 49
15 clang                    0x000000010bc97c03 clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 291
16 clang                    0x000000010d382d11 clang::Sema::EmitCurrentDiagnostic(unsigned int) + 1201
17 clang                    0x000000010d3a818b clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() + 91
18 clang                    0x000000010d389d95 clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() + 21
19 clang                    0x000000010d356f89 (anonymous namespace)::checkAVRProgmemAppertainsTo(clang::Sema&, clang::AttributeList const&, clang::Decl const*) + 153
20 clang                    0x000000010d356596 clang::AttributeList::diagnoseAppertainsTo(clang::Sema&, clang::Decl const*) const + 54
21 clang                    0x000000010d4bba61 handleCommonAttributeFeatures(clang::Sema&, clang::Scope*, clang::Decl*, clang::AttributeList const&) + 401
22 clang                    0x000000010d4b8706 ProcessDeclAttribute(clang::Sema&, clang::Scope*, clang::Decl*, clang::AttributeList const&, bool) + 326
23 clang                    0x000000010d4b8225 clang::Sema::ProcessDeclAttributeList(clang::Scope*, clang::Decl*, clang::AttributeList const*, bool) + 101
24 clang                    0x000000010d4baa66 clang::Sema::ProcessDeclAttributes(clang::Scope*, clang::Decl*, clang::Declarator const&) + 102
25 clang                    0x000000010d4744fd clang::Sema::ActOnVariableDeclarator(clang::Scope*, clang::Declarator&, clang::DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&, llvm::MutableArrayRef<clang::TemplateParameterList*>, bool&) + 6845
26 clang                    0x000000010d46d52e clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>) + 3214
27 clang                    0x000000010d46c81e clang::Sema::ActOnDeclarator(clang::Scope*, clang::Declarator&) + 94
28 clang                    0x000000010d097da7 clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 215
29 clang                    0x000000010d096dc9 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2185
30 clang                    0x000000010d0927a2 clang::Parser::ParseSimpleDeclaration(unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*) + 674
31 clang                    0x000000010d0924a4 clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 900
32 clang                    0x000000010d10afdf clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) + 2463
33 clang                    0x000000010d10a4f5 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*) + 133
34 clang                    0x000000010d111a92 clang::Parser::ParseCompoundStatementBody(bool) + 1282
35 clang                    0x000000010d112608 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 328
36 clang                    0x000000010d12f37d clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) + 3709
37 clang                    0x000000010d0969b6 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1142
38 clang                    0x000000010d12e4ec clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1228
39 clang                    0x000000010d12dc05 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) + 197
40 clang                    0x000000010d12d391 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 3441
41 clang                    0x000000010d12c5d5 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 773
42 clang                    0x000000010d083b6c clang::ParseAST(clang::Sema&, bool, bool) + 988
43 clang                    0x000000010bf828ca clang::ASTFrontendAction::ExecuteAction() + 522
44 clang                    0x000000010c575703 clang::CodeGenAction::ExecuteAction() + 3939
45 clang                    0x000000010bf81e48 clang::FrontendAction::Execute() + 120
46 clang                    0x000000010bf13529 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1017
47 clang                    0x000000010bff3fd1 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3201
48 clang                    0x000000010ad1b920 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2496
49 clang                    0x000000010ad3157b ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 171
50 clang                    0x000000010ad303ea main + 1274
51 libdyld.dylib            0x00007fff8b4d95fd start + 1
52 libdyld.dylib            0x0000000000000044 start + 1957849672
Stack dump:
0.  Program arguments: /Users/asmirnov/Documents/dev/src/llvm_dylan/xcode_installed/bin/clang -cc1 -triple avr -emit-obj -disable-free -main-file-name Print.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu atmega328p -target-linker-version 241.9 -g -dwarf-column-info -ffunction-sections -fdata-sections -coverage-file /tmp/a_test1/Print.cpp.o -resource-dir /Users/asmirnov/Documents/dev/src/llvm_dylan/xcode_installed/bin/../lib/clang/3.6.0 -dependency-file /tmp/a_test1/Print.cpp.d -MT /tmp/a_test1/Print.cpp.o -D F_CPU=16000000L -D USB_VID=null -D USB_PID=null -D ARDUINO=105 -I /Applications/A.app/Contents/Resources/Java/hardware/a/cores/a -I /Applications/A.app/Contents/Resources/Java/hardware/a/variants/standard -I /Applications/A.app/Contents/Resources/Java/hardware/tools/avr/avr/include -Os -Wall -fdeprecated-macro -fdebug-compilation-dir /Users/asmirnov/Documents/dev/src/llvm_dylan/xcode_installed/bin -ferror-limit 19 -fmessage-length 107 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/a_test1/Print.cpp.o -x c++ /Applications/A.app/Contents/Resources/Java/hardware/a/cores/a/Print.cpp 
1.  /Applications/A.app/Contents/Resources/Java/hardware/a/cores/a/Print.cpp:44:25: current parser token '='
2.  /Applications/A.app/Contents/Resources/Java/hardware/a/cores/a/Print.cpp:43:1: parsing function body 'print'
3.  /Applications/A.app/Contents/Resources/Java/hardware/a/cores/a/Print.cpp:43:1: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4