OpenMP Spec 5.0 [2.12.5, Restrictions]: If a device clause in which the
ancestor device-modifier appears is present on the target construct,
then a requires directive with the reverse_offload clause must be
specified.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/OpenMP/target_device_codegen.cpp | ||
---|---|---|
43–47 | Do we have a codegen test for the ancestor modifier? |
clang/test/OpenMP/target_device_codegen.cpp | ||
---|---|---|
43–47 | We shouldn't have a test for ancestor modifier because it can only be used when requires reverse_offload is specified and Spec 5.2 says that if an implementation is not supporting a requirement (reverse offload in this case) then it should give compile-time error termination [1]. I am going to propose this change in a different phab review. [1] OpenMP API Specification 5.2, Section 8.2.1, lines 12-13, page 212. |
clang/test/OpenMP/target_device_codegen.cpp | ||
---|---|---|
43–47 | I'm not asking about runtime test but the unit test. We should check at least that using this modifier does not crash the compiler. Could you restore this test here and add #pragma omp requires reverse_offload instead? |
Do we have a codegen test for the ancestor modifier?