<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - ICE in TextDiagnostic.cpp"
   href="http://llvm.org/bugs/show_bug.cgi?id=21076">21076</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE in TextDiagnostic.cpp
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ishiura-compiler@ml.kwansei.ac.jp
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13090" name="attach_13090" title="Preprocessed source">attachment 13090</a> <a href="attachment.cgi?id=13090&action=edit" title="Preprocessed source">[details]</a></span>
Preprocessed source

LLVM + clang version 3.5 for x86_64 ICEs the following code.


$ cat clang.c

int main (void)
{
  int x = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16;
}

$ clang clang.c
clang.c:4:7: error: non-ASCII characters are not allowed outside of literals
and
      identifiers
clang: /home/ishiuraken/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp:488:
void selectInterestingSourceRegion(std::string&, std::string&, std::string&,
unsigned int, const {anonymous}::SourceColumnMap&): Assertion
`FrontColumnsRemoved+ColumnsKept+BackColumnsRemoved > Columns' failed.
0  clang           0x0000000002615d12 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang           0x0000000002615934
2  libpthread.so.0 0x00007f58f101a340
3  libc.so.6       0x00007f58f002dbb9 gsignal + 57
4  libc.so.6       0x00007f58f0030fc8 abort + 328
5  libc.so.6       0x00007f58f0026a76
6  libc.so.6       0x00007f58f0026b22
7  clang           0x0000000000906d84
8  clang           0x000000000090c3bb
clang::TextDiagnostic::emitSnippetAndCaret(clang::SourceLocation,
clang::DiagnosticsEngine::Level,
llvm::SmallVectorImpl<clang::CharSourceRange>&,
llvm::ArrayRef<clang::FixItHint>, clang::SourceManager const&) + 6539
9  clang           0x00000000008feba3
clang::DiagnosticRenderer::emitCaret(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::ArrayRef<clang::CharSourceRange>,
llvm::ArrayRef<clang::FixItHint>, clang::SourceManager const&) + 131
10 clang           0x00000000008ffdd9
clang::DiagnosticRenderer::emitDiagnostic(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::StringRef,
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>,
clang::SourceManager const*, llvm::PointerUnion<clang::Diagnostic const*,
clang::StoredDiagnostic const*>) + 793
11 clang           0x00000000008d4245
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 677
12 clang           0x000000000160c2a4
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const + 52
13 clang           0x000000000160c526
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 358
14 clang           0x000000000160407c
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 92
15 clang           0x0000000000883db0
16 clang           0x00000000015a6470 clang::Lexer::LexUnicode(clang::Token&,
unsigned int, char const*) + 416
17 clang           0x00000000015a7642
clang::Lexer::LexTokenInternal(clang::Token&, bool) + 4018
18 clang           0x00000000015a8e03 clang::Lexer::Lex(clang::Token&) + 115
19 clang           0x00000000015f22ff clang::Preprocessor::Lex(clang::Token&) +
159
20 clang           0x0000000000bdebf3
21 clang           0x0000000000bf5b38
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 1528
22 clang           0x0000000000bf9f02
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 738
23 clang           0x0000000000bfa259
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 233
24 clang           0x0000000000c41068
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 2536
25 clang           0x0000000000c41235
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
26 clang           0x0000000000c44972
clang::Parser::ParseCompoundStatementBody(bool) + 1810
27 clang           0x0000000000c46a66
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 198
28 clang           0x0000000000be22b7
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
1159
29 clang           0x0000000000bf9ae1
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2961
30 clang           0x0000000000be0906
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 278
31 clang           0x0000000000be0fae
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 1054
32 clang           0x0000000000be4048
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 328
33 clang           0x0000000000be46f1
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 449
34 clang           0x0000000000bdda30 clang::ParseAST(clang::Sema&, bool, bool)
+ 352
35 clang           0x0000000000a39a3e clang::CodeGenAction::ExecuteAction() +
78
36 clang           0x00000000008a80b6 clang::FrontendAction::Execute() + 150
37 clang           0x0000000000886380
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 352
38 clang           0x000000000086ddb2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1858
39 clang           0x00000000008673c8 cc1_main(char const**, char const**, char
const*, void*) + 1288
40 clang           0x0000000000842b74 main + 756
41 libc.so.6       0x00007f58f0018ec5 __libc_start_main + 245
42 clang           0x000000000086610a
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
clang.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.24 -resource-dir /usr/local/bin/../lib/clang/3.5.0
-internal-isystem /usr/local/include -internal-isystem
/usr/local/bin/../lib/clang/3.5.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir /home/ishiuraken
-ferror-limit 19 -fmessage-length 80 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o
/tmp/clang-60aa57.o -x c clang.c
1. <unknown> parser at unknown location
2. clang.c:3:1: parsing function body 'main'
3. clang.c:3:1: in compound statement ('{}')
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> 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: /tmp/clang-29714f.c
clang: note: diagnostic msg: /tmp/clang-29714f.sh
clang: note: diagnostic msg:

********************</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>