[Patch, fortran] PR93581 - [9/10 Regression] ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6951

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

[Patch, fortran] PR93581 - [9/10 Regression] ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6951

Paul Richard Thomas
This is a straightforward patch, especially for the bug in the PR! The
additional fix ensures that expr%LEN always returns a scalar. Please
note the comment in resolve.c about bounds checking.

Regtests on trunk - OK for 9- and 10-branches?

Paul

2020-03-01  Paul Thomas  <[hidden email]>

    PR fortran/93581
    * resolve.c (gfc_resolve_ref): Modify array refs to be elements
    if the ref chain ends in INQUIRY_LEN.
    * trans-array.c (gfc_get_dataptr_offset): Provide the offsets
    for INQUIRY_RE and INQUIRY_IM.

2020-03-01  Paul Thomas  <[hidden email]>

    PR fortran/93581
    * gfortran.dg/inquiry_type_ref_6.f90 : New test.

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

Re: [Patch, fortran] PR93581 - [9/10 Regression] ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6951

Paul Richard Thomas
***ping***

On Sun, 1 Mar 2020 at 16:00, Paul Richard Thomas
<[hidden email]> wrote:

>
> This is a straightforward patch, especially for the bug in the PR! The
> additional fix ensures that expr%LEN always returns a scalar. Please
> note the comment in resolve.c about bounds checking.
>
> Regtests on trunk - OK for 9- and 10-branches?
>
> Paul
>
> 2020-03-01  Paul Thomas  <[hidden email]>
>
>     PR fortran/93581
>     * resolve.c (gfc_resolve_ref): Modify array refs to be elements
>     if the ref chain ends in INQUIRY_LEN.
>     * trans-array.c (gfc_get_dataptr_offset): Provide the offsets
>     for INQUIRY_RE and INQUIRY_IM.
>
> 2020-03-01  Paul Thomas  <[hidden email]>
>
>     PR fortran/93581
>     * gfortran.dg/inquiry_type_ref_6.f90 : New test.



--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein
Reply | Threaded
Open this post in threaded view
|

Re: [Patch, fortran] PR93581 - [9/10 Regression] ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6951

gcc - fortran mailing list
Hi Paul,

> ***ping***

OK. Thanks for the patch!

Regards

        Thomas