Hi! On 2022-11-02T21:10:54+0100, I wrote: > On 2022-11-02T21:04:56+0100, I wrote: >> On 2017-04-05T08:23:58-0700, Cesar Philippidis wrote: >>> This patch implements the OpenACC 2.5 behavior of fortran allocate on >>> variables marked with declare create as defined in Section 2.13.2 in the >>> OpenACC spec. >> >> That functionality is still missing in GCC master branch, however a test >> case included in that submission here: >> >>> --- /dev/null >>> +++ b/libgomp/testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90 >>> @@ -0,0 +1,211 @@ >>> +! Test declare create with allocatable arrays. >> >> ... is useful in a different (though related) context that I'm currently >> working on. Having applied the following changes: >> >> - Replace 'call abort' by 'error stop' (in spirit of earlier PR84381 >> changes). >> - Replace '[logical] .neqv. .true.' by '.not.[logical]'. >> - Add scanning for OpenACC compiler diagnostics. >> - 'dg-xfail-run-if' for '-DACC_MEM_SHARED=0' (see above). >> >> ..., I've then pushed to master branch >> commit 8c357d884b16cb3c14cba8a61be5b53fd04a6bfe >> "Add 'libgomp.oacc-fortran/declare-allocatable-1.f90'", see attached. > >> --- /dev/null >> +++ b/libgomp/testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90 >> @@ -0,0 +1,268 @@ >> +! Test OpenACC 'declare create' with allocatable arrays. >> + >> +! { dg-do run } >> + >> +!TODO-OpenACC-declare-allocate >> +! Not currently implementing correct '-DACC_MEM_SHARED=0' behavior: >> +! Missing support for OpenACC "Changes from Version 2.0 to 2.5": >> +! "The 'declare create' directive with a Fortran 'allocatable' has new behavior". >> +! { dg-xfail-run-if TODO { *-*-* } { -DACC_MEM_SHARED=0 } } >> + >> +[...] > > Getting rid of the "'dg-xfail-run-if' for '-DACC_MEM_SHARED=0'" via a > work around (as seen in real-world code), I've pushed to master branch > commit 59c6c5dbf267cd9d0a8df72b2a5eb5657b64268e > "Add 'libgomp.oacc-fortran/declare-allocatable-1-runtime.f90'" > ... which is 'libgomp.oacc-fortran/declare-allocatable-1.f90' adjusted > for missing support for OpenACC "Changes from Version 2.0 to 2.5": > "The 'declare create' directive with a Fortran 'allocatable' has new behavior". > Thus, after 'allocate'/before 'deallocate', call 'acc_create'/'acc_delete' > manually. A similar test case, but with different focus, I've pushed to master branch in commit abeaf3735fe2568b9d5b8096318da866b1fe1e5c "Add 'libgomp.oacc-fortran/declare-allocatable-array_descriptor-1-runtime.f90'", see attached. Grüße Thomas ----------------- 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