Re: [RFH] ME optimizes variable assignment away / Fortran bind(C) descriptor conversion

2021-08-29 Thread Richard Biener via Gcc-patches
On Sun, Aug 29, 2021 at 10:07 AM Tobias Burnus wrote: > > Hi all, hi Richard, > > On 27.08.21 21:48, Richard Biener wrote: > >> It looks really nice with "-O1 -fno-inline" :-) > >>The callee 'rank_p()' is mostly optimized and in the > >>caller only those struct elements are set, which ar

Re: [RFH] ME optimizes variable assignment away / Fortran bind(C) descriptor conversion

2021-08-29 Thread Tobias Burnus
Hi all, hi Richard, On 27.08.21 21:48, Richard Biener wrote: It looks really nice with "-O1 -fno-inline" :-) The callee 'rank_p()' is mostly optimized and in the caller only those struct elements are set, which are used: integer(kind=4) rank_p (struct CFI_cdesc_t & _this) { _1 = _thi

Re: [RFH] ME optimizes variable assignment away / Fortran bind(C) descriptor conversion

2021-08-27 Thread Richard Biener via Gcc-patches
On August 27, 2021 5:47:58 PM GMT+02:00, Tobias Burnus wrote: >Hi all, > >Background: gfortran has its own array descriptor – and one which is defined in >F2018 and used/usable from C (#include ). >On mainline, the conversion is done via a void* pointer and calls to >libgfortran, >which causes a

Re: [RFH] ME optimizes variable assignment away / Fortran bind(C) descriptor conversion

2021-08-27 Thread Tobias Burnus
On 27.08.21 17:47, Tobias Burnus wrote at https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578271.html : PS: Current GCC (mainline w/o patch) generates the following. [-> with patch, see a-test.f90.*.original.] I accidentally attached the original dump created by mainline GCC. For the pa

[RFH] ME optimizes variable assignment away / Fortran bind(C) descriptor conversion

2021-08-27 Thread Tobias Burnus
Hi all, Background: gfortran has its own array descriptor – and one which is defined in F2018 and used/usable from C (#include ). On mainline, the conversion is done via a void* pointer and calls to libgfortran, which causes all kind of issues, including alias issues but also data type/bounds i