https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67171
--- Comment #1 from vehre at gcc dot gnu.org --- First working thesis on this: offset of d is errorneously propagate to tmp. A suitable workaround is to wrap the last allocate in an associate: associate (t => tmp(1:50,:)) allocate( d( 50, 2 ), source = t , stat=errstat ) end associate