[PATCH, FORTRAN] ICE in gfc_conv_array_constructor_expr PR93497

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

[PATCH, FORTRAN] ICE in gfc_conv_array_constructor_expr PR93497

Mark Eggleston
Please find attached for PR93497. This patch was posted as a comment to
the PR, I've checked it added a test case. It has the side affect of
changing the errors for three other test cases which have modified
accordingly.

The commit message is as follows:

fortran : ICE in gfc_conv_array_constructor_expr PR93497

Invalid expressions, such as those involving array constructors,
used for the length of character types will cause an ICE.

2020-05-12  Steven G. Kargl  <[hidden email]>

gcc/fortran/

     PR fortran/93497
     * decl.c (char_len_param_value) : Check whether character
     length expression is of type EXPR_OP and if so simplify it.
     * resolve.c (resolve_charlen) : Reject length if it has a
     rank.

2020-05-12  Mark Eggleston <[hidden email]>

gcc/testsuite/

     PR fortran/93497
     * gfortran.dg/pr88025.f90: Change in wording of error.
     * gfortran.dg/pr93497.f90: New test.
     * gfortran.dg/pr93714_1.f90: Change in wording of errors.
     * gfortran.dg/pr93714_2.f90: Change in wording of errors.

Note: the dates will be updated as necessary when the patch is committed.

Tested using make check-fortran on x86_64 for branches master,
releases/gcc-8, releases/gcc-9 and releases/gcc-10.

OK to commit to master and to backport to releases/gcc-8, releases/gcc-9
and releases/gcc-10?

--
https://www.codethink.co.uk/privacy.html


0001-PR93497.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH, FORTRAN] ICE in gfc_conv_array_constructor_expr PR93497

Tobias Burnus-3
On 5/12/20 5:08 PM, Mark Eggleston wrote:

> fortran : ICE in gfc_conv_array_constructor_expr PR93497

"F" in "Fortran". Extra space before ":".

> PR fortran/93497
>     * decl.c (char_len_param_value) : Check whether character

Likewise. (Do you like French typography? There, one uses a space before
(and after) the colon.)

> OK to commit to master and to backport to releases/gcc-8,
> releases/gcc-9 and releases/gcc-10?

Otherwise: LGTM. However, as it is just an ICE-on-invalid code, I'd
prefer if you do not backport it to GCC 8, which will soon see its last
release and then the branch will be closed.

Cheers,

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter