[OpenMP] Fix always,from and delete for data absent at exit
authorJoel E. Denny <jdenny.ornl@gmail.com>
Fri, 19 Feb 2021 15:59:36 +0000 (10:59 -0500)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Fri, 19 Feb 2021 16:09:26 +0000 (11:09 -0500)
commitd2147b1a876187e6addd89b681d47f9f98a89669
treea41551b6ef0bb7dcd1d20da3418b79f48418e2e7
parent82492f24ffa74825cc7990aa7e06b6b0b8c32e81
[OpenMP] Fix always,from and delete for data absent at exit

Without this patch, there's a runtime error for those map types at
exit from an "omp target data" or at "omp target exit data", but the
spec says the list item should be ignored.

This patch tests that fix in data_absent_at_exit.c, and it also
improves other testing for data that is not fully present at exit.

Reviewed By: grokos, RaviNarayanaswamy

Differential Revision: https://reviews.llvm.org/D96999
openmp/libomptarget/src/omptarget.cpp
openmp/libomptarget/test/mapping/data_absent_at_exit.c [new file with mode: 0644]
openmp/libomptarget/test/mapping/present/target_exit_data.c [deleted file]
openmp/libomptarget/test/mapping/present/target_exit_data_delete.c [new file with mode: 0644]
openmp/libomptarget/test/mapping/present/target_exit_data_release.c [new file with mode: 0644]
openmp/libomptarget/test/mapping/target_data_array_extension_at_exit.c