Bug 25020 - NAG extension: module F90_UNIX providing access to UNIX functions (abort ...)
Summary: NAG extension: module F90_UNIX providing access to UNIX functions (abort ...)
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-24 15:54 UTC by Harald Anlauf
Modified: 2012-02-07 10:11 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-01-14 11:02:28


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Anlauf 2005-11-24 15:54:05 UTC
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
Comment 1 Andrew Pinski 2005-11-26 03:26:23 UTC
Confirmed.
Comment 2 Harald Anlauf 2005-12-20 08:29:03 UTC
(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
Comment 3 Francois-Xavier Coudert 2006-10-30 12:18:39 UTC
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.
Comment 4 Francois-Xavier Coudert 2007-02-16 16:05:16 UTC
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.
Comment 5 Janne Blomqvist 2012-02-07 10:11:56 UTC
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