[patch, fortran] PR92123 - [F2018/array-descriptor] Scalar allocatable/pointer with array descriptor (via bind(C)): ICE with select rank or error scalar variable with POINTER or ALLOCATABLE in procedure with BIND(C) is not yet supported

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch, fortran] PR92123 - [F2018/array-descriptor] Scalar allocatable/pointer with array descriptor (via bind(C)): ICE with select rank or error scalar variable with POINTER or ALLOCATABLE in procedure with BIND(C) is not yet supported

Paul Richard Thomas
The attached patch is verging on the obvious. Thanks to Tobias for
spotting Vipul's messages on the J3 list.

Regtests on FC30/x86_64 - OK for trunk and 9-branch?

Paul

2019-11-03  Paul Thomas  <[hidden email]>

    PR fortran/92123
    *decl.c (gfc_verify_c_interop_param): Remove error asserting
    that pointer or allocatable variables in a bind C procedure are
    not supported. Delete some trailing spaces.
    * trans-stmt.c (trans_associate_var): Correct the attempt to
    treat scalar pointer or allocatable temporaries as if they are
    array descriptors.

2019-11-03  Paul Thomas  <[hidden email]>

    PR fortran/92123
    * gfortran.dg/bind_c_procs_3.f90 : New test.
    * gfortran.dg/ISO_Fortran_binding_15.c : New test.
    * gfortran.dg/ISO_Fortran_binding_15.f90 : Additional source.

submit92123.diff (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch, fortran] PR92123 - [F2018/array-descriptor] Scalar allocatable/pointer with array descriptor (via bind(C)): ICE with select rank or error scalar variable with POINTER or ALLOCATABLE in procedure with BIND(C) is not yet supported

Steve Kargl

On Sun, Nov 03, 2019 at 06:36:59PM +0000, Paul Richard Thomas wrote:
> The attached patch is verging on the obvious. Thanks to Tobias for
> spotting Vipul's messages on the J3 list.
>
> Regtests on FC30/x86_64 - OK for trunk and 9-branch?
>

OK for both.

--
Steve
Reply | Threaded
Open this post in threaded view
|

Re: [patch, fortran] PR92123 - [F2018/array-descriptor] Scalar allocatable/pointer with array descriptor (via bind(C)): ICE with select rank or error scalar variable with POINTER or ALLOCATABLE in procedure with BIND(C) is not yet supported

Vipul Parekh
In reply to this post by Paul Richard Thomas
On Sun, Nov 3, 2019 at 1:37 PM Paul Richard Thomas
<[hidden email]> wrote:
>
> The attached patch is verging on the obvious. Thanks to Tobias for
> spotting Vipul's messages on the J3 list.
>
> Regtests on FC30/x86_64 - OK for trunk and 9-branch?
>
> Paul

Paul,

Thanks for your follow-up on this issue.  Would you be interested in
taking a look at the problem I run into with gfortran with CFI_address
function?  See this link at the new GitHub site for Fortran proposals:
https://github.com/j3-fortran/fortran_proposals/issues/57#issuecomment-552680503

Thanks and Best Regards,
Vipul Parekh