[Bug c++/121353] [OpenMP] 'declare mapper' - ICE on invalid code, rejected in 'struct'

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 9 14:39:34 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121353

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The following is also accepted – but the mapper is not invoked:


#include <cstddef>

template <typename T>
struct myvec
{
private:
  size_t len;
  T *data;
  #pragma omp declare mapper(myvec v) map(v, v.data[0:v.len])
public:
  ....
};


More information about the Gcc-bugs mailing list