* [PATCH] OpenMP: Fix g++.dg/gomp/bad-array-section-10.C for C++23 and up
@ 2024-01-10 13:14 Julian Brown
0 siblings, 0 replies; only message in thread
From: Julian Brown @ 2024-01-10 13:14 UTC (permalink / raw)
To: gcc-patches; +Cc: jakub
This patch adjusts diagnostic output for C++23 and above for the test
case mentioned in the commit title.
I will apply shortly as obvious.
2024-01-10 Julian Brown <julian@codesourcery.com>
gcc/testsuite/
* g++.dg/gomp/bad-array-section-10.C: Adjust diagnostics for C++23 and
up.
---
gcc/testsuite/g++.dg/gomp/bad-array-section-10.C | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gcc/testsuite/g++.dg/gomp/bad-array-section-10.C b/gcc/testsuite/g++.dg/gomp/bad-array-section-10.C
index 393b0fefe51..286e72e9f64 100644
--- a/gcc/testsuite/g++.dg/gomp/bad-array-section-10.C
+++ b/gcc/testsuite/g++.dg/gomp/bad-array-section-10.C
@@ -6,12 +6,15 @@ void foo()
int arr1[40];
#pragma omp target map(arr1[4,C:])
// { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } .-1 }
+// { dg-error "cannot use multidimensional subscript in OpenMP array section" "" { target c++23 } .-2 }
{ }
#pragma omp target map(arr1[4,5:C,7])
// { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } .-1 }
+// { dg-error "cannot use multidimensional subscript in OpenMP array section" "" { target c++23 } .-2 }
{ }
#pragma omp target map(arr1[:8,C,10])
// { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } .-1 }
+// { dg-error "cannot use multidimensional subscript in OpenMP array section" "" { target c++23 } .-2 }
{ }
}
@@ -20,12 +23,15 @@ int main()
int arr1[40];
#pragma omp target map(arr1[4,5:])
// { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } .-1 }
+// { dg-error "cannot use multidimensional subscript in OpenMP array section" "" { target c++23 } .-2 }
{ }
#pragma omp target map(arr1[4,5:6,7])
// { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } .-1 }
+// { dg-error "cannot use multidimensional subscript in OpenMP array section" "" { target c++23 } .-2 }
{ }
#pragma omp target map(arr1[:8,9,10])
// { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } .-1 }
+// { dg-error "cannot use multidimensional subscript in OpenMP array section" "" { target c++23 } .-2 }
{ }
foo<6, 9> ();
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-10 13:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10 13:14 [PATCH] OpenMP: Fix g++.dg/gomp/bad-array-section-10.C for C++23 and up Julian Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).