Minimal code: https://pastebin.com/APcj0gjh
Basically, I'm linking a library (p3) with anything else (in this case, a simple compiled program p1, but another library created in the same way also works).
Compiler arguments must be as specified for a crash.
Driver version, as reported by OpenCL: 3640
Full list of OpenCL properties:
For platform: https://pastebin.com/nJB7htci
For device: https://pastebin.com/5a04ig6d
This code works on NVidia GPUs (tested on 750ti and 4090) and Intel CPU implementation.