<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 --- - crash in late parsed templates with null decl*"
href="http://llvm.org/bugs/show_bug.cgi?id=16765">16765</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>crash in late parsed templates with null decl*
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nlewycky@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Reduced testcase:
class {
template <> : 0 __attribute__((locks_excluded()));
};
$ clang -cc1 x.cc
x.cc:2:3: error: extraneous 'template<>' in declaration of member (null)
template <> : 0 __attribute__((locks_excluded()));
^~~~~~~~~~~
clang: /usr/local/google/home/nlewycky/llvm/include/llvm/Support/Casting.h:97:
static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
clang::NamedDecl, From = clang::Decl]: Assertion `Val && "isa<> used on a null
pointer"' failed.
0 clang 0x000000000325c8e3 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 clang 0x000000000325cb6a
2 clang 0x000000000325c5ae
3 libpthread.so.0 0x00007f8553766cb0
4 libc.so.6 0x00007f85529b8425 gsignal + 53
5 libc.so.6 0x00007f85529bbb8b abort + 379
6 libc.so.6 0x00007f85529b10ee
7 libc.so.6 0x00007f85529b1192
8 clang 0x0000000000d41758
9 clang 0x0000000000d416ab
10 clang 0x0000000000d4153c
11 clang 0x0000000000d41407 bool llvm::isa<clang::NamedDecl,
clang::Decl*>(clang::Decl* const&) + 24
12 clang 0x0000000000d411dc llvm::cast_retty<clang::NamedDecl,
clang::Decl*>::ret_type llvm::dyn_cast<clang::NamedDecl,
clang::Decl>(clang::Decl*) + 24
13 clang 0x00000000011e8abd
clang::Parser::ParseLexedAttribute(clang::Parser::LateParsedAttribute&, bool,
bool) + 613
14 clang 0x00000000011e855e
clang::Parser::LateParsedAttribute::ParseLexedAttributes() + 42
15 clang 0x00000000011e86c9
clang::Parser::ParseLexedAttributes(clang::Parser::ParsingClass&) + 361
16 clang 0x00000000012073c9
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 3301
17 clang 0x00000000012037f1
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 8275
18 clang 0x00000000011ef2a5
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 8343
19 clang 0x00000000011d85a7
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 101
20 clang 0x00000000011d8a41
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 189
21 clang 0x00000000011d81f5
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2783
22 clang 0x00000000011d76e5
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 415
23 clang 0x00000000011d3d27 clang::ParseAST(clang::Sema&, bool, bool)
+ 387
24 clang 0x0000000000d9e047 clang::ASTFrontendAction::ExecuteAction()
+ 321
25 clang 0x0000000000fdc1f4 clang::CodeGenAction::ExecuteAction() +
1414
26 clang 0x0000000000d9db86 clang::FrontendAction::Execute() + 200
27 clang 0x0000000000d70016
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 720
28 clang 0x0000000000d3f1be
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1018
29 clang 0x0000000000d308a5 cc1_main(char const**, char const**, char
const*, void*) + 717
30 clang 0x0000000000d3aefd main + 551
31 libc.so.6 0x00007f85529a376d __libc_start_main + 237
32 clang 0x0000000000d2ff79
0. Program arguments:
/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
x.cc -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -resource-dir
/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/../lib/clang/3.4
-internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/x86_64-linux-gnu/c++/4.6
-internal-isystem /usr/local/include -internal-isystem
/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/../lib/clang/3.4/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir /usr/local/google/home/nlewycky
-ferror-limit 19 -fmessage-length 80 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -o
/tmp/x-ee6b56.o -x c++ x.cc
1. x.cc:2:48: current parser token '('
2. x.cc:1:1: parsing struct/union/class body
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.4 (trunk 187531)
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>