https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87045
--- Comment #2 from Harald Anlauf <anlauf at gmx dot de> --- With trunk it appears essential to have at least -fcheck=bounds as option, otherwise the testcase passes for me. The dump-tree for the critical code part (with -fcheck=bounds): p = t; p.span = (integer(kind=8)) SAVE_EXPR <D.3893>; if ((integer(kind=8)) (.p != .t)) { _gfortran_runtime_error_at (&"At line 8 of file pr87045.f90"[1]{lb: 1 sz: 1}, &"Unequal character lengths (%ld/%ld) in %s"[1]{lb: 1 sz: 1}, .p, .t, &"pointer assignment"[1]{lb: 1 sz: 1}); } .p = .t; Has the check been put into the wrong place?