OpenCL 2.0 Compiler Bug?

In my OpenCL kernel I'm using the "async_work_group_copy" function to copy data from global to local memory. However, whenever I use the "wait_group_events" function in the kernel, and I compile with OpenCL 2.0, I get the following error during compilation:

Error: Call of undefined functionCompiler Log: Size of the type of data structure used to hold value too smallError: HSAIL program is not finalized successfully.Codegen phase failed compilation.

Size of the type of data structure used to hold value too smallError: HSAIL program is not finalized successfully.Codegen phase failed compilation.Error: BRIG finalization to ISA failed.

(the first half is written by clBuildProgram(), the second half is written by the host program right after)

The same kernels compile just fine under OpenCL 1.2, but it fails under OpenCL 2.0. Reproducible test case attached.

Please take a look at that example from gpucomp/ex02.c at master · sowson/gpucomp · GitHub (you may check full example. I understand that maybe not exactly check on functions you ask, but if I correctly understand this is your code about. It works on OpenCL 1.2 / 2.0 Thanks!