[Openmp-commits] [openmp] eace139 - Back out test that failed.
Jennifer Yu via Openmp-commits
openmp-commits at lists.llvm.org
Fri Nov 4 17:24:17 PDT 2022
Author: Jennifer Yu
Date: 2022-11-04T17:23:05-07:00
New Revision: eace13928be495d0f9f8ea3e730bea57ddd9fe13
URL: https://github.com/llvm/llvm-project/commit/eace13928be495d0f9f8ea3e730bea57ddd9fe13
DIFF: https://github.com/llvm/llvm-project/commit/eace13928be495d0f9f8ea3e730bea57ddd9fe13.diff
LOG: Back out test that failed.
But I can not reproduce the problem on my local machine. My local machine run:
222 0x5a6780
222 0x7fffbef9400e
222 0x5a677e 0x5a6780 0x7fffbef936c8
222 0x376f8e 0x376f90 0x7fffbef94008
222 0x281f20
222 0x7fffbef9400e
PASSED
Added:
Modified:
openmp/libomptarget/test/mapping/has_device_addr.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/test/mapping/has_device_addr.cpp b/openmp/libomptarget/test/mapping/has_device_addr.cpp
index 8a17228301463..63fa313cf2780 100644
--- a/openmp/libomptarget/test/mapping/has_device_addr.cpp
+++ b/openmp/libomptarget/test/mapping/has_device_addr.cpp
@@ -25,60 +25,9 @@ struct view {
}
};
-void poo() {
- short a = 1;
- short &ar = a;
-
-#pragma omp target data map(tofrom : ar) use_device_addr(ar)
- {
-#pragma omp target has_device_addr(ar)
- {
- ar = 222;
- // CHECK: 222
- printf("%hd %p\n", ar, &ar); // 222 p2
- }
- }
- // CHECK: 222
- printf("%hd %p\n", ar, &ar); // 222 p1
-}
-
-void noo() {
- short *b = (short *)malloc(sizeof(short));
- short *&br = b;
- br = br - 1;
-
- br[1] = 111;
-#pragma omp target data map(tofrom : br[1]) use_device_addr(br[1])
-#pragma omp target has_device_addr(br[1])
- {
- br[1] = 222;
- // CHECK: 222
- printf("%hd %p %p %p\n", br[1], br, &br[1], &br);
- }
- // CHECK: 222
- printf("%hd %p %p %p\n", br[1], br, &br[1], &br);
-}
-
-void ooo() {
- short a = 1;
-
-#pragma omp target data map(tofrom : a) use_device_addr(a)
-#pragma omp target has_device_addr(a)
- {
- a = 222;
- // CHECK: 222
- printf("%hd %p\n", a, &a);
- }
- // CHECK: 222
- printf("%hd %p\n", a, &a);
-}
-
int main() {
view a;
a.foo();
- poo();
- noo();
- ooo();
// CHECK: PASSED
printf("PASSED\n");
}
More information about the Openmp-commits
mailing list