This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gfortran,patch] F2003 USE syntax and OpenMP module
- From: FX Coudert <fxcoudert at gmail dot com>
- To: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, gcc-patches patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Diego Novillo <dnovillo at redhat dot com>
- Date: Mon, 30 Oct 2006 07:56:26 +0100
- Subject: [gfortran,patch] F2003 USE syntax and OpenMP module
:ADDPATCH fortran:
Attached patch allow gfortran to use the Fortran 2003 syntax for the
USE statement, i.e. with specification of the module nature
(INTRINSIC, NON_INTRINSIC or unspecified). I changed the way the pre-
compiled intrinsic modules are found so that they do not get confused
with non-intrinsic modules (the only such pre-compiled intrinsic
module right now is the OpenMP module, omp_lib; I plan to add the
IEEE modules as pre-compiled modules after that patch is commited).
With this patch, instead of adding "-I $finclude" to the f951 command
arguments, I propose that we add "-fintrinsic-modules-path
$finclude", where -fintrinsic-modules-path is a new option that adds
the given path to the list of include directories, but explicitly
notes that it will not be used during non-intrinsic modules search.
It also adds the path to a new list of directories where intrinsic
pre-compiled modules are expected to be found.
It allows things like the following to work:
module omp_lib
integer x
end
subroutine foo
use omp_lib
implicit none
print *, x
end
subroutine foo2
use, intrinsic :: omp_lib
implicit none
print *, omp_integer_kind
end
I'll soon provide some more testcases about all possible F2003-syntax
possibilities. Bootstrapped and regtested on i686-linux. OK for
mainline?
FX
Attachment:
include_path.ChangeLog
Description: Binary data
Attachment:
include_path.diff
Description: Binary data