[LLVMbugs] [Bug 8790] New: Assertion `New != this && "this->replaceAllUsesWith(this) is NOT valid!"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 14 10:32:16 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=8790
Summary: Assertion `New != this &&
"this->replaceAllUsesWith(this) is NOT valid!"'
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
[regehr at gamow tmp431]$ clang -v
clang version 2.9 (trunk 121771)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp431]$ clang -c -O3 small.c -w
clang: Value.cpp:312: void llvm::Value::replaceAllUsesWith(llvm::Value*):
Assertion `New != this && "this->replaceAllUsesWith(this) is NOT valid!"'
failed.
0 clang 0x000000000173bd4f
1 clang 0x000000000173dfc2
2 libpthread.so.0 0x00007ff7ea7ff190
3 libc.so.6 0x00007ff7e9b044b5 gsignal + 53
4 libc.so.6 0x00007ff7e9b07f50 abort + 384
5 libc.so.6 0x00007ff7e9afd481 __assert_fail + 241
6 clang 0x00000000016a8468
llvm::Value::replaceAllUsesWith(llvm::Value*) + 440
7 clang 0x0000000001434a61
8 clang 0x0000000001690b1d
llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
9 clang 0x000000000154a98b
10 clang 0x000000000154b0e5
11 clang 0x0000000001691f44
llvm::MPPassManager::runOnModule(llvm::Module&) + 500
12 clang 0x00000000016920b7 llvm::PassManagerImpl::run(llvm::Module&)
+ 167
13 clang 0x00000000007f20d9
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1625
14 clang 0x00000000007ee0cb
15 clang 0x00000000009192b3 clang::ParseAST(clang::Sema&, bool) + 291
16 clang 0x00000000007ef0b4 clang::CodeGenAction::ExecuteAction() +
68
17 clang 0x00000000006e8fc5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
18 clang 0x00000000006c44dc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
19 clang 0x00000000006bc0eb cc1_main(char const**, char const**, char
const*, void*) + 539
20 clang 0x00000000006c3565 main + 4197
21 libc.so.6 0x00007ff7e9aefabd __libc_start_main + 253
22 clang 0x00000000006ba999
Stack dump:
0. Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r121771-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 -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r121771-install/bin/../lib/clang/2.9
-O3 -w -ferror-limit 19 -fmessage-length 90 -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 'Value Propagation' on function '@int326'
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 tmp431]$ cat small.c
typedef short int int16_t;
typedef int int32_t;
typedef long int int64_t;
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
static uint8_t
safe_div_func_int64_t_s_s (int64_t si1, uint8_t si2)
{
return si2 == 0 || si1 && si2 == 0 ? : (si1 / si2);
}
static uint8_t
safe_rshift_func_uint16_t_u_s (uint16_t left, int right)
{
return right || right ? : left >> right;
}
uint8_t g_11;
uint8_t *g = &g_11;
int32_t func_29 (int32_t * const *p_30, int16_t p_31);
int326 (uint32_t p_27, uint8_t ** p_28)
{
uint8_t *const *l_246[1][10];
uint8_t l_247;
lbl_290:l_247 &= func_29 (l_246[0][6], 0);
}
int32_t
func_29 (int32_t * const *p_30, int16_t p_31)
{
uint8_t l_44 = 0;
for (0; g; g = 1)
if (safe_rshift_func_uint16_t_u_s
(safe_div_func_int64_t_s_s (1, g_11), l_44))
{
uint8_t *l_46[6];
int i;
for (i = 0; i < 1; i++)
l_46[i] = &g_11;
lbl_243:0;
}
else
{
for (l_44 = 1; 0; 1)
{
}
if (g_11)
goto lbl_243;
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