*PING* [PATCH] PR fortran/69419 - ICE: tree check: expected array_type, have real_type in gfc_conv_array_initializer, at fortran/trans-array.c:5618
Harald Anlauf
anlauf@gmx.de
Wed Nov 3 20:00:41 GMT 2021
*PING*
Am 27.10.21 um 21:09 schrieb Harald Anlauf via Fortran:
> Dear Fortranners,
>
> when debugging the testcase, I noticed that a coarray declaration in
> a COMMON statement wrongly set the dimension attribute instead of the
> codimension. As a consequence, subsequent checks that catch this
> invalid situation would not trigger.
>
> I see two possible solutions:
>
> - in gfc_match_common, replace
>
> /* Deal with an optional array specification after the
> symbol name. */
> m = gfc_match_array_spec (&as, true, true);
>
> by
>
> m = gfc_match_array_spec (&as, true, false);
>
> which in turn would lead to a syntax error. Interestingly, the Intel
> compiler also takes this route and gives a syntax error.
>
> - check the resulting as->corank and emit an error as in the attached
> patch.
>
> The attached patch regtests fine on x86_64-pc-linux-gnu. OK for mainline?
>
> Thanks,
> Harald
>
More information about the Gcc-patches
mailing list