[Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-14 Thread José Rui Faustino de Sousa via Fortran
Hi all! Update to a proposed patch to: Bug 93308 - bind(c) subroutine changes lower bound of array argument in caller Bug 93963 - Select rank mishandling allocatable and pointer arguments with bind(c) Bug 94327 - Bind(c) argument attributes are incorrectly set Bug 94331 - Bind(C) corrupts arr

[Patch, fortran] PR fortran/94104 - Request for diagnostic improvement

2021-06-14 Thread José Rui Faustino de Sousa via Fortran
Hi all! Proposed patch to: Bug 94104 - Request for diagnostic improvement Patch tested only on x86_64-pc-linux-gnu. Error message improvement. In Fortran 2008 actual arguments to procedures having a pointer, with intent attribute in, formal argument can also have the target attribute not jus

Re: [Patch ]Fortran/OpenMP: Extend defaultmap clause for OpenMP 5 [PR92568]

2021-06-14 Thread Jakub Jelinek via Fortran
On Wed, Jun 09, 2021 at 02:18:43PM +0200, Tobias Burnus wrote: > This patch add's OpenMP 5.1's defaultmap extensions to Fortran. > > There is one odd thing, > integer :: ii, it > target :: it > both count as nonallocatable, nonpointer scalars (i.e. category 'scalar'). > But with implicit mapp

[Patch, fortran V2] PR fortran/100683 - Array initialization refuses valid

2021-06-14 Thread José Rui Faustino de Sousa via Fortran
Hi all! Update to a proposed patch to: PR100683 - Array initialization refuses valid due to errors found by Dominique d'Humieres. Patch tested only on x86_64-pc-linux-gnu. Add call to simplify expression before parsing *and* check if the expression is still an array after simplification. T

PING: [Patch, fortran v2] PR fortran/92621 Problems with memory handling with allocatable intent(out) arrays with bind(c)

2021-06-14 Thread José Rui Faustino de Sousa via Fortran
*PING* Forwarded Message Subject: [Patch, fortran v2] PR fortran/92621 Problems with memory handling with allocatable intent(out) arrays with bind(c) Date: Mon, 26 Apr 2021 11:21:25 + From: José Rui Faustino de Sousa To: fortran@gcc.gnu.org, gcc-patc...@gcc.gnu.org Hi a

[committed] Fortran: resolve.c - remove '*XCNEW' based nullifying

2021-06-14 Thread Tobias Burnus
Found this odd code. It starts fine with: gfc_ref *ref = gfc_get_ref (); this uses XCNEW to return nullified memory. We then operate on ref->u.ar where 'ar' is a struct which is in a 'u'nion which is in gfc_ref. Hence, 'ref->u.ar' is not a pointer. Hence, the following is a wasteful way to m

Re: [Patch] C/C++: Fix unused set var warning with omp_clause_affinity [PR100913]

2021-06-14 Thread Jakub Jelinek via Fortran
On Mon, Jun 14, 2021 at 02:34:53PM +0200, Tobias Burnus wrote: > Rather obvious fix for a warning found by David via cppcheck. > > OK? > > Tobias > > - > Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München > Registergericht München HRB 106955, Geschäftsführer: T

[Patch] C/C++: Fix unused set var warning with omp_clause_affinity [PR100913]

2021-06-14 Thread Tobias Burnus
Rather obvious fix for a warning found by David via cppcheck. OK? Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf C/C++: Fix unused set var warning with omp_clause_