Issue 132342
Summary OpenMP failing offload of static object if bitfields
Labels new issue
Assignees
Reporter KaruroChori
    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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to