I've just tried to compile this code for a HD 4000 on OS X and receive the same error. Given the nature of the build log and the fact that the same code builds successfully on other devices, this is clearly a bug with Apple's OpenCL implementation. In my experience Apple's OpenCL implementation exhibits a particularly large number of bugs, often involving compilation failures with useless error messages. The HD graphics devices seem to be responsible for a significant number of these (this is the 3rd bug for HD graphics on OS X posted to stack overflow in the last two weeks), perhaps because the implementation for them is still relatively immature.
I recommend you raise a bug via the Apple Bug Reporting System.