[LLVMbugs] [Bug 12963] New: lib/Transforms/Utils/ValueMapper.cpp:170: Assertion `(Flags & RF_IgnoreMissingEntries) && "Referenced value not in value map!"' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 27 08:34:43 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12963

             Bug #: 12963
           Summary: lib/Transforms/Utils/ValueMapper.cpp:170: Assertion
                    `(Flags & RF_IgnoreMissingEntries) && "Referenced
                    value not in value map!"' 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: merkil at savhon.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Clang as of r157524 asserts something is wrong while compiling this code :

$ cat file.c
unsigned char i, a, b;

void f3(void) {
    for(i = 0; i < 19; i++)
        a *= b;
}

void f2(void) {
    if(b)
        f3();
}

void f1(void) {
    f2();
}

void f0(void) {
    f1();
}

$ ~/clang/build/Release+Asserts/bin/clang -O2 -w file.c
clang: /home/merkil/clang/llvm/lib/Transforms/Utils/ValueMapper.cpp:170: void
llvm::RemapInstruction(llvm::Instruction*, llvm::ValueToValueMapTy&,
llvm::RemapFlags, llvm::ValueMapTypeRemapper*): Assertion `(Flags &
RF_IgnoreMissingEntries) && "Referenced value not in value map!"' failed.
0  clang           0x0000000001ebc29f
1  clang           0x0000000001ebc789
2  libpthread.so.0 0x00002aeaf5fac030
3  libc.so.6       0x00002aeaf6b90475 gsignal + 53
4  libc.so.6       0x00002aeaf6b936f0 abort + 384
5  libc.so.6       0x00002aeaf6b89621 __assert_fail + 241
6  clang           0x0000000001c10724
7  clang           0x0000000001bbbdf8
8  clang           0x0000000001bbcf8d
llvm::CloneAndPruneFunctionInto(llvm::Function*, llvm::Function const*,
llvm::ValueMap<llvm::Value const*, llvm::WeakVH,
llvm::ValueMapConfig<llvm::Value const*> >&, bool,
llvm::SmallVectorImpl<llvm::ReturnInst*>&, char const*, llvm::ClonedCodeInfo*,
llvm::TargetData const*, llvm::Instruction*) + 717
9  clang           0x0000000001bc943a llvm::InlineFunction(llvm::CallSite,
llvm::InlineFunctionInfo&, bool) + 2506
10 clang           0x00000000012b90b2
llvm::Inliner::runOnSCC(llvm::CallGraphSCC&) + 2930
11 clang           0x0000000001c159a0
12 clang           0x0000000001c18426
13 clang           0x0000000001e533c4
llvm::MPPassManager::runOnModule(llvm::Module&) + 532
14 clang           0x0000000001e5495b llvm::PassManagerImpl::run(llvm::Module&)
+ 171
15 clang           0x000000000088b853
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1955
16 clang           0x00000000008897cd
17 clang           0x00000000009ded7f clang::ParseAST(clang::Sema&, bool, bool)
+ 447
18 clang           0x0000000000745784
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 340
19 clang           0x000000000072c9de
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1198
20 clang           0x0000000000724548 cc1_main(char const**, char const**, char
const*, void*) + 920
21 clang           0x000000000070e5ef main + 719
22 libc.so.6       0x00002aeaf6b7cead __libc_start_main + 253
23 clang           0x0000000000722179
Stack dump:
0.    Program arguments: /home/merkil/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
file.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -momit-leaf-frame-pointer -resource-dir
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-w -fdebug-compilation-dir /home/merkil -ferror-limit 19 -fmessage-length 169
-mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/file-bhBuXt.o -x c file.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'file.c'.
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang version 3.2 (trunk 157524)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/file-atIcWA.i
clang: note: diagnostic msg: /tmp/file-atIcWA.sh

It seems to compile fine with clang 3.1.

-- 
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