Build DLL with:
lf95 test.f90 -dll

Check exported name declaration with:
dumpbin /exports test.dll

Copy dll in folder containing GoldSim model file (update after each rebuild of DLL!)

Look at Lahey Fortran External.gsm. You will need GoldSim v8.01 (SP4) or higher.