I am happy to report that for the first time since quite some time I was able to get a proper running R with your patch using -current 8.99.1 amd64, -current pkgsrc and gcc7.1. The only manual operation I had to do during the compilation was to add ' -lfortran' to the link command of R itself; after that everything went smoothly. The tests also pass (modulo one math error in the complex number test - an _expression_ is returning NaN whilst the test expects a number). All the R demos work fine as well.
Chavdar Ivanov