OK, I guess, I identified the issue. ImageMagick cached an old OpenCL program compiled some months ago, after removing that, it does not crash any more. Now the build fails, because cospi() and sinpi() are not yet supported by libclc.