This patch fixes an issue whereby a constexpr class member which is mapped to the device is being optimized out thus leading to a runtime error:
Libomptarget error: Unable to generate entries table for device id 0. Libomptarget error: Failed to init globals on device 0
This is due to the optimized-out variable not being present when host entry table values are matched with their device counterparts.
A currently failing example is included in the runtime test included in this patch.
I really think we need a different solution to this than the "ref" variables... alas, not with this patch