[LLVMbugs] [Bug 9324] New: Assertion `isVirtualRegister(Reg) && "Not a virtual register"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Feb 24 21:12:54 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9324
Summary: Assertion `isVirtualRegister(Reg) && "Not a virtual
register"' 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
[regehr at gamow tmp004]$ clang -v
clang version 2.9 (trunk 126412)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp004]$ clang -O small.c
clang:
/uusoc/exports/scratch/regehr/z/compiler-build/llvm-r126412/include/llvm/Target/TargetRegisterInfo.h:352:
static unsigned int llvm::TargetRegisterInfo::virtReg2Index(unsigned int):
Assertion `isVirtualRegister(Reg) && "Not a virtual register"' failed.
0 clang 0x000000000184068f
1 clang 0x0000000001842902
2 libpthread.so.0 0x00007fd1e1816190
3 libc.so.6 0x00007fd1e0b1b4b5 gsignal + 53
4 libc.so.6 0x00007fd1e0b1ef50 abort + 384
5 libc.so.6 0x00007fd1e0b14481 __assert_fail + 241
6 clang 0x00000000012d7c51
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 5473
7 clang 0x00000000012d7f42
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 594
8 clang 0x00000000017882cd
llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
9 clang 0x00000000017883cb
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
10 clang 0x0000000001789af4
llvm::MPPassManager::runOnModule(llvm::Module&) + 500
11 clang 0x0000000001789c67 llvm::PassManagerImpl::run(llvm::Module&)
+ 167
12 clang 0x000000000081cf48
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1720
13 clang 0x0000000000819fdb
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
14 clang 0x0000000000939683 clang::ParseAST(clang::Sema&, bool) + 275
15 clang 0x0000000000819784 clang::CodeGenAction::ExecuteAction() +
68
16 clang 0x000000000070224b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 347
17 clang 0x00000000006d98ac
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
18 clang 0x00000000006d1064 cc1_main(char const**, char const**, char
const*, void*) + 500
19 clang 0x00000000006d89ed main + 4685
20 libc.so.6 0x00007fd1e0b06abd __libc_start_main + 253
21 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 -ferror-limit 19 -fmessage-length 190 -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-fCvymt.o -x c small.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'small.c'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@func_37'
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 tmp004]$ cat small.c
static unsigned char
foo (short si1, unsigned char si2)
{
return 0;
}
struct S1 {
signed f0;
const signed f1;
signed f3;
};
struct S2 {
struct S1 f1;
};
struct S3 {
unsigned char f0;
};
struct S5 {
unsigned char f1;
};
struct S3 g_19 = {
};
struct S5 g_254 = {
};
struct S2 g_259 = {
};
unsigned char ** func_37 (int * p_38)
{
unsigned char l;
unsigned char *l_801 = &g_254.f1;
{
if (foo (~0, 0))
{
}
else
{
if (g_259.f1.f3)
goto lbl_920;
}
}
lbl_919:*l_801 ^= 1;
for (; ; l += 1)
for (g_19.f0 = 0; g_19.f0 < 1; g_19.f0 += 1)
lbl_920:if (g_259.f1.f0)
goto lbl_919;
}
int main (int argc, char *argv[])
{
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