<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 - Assertion in VirtRegRewriter: `toIndex_(n) < storage_.size() && "index out of bounds!"'"
   href="https://bugs.llvm.org/show_bug.cgi?id=34828">34828</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion in VirtRegRewriter: `toIndex_(n) < storage_.size() && "index out of bounds!"'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </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>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>babokin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clang trunk rev314757, x86_64.

Note that UBSAN switches are required to reproduce.

<span class="quote">> cat f.cpp</span >
int a, b, ad, av, l, o, p, q, r, s, m, cl, cm;
short c, am, ap, n, ci;
unsigned d, e, g, h, ak;
unsigned long long f, i;
long j, aj;
unsigned long k, ag;
long *ce;
unsigned *cf;
long long *ch;
short *cn;
int *co;
void t() {
  0 <= *ce;
  if ((unsigned(aj) + (f + -g - e) - d + ag + (unsigned(i) - (27002 + c) + k))
*
      h * 3131423175)
    *cn = s;
  else {
    if ((r || n <= m) <= int((i - int(2 + k)) * j * d * (c * ak)))
      if ((d && *cf) < b)
        ;
      else
        p = l;
    else
      a = i - int(k) && -1609622849 / ci;
    c + ag + k || *ch;
    am = f + -g - c;
  }
  l << q;
  if (ap && av) {
    if (e - c)
      cm = *ce && cl * ad * *co + c && ag + k;
    else
      *ch = 0;
    if (i)
      *co << j - 70807125331817721;
    j - 70807125331817721;
  }
  o = unsigned(aj) + f + -g - d - c + unsigned(i - 27002) - (2 + k) < aj;
}

<span class="quote">> clang++ -fsanitize=undefined -fno-sanitize-recover=undefined -w -O2 -c f.cpp</span >
clang-6.0:
/home/dybaboki/llvm/llvm-trunk-20171002/include/llvm/ADT/IndexedMap.h:52:
typename StorageT::const_reference llvm::IndexedMap<unsigned int,
llvm::VirtReg2IndexFunctor>::operator[](llvm::IndexedMap::IndexT) const [T =
unsigned int, ToIndexT = llvm::VirtReg2IndexFunctor]: Assertion `toIndex_(n) <
storage_.size() && "index out of bounds!"' failed.
#0 0x00000000013528ff llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0x13528ff)
#1 0x0000000001352c06 SignalHandler(int)
(/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0x1352c06)
#2 0x00007f5e3bb9c370 __restore_rt (/lib64/libpthread.so.0+0xf370)
#3 0x00007f5e3a7181d7 __GI_raise (/lib64/libc.so.6+0x351d7)
#4 0x00007f5e3a7198c8 __GI_abort (/lib64/libc.so.6+0x368c8)
#5 0x00007f5e3a711146 __assert_fail_base (/lib64/libc.so.6+0x2e146)
#6 0x00007f5e3a7111f2 (/lib64/libc.so.6+0x2e1f2)
#7 0x0000000000d24206 llvm::LiveIntervals::addKillFlags(llvm::VirtRegMap
const*) (/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0xd24206)
#8 0x0000000000cd637d (anonymous
namespace)::VirtRegRewriter::runOnMachineFunction(llvm::MachineFunction&)
(/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0xcd637d)
#9 0x0000000000bd84a8 llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0xbd84a8)
#10 0x0000000000eeceff llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0xeeceff)
#11 0x0000000000eed1c3 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0xeed1c3)
#12 0x0000000000eed6a6 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/dybaboki/llvm/bin-trunk-20171002/bin/clang-6.0+0xeed6a6)
<...></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>