Hi! There is a typo in one of the OpenMP gimplification diagnostics messages. The following patch fixes that and adjusts tests which just copied that message including typo to dg-warning regexps in 2 tests.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2025-02-24 Jakub Jelinek <ja...@redhat.com> PR middle-end/118993 * gimplify.cc (gimplify_scan_omp_clauses): Fix diagnostics typo, undfined -> undefined. * c-c++-common/gomp/allocate-18.c: Adjust dg-warning regex for diagnostics typo fix. * gfortran.dg/gomp/allocate-clause.f90: Likewise. --- gcc/gimplify.cc.jj 2025-01-30 22:09:17.523382838 +0100 +++ gcc/gimplify.cc 2025-02-23 23:59:56.021122542 +0100 @@ -14007,7 +14007,7 @@ gimplify_scan_omp_clauses (tree *list_p, && (code == OMP_TARGET || code == OMP_TASK || code == OMP_TASKLOOP)) warning_at (OMP_CLAUSE_LOCATION (c), OPT_Wopenmp, "allocator with access trait set to %<thread%> " - "results in undfined behavior for %qs directive", + "results in undefined behavior for %qs directive", code == OMP_TARGET ? "target" : (code == OMP_TASK ? "task" : "taskloop")); --- gcc/testsuite/c-c++-common/gomp/allocate-18.c.jj 2024-12-04 00:45:08.606203630 +0100 +++ gcc/testsuite/c-c++-common/gomp/allocate-18.c 2025-02-24 00:00:08.043956210 +0100 @@ -36,16 +36,16 @@ test1 () x[0] = 1; #pragma omp target allocate(omp_thread_mem_alloc: x) firstprivate(x) /* uses_allocators(omp_thread_mem_alloc) */ - /* { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'target' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ + /* { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'target' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ x[0] = 1; #pragma omp taskloop allocate(omp_thread_mem_alloc: x) firstprivate(x) - /* { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ + /* { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ for (int i = 0; i < 5; i++) x[i] = i; #pragma omp parallel master taskloop simd allocate(omp_thread_mem_alloc: x) firstprivate(x) - /* { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ + /* { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ for (int i = 0; i < 5; i++) x[i] = i; @@ -53,7 +53,7 @@ test1 () #pragma omp masked { #pragma omp task allocate(omp_thread_mem_alloc: x) firstprivate(x) - /* { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'task' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ + /* { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'task' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } */ x[0] = 1; } } --- gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90.jj 2024-10-07 10:49:58.098362880 +0200 +++ gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90 2025-02-24 00:00:12.407895839 +0100 @@ -34,18 +34,18 @@ subroutine test1 () !$omp end parallel !$omp target allocate(omp_thread_mem_alloc: x) firstprivate(x) ! uses_allocators(omp_thread_mem_alloc) - ! { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'target' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } + ! { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'target' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } x(1) = 1 !$omp end target !$omp taskloop allocate(omp_thread_mem_alloc: x) firstprivate(x) - ! { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } + ! { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } do i = 1, 5 x(i) = i end do !$omp parallel master taskloop simd allocate(omp_thread_mem_alloc: x) firstprivate(x) - ! { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } + ! { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'taskloop' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } do i = 1, 5 x(i) = i end do @@ -53,7 +53,7 @@ subroutine test1 () !$omp parallel !$omp masked !$omp task allocate(omp_thread_mem_alloc: x) firstprivate(x) - ! { dg-warning "allocator with access trait set to 'thread' results in undfined behavior for 'task' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } + ! { dg-warning "allocator with access trait set to 'thread' results in undefined behavior for 'task' directive \\\[-Wopenmp\\\]" "" { target *-*-* } .-1 } x(1) = 1 !$omp end task !$omp end masked Jakub