Environment:
OS: Windows 7 x64 Professional
Graphics: Radeon R7 370
Driver version: 16.20 (from AMD Radeon Software Crimson Edition 16.6.1)
File opencl_trace.cl with narrowed source code version is attached.
It looks like there is no critical part in the code that leads to the crash. Commenting out random parts of the code get it compiling successfully.