diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-04 08:57:36 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-04 08:57:36 +0000 |
commit | 3a8a854bfeac14dc45519c60c77d585fbfecfd15 (patch) | |
tree | 65fe308921b97b7a847fd2a476e681503d561a01 /gcc/fortran | |
parent | 3e9045dd017e57db781b199aba6f2ad9f0313e7b (diff) | |
download | gcc-3a8a854bfeac14dc45519c60c77d585fbfecfd15.tar.gz |
2007-01-02 Tobias Burnus <burnus@net-b.de>
Jakub Jelinek <jakub@redhat.com>
PR fortran/30276
* scanner.c (open_included_file): Revert patch.
(gfc_open_included_file): Support absolute pathnames.
(gfc_open_intrinsic_module): Support absolute pathnames.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120431 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/fortran/scanner.c | 11 |
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4a2936a434f..3d66cbce6e4 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2007-01-02 Tobias Burnus <burnus@net-b.de> + Jakub Jelinek <jakub@redhat.com> + + PR fortran/30276 + * scanner.c (open_included_file): Revert patch. + (gfc_open_included_file): Support absolute pathnames. + (gfc_open_intrinsic_module): Support absolute pathnames. + 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com> * gfortran.texi (GNU Fortran and GCC): Rewrite diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 5d519a0ba9b..cf05306794d 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -199,11 +199,6 @@ open_included_file (const char *name, gfc_directorylist *list, bool module) gfc_directorylist *p; FILE *f; - f = gfc_open_file (name); - - if (f != NULL) - return f; - for (p = list; p; p = p->next) { if (module && !p->use_for_modules) @@ -231,6 +226,9 @@ gfc_open_included_file (const char *name, bool include_cwd, bool module) { FILE *f; + if (IS_ABSOLUTE_PATH (name)) + return gfc_open_file (name); + if (include_cwd) { f = gfc_open_file (name); @@ -244,6 +242,9 @@ gfc_open_included_file (const char *name, bool include_cwd, bool module) FILE * gfc_open_intrinsic_module (const char *name) { + if (IS_ABSOLUTE_PATH (name)) + return gfc_open_file (name); + return open_included_file (name, intrinsic_modules_dirs, true); } |