Open ye-luo opened 1 year ago
#define PRAGMA_OFFLOAD(x) _Pragma(x) int main() { PRAGMA_OFFLOAD("omp target ompx_attribute([[clang::amdgpu_flat_work_group_size(3, 17)]])") for (int i = 0; i < 1000; ++i) {} }
got error
$ clang++ -fopenmp --offload-arch=gfx90a main.cpp main.cpp:5:3: warning: '[' tokens introducing attribute appear in different macro expansion contexts [-Wcompound-token-split-by-macro] 5 | PRAGMA_OFFLOAD("omp target ompx_attribute([[clang::amdgpu_flat_work_group_size(3, 17)]])") | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:1:27: note: expanded from macro 'PRAGMA_OFFLOAD' 1 | #define PRAGMA_OFFLOAD(x) _Pragma(x) | ^~~~~~~~~~ <scratch space>:2:28: note: expanded from here 2 | omp target ompx_attribute([[clang::amdgpu_flat_work_group_size(3, 17)]]) | ^ main.cpp:5:3: note: second '[' token is here
@llvm/issue-subscribers-openmp
@llvm/issue-subscribers-clang-frontend
got error