Index: openmp/runtime/test/affinity/format/api2.c =================================================================== --- openmp/runtime/test/affinity/format/api2.c +++ openmp/runtime/test/affinity/format/api2.c @@ -13,8 +13,8 @@ #define check(condition) \ if (!(condition)) { \ - fprintf(stderr, "error: %s: %d: " STR(condition) "\n", __FILE__, \ - __LINE__); \ + fprintf(stderr, "error: %s: %d: %s\n", __FILE__, __LINE__, \ + STR(condition)); \ exit(1); \ } Index: openmp/runtime/test/api/omp_alloc_def_fb.c =================================================================== --- openmp/runtime/test/api/omp_alloc_def_fb.c +++ openmp/runtime/test/api/omp_alloc_def_fb.c @@ -12,8 +12,8 @@ at[1].key = omp_atk_fallback; at[1].value = omp_atv_default_mem_fb; a = omp_init_allocator(omp_large_cap_mem_space, 2, at); - printf("allocator large created: %p\n", a); - #pragma omp parallel num_threads(2) + printf("allocator large created: %p\n", (void *)a); +#pragma omp parallel num_threads(2) { int i = omp_get_thread_num(); p[i] = omp_alloc(1024 * 1024, a); Index: openmp/runtime/test/api/omp_alloc_hbw.c =================================================================== --- openmp/runtime/test/api/omp_alloc_hbw.c +++ openmp/runtime/test/api/omp_alloc_hbw.c @@ -12,8 +12,8 @@ at[1].key = omp_atk_fallback; at[1].value = omp_atv_null_fb; a = omp_init_allocator(omp_high_bw_mem_space, 2, at); - printf("allocator hbw created: %p\n", a); - #pragma omp parallel num_threads(2) + printf("allocator hbw created: %p\n", (void *)a); +#pragma omp parallel num_threads(2) { int i = omp_get_thread_num(); p[i] = omp_alloc(1024 * 1024, a); Index: openmp/runtime/test/api/omp_alloc_null_fb.c =================================================================== --- openmp/runtime/test/api/omp_alloc_null_fb.c +++ openmp/runtime/test/api/omp_alloc_null_fb.c @@ -12,8 +12,8 @@ at[1].key = omp_atk_fallback; at[1].value = omp_atv_null_fb; a = omp_init_allocator(omp_large_cap_mem_space, 2, at); - printf("allocator large created: %p\n", a); - #pragma omp parallel num_threads(2) + printf("allocator large created: %p\n", (void *)a); +#pragma omp parallel num_threads(2) { int i = omp_get_thread_num(); #pragma omp barrier Index: openmp/runtime/test/api/omp_display_env0.c =================================================================== --- openmp/runtime/test/api/omp_display_env0.c +++ openmp/runtime/test/api/omp_display_env0.c @@ -1,5 +1,5 @@ // RUN: %libomp-compile-and-run 2>&1 | FileCheck %s -// RUN: %libomp-cxx-compile-and-run 2>&1 | FileCheck %s +// RUN: %libomp-cxx-compile-c && %libomp-run 2>&1 | FileCheck %s #include #include int main() Index: openmp/runtime/test/env/omp_target_offload.c =================================================================== --- openmp/runtime/test/env/omp_target_offload.c +++ openmp/runtime/test/env/omp_target_offload.c @@ -9,6 +9,7 @@ }; extern int __kmpc_get_target_offload(); +extern void kmp_set_defaults(char const *str); const char *disabled_examples[] = { // Allowed inputs Index: openmp/runtime/test/lit.cfg =================================================================== --- openmp/runtime/test/lit.cfg +++ openmp/runtime/test/lit.cfg @@ -116,6 +116,8 @@ "%libomp-compile && %libomp-run")) config.substitutions.append(("%libomp-cxx-compile-and-run", \ "%libomp-cxx-compile && %libomp-run")) +config.substitutions.append(("%libomp-cxx-compile-c", \ + "%clangXX %openmp_flags %flags -std=c++14 -x c++ %s -o %t" + libs)) config.substitutions.append(("%libomp-cxx-compile", \ "%clangXX %openmp_flags %flags -std=c++14 %s -o %t" + libs)) config.substitutions.append(("%libomp-compile", \ Index: openmp/runtime/test/misc_bugs/omp_foreign_thread_team_reuse.c =================================================================== --- openmp/runtime/test/misc_bugs/omp_foreign_thread_team_reuse.c +++ openmp/runtime/test/misc_bugs/omp_foreign_thread_team_reuse.c @@ -37,6 +37,7 @@ a++; } } + return NULL; } int test_omp_team_reuse() Index: openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c =================================================================== --- openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c +++ openmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c @@ -128,7 +128,7 @@ // Guided scheduling uses FP computations, so current chunk may // be a bit bigger (+1) than allowed maximum if (!(cur <= max + 1)) { - printf("Error with iter %d, %d\n", cur, max); + printf("Error with iter %llu, %llu\n", cur, max); err++; } // Update maximum for the next chunk @@ -280,7 +280,7 @@ // Guided scheduling uses FP computations, so current chunk may // be a bit bigger (+1) than allowed maximum if (!(cur <= max + 1)) { - printf("Error with iter %d, %d\n", cur, max); + printf("Error with iter %llu, %llu\n", cur, max); err++; } // Update maximum for the next chunk Index: openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_api.c =================================================================== --- openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_api.c +++ openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_api.c @@ -132,7 +132,7 @@ // Guided scheduling uses FP computations, so current chunk may // be a bit bigger (+1) than allowed maximum. if (!( cur <= max + 1)) - printf("Error with iter %d, %d, err %d\n", cur, max, ++err); + printf("Error with iter %llu, %llu, err %d\n", cur, max, ++err); // Update maximum for the next chunk. if (last) { if (!no_chunk && cur > ch && nthreads > 1) Index: openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_guided.c =================================================================== --- openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_guided.c +++ openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_guided.c @@ -140,7 +140,7 @@ // Guided scheduling uses FP computations, so current chunk may // be a bit bigger (+1) than allowed maximum. if (!( cur <= max + 1)) - printf("Error with iter %d, %d, err %d\n", cur, max, ++err); + printf("Error with iter %llu, %llu, err %d\n", cur, max, ++err); // Update maximum for the next chunk. if (!last && cur % ch) printf("Error with chunk %d, %d, ch %d, tid %d, err %d\n", Index: openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_static.c =================================================================== --- openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_static.c +++ openmp/runtime/test/worksharing/for/kmp_sch_simd_runtime_static.c @@ -5,6 +5,7 @@ // in combination with OMP_SCHEDULE=static[,chunk] #include #include +#include #include #if defined(WIN32) || defined(_WIN32) @@ -133,7 +134,7 @@ // Guided scheduling uses FP computations, so current chunk may // be a bit bigger (+1) than allowed maximum. if (!( cur <= max + 1)) - printf("Error with iter %d, %d, err %d\n", cur, max, ++err); + printf("Error with iter %llu, %llu, err %d\n", cur, max, ++err); // Update maximum for the next chunk. if (last) { if (!no_chunk && cur > ch && nthreads > 1)