Open
Description
Tested in one of the latest commits. This works as intended:
struct hello{
struct sub{
uint32_t uid;
uint32_t gid ;
uint32_t idx;
uint32_t weak ;
};
#pragma omp declare target
constexpr static sub A={1,1,1,false};
#pragma omp end declare target
};
while this does not:
struct hello{
struct sub{
uint32_t uid:32;
uint32_t gid:32;
uint32_t idx:32;
uint32_t weak:32;
};
#pragma omp declare target
constexpr static sub A={1,1,1,false};
#pragma omp end declare target
};
Bitfields are intrinsically not working, and the error message is a generic sounding Offloading entry for declare target variable _ZN3sdf5hello1AE is incorrect: the address is invalid.
At the very least, a more explicit description would help but still, I see no reason why bitfields should not be allowed.
Potential workarounds like wrapping it in an union and setting it up through a different field will not work.