Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-28 Thread Harald Anlauf via Gcc-patches
Hi Tobias, let me first reach for my brown bag... > Otherwise, the quote from F2018 of my previous email applies: > > F2018:16.9.109 LBOUND has for "case(i)", i.e. with a 'dim' > argument the following. The case without 'dim' just iterates > through case (i) for each dim. Thus: > > "If DIM is pre

Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-28 Thread Thomas Schwinge
Hi! On 2021-09-27T14:07:53+0200, Tobias Burnus wrote: > now committed r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 > Conclusion: Reviews are very helpful :-) Ha! :-) (... and I wasn't even involed here!) ;-P As testing showed here: > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/a

Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-27 Thread Tobias Burnus
Hi Harald, hi all, On 27.09.21 21:34, Harald Anlauf via Gcc-patches wrote: [...] here is what I played with: program p implicit none integer, pointer :: x(:,:) allocate (x(-3:3,4:0)) print *, "lbound =", lbound (x) call sub (x) contains subroutine sub (y) integer, pointer

Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-27 Thread Harald Anlauf via Gcc-patches
Hi Thomas, Am 27.09.21 um 14:07 schrieb Tobias Burnus: While playing I stumbled over the fact that when allocating an array with a dimension that has extent 0, e.g. 4:-5, the lbound gets reset to 1 and ubound set to 0. I am not sure, whether I fully understand what you wrote. For:   integer,

Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-27 Thread Tobias Burnus
Hi Thomas, hi Harald, hi all, now committed r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 with the following changes: * Removed now unused gfor_fndecl_size0/gfor_fndecl_size1 (trans{-decl.c,.h}) * Add a scan-dump-not check for those. See below for some comments. On 24.09.21 22:38, Thomas K

Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-24 Thread Thomas Koenig via Gcc-patches
Hi Tobias, OK for mainline? As promised on IRC, here's the review. Maybe you can add a test case which shows that the call to the size intrinsic really does not happen. OK with that. Thanks for the patch! Best regards Thomas