[PATCH] Fortran: ordering of hidden procedure arguments [PR107441]

2022-10-28 Thread Harald Anlauf via Gcc-patches
7 00:00:00 2001 From: Harald Anlauf Date: Fri, 28 Oct 2022 21:58:08 +0200 Subject: [PATCH] Fortran: ordering of hidden procedure arguments [PR107441] gcc/fortran/ChangeLog: PR fortran/107441 * trans-decl.cc (create_function_arglist): Adjust the ordering of automatically generated hidden

Re: [PATCH] Fortran: ordering of hidden procedure arguments [PR107441]

2022-10-30 Thread Mikael Morin
Le 28/10/2022 à 22:12, Harald Anlauf via Fortran a écrit : Dear all, the passing of procedure arguments in Fortran sometimes requires ancillary parameters that are "hidden". Examples are string length and the presence status of scalar variables with optional+value attribute. The gfortran ABI i

Re: [PATCH] Fortran: ordering of hidden procedure arguments [PR107441]

2022-10-30 Thread Mikael Morin
Le 30/10/2022 à 20:23, Mikael Morin a écrit : I think some discrepancy remains, as gfc_conv_procedure_call accumulates coarray stuff into the stringargs, while your change accumulates the associated parameter decls separately into hidden_arglist.  It's not completely clear to me whether it is

Re: [PATCH] Fortran: ordering of hidden procedure arguments [PR107441]

2022-10-30 Thread Mikael Morin
Le 30/10/2022 à 20:23, Mikael Morin a écrit : Another probable issue is your change to create_function_arglist changes arglist/hidden_arglist without also changing typelist/hidden_typelist accordingly.  I think a change to gfc_get_function_type is also necessary: as the function decl is changed

Re: [PATCH] Fortran: ordering of hidden procedure arguments [PR107441]

2022-10-31 Thread Mikael Morin
Le 30/10/2022 à 22:25, Mikael Morin a écrit : Le 30/10/2022 à 20:23, Mikael Morin a écrit : Another probable issue is your change to create_function_arglist changes arglist/hidden_arglist without also changing typelist/hidden_typelist accordingly.  I think a change to gfc_get_function_type is