Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/test/mapping/two_chunks_via_ptrs.c
- This file was added.
// RUN: %libomptarget-compile-generic | |||||
// RUN: %libomptarget-run-fail-generic 2>&1 \ | |||||
// RUN: | %fcheck-generic | |||||
// CHECK: Libomptarget message: Found record of existing mapping with the requested base address 0x{{.*}} but disjoint mapped data, mapping of two distinct chunks of the same object is not allowed. | |||||
// CHECK: Libomptarget error: Call to getTargetPointer returned null pointer (device failure or illegal mapping). | |||||
// CHECK: Libomptarget fatal error 1: failure of target construct while offloading is mandatory | |||||
#include <stdio.h> | |||||
#include <stdlib.h> | |||||
int main() | |||||
{ | |||||
int *mem = (int *) malloc(32 * sizeof(int)); | |||||
int *a = mem; | |||||
int *b = mem; | |||||
#pragma omp target data map(from: a[0:10], b[20:10]) | |||||
{ } | |||||
return 0; | |||||
} |