https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102817
--- Comment #3 from anlauf at gcc dot gnu.org --- Strange. We happen to call gfc_free_shape with inconsistent data: (gdb) p rank $84 = 2 (gdb) p shape[1] $85 = (mpz_t *) 0x0 Not good. Interestingly the following works: integer :: z(1,2) = (x(1)%a)