Re: [PATCH 1/6] Fortran: Typo/unicode-o fixes

2022-12-23 Thread Julian Brown
On Wed, 1 Jun 2022 11:39:19 -0700 Julian Brown wrote: > This patch fixes a minor typo in dump output and a stray unicode > character in a comment. > > This one probably counts as obvious. FYI, I committed this one now. Julian

[PATCH v6 00/11] OpenMP: C/C++ lvalue parsing, C/C++/Fortran "declare mapper" support

2022-12-23 Thread Julian Brown
Following on from here: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608577.html this is a complete patch series, rebased against mainline. The final three patches are the revised C "lvalue"-parsing patches and C and Fortran "declare mapper" support patches mentioned in that email.

[PATCH v6 01/11] OpenMP/OpenACC: Reindent TO/FROM/_CACHE_ stanza in {c_}finish_omp_clause

2022-12-23 Thread Julian Brown
This patch trivially adds braces and reindents the OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza in c_finish_omp_clause and finish_omp_clause, in preparation for the following patch (to clarify the diff a little). 2022-09-13 Julian Brown gcc/c/ * c-typeck.cc (c_finish_omp_cla

[PATCH v6 04/11] OpenMP: implicitly map base pointer for array-section pointer components

2022-12-23 Thread Julian Brown
Following from discussion in: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570075.html and: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608100.html and also upstream OpenMP issue 342, this patch changes mapping for array sections of pointer components on compute regions li

[PATCH v6 05/11] OpenMP: Pointers and member mappings

2022-12-23 Thread Julian Brown
This patch changes the mapping node arrangement used for array components of derived types, e.g.: type T integer, pointer, dimension(:) :: arrptr end type T type(T) :: tvar [...] !$omp target map(tofrom: tvar%arrptr) This will currently be mapped using three mapping nodes: GOMP_MA

[PATCH v6 06/11] OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic

2022-12-23 Thread Julian Brown
This patch adds support for non-constant component offsets in "map" clauses for OpenMP (and the equivalants for OpenACC), which are not able to be sorted into order at compile time. Normally struct accesses in such clauses are gathered together and sorted into increasing address order after a "GOM

[PATCH v6 08/11] OpenMP: C++ "declare mapper" support

2022-12-23 Thread Julian Brown
This is a new version of the patch to support OpenMP 5.0 "declare mapper" functionality for C++. As with the previously-posted version, arrays of structs whose elements would be mapped via a user-defined mapper remain unsupported. This version of the patch uses a magic VAR_DECL instead of a magic

[PATCH v6 11/11] OpenMP: Fortran "!$omp declare mapper" support

2022-12-23 Thread Julian Brown
This patch implements "omp declare mapper" functionality for Fortran, following the equivalent support for C and C++. Fortran differs quite substantially from C and C++ in that "map" clauses are naturally represented in the gfortran front-end's own representation rather than as trees. Those are tu

[PATCH v6 03/11] OpenMP/OpenACC: Refine condition for when map clause expansion happens

2022-12-23 Thread Julian Brown
This patch fixes some cases for OpenACC and OpenMP where map clauses were being expanded (adding firstprivate_pointer, attach/detach nodes, and so forth) unnecessarily, after the "OpenMP/OpenACC: Rework clause expansion and nested struct handling" patch (approved but not yet committed): https://

[PATCH v6 10/11] OpenMP: Support OpenMP 5.0 "declare mapper" directives for C

2022-12-23 Thread Julian Brown
This patch adds support for "declare mapper" directives (and the "mapper" modifier on "map" clauses) for C. As for C++, arrays of custom-mapped objects are not supported yet. I've taken hints from the existing C support for "declare reduction" directives: this works a little differently from C++

[PATCH v6 09/11] OpenMP: lvalue parsing for map clauses (C)

2022-12-23 Thread Julian Brown
This patch adds support for parsing general lvalues for OpenMP "map", "to" and "from" clauses to the C front-end, similar to the previously-posted patch for C++. This version of the patch incorporates the patch to change uses of TREE_LIST to the new OMP_ARRAY_SECTION tree code to represent OpenMP

[patch, fortran] ICE on automatic array of derived type with DTIO

2022-12-23 Thread Jerry D via Fortran
I have committed the obvious as simple. The master branch has been updated by Jerry DeLisle : https://gcc.gnu.org/g:7e76cd96950f49ce21246d44780e972d86b2bcdd commit r13-4862-g7e76cd96950f49ce21246d44780e972d86b2bcdd Author: Steve Kargl Date: Thu Dec 22 20:38:57 2022 -0800 Remove not need

nvptx: '-mframe-malloc-threshold', '-Wframe-malloc-threshold' (was: Handling of large stack objects in GPU code generation -- maybe transform into heap allocation?)

2022-12-23 Thread Thomas Schwinge
Hi! On 2022-11-11T15:35:44+0100, Richard Biener via Fortran wrote: > On Fri, Nov 11, 2022 at 3:13 PM Thomas Schwinge > wrote: >> For example, for Fortran code like: >> >> write (*,*) "Hello world" >> >> ..., 'gfortran' creates: >> >> struct __st_parameter_dt dt_parm.0; >> >> try >>

*PING* [PATCH] Fortran: incorrect array bounds when bound intrinsic used in decl [PR108131]

2022-12-23 Thread Harald Anlauf via Fortran
Am 17.12.22 um 22:21 schrieb Harald Anlauf via Gcc-patches: Dear all, the previous fix for pr103505 introduced a regression that could lead to wrong array bounds when LBOUND/UBOUND were used in the array spec of a declaration. The reason was that we tried to simplify too early the array element

Re: [PATCH] Fortran: incorrect array bounds when bound intrinsic used in decl [PR108131]

2022-12-23 Thread Jerry D via Fortran
On 12/17/22 1:21 PM, Harald Anlauf via Fortran wrote: Dear all, the previous fix for pr103505 introduced a regression that could lead to wrong array bounds when LBOUND/UBOUND were used in the array spec of a declaration. The reason was that we tried to simplify too early the array element spec,

Re: nvptx: '-mframe-malloc-threshold', '-Wframe-malloc-threshold' (was: Handling of large stack objects in GPU code generation -- maybe transform into heap allocation?)

2022-12-23 Thread Jerry D via Fortran
On 12/23/22 6:08 AM, Thomas Schwinge wrote: Hi! On 2022-11-11T15:35:44+0100, Richard Biener via Fortran wrote: On Fri, Nov 11, 2022 at 3:13 PM Thomas Schwinge wrote: For example, for Fortran code like: write (*,*) "Hello world" ..., 'gfortran' creates: struct __st_parameter_dt

Re: Adding a new thread model to GCC

2022-12-23 Thread NightStrike via Fortran
On Fri, Dec 23, 2022 at 7:00 PM Jonathan Yong via Gcc-patches wrote: > > On 12/22/22 12:28, i.nix...@autistici.org wrote: > > On 2022-12-22 12:21, Jonathan Yong wrote: > > > > hello, > > > >> On 12/16/22 19:20, Eric Botcazou wrote: > The libgcc parts look reasonable to me, but I can't approve

Re: Adding a new thread model to GCC

2022-12-23 Thread i.nixman--- via Fortran
On 2022-12-24 05:58, NightStrike wrote: I think this might have broken fortran. I'm assuming because the backtrace includes gthr.h, and I just did a git pull: In file included from /tmp/rtmingw/mingw/include/windows.h:71, from ../libgcc/gthr-default.h:606, fro