[llvm-bugs] [Bug 28048] New: crash at -Os in 32-bit and 64-bit mode on x86_64-linux-gnu (`L->isRecursivelyLCSSAForm(*DT) && "LCSSA required to run indvars!"')

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 8 02:16:46 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28048

            Bug ID: 28048
           Summary: crash at -Os in 32-bit and 64-bit mode on
                    x86_64-linux-gnu (`L->isRecursivelyLCSSAForm(*DT) &&
                    "LCSSA required to run indvars!"')
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chengniansun at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

$: clang-trunk -v
clang version 3.9.0 (trunk 271696)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$: 
$: clang-trunk -Os small.c
clang-3.9:
/tmp/llvm-builder/llvm-source-trunk/lib/Transforms/Scalar/IndVarSimplify.cpp:2105:
bool {anonymous}::IndVarSimplify::run(llvm::Loop*): Assertion
`L->isRecursivelyLCSSAForm(*DT) && "LCSSA required to run indvars!"' failed.
0  clang-3.9       0x0000000001c42545
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  clang-3.9       0x0000000001c402f6 llvm::sys::RunSignalHandlers() + 54
2  clang-3.9       0x0000000001c40521
3  libpthread.so.0 0x00007fd5aaf75340
4  libc.so.6       0x00007fd5aa193cc9 gsignal + 57
5  libc.so.6       0x00007fd5aa1970d8 abort + 328
6  libc.so.6       0x00007fd5aa18cb86
7  libc.so.6       0x00007fd5aa18cc32
8  clang-3.9       0x0000000001af8693
9  clang-3.9       0x00000000024b7157
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1431
10 clang-3.9       0x00000000018d4463
llvm::FPPassManager::runOnFunction(llvm::Function&) + 643
11 clang-3.9       0x0000000002497d70
12 clang-3.9       0x00000000018d4b2f
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 751
13 clang-3.9       0x0000000001d79938
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*) + 3640
14 clang-3.9       0x0000000002398936
15 clang-3.9       0x00000000026d806b clang::ParseAST(clang::Sema&, bool, bool)
+ 571
16 clang-3.9       0x0000000002398cfe clang::CodeGenAction::ExecuteAction() +
78
17 clang-3.9       0x000000000207c066 clang::FrontendAction::Execute() + 518
18 clang-3.9       0x000000000205772e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 318
19 clang-3.9       0x0000000002100fac
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2300
20 clang-3.9       0x0000000000a0cf98 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2296
21 clang-3.9       0x00000000009c0778 main + 6456
22 libc.so.6       0x00007fd5aa17eec5 __libc_start_main + 245
23 clang-3.9       0x0000000000a08f54
Stack dump:
0.    Program arguments: /usr/local/clang-trunk/bin/clang-3.9 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -resource-dir
/usr/local/clang-trunk/bin/../lib/clang/3.9.0 -c-isystem . -c-isystem
/usr/local/include/csmith -internal-isystem /usr/local/include
-internal-isystem /usr/local/clang-trunk/bin/../lib/clang/3.9.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -Os
-fdebug-compilation-dir
/home/cnsun/ramdisk/reduction/20160607-clang-trunk-m64-g-O3-build-145239/delta-first
-ferror-limit 19 -fmessage-length 132 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o /tmp/small-97277d.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 'Loop Pass Manager' on function '@main'
5.    Running pass 'Induction Variable Simplification' on basic block
'%for.cond'
clang-3.9: error: unable to execute command: Aborted (core dumped)
clang-3.9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (trunk 271696)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg: /tmp/small-ba2e74.c
clang-3.9: note: diagnostic msg: /tmp/small-ba2e74.sh
clang-3.9: note: diagnostic msg: 

********************
$: 
$: cat small.c
int a[15];
int b, e, h, g;
int main() {
  for (;;) {
    char i = h = 2;
    if (!g) {
      for (e = 0; e < 10; e++)
        a[e] = 1;
      continue;
    }
    for (; b;) {
      for (i = 0; i <= 1; i++) {
        for (; b;) {
          a[i + 2] = h;
          h = 0;
        }
        if (g)
          break;
      }
    }
  }
  return 0;
}
$:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160608/7117ca7f/attachment.html>


More information about the llvm-bugs mailing list