Attached there is a reduced test case that gives an
f951: internal compiler error: Segmentation fault
The full message on MSYS2/MINGW64 is:
$ gfortran -c f951_internal_error.f90
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.
Really, I get similar message on:
The failure occurs both with GCC 9.1 (MSYS2, MSYS2/MINGW32, MSYS2/MINGW64, GNU/Linux) and with GCC 7.4 (GNU/Linux). Don't have 7.4 on the other systems. The same occurs on WSL. I guess it is a general issue for GCC.
In the reduced test case (and in the original programs), just renaming the 'delta' variable or the 'delta' function fixes the failure.