https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80388
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 CC| |kargl at gcc dot gnu.org Known to work| |6.3.1, 7.0 Known to fail| |5.4.0 --- Comment #3 from kargl at gcc dot gnu.org --- The code compiles and gives the correct answer with GNU Fortran (GCC) 6.3.1 20170207 GNU Fortran (GCC) 7.0.1 20170407 I doubt that the patch will be back-ported to 5-branch as there are too few gfortran developers. Can you update to a newer compiler.