Building a Fortran compiler in pure Fortran (Mega thread)

The runtime library is here: lfortran/src/runtime at main · lfortran/lfortran · GitHub, for now anyone is welcome to contribute there. We can make it a separate project but we would still need to ensure it remains usable with LFortran, so that we can use it. The exact interface what is implemented directly in the compiler and what is a library function might change, so you will have to work with us. See also How to contribute to LFortran's runtime library, where we determined that the sqrt function should probably be moved from the library into the compiler.