<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 createTemporaryRegionIfNeeded()"
href="http://llvm.org/bugs/show_bug.cgi?id=15742">15742</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ICE in createTemporaryRegionIfNeeded()
</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>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dimhen@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>$ cat x.ii
template < class _T1, class _T2 > struct A
{
A (const _T1 &, const _T2 &);
};
extern "C" typedef enum
{ }
NPVariant;
typedef void *NPIdentifier;
template < class T > class B
{
protected:
typedef A < NPIdentifier, bool (T::*) (const NPVariant *, unsigned,
NPVariant *)
>MethodMapMember;
};
class C:B < C >
{
bool Find (const NPVariant *, unsigned, NPVariant *);
void InitStaticData ();
};
void
C::InitStaticData ()
{
MethodMapMember (0, &C::Find);
}
$ /home/dimhen/build/csa/Release+Asserts/bin/clang++ -cc1 -triple
x86_64-unknown-linux-gnu -analyze -disable-free -main-file-name x.ii
-analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=cplusplus
-fcxx-exceptions -x c++ x.ii
clang++:
/home/dimhen/src/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:184:
clang::ento::ProgramStateRef
clang::ento::ExprEngine::createTemporaryRegionIfNeeded(clang::ento::ProgramStateRef,
const clang::LocationContext*, const clang::Expr*, const clang::Expr*):
Assertion `!V.getAs<Loc>() || Loc::isLocType(Result->getType())' failed.
0 clang++ 0x0000000001dba142 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 clang++ 0x0000000001db9d99
2 libpthread.so.0 0x0000003eb020f000
3 libc.so.6 0x0000003eafa35ba5 gsignal + 53
4 libc.so.6 0x0000003eafa37358 abort + 328
5 libc.so.6 0x0000003eafa2e972
6 libc.so.6 0x0000003eafa2ea22
7 clang++ 0x0000000000e98b61
clang::ento::ExprEngine::createTemporaryRegionIfNeeded(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::LocationContext const*, clang::Expr const*, clang::Expr const*)
+ 961
8 clang++ 0x0000000000eb07c5
clang::ento::ExprEngine::CreateCXXTemporaryObject(clang::MaterializeTemporaryExpr
const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 805
9 clang++ 0x0000000000e9c9f4
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 3604
10 clang++ 0x0000000000e9db78
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 712
11 clang++ 0x0000000000e9de53
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
227
12 clang++ 0x0000000000e84b90
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 128
13 clang++ 0x0000000000e85a5c
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 92
14 clang++ 0x0000000000e85e1d
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 253
15 clang++ 0x0000000000d0ec70
16 clang++ 0x0000000000d0f76f
17 clang++ 0x0000000000d1a0c0
18 clang++ 0x000000000095658a clang::ParseAST(clang::Sema&, bool, bool)
+ 538
19 clang++ 0x0000000000653909 clang::FrontendAction::Execute() + 265
20 clang++ 0x0000000000633d05
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
21 clang++ 0x000000000061b012
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1794
22 clang++ 0x00000000006129d8 cc1_main(char const**, char const**, char
const*, void*) + 888
23 clang++ 0x000000000061a290 main + 4992
24 libc.so.6 0x0000003eafa21a05 __libc_start_main + 245
25 clang++ 0x0000000000611999
Stack dump:
0. Program arguments: /home/dimhen/build/csa/Release+Asserts/bin/clang++
-cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -main-file-name
x.ii -analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=cplusplus
-fcxx-exceptions -x c++ x.ii
1. <eof> parser at end of file
2. x.ii:25:25: Error evaluating statement
3. x.ii:25:25: Error evaluating statement
Aborted (core dumped)</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>