Hi, it would be nice if gfortran implemented a facility like NAG's F90_UNIX module. The program implicit none call abort () end compiles and links with gfc -std=gnu but not with -std=f95 With the NAG compiler one can write USE f90_unix, ONLY: abort implicit none call abort () end have access to the intrinsics and be happy. See http://www.nag.co.uk/nagware/np/r50_doc/nag_modules.html http://www.nag.co.uk/nagware/np/r50_doc/f90_unix.html for details. Cheers, -ha
Confirmed.
(In reply to comment #0) I have written a portable version of the module F90_UNIX, which runs under several platforms but need to be configured manually. It is available from: http://home.arcor.de/harald.anlauf/f90_unix.tar.gz Tested with different compilers on different platforms. Works best with compilers that support the Fortran 2003 IMPORT statement (PR 24549) and the BIND(C) construct for interoperability with C, but these features are not required. Cheers, -ha
Once my patch for pre-compiled intrinsic modules is reviewed (which should be soon) and when ISO_C_BINDING is integrated (which might take a little longer), it will be almost trivial to integrate your module in gfortran.
Harald, if you were to assign copyright of your code (or modified code) to the FSF by filing a copyright assignment, we could integrate that into gfortran. [I don't think you have a copyright assignment, do you?] So, if you want to integrate it, please ask on the list how to get sent the form (it comes by snail mail, so it takes some time to receive and send back). Otherwise, please close this PR.
Closing as wontfix. - The PR hasn't seen any activity in almost 5 years - GFortran nowadays has ISO_C_BINDING support, making it easy to create robust interfaces to C functionality without having to integrate it into the compiler. - The GFortran developers have their hands full implementing support for the Fortran standard. - Contributing to GCC is a bit cumbersome, with all kinds of paperwork required etc. Thus I suggest that functionality such as proposed here is better of developed as a separate library, e.g. on github or whatnot. The gtk-fortran project offers an excellent example of such a project: https://github.com/jerryd/gtk-fortran/wiki