[PATCH] PR fortran/102715 - [12 Regression] ICE in gfc_simplify_transpose, at fortran/simplify.c:8184

Mikael Morin morin-mikael@orange.fr
Sat Nov 6 10:17:31 GMT 2021

Le 31/10/2021 à 22:35, Harald Anlauf via Fortran a écrit :
> Dear Fortranners,
> the fix for initialization of DT arrays caused an apparent regression for
> cases where inconsistent ranks were used in such an initialization.
> This caused either an ICE in subsequent uses of these arrays, or showed
> up in valgrind as invalid reads, all of which seemed to be related to this
> rank mismatch.
> The cleanest solution seems to be to strictly reject rank mismatch earlier
> than we used to, which helps error recovery.  I had to adjust one testcase
> accordingly.
> The place I inserted the check does not distinguish between explicit shape
> and implied shape.  The Intel compiler does give a slightly different
> error message for the implied shape case.  If anyone feels strongly about
> this, I'm open to suggestions for better choices of handling this.
> Regtested on x86_64-pc-linux-gnu.  OK for mainline / affected branches?

OK, thanks.


More information about the Gcc-patches mailing list