Hello world, the attached patch fixes PR 88871, a regression introduced by my recent patch for removing unnecessary substrings. Regression-tested; this now also works with valgrind on Linux, where the failure did not show up otherwise. No test case because, well - it did show up on a few systems, so we will notice if it regresses. OK for trunk? Regards Thomas 2019-01-17 Thomas Koenig PR fortran/88871 * resolve.c (resolve_ref): Fix logic for removal of reference.