OG13 (devel/omp/gcc-13) has a patch which uses sometimes the tree's array representation. The patch unfortunately did not make it to mainline so far.
The here attached/committed patch adapts the expected dump for the OG13 variant to unfail this testcase. With this commit, gfortran/gomp/ has no fails. (Contrary to gfortran/oacc/ which has plenty.) Committed as 49ad5a86615 Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
commit 49ad5a86615089d236ae8ee9a2b7d17db1f0c1d7 Author: Tobias Burnus <tob...@codesourcery.com> Date: Wed Jul 19 13:33:29 2023 +0200 gfortran.dg/gomp/affinity-clause-1.f90: Fix scan-tree-dump gcc/testsuite/ * gfortran.dg/gomp/affinity-clause-1.f90: Fix scan-tree-dump. --- gcc/testsuite/ChangeLog.omp | 4 ++++ gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp index 4d986631574..435ad855dd9 100644 --- a/gcc/testsuite/ChangeLog.omp +++ b/gcc/testsuite/ChangeLog.omp @@ -1,3 +1,7 @@ +2023-07-19 Tobias Burnus <tob...@codesourcery.com> + + * gfortran.dg/gomp/affinity-clause-1.f90: Fix scan-tree-dump. + 2023-07-19 Tobias Burnus <tob...@codesourcery.com> Backported from master: diff --git a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90 b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90 index 93e9afa72d6..568ae441fcf 100644 --- a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90 @@ -22,9 +22,9 @@ end ! { dg-final { scan-tree-dump-times "D\\.\[0-9\]+ = .integer.kind=4.. __builtin_cosf ..real.kind=4.. a \\+ 1.0e\\+0\\);" 2 "original" } } -! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):b\\\[\\(integer\\(kind=8\\)\\) i \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):\\(\\(integer\\(kind=4\\)\\\[1:5\\\]\\\[1:5\\\]\\) d\\)\\\[\\(integer\\(kind=8\\)\\) jj\\\]{lb: 1 sz: 20}\\\[\\(integer\\(kind=8\\)\\) i\\\]{lb: 1 sz: 4}\\)" 1 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):b\\\[.* <?i>? \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):\\(\\(integer\\(kind=4\\)\\\[1:5\\\]\\\[1:5\\\]\\) d\\)\\\[\[^\\\]\]*jj\\\]{lb: 1 sz: 20}\\\[\[^\\\]\]*i\\\]{lb: 1 sz: 4}\\)" 1 "original" } } -! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):b\\\[.* <?i>? \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):d\\\[\\(.*i \\+ -1\\) \\* 6\\\]\\)" 1 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):b\\\[.* <?i>? \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):\\(\\(integer\\(kind=4\\)\\\[1:5\\\]\\\[1:5\\\]\\) d\\)\\\[\[^\\\]\]*i\\\]\\{lb: 1 sz: 20\\}\\\[\[^\\\]\]*i\\\]\\{lb: 1 sz: 4\\}\\)" 1 "original" } } ! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=1:5:1\\):a\\)\[^ \]" 1 "original" } } ! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=1:5:1\\):a\\) affinity\\(iterator\\(integer\\(kind=4\\) i=1:5:1\\):\\*x\\)" 1 "original" } }