llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

ExprWithCleanups not handled in emitOpenCLEnqueuedBlock

Open nzaghen opened this issue 8 years ago • 0 comments

Bugzilla Link 36088
Resolution FIXED
Resolved on Feb 01, 2019 05:54
Version trunk
OS Linux
Attachments The CL kernel

Extended Description

The attached source makes clang (6.0-rc1 and trunk) assert on cast(). I tried ignoring the ExprWithCleanups:

if (auto DR = dyn_cast(E)) { E = cast(DR->getDecl())->getInit(); }

  • if (auto Cast = dyn_cast(E)) {
  • E = Cast->getSubExpr();
  • } if (auto Cast = dyn_cast(E)) { E = Cast->getSubExpr(); } auto *Block = cast(E);

but it seems like clang also tries to emit the same block expression twice (the second time through the OCL enqueue specific codepath.)

Options I used for clang: "-x cl -cl-std=CL2.0 enqueue_block_kernel.cl"

nzaghen avatar Jan 25 '18 16:01 nzaghen