OpenMP-Validation-and-Verification / OpenMP_VV

OpenMP Offloading Validation & Verification Suite; Official repository. We have migrated from bitbucket!! For documentation, results, publication and presentations, please check out our website ->
https://crpl.cis.udel.edu/ompvvsollve/
Other
54 stars 19 forks source link

tests/5.0/target/test_target_allocate.c gets compilation error when using allocate clause #808

Closed ddpagan closed 5 months ago

ddpagan commented 6 months ago

Using clang, compiling test tests/5.0/target/test_target_allocate.c with -fopenmp gets this error: 27:32: error: allocator must be specified in the 'uses_allocators' clause 27 | #pragma omp target allocate(omp_default_mem_alloc:x) firstprivate(x) map(from: device_result) | ^~~~~

For the test to compile properly, the uses_allocators clause must be specified. See

OpenMP5.0 specification, section 2.12.5 target construct, under restrictions, pg. 175, L7-8

7 Memory allocators that do not appear in a uses_allocators clause cannot appearas an 8 allocator in an allocate clause ...

This restriction is the same in versions 5.1 and 5.2 as well.

To reproduce, using clang 19.0 clang -fopenmp -I./ompvv tests/5.0/target/test_target_allocate.c

Test should compile and pass upon execution.

NOTE: gcc compiles the test case without error, which is wrong.

fel-cab commented 6 months ago

The test was fixed in the PR #802. Can you do git pull and test it again?

ddpagan commented 5 months ago

That did it. Test passes now. Thanks.

ddpagan commented 5 months ago

Test was already fixed. I just needed to update my version.