aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-02-24 09:25:34 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2025-02-24 09:25:34 +0100
commit27ebd2a55cd373542977b21631b6b0919e703733 (patch)
tree984be68bb09f9dae65be80bd887df842fc795b09
parent0d590d21586edbb9c62ce3db92794d93faf7ed34 (diff)
downloadgcc-27ebd2a55cd373542977b21631b6b0919e703733.zip
gcc-27ebd2a55cd373542977b21631b6b0919e703733.tar.gz
gcc-27ebd2a55cd373542977b21631b6b0919e703733.tar.bz2
openmp: Fix diagnostics typo [PR118993]
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. 2025-02-24 Jakub Jelinek <jakub@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.
-rw-r--r--gcc/gimplify.cc2
-rw-r--r--gcc/testsuite/c-c++-common/gomp/allocate-18.c8
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/allocate-clause.f908
3 files changed, 9 insertions, 9 deletions
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index cc0172c..756cdea 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -14007,7 +14007,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_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"));
diff --git a/gcc/testsuite/c-c++-common/gomp/allocate-18.c b/gcc/testsuite/c-c++-common/gomp/allocate-18.c
index 93c5aca..49dc60f 100644
--- a/gcc/testsuite/c-c++-common/gomp/allocate-18.c
+++ b/gcc/testsuite/c-c++-common/gomp/allocate-18.c
@@ -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;
}
}
diff --git a/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90 b/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90
index 3548538..b60bca0 100644
--- a/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90
@@ -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