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

test_taskloop_num_tasks.c failing to compile #805

Closed brianwhitney59 closed 5 months ago

brianwhitney59 commented 6 months ago

test_taskloop_num_tasks.c is failing to compile. There seems to be an unneeded ";" that is causing the if structure to fail

64 //To check if the num_threads actually executing the parallel region > 1 65 if(num_threads == 1) 66 OMPVV_WARNING("Only a single thread executed the parallel region"); 67 else 68 //if all the tasks in a group are run by a same thread, get TRUE else F ALSE 69 OMPVV_TEST_AND_SET_VERBOSE(errors, (isGroupIdsSame(thread_ids) != 1));

On line 66, the macro expands and causes multiple lines, so the else statement is left orphaned. Removing the ";" or adding {} around the macro allow it to build.

This was found with the intel 2024.1 compiler. icx -std=c99 -fiopenmp -fopenmp-targets=spir64 -I./ompvv -DVERBOSE_MODE=1 test_taskloop_num_tasks.c test_taskloop_num_tasks.c:67:4: error: expected expression 67 | else | ^ 1 error generated.

fel-cab commented 5 months ago

The issue was solved with PR #803