Re: José's pending bind(C) patches / status (was: Re: [Patch, fortran V3] PR fortran/100683 - Array initialization refuses valid)

Tobias Burnus tobias@codesourcery.com
Fri Oct 22 13:06:45 GMT 2021


Hi José, hi Fortraners,

triage of all listed patches:

> On 21.06.21 17:21, José Rui Faustino de Sousa wrote:
>> https://gcc.gnu.org/pipermail/fortran/2021-April/055924.html

PR100040 - Wrong code with intent out assumed-rank allocatable
PR100029 - ICE on subroutine call with allocatable polymorphic
→ Both: Still occurs, ICE in gfc_deallocate_scalar_with_status

TODO: Review patch.

>> https://gcc.gnu.org/pipermail/fortran/2021-April/055933.html

PR100097 - Unlimited polymorphic pointers and allocatables have incorrect rank
PR100098 - Polymorphic pointers and allocatables have incorrect rank
→ Both: PASS

TODO: Check whether it makes sense to apply the testcase
TODO: Close PRs
→ See also patch below (2021-June/056169.html)

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056168.html

PR96870 - Class name on error message
→ Fixed with sufficient test coverage; thus, I closed the PR.

Nothing to be done.

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056167.html

PR96724 - Bogus warnings with the repeat intrinsic and the flag -Wconversion-extra|  repeat ('x', NCOPIES=i08) ! i08 is 20_1 shows: Warning: Conversion
from INTEGER(1) to INTEGER(8) at (1) [-Wconversion-extra] TODO: Review
patch. |

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056163.html

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 array descriptors
Bug 97046 - Bad interaction between lbound/ubound, allocatable arrays and bind(C) subroutine with dimension(..) parameter
→ All already closed as FIXED

TODO: Nothing, unless we want to pick one of the testcases.

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056162.html

PR94104 - Request for diagnostic improvement
    10 |   print *, sumf(a)
       |                1
Error: Actual argument for ‘a’ must be a pointer at (1)
NOTE: as the dummy is intent(in), since F2008 alternatively a TARGET attr would be also okay.

TODO: Review patch - in principle, I am fine with the but I am not sure the
'valid target' in the error message is clear enough. Might require some message tweaking
for clarity.

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056155.html

Gerald's PR100948 - [12 Regression] ICE in gfc_conv_expr_val, at fortran/trans-expr.c:9069
Still has an ICE.

TODO: Review patch.

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html

Bug 100906 - Bind(c): failure handling character with len/=1
→ Testcase now passes.
Bug 100907 - Bind(c): failure handling wide character
→ I think now okay – but the testcase assumes elem_len/sizeof(char) == #chars
   but for the C descriptor, elem_len / sizeof(char-type) = #chars
   Thus, sz is not 1 or 7 bytes but 4 or 28 bytes (or 1/7 characters)
Bug 100911 - Bind(c): failure handling C_PTR
→ Closed as FIXED.
Bug 100914 - Bind(c): errors handling complex
→ Closed as FIXED
Bug 100915 - Bind(c): failure handling C_FUNPTR
→ Closed as FIXED
Bug 100916 - Bind(c): CFI_type_other unimplemented
→ Bogus testcase (for 't(ype)' argument) otherwise it expects
   CFI_type_other instead of CFI_type_struct (TODO: Is that sensible?)

TODO: Check whether a testcase is needed
TODO: Close the three still open PRs

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056152.html

Bug 101047 - Pointer explicit initialization fails
Bug 101048 - Class pointer explicit initialization refuses valid
   ..., pointer, save :: ptr => tgt
fails to associate ptr with tgt
(wrong-code + rejects valid)

TODO: Review patch.

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056159.html

PR92621 - Problems with memory handling with allocatable intent(out) arrays with bind(c)

I think mostly fixed by my big bind(C) patch, but there still one ICE
with '-fcheck=all -fsanitize=undefined'

TODO: Fix that bug  (unlikely to be fixed by José's patch)
TODO: Check whether testcase should be added
and then close the PR

>> https://gcc.gnu.org/pipermail/fortran/2021-April/055982.html

PR100245 - ICE on automatic reallocation.
Still ICEs

TODO: Review patch.

>> https://gcc.gnu.org/pipermail/fortran/2021-April/055949.html

PR100136 - ICE, regression, using flag -fcheck=pointer

First testcase has an ICE with -fcheck=pointer
Second testcase has always an ICE + possibly missing func.

TODO: Review patch – and probably: follow-up patch for remaining issue

>> https://gcc.gnu.org/pipermail/fortran/2021-April/055946.html

PR100132 - Optimization breaks pointer association.
'fn spec' is wrong :-(

TODO: Review patch!

>> https://gcc.gnu.org/pipermail/fortran/2021-April/055934.html

PR100103 - Automatic reallocation fails inside select rank
Still segfaults at runtime for 'that = a' where the RHS is a parameter
and the LHS an allocatable assumed-rank array (inside select rank).

TODO: Review patch

>> https://gcc.gnu.org/pipermail/fortran/2021-June/056169.html

PR100097 - Unlimited polymorphic pointers and allocatables have incorrect rank
PR100098 - Polymorphic pointers and allocatables have incorrect rank
→ Both: PASS

TODO: Check whether it makes sense to apply the testcase
TODO: Close PRs
→ See also patch above (2021-April/055933.html)

>> https://gcc.gnu.org/pipermail/fortran/2021-April/055921.html

PR100024 & PR100025 - ICE on missing polymorphic argument.
ICE in argument_rank_mismatch

TODO: Review patch.

>> I am not 100% sure this is all of them but it should be most.

If PRs link them, we find them eventually. Otherwise, we won't :-(

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955


More information about the Gcc-patches mailing list