[Patch, fortran] PR91077 - [8/9/10 Regression] Wrong indexing when using a pointer

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

[Patch, fortran] PR91077 - [8/9/10 Regression] Wrong indexing when using a pointer

Paul Richard Thomas
This problem was caused by the code for scalarized array references to
subref arrays and deferred length variables not obtaining the correct
array descriptor and so getting the array span wrong. As it happens,
the lines, following the deleted part, correctly identify when the
info descriptor is a pointer and provide the span as appropriate.

Bootstrapped and regtested on FC29/x86_64 - OK for trunk and 9-branch?
8-branch might be somewhat more difficult to fix but I will give it a
try. This will require a separate submission.

Paul

2019-07-06  Paul Thomas  <[hidden email]>

    PR fortran/91077
    * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
    that gave symbol backend decl for subref arrays and deferred
    length variables.

2019-07-06  Paul Thomas  <[hidden email]>

    PR fortran/91077
    * gfortran.dg/pointer_array_11.f90 : New test.

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

Re: [Patch, fortran] PR91077 - [8/9/10 Regression] Wrong indexing when using a pointer

Paul Richard Thomas
As anticipated, 8-branch required a different patch but the difference
was much smaller than anticipated.

Bootstrapped and regetested on FC29/x86_64 - OK for 8-branch?

Paul

2019-07-06  Paul Thomas  <[hidden email]>

    PR fortran/91077
    * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
    that gave symbol backend decl for subref arrays.

2019-07-06  Paul Thomas  <[hidden email]>

    PR fortran/91077
    * gfortran.dg/pointer_array_11.f90 : New test.

On Sat, 6 Jul 2019 at 11:48, Paul Richard Thomas
<[hidden email]> wrote:

>
> This problem was caused by the code for scalarized array references to
> subref arrays and deferred length variables not obtaining the correct
> array descriptor and so getting the array span wrong. As it happens,
> the lines, following the deleted part, correctly identify when the
> info descriptor is a pointer and provide the span as appropriate.
>
> Bootstrapped and regtested on FC29/x86_64 - OK for trunk and 9-branch?
> 8-branch might be somewhat more difficult to fix but I will give it a
> try. This will require a separate submission.
>
> Paul
>
> 2019-07-06  Paul Thomas  <[hidden email]>
>
>     PR fortran/91077
>     * trans-array.c (gfc_conv_scalarized_array_ref) Delete code
>     that gave symbol backend decl for subref arrays and deferred
>     length variables.
>
> 2019-07-06  Paul Thomas  <[hidden email]>
>
>     PR fortran/91077
>     * gfortran.dg/pointer_array_11.f90 : New test.


--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

submit8.diff (5K) Download Attachment