[llvm-bugs] [Bug 40799] New: Infinite recursion in getSCEV -> createSCEV

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 21 02:17:49 PST 2019


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

            Bug ID: 40799
           Summary: Infinite recursion in getSCEV -> createSCEV
           Product: libraries
           Version: 6.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: konstantin.vladimirov at gmail.com
                CC: llvm-bugs at lists.llvm.org

Reproduction after creduce:

---
int a, b, c, d, e, f, g;
void h() {
  int j = g;
  long *k = h;
  for (; a;)
    ;
  for (; b; b++) {
    c = 0;
    for (; c < 7; c++) {
      d = 2;
      for (; d < 15; d += 2) {
        e = 1;
        for (; e < 12; e += 2) {
          f = 0;
          for (; f < 15; f++) {
            g = 2;
            for (; g < 5; g++)
              *k = a ^ 940 * *k * j;
          }
        }
      }
    }
  }
}
---

Compile with:

clang -w -O2 minimize.c -S

You will see stack trace.

---
#240 0x0000000000cefc70 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1495] (/apps/clang/6.0.0/bin/clang-6.0+0xcefc70)
#241 0x0000000000cf1410 llvm::ScalarEvolution::getSCEV(llvm::Value*)
(/apps/clang/6.0.0/bin/clang-6.0+0xcf1410)
#242 0x0000000000cefc70 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1495] (/apps/clang/6.0.0/bin/clang-6.0+0xcefc70)
#243 0x0000000000cf1410 llvm::ScalarEvolution::getSCEV(llvm::Value*)
(/apps/clang/6.0.0/bin/clang-6.0+0xcf1410)
#244 0x0000000000cefc70 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1495] (/apps/clang/6.0.0/bin/clang-6.0+0xcefc70)
#245 0x0000000000cf1410 llvm::ScalarEvolution::getSCEV(llvm::Value*)
(/apps/clang/6.0.0/bin/clang-6.0+0xcf1410)
#246 0x0000000000cefc70 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1495] (/apps/clang/6.0.0/bin/clang-6.0+0xcefc70)
#247 0x0000000000cf1410 llvm::ScalarEvolution::getSCEV(llvm::Value*)
(/apps/clang/6.0.0/bin/clang-6.0+0xcf1410)
#248 0x0000000000cefc70 llvm::ScalarEvolution::createSCEV(llvm::Value*) [clone
.part.1495] (/apps/clang/6.0.0/bin/clang-6.0+0xcefc70)
#249 0x0000000000cf1410 llvm::ScalarEvolution::getSCEV(llvm::Value*)
(/apps/clang/6.0.0/bin/clang-6.0+0xcf1410)
---

Compiler information:

> clang -v
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /apps/clang/6.0.0//bin
Found candidate GCC installation: /usr/lib/gcc/i586-suse-linux/2.95.3
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.3
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.3
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

-- 
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/20190221/39f87054/attachment.html>


More information about the llvm-bugs mailing list