[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 Tobias Burnus changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED CC||burnus at gcc dot gnu.org --- Comment #9 from Tobias Burnus --- Close as FIXED (in GCC 12) by the big patch. I tried the full testcases of the submitted patch (PR93308.f90 PR93963.f90 PR94327.c PR94327.f90 PR94331.c PR94331.f90 PR97046.f90) and also Thanks José for report and testcases - and again sorry for no prompt review of your patches. (It helps to ping them regularly.)
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 --- Comment #8 from CVS Commits --- The master branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:0cbf03689e3e7d9d6002b8e5d159ef3716d0404c commit r12-2511-g0cbf03689e3e7d9d6002b8e5d159ef3716d0404c Author: Tobias Burnus Date: Mon Jul 26 14:20:46 2021 +0200 PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling Fortran: Fix attributes and bounds in ISO_Fortran_binding. 2021-07-26 José Rui Faustino de Sousa Tobias Burnus PR fortran/93308 PR fortran/93963 PR fortran/94327 PR fortran/94331 PR fortran/97046 gcc/fortran/ChangeLog: * trans-decl.c (convert_CFI_desc): Only copy out the descriptor if necessary. * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute handling which reflect a previous intermediate version of the standard. Only copy out the descriptor if necessary. libgfortran/ChangeLog: * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Add code to verify the descriptor. Correct bounds calculation. (gfc_desc_to_cfi_desc): Add code to verify the descriptor. gcc/testsuite/ChangeLog: * gfortran.dg/ISO_Fortran_binding_1.f90: Add pointer attribute, this test is still erroneous but now it compiles. * gfortran.dg/bind_c_array_params_2.f90: Update regex to match code changes. * gfortran.dg/PR93308.f90: New test. * gfortran.dg/PR93963.f90: New test. * gfortran.dg/PR94327.c: New test. * gfortran.dg/PR94327.f90: New test. * gfortran.dg/PR94331.c: New test. * gfortran.dg/PR94331.f90: New test. * gfortran.dg/PR97046.f90: New test.
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 --- Comment #7 from José Rui Faustino de Sousa --- Created attachment 51015 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51015&action=edit Updated patch.
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 --- Comment #6 from José Rui Faustino de Sousa --- Updated patch: https://gcc.gnu.org/pipermail/fortran/2021-June/056163.html
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 Dominique d'Humieres changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #5 from Dominique d'Humieres --- > Patch posted: > > https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html The patch fixes this PR, see also pr94331.
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 --- Comment #4 from José Rui Faustino de Sousa --- Patch posted: https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org --- Comment #3 from kargl at gcc dot gnu.org --- (In reply to sandra from comment #2) > Fiddling with the test case a bit, I observe that the RANK() intrinsic > returns the correct result even in the functions where SELECT RANK fails. > Seems odd that SELECT RANK uses different logic. Why? The code for SELECT RANK was added in 2019 and code for RANK() was added sometime around 2011. It seems the individuals, who committed each feature, are different people. At least, one of the two took a very long hiatus from working on gfortran, and the other seems not to be omniscient.
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 sandra at gcc dot gnu.org changed: What|Removed |Added CC||sandra at gcc dot gnu.org --- Comment #2 from sandra at gcc dot gnu.org --- Fiddling with the test case a bit, I observe that the RANK() intrinsic returns the correct result even in the functions where SELECT RANK fails. Seems odd that SELECT RANK uses different logic.
[Bug fortran/93963] Select rank mishandling allocatable and pointer arguments with bind(c)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93963 Dominique d'Humieres changed: What|Removed |Added Last reconfirmed||2020-07-23 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Priority|P3 |P4 --- Comment #1 from Dominique d'Humieres --- > Select rank mishandles allocatable and pointer arguments when using bind(c) > with: AFACT only when the arrays are not allocated.