OpenCilk / opencilk-project

Monorepo for the OpenCilk compiler. Forked from llvm/llvm-project and based on Tapir/LLVM.
Other
93 stars 29 forks source link

cilk_for type error with pointer loop variable #156

Closed VoxSciurorum closed 1 year ago

VoxSciurorum commented 1 year ago

This program generates a type error, a mismatch between long and long *, with the long coming from the implicit end - begin calculation and the long * being in the code as written.

long cilk_for_type_error(const long *begin, const long *end)
{
  _Cilk_for (const long *p = begin; p != end; ++p)
    (void)p;
  return 0;
}

Without pull request 155 the compiler crashes after reporting the error.