<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 --- - SIGSEGV in ParseSwitchStatement()"
href="http://llvm.org/bugs/show_bug.cgi?id=19022">19022</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>SIGSEGV in ParseSwitchStatement()
</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>Linux
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vanyacpp@gmail.com
</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>int baz5()
{}
bool bar0()
{
switch (int foo0)
case bar5: ;
}
0 clang 0x000000000394bf0e llvm::sys::PrintStackTrace(_IO_FILE*) +
46
1 clang 0x000000000394c1db
2 clang 0x000000000394d69a
3 libpthread.so.0 0x00007ff75dc13bd0
4 clang 0x0000000000965d6a
5 clang 0x0000000002276dc5 clang::Stmt::getLocEnd() const + 21
6 clang 0x0000000000f15431
clang::Parser::ParseSwitchStatement(clang::SourceLocation*) + 977
7 clang 0x0000000000f12d88
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1944
8 clang 0x0000000000f124d5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 133
9 clang 0x0000000000f19298
clang::Parser::ParseCompoundStatementBody(bool) + 1384
10 clang 0x0000000000f1cb5f
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 319
11 clang 0x0000000000e9b141
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
3489
12 clang 0x0000000000eb2d53
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 467
13 clang 0x0000000000e9a1a2
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1234
14 clang 0x0000000000e99853
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 147
15 clang 0x0000000000e98e31
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 3521
16 clang 0x0000000000e97e48
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 696
17 clang 0x0000000000e939ce clang::ParseAST(clang::Sema&, bool, bool)
+ 558
18 clang 0x0000000000910c7e clang::ASTFrontendAction::ExecuteAction()
+ 334
19 clang 0x0000000000c11935 clang::CodeGenAction::ExecuteAction() +
1477
20 clang 0x000000000091046f clang::FrontendAction::Execute() + 191
21 clang 0x00000000008d8fab
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 779
22 clang 0x0000000000897584
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1028
23 clang 0x0000000000884fc9 cc1_main(char const**, char const**, char
const*, void*) + 697
24 clang 0x000000000089139e main + 814
25 libc.so.6 0x00007ff75cc12ea5 __libc_start_main + 245
26 clang 0x0000000000884c45
Stack dump:
0. Program arguments: /home/ivan/d/llvm/Debug+Asserts/bin/clang -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name 1.cpp -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.23.2 -resource-dir
/home/ivan/d/llvm/Debug+Asserts/bin/../lib/clang/3.5 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7
-internal-isystem /usr/local/include -internal-isystem
/home/ivan/d/llvm/Debug+Asserts/bin/../lib/clang/3.5/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir
/home/ivan/d/cppgen-build-desktop-Qt___PATH________ -ferror-limit 19
-fmessage-length 180 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o
/tmp/1-d46882.o -x c++ 1.cpp
1. 1.cpp:7:16: current parser token ';'
2. 1.cpp:5:1: parsing function body 'bar0'
3. 1.cpp:5:1: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5 (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/clang.git
30577e6c4f5ba66b8dc832ed9955b1a7475f788a) (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/llvm.git
c9bf74fdc543c2da90f334e0bf8e34b128c8a615)
Target: x86_64-unknown-linux-gnu
Thread model: posix
../llvm/Debug+Asserts/bin/clang++ --version
clang version 3.5 (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/clang.git
30577e6c4f5ba66b8dc832ed9955b1a7475f788a) (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/llvm.git
c9bf74fdc543c2da90f334e0bf8e34b128c8a615)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>