I use the the ATI's sdk to have support for the CPU for my for my MSc thesis and I have encountered crashes at the OpenCL compiler for the CPU.
The minimal case that I have identified as the source of the problem is the code fragment below:
This is not the actual code but a minimal example that produces the same problem. If I remove the 'const', the compilation continues without problems.
When something like this appears in the source code, the compiler crashes (clc.exe has stopped working) and i get an error code -11 (CL_BUILD_PROGRAM_FAILURE).
I should mention that i use MS Visual Studio 2008 SP1 for the development with the SDK 2.2 and the c++ wrapper API (cl.hpp).
I tried calling the clc from the command prompt and it again crashed for this minimal test case leaving the message "eok_lvalue_adjust" in the command prompt window. I also tried compiling it in a VBox with ubuntu 10.04 and the SDK 2.3 with simirar results, it segfaulted.
Using the same source on the nVidia driver (as my GPU is a GTX275) seems to work as expected.
Have I encountered a bug in the OpenCL compiler or I am doing something wrong? And even if I do something wrong shouldn't the compiler report a warning or an error instead of crashing? What do you think?