[llvm-bugs] [Bug 41117] New: After r343028, Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file include/llvm/Support/Casting.h, line 255.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 17 15:14:43 PDT 2019


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

            Bug ID: 41117
           Summary: After r343028, Assertion failed: (isa<X>(Val) &&
                    "cast<Ty>() argument of incompatible type!"), function
                    cast, file include/llvm/Support/Casting.h, line 255.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

As described in https://bugs.freebsd.org/236566, compiling the FreeBSD
java/openjdk8 port for armv7 or aarch64 asserts with:

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file include/llvm/Support/Casting.h, line 255.

Bisection shows this started occurring after https://reviews.llvm.org/rL343028
("[LV][LAA] Vectorize loop invariant values stored into loop invariant
address").

Minimized test case:

// clang -cc1 -triple aarch64-- -S -fno-delete-null-pointer-checks -O2
-vectorize-loops instanceKlass-min.cpp
void *a;
struct d {
  template <class c> c *g(int) const;
};
struct i {
  int e;
  template <class c> void f(c *);
};
struct l {
  int count() { return h; }
  int h;
};
int j;
template <class c> c *d::g(int) const {
  a = &((char *)0)[j];
  return (c *)a;
}
template <class c> void i::f(c *) { e = 0; }
d k;
void p() {
  i *b = 0;
  l *m = 0;
  l n;
  while (m < &n) {
    unsigned *o(k.g<unsigned>(0));
    unsigned *c = o + m->count();
    while (o < c) {
      b->f(o);
      ++o;
    }
    ++m;
  }
}

-- 
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/20190317/a9594cb5/attachment.html>


More information about the llvm-bugs mailing list