Today I used the barrier call for the fist time and it was causing a crash of the graphic driver (HD4000, Win7 x64, 18.104.22.16832) (Lucky for me Win7 was able to restart it nicely every time).
The issue was that I had a barrier inside an IF statement and that not all work items were taking the branch.
Now, it would be good in the offline compiler was able to at least raise a warning about that if not an error actually.
After moving the barrier my kernel worked fixing the code, so no big deal here but just to let you know.
Ideally the kernel compilation should detect that before crashing the driver :)