https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70673
--- Comment #4 from David Kinniburgh <davidgkinniburgh at yahoo dot co.uk> --- It seems the problem usually arises when there is reassignment in one line, eg character(:), allocatable: s, t s = s(2:) ! or even s = s whereas forcing the temporary t = s(2:) s = t seems to work. But it is not quite that simple as the above doesn't always fail. It requires other things to be happening too.