<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Polly crashes while running pass 'Polly - Forward operand tree' on skx"
   href="https://bugs.llvm.org/show_bug.cgi?id=47098">47098</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Polly crashes while running pass 'Polly - Forward operand tree' on skx
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Polly
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Optimizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>polly-dev@googlegroups.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Vsevolod.Livinskij@frtk.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Error:
<span class="quote">>$ clang++ -mllvm -polly -O3 -march=skx -c func.cpp</span >
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang++ -mllvm -polly -O3 -march=skx -c func.cpp 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 'func.cpp'.
4.      Running pass 'Region Pass Manager' on function
'@_Z4testihPA12_A2_A24_A25_i'
5.      Running pass 'Polly - Forward operand tree' on basic block
'%entry.split'
 #0 0x0000555f3739d57e llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/clang-12+0x1dd857e)
 #1 0x0000555f3739b344 llvm::sys::RunSignalHandlers() (/clang-12+0x1dd6344)
 #2 0x0000555f3739b5c1 llvm::sys::CleanupOnSignal(unsigned long)
(/clang-12+0x1dd65c1)
 #3 0x0000555f373094e8 CrashRecoverySignalHandler(int) (/clang-12+0x1d444e8)
 #4 0x00007f36b076a3c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #5 0x0000555f383fffe4 polly::Scop::getSE() const (/clang-12+0x2e3afe4)
 #6 0x0000555f3848120d polly::VirtualUse::create(polly::Scop*,
polly::ScopStmt*, llvm::Loop*, llvm::Value*, bool) (/clang-12+0x2ebc20d)
 #7 0x0000555f383a9bd8 (anonymous
namespace)::ForwardOpTreeImpl::forwardTree(polly::ScopStmt*, llvm::Value*,
polly::ScopStmt*, llvm::Loop*, bool) (/clang-12+0x2de4bd8)
 #8 0x0000555f383aa03c (anonymous
namespace)::ForwardOpTreeImpl::forwardTree(polly::ScopStmt*, llvm::Value*,
polly::ScopStmt*, llvm::Loop*, bool) (/clang-12+0x2de503c)
 #9 0x0000555f383ac33b (anonymous
namespace)::ForwardOpTree::runOnScop(polly::Scop&) (/clang-12+0x2de733b)
#10 0x0000555f365d4890 llvm::RGPassManager::runOnFunction(llvm::Function&)
(/clang-12+0x100f890)
#11 0x0000555f36cdf891 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/clang-12+0x171a891)
#12 0x0000555f36cdff89 llvm::FPPassManager::runOnModule(llvm::Module&)
(/clang-12+0x171af89)
#13 0x0000555f36cdea2c llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/clang-12+0x1719a2c)
#14 0x0000555f3764f109 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) (/clang-12+0x208a109)
#15 0x0000555f37650abe clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) (/clang-12+0x208babe)
#16 0x0000555f3832a971
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/clang-12+0x2d65971)
#17 0x0000555f39460939 clang::ParseAST(clang::Sema&, bool, bool)
(/clang-12+0x3e9b939)
#18 0x0000555f383293b8 clang::CodeGenAction::ExecuteAction()
(/clang-12+0x2d643b8)
#19 0x0000555f37c79729 clang::FrontendAction::Execute() (/clang-12+0x26b4729)
#20 0x0000555f37c30466
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/clang-12+0x266b466)
#21 0x0000555f37d4d420
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/clang-12+0x2788420)
#22 0x0000555f3617a636 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/clang-12+0xbb5636)
#23 0x0000555f36177988 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/clang-12+0xbb2988)
#24 0x0000555f37af00f9 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const::'lambda'()>(long) (/clang-12+0x252b0f9)
#25 0x0000555f3730966c
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/clang-12+0x1d4466c)
#26 0x0000555f37af0a16
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const (.part.0) (/clang-12+0x252ba16)
#27 0x0000555f37ac7ecc
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const (/clang-12+0x2502ecc)
#28 0x0000555f37ac8806
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/clang-12+0x2503806)
#29 0x0000555f37ad1a19
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/clang-12+0x250ca19)
#30 0x0000555f360f5629 main (/clang-12+0xb30629)
#31 0x00007f36b01d70b3 __libc_start_main
/build/glibc-YYA7BZ/glibc-2.31/csu/../csu/libc-start.c:342:3
#32 0x0000555f361774de _start (/clang-12+0xbb24de)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 12.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
92e82a2890c38bbb158cbf9dd592328b4c383696)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: 
clang-12: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/func-b320a7.cpp
clang-12: note: diagnostic msg: /tmp/func-b320a7.sh
clang-12: note: diagnostic msg: 

********************

Reproducer:
extern long var_27;
extern int var_28;
void test(int a, unsigned char b, int c[26][12][2][24][25]) {
  for (bool d = 0; d < bool(2); d = 1)
    for (short e = 0; e < (short)a - 25941 /*23*/; e += -21006 + 21010 /*4*/)
      for (long f = 0; f < b - 129ULL /*24*/; f++) {
        var_27 = c[6][2][1][e][f];
        var_28 = 0;
      }
}

LLVM version:
clang version 12.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
92e82a2890c38bbb158cbf9dd592328b4c383696)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>