[LLVMbugs] [Bug 12087] New: Assertion `isReachableFromEntry(DefBB) && isReachableFromEntry(UseBB) && "We only handle reachable blocks"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 26 07:17:27 PST 2012


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

             Bug #: 12087
           Summary: Assertion `isReachableFromEntry(DefBB) &&
                    isReachableFromEntry(UseBB) && "We only handle
                    reachable blocks"' failed.
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: chenyang at cs.utah.edu, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


regehr at john-home:~/z/reduce/1$ clang -v
clang version 3.1 (trunk 151473)
Target: x86_64-unknown-linux-gnu
Thread model: posix
regehr at john-home:~/z/reduce/1$ cat small.c
int g_10;
int **g_92;
static unsigned short func_13 (int *, const int *);
int func_53 (int *, int, int);
int
func_1 ()
{
    int *l_16 = &g_10;
    func_13 (l_16, 0);
    return 0;
}

unsigned short
func_13 (int *p_14, const int *p_15)
{
    int *l_28[][1][1] = {
        0
    }
    ;
    int **l_27 = &l_28[0][0][0];
    int **l_384 = &l_28[0][0][0];
    for (; g_10 <= -13;)
        for (;;)
        {
            if (*p_14)
                if (**g_92)
                    return 0;
            *l_27 = 0;
        }
    int **l_355[][8][4] = {
        &l_28[0][0][0]
    };
    *l_384 = (func_53 (0, 0, 0), p_14);
    return 0;
}
regehr at john-home:~/z/reduce/1$ clang -O3 -c small.c
clang: Dominators.cpp:92: bool llvm::DominatorTree::dominates(const
llvm::Instruction*, const llvm::Instruction*) const: Assertion
`isReachableFromEntry(DefBB) && isReachableFromEntry(UseBB) && "We only handle
reachable blocks"' failed.
0  clang           0x0000000001e3b8ff
1  clang           0x0000000001e3be09
2  libpthread.so.0 0x00007f2a62161060
3  libc.so.6       0x00007f2a614433a5 gsignal + 53
4  libc.so.6       0x00007f2a61446b0b abort + 379
5  libc.so.6       0x00007f2a6143bd4d __assert_fail + 221
6  clang           0x0000000001d3306b
llvm::DominatorTree::dominates(llvm::Instruction const*, llvm::Instruction
const*) const + 427
7  clang           0x0000000001bf4d6c
8  clang           0x0000000001b9987a llvm::PointerMayBeCaptured(llvm::Value
const*, llvm::CaptureTracker*) + 554
9  clang           0x0000000001bf691e
llvm::MemoryDependenceAnalysis::getModRefInfo(llvm::Instruction const*,
llvm::AliasAnalysis::Location const&) + 350
10 clang           0x0000000001bf6d86
llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(llvm::AliasAnalysis::Location
const&, bool, llvm::ilist_iterator<llvm::Instruction>, llvm::BasicBlock*) + 550
11 clang           0x0000000001bf7e8d
llvm::MemoryDependenceAnalysis::getDependency(llvm::Instruction*) + 413
12 clang           0x00000000019f1fac
13 clang           0x00000000019f3253
14 clang           0x0000000001dd3487
llvm::FPPassManager::runOnFunction(llvm::Function&) + 631
15 clang           0x0000000001b6fd57
16 clang           0x0000000001b72957
17 clang           0x0000000001dd3174
llvm::MPPassManager::runOnModule(llvm::Module&) + 532
18 clang           0x0000000001dd475b llvm::PassManagerImpl::run(llvm::Module&)
+ 187
19 clang           0x0000000000839d13
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1923
20 clang           0x0000000000837bb5
21 clang           0x0000000000985381 clang::ParseAST(clang::Sema&, bool) + 449
22 clang           0x00000000006f8444
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 324
23 clang           0x00000000006dec6c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1388
24 clang           0x00000000006d3b68 cc1_main(char const**, char const**, char
const*, void*) + 984
25 clang           0x00000000006bf537 main + 727
26 libc.so.6       0x00007f2a6142e30d __libc_start_main + 237
27 clang           0x00000000006d34e9
Stack dump:
0.    Program arguments:
/home/regehr/z/compiler-install/llvm-gcc-r151473-install/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -momit-leaf-frame-pointer -coverage-file small.o
-resource-dir
/home/regehr/z/compiler-install/llvm-gcc-r151473-install/bin/../lib/clang/3.1
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/regehr/z/compiler-install/llvm-gcc-r151473-install/bin/../lib/clang/3.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdebug-compilation-dir /home/regehr/z/reduce/1 -ferror-limit 19
-fmessage-length 95 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -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 'Dead Store Elimination' on function '@func_1'
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: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/small-VkYAzy.i
clang: note: diagnostic msg: /tmp/small-VkYAzy.sh

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