[LLVMbugs] [Bug 9331] New: Assertion `(KnownZero2 & KnownOne2) == 0 && "Bits known to be one AND zero\ ?"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Feb 25 20:49:29 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9331
Summary: Assertion `(KnownZero2 & KnownOne2) == 0 && "Bits
known to be one AND zero\ ?"' failed.
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu
This is the same symptom as (fixed) PR9112.
[regehr at gamow tmp005]$ clang -v
clang version 2.9 (trunk 126412)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp005]$ clang -c -w -O small.c
clang: ValueTracking.cpp:180: void llvm::ComputeMaskedBits(llvm::Value*, const
llvm::APInt&, llvm::APInt&, llvm::APInt&, const llvm::TargetData*, unsigned
int): Assertion `(KnownZero2 & KnownOne2) == 0 && "Bits known to be one AND
zero?"' failed.
0 clang 0x000000000184068f
1 clang 0x0000000001842902
2 libpthread.so.0 0x00007f5692ecd190
3 libc.so.6 0x00007f56921d24b5 gsignal + 53
4 libc.so.6 0x00007f56921d5f50 abort + 384
5 libc.so.6 0x00007f56921cb481 __assert_fail + 241
6 clang 0x00000000016cd45c llvm::ComputeMaskedBits(llvm::Value*,
llvm::APInt const&, llvm::APInt&, llvm::APInt&, llvm::TargetData const*,
unsigned int) + 7596
7 clang 0x00000000016ce052 llvm::ComputeMaskedBits(llvm::Value*,
llvm::APInt const&, llvm::APInt&, llvm::APInt&, llvm::TargetData const*,
unsigned int) + 10658
8 clang 0x00000000016d0c6e llvm::isKnownNonZero(llvm::Value*,
llvm::TargetData const*, unsigned int) + 622
9 clang 0x0000000001661c16
10 clang 0x000000000153158a
11 clang 0x00000000015317da
12 clang 0x0000000001533a4d
13 clang 0x000000000153445d
14 clang 0x00000000017882cd
llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
15 clang 0x0000000001635fdb
16 clang 0x0000000001636735
17 clang 0x0000000001789af4
llvm::MPPassManager::runOnModule(llvm::Module&) + 500
18 clang 0x0000000001789c67 llvm::PassManagerImpl::run(llvm::Module&)
+ 167
19 clang 0x000000000081cee9
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1625
20 clang 0x0000000000819fdb
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
21 clang 0x0000000000939683 clang::ParseAST(clang::Sema&, bool) + 275
22 clang 0x0000000000819784 clang::CodeGenAction::ExecuteAction() +
68
23 clang 0x000000000070224b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 347
24 clang 0x00000000006d98ac
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
25 clang 0x00000000006d1064 cc1_main(char const**, char const**, char
const*, void*) + 500
26 clang 0x00000000006d89ed main + 4685
27 libc.so.6 0x00007f56921bdabd __libc_start_main + 253
28 clang 0x00000000006cf819
Stack dump:
0. Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r126412-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20 -momit-leaf-frame-pointer -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r126412-install/bin/../lib/clang/2.9
-O2 -w -ferror-limit 19 -fmessage-length 80 -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o small.o -x c small.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'small.c'.
4. Running pass 'Jump Threading' on function '@func'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)
[regehr at gamow tmp005]$ cat small.c
typedef signed char int8_t;
typedef int int32_t;
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;
static uint8_t
safe_lshift_func_int8_t_s_u (int8_t left, unsigned int right)
{
return left || right || left >> right ? : left << right;
}
static uint8_t
safe_div_func_uint32_t_u_u (uint32_t ui1, uint8_t ui2)
{
return ui1 - ui2;
}
static uint64_t
safe_mod_func_uint64_t_u_u (uint64_t ui1, uint64_t ui2)
{
return ui2 ? : (ui1 / ui2);
}
uint8_t g_26;
uint8_t *volatile g = &g_26;
uint8_t g_64;
uint8_t g_124;
uint8_t *g_132;
uint8_t **g_131 = &g_132;
int32_t func_68 (uint32_t p_69, int32_t p_70);
uint8_t *
func (int32_t ** p_43, uint8_t p_44, uint8_t * const *p_45)
{
uint32_t l_50;
uint8_t l_326;
uint8_t **l_344 = &g_132;
int32_t l_477[2][3][9];
if (safe_lshift_func_int8_t_s_u (safe_div_func_uint32_t_u_u (l_50, 0), 0))
{
}
else
for (0; 1; g += 0)
for (l_326 = 1; l_326; l_326 += 1)
{
if (func_68 (p_44, 0))
{
for (p_44 = 0; 0; )
{
}
for (g_64 = 1; g_64; g += 1)
return 0;
}
lbl_465:;
if (g_64)
goto lbl_465;
l_477[1][2][4] &= safe_mod_func_uint64_t_u_u (p_44 ^ 1, p_44)
|| **g_131 == &g != &l_344;
}
uint8_t *l_128 = &g_124;
safe_div_func_uint32_t_u_u (1, 1);
return 0;
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list