[LLVMbugs] [Bug 14742] New: LCSSA::runOnLoop(llvm::Loop *, llvm::LPPassManager &): Assertion `L->isLCSSAForm(*DT)' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 29 07:57:31 PST 2012


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

             Bug #: 14742
           Summary: LCSSA::runOnLoop(llvm::Loop *, llvm::LPPassManager &):
                    Assertion `L->isLCSSAForm(*DT)' 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: antoine.balestrat at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Hi ! This testcase triggers an assertion failure, using LLVM/Clang 3.3 as of
r171216 (only at -O2).

$ cat lcssa.c
int a, b, c;

void f(void)
{
    int i;
    short *p;

    for(;; b++)
    {
label:
        while(c++ < 1)
        {
            for(a = 0; a < 16; a++)
                for(i = 0; i < 1; i++);

            if(b)
                goto label;

            while(c++);
        }

        if(*p)
            p = &i;

        a++;
    }
}

$ clong -O2 -w lcssa.c
clang: /home/merkil/clang/llvm/lib/Transforms/Utils/LCSSA.cpp:170: virtual bool
{anonymous}::LCSSA::runOnLoop(llvm::Loop*, llvm::LPPassManager&): Assertion
`L->isLCSSAForm(*DT)' failed.
0  clang           0x0000000001d2021f
1  clang           0x0000000001d20719
2  libpthread.so.0 0x00007f6adebce030
3  libc.so.6       0x00007f6addec4475 gsignal + 53
4  libc.so.6       0x00007f6addec76f0 abort + 384
5  libc.so.6       0x00007f6addebd621 __assert_fail + 241
6  clang           0x0000000001a125a3
7  clang           0x0000000001af111f
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1775
8  clang           0x0000000001cb8c6f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
9  clang           0x0000000001a6be66
10 clang           0x0000000001cb8907
llvm::MPPassManager::runOnModule(llvm::Module&) + 663
11 clang           0x0000000001cbc097 llvm::PassManagerImpl::run(llvm::Module&)
+ 231
12 clang           0x00000000008db012
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 3666
13 clang           0x00000000008d8baf
14 clang           0x0000000000a2295a clang::ParseAST(clang::Sema&, bool, bool)
+ 538
15 clang           0x00000000008d787e clang::CodeGenAction::ExecuteAction() +
78
16 clang           0x0000000000771c26 clang::FrontendAction::Execute() + 150
17 clang           0x00000000007550e5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
18 clang           0x000000000073c9fd
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1421
19 clang           0x0000000000736188 cc1_main(char const**, char const**, char
const*, void*) + 968
20 clang           0x000000000072ab17 main + 4967
21 libc.so.6       0x00007f6addeb0ead __libc_start_main + 253
22 clang           0x0000000000735169
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
lcssa.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -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.3
-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.3/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 0
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -backend-option
-vectorize-loops -o /tmp/lcssa-vrvJtP.o -x c lcssa.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'lcssa.c'.
4.    Running pass 'Loop Pass Manager' on function '@f'
5.    Running pass 'Loop-Closed SSA Form Pass' on basic block
'%for.cond1.preheader.lr.ph'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 171216)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.

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