https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87448
--- Comment #2 from martin <mscfd at gmx dot net> --- Originally I came across this problem in a large module with a slightly more complex function with gfortran-7.3.0 (standard version from ubuntu 18.4). I got the same bogus error, which Janus has seen for this reduced testcase with gfortran-5.5. Taking out the function and related class I got the ICE, but was not able to reproduce this error. In short: I think that the bogus error is still present in recent gfortran versions (or is just another symptom of this problem).