https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72770
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- .original has: case 85893463:; .__tmp_CHARACTER_0_1 = x->_len; __tmp_CHARACTER_0_1 = x->_data; __tmp_CHARACTER_0_1.dtype = ((integer(kind=8)) SAVE_EXPR <(sizetype) .__tmp_CHARACTER_0_1> << 6) + 49; { logical(kind=4) test.2; character(kind=1)[0:][1:.__tmp_CHARACTER_0_1] * D.3488; integer(kind=8) D.3489; integer(kind=8) D.3490; integer(kind=8) D.3491; integer(kind=8) D.3494; test.2 = 0; D.3488 = (character(kind=1)[0:][1:.__tmp_CHARACTER_0_1] *) __tmp_CHARACTER_0_1.data; D.3489 = __tmp_CHARACTER_0_1.offset; D.3490 = __tmp_CHARACTER_0_1.dim[0].lbound; ... and the type of D.3488 misses a DECL_EXPR (or manual handling in the Fortran FE like we do for some cases - simply copy x->_len to a decl and use that for the upper bound).