[patch, fortran] Fix PR 86111, ICE on invalid

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

[patch, fortran] Fix PR 86111, ICE on invalid

Thomas Koenig-6
Hello world,

the attached patch fixes an ICE regression by issuing an error
when a clever combination of array constructors ends up
in gfc_arith_concat with mismatched types, before resultion
has a chance to report the error.

Regression-tested. OK for trunk?

Regards

        Thomas

2018-10-06  Thomas Koenig  <[hidden email]>

        PR fortran/86111
        * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
        * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
        (gfc_arith_concat):  If the types of op1 and op2 are not
        character of if their kinds do not match, issue ARITH_WRONGCONCAT.

2018-10-06  Thomas Koenig  <[hidden email]>

        PR fortran/86111
        * gfortran.dg/array_constructor_type_23.f90: New test.

p1.diff (1K) Download Attachment
array_constructor_type_23.f90 (224 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch, fortran] Fix PR 86111, ICE on invalid

jerry DeLisle-3
On 10/6/18 10:53 AM, Thomas Koenig wrote:
> Hello world,
>
> the attached patch fixes an ICE regression by issuing an error
> when a clever combination of array constructors ends up
> in gfc_arith_concat with mismatched types, before resultion
> has a chance to report the error.
>
> Regression-tested. OK for trunk?
>

Looks OK.

Jerry