clspv icon indicating copy to clipboard operation
clspv copied to clipboard

can't-compare-pointers error emitted as an assert

Open dneto0 opened this issue 6 years ago • 2 comments

This kernel should error out since pointer comparison is not supported in Vulkan 1.0 with variable-pointer.

kernel void foo(global int* A, global int *B) {
  const bool same = (A == B);
  *A = (int)(same);
}

The compiler does error out, but in an infinte loop.

Pointer equality test is not supported by SPIR-V for Vulkan, in function

(repeat)

dneto0 avatar Sep 10 '19 15:09 dneto0

whoops. I had an older version of the compiler. After updating clspv, I now get what looks like a failed assert, including a segfault (from the assert macro). I'll change the title of the issue. It's not a bug, but a usability thing at best.

dneto0 avatar Sep 10 '19 15:09 dneto0

My experience is that even with recent versions, it does occasionally happen. I've found that removing the errs() ... before the llvm_unreachable seems to suppress the infinite loop. Linking #383 as well.

kpet avatar Sep 10 '19 15:09 kpet

This is now supported

rjodinchr avatar Jul 25 '23 07:07 rjodinchr