public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30276] New: gfortran include problem
@ 2006-12-22 10:32 aog at terma dot com
2006-12-22 12:56 ` [Bug fortran/30276] " burnus at gcc dot gnu dot org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: aog at terma dot com @ 2006-12-22 10:32 UTC (permalink / raw)
To: gcc-bugs
This bug has similarities with bug no 20811. For some reason the gfortran
compilier cannot locate a file when its absolute path is included. See below:
My operating system:
$ uname -a
Linux lylt0061.terma.com 2.6.18-1.2868.fc6 #1 SMP Fri Dec 15 17:31:29 EST 2006
i686 i686 i386 GNU/Linux
The source file:
$ more test.f
program main
include '/home/allan/slot2usl/physcons.inc'
stop
end
The include file:
$ ls -l /home/allan/slot2usl/physcons.inc
-rw-r--r-- 1 allan users 158 Dec 19 12:05 /home/allan/slot2usl/physcons.inc
The call to the compiler and error message:
$ gfortran -v -c test.f
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20061011 (Red Hat 4.1.1-30)
/usr/libexec/gcc/i386-redhat-linux/4.1.1/f951 test.f -ffixed-form -quiet
-dumpbase test.f -mtune=generic -auxbase test -version -I
/usr/lib/gcc/i386-redhat-linux/4.1.1/finclude -o /tmp/cc6e5iPa.s
GNU F95 version 4.1.1 20061011 (Red Hat 4.1.1-30) (i386-redhat-linux)
compiled by GNU C version 4.1.1 20061011 (Red Hat 4.1.1-30).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129304
Error: Can't open included file '/home/allan/slot2usl/physcons.inc'
Hope someone can help. Regards Allan
--
Summary: gfortran include problem
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aog at terma dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
@ 2006-12-22 12:56 ` burnus at gcc dot gnu dot org
2006-12-23 14:49 ` steven at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-12-22 12:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2006-12-22 12:56 -------
Confirmed. I think the following patch should work. I'll take the bug next year
(if I don't forget). Otherwise, if someone wants to take it, feel free to do
so.
The problem is that only
for include_path in include_paths
try-to-open( include_path + filename )
is checked, never the filename itself.
Index: gcc/fortran/scanner.c
===================================================================
--- gcc/fortran/scanner.c (Revision 120144)
+++ gcc/fortran/scanner.c (Arbeitskopie)
@@ -199,6 +199,11 @@
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)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.1.1 4.2.0 4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2006-12-22 12:56:06
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
2006-12-22 12:56 ` [Bug fortran/30276] " burnus at gcc dot gnu dot org
@ 2006-12-23 14:49 ` steven at gcc dot gnu dot org
2006-12-25 17:55 ` burnus at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-12-23 14:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2006-12-23 14:48 -------
I think the proper fix is to add "." to the search list of directories where
include files may live.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
2006-12-22 12:56 ` [Bug fortran/30276] " burnus at gcc dot gnu dot org
2006-12-23 14:49 ` steven at gcc dot gnu dot org
@ 2006-12-25 17:55 ` burnus at gcc dot gnu dot org
2006-12-26 12:16 ` tkoenig at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-12-25 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2006-12-25 17:55 -------
> I think the proper fix is to add "." to the search list of directories where
> include files may live.
I don't see how this will help; adding "." for
'/home/allan/slot2usl/physcons.inc', searches at
./home/allan/slot2usl/physcons.inc, which only finds the file if the current
working directory is "/". Adding "/" would work, but I don't think this is the
right approach.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (2 preceding siblings ...)
2006-12-25 17:55 ` burnus at gcc dot gnu dot org
@ 2006-12-26 12:16 ` tkoenig at gcc dot gnu dot org
2007-01-02 12:51 ` burnus at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-12-26 12:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tkoenig at gcc dot gnu dot org 2006-12-26 12:15 -------
(In reply to comment #1)
>
> Index: gcc/fortran/scanner.c
> ===================================================================
> --- gcc/fortran/scanner.c (Revision 120144)
> +++ gcc/fortran/scanner.c (Arbeitskopie)
> @@ -199,6 +199,11 @@
> 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)
Looks obvious. Pre-approved for a regression-tested
version. As for a test case, I don't see an easy way
of generating one.
Thomas
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (3 preceding siblings ...)
2006-12-26 12:16 ` tkoenig at gcc dot gnu dot org
@ 2007-01-02 12:51 ` burnus at gcc dot gnu dot org
2007-01-02 15:40 ` patchapp at dberlin dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-02 12:51 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |burnus at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-12-22 12:56:06 |2007-01-02 12:51:44
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (4 preceding siblings ...)
2007-01-02 12:51 ` burnus at gcc dot gnu dot org
@ 2007-01-02 15:40 ` patchapp at dberlin dot org
2007-01-02 15:54 ` burnus at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: patchapp at dberlin dot org @ 2007-01-02 15:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from patchapp at dberlin dot org 2007-01-02 15:40 -------
Subject: Bug number PR30276
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00057.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (5 preceding siblings ...)
2007-01-02 15:40 ` patchapp at dberlin dot org
@ 2007-01-02 15:54 ` burnus at gcc dot gnu dot org
2007-01-02 15:55 ` [Bug fortran/30276] [4.2 only] " burnus at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-02 15:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2007-01-02 15:54 -------
Subject: Bug 30276
Author: burnus
Date: Tue Jan 2 15:54:20 2007
New Revision: 120344
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120344
Log:
2007-01-02 Tobias Burnus <burnus@net-b.de>
PR fortran/30276
* scanner.c (open_included_file): Support full-path filenames.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/scanner.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] [4.2 only] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (6 preceding siblings ...)
2007-01-02 15:54 ` burnus at gcc dot gnu dot org
@ 2007-01-02 15:55 ` burnus at gcc dot gnu dot org
2007-01-04 8:57 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-02 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from burnus at gcc dot gnu dot org 2007-01-02 15:55 -------
Fixed in 4.3; I will commit the patch for 4.2 in about a week; I will not fix
4.1.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|gfortran include problem |[4.2 only] gfortran include
| |problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] [4.2 only] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (7 preceding siblings ...)
2007-01-02 15:55 ` [Bug fortran/30276] [4.2 only] " burnus at gcc dot gnu dot org
@ 2007-01-04 8:57 ` burnus at gcc dot gnu dot org
2007-01-14 11:45 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-04 8:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from burnus at gcc dot gnu dot org 2007-01-04 08:57 -------
Subject: Bug 30276
Author: burnus
Date: Thu Jan 4 08:57:36 2007
New Revision: 120431
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120431
Log:
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.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/scanner.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] [4.2 only] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (8 preceding siblings ...)
2007-01-04 8:57 ` burnus at gcc dot gnu dot org
@ 2007-01-14 11:45 ` pault at gcc dot gnu dot org
2007-01-30 18:13 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-01-14 11:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pault at gcc dot gnu dot org 2007-01-14 11:45 -------
(In reply to comment #7)
> Fixed in 4.3; I will commit the patch for 4.2 in about a week; I will not fix
> 4.1.
>
Tobias,
Are you in a position to do that now? The week is up and all is well:)
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] [4.2 only] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (9 preceding siblings ...)
2007-01-14 11:45 ` pault at gcc dot gnu dot org
@ 2007-01-30 18:13 ` burnus at gcc dot gnu dot org
2007-01-30 18:15 ` [Bug fortran/30276] " burnus at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-30 18:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from burnus at gcc dot gnu dot org 2007-01-30 18:13 -------
Subject: Bug 30276
Author: burnus
Date: Tue Jan 30 18:13:14 2007
New Revision: 121350
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121350
Log:
2007-01-30 Tobias Burnus <burnus@net-b.de>
Jakub Jelinek <jakub@redhat.com>
PR fortran/30276
* scanner.c (gfc_open_included_file): Support absolute pathnames.
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/scanner.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (10 preceding siblings ...)
2007-01-30 18:13 ` burnus at gcc dot gnu dot org
@ 2007-01-30 18:15 ` burnus at gcc dot gnu dot org
2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-30 18:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from burnus at gcc dot gnu dot org 2007-01-30 18:14 -------
Paul Thomas wrote on 2007-01-14:
> > Fixed in 4.3; I will commit the patch for 4.2 in about a week; I will not fix
> > 4.1.
> Are you in a position to do that now? The week is up and all is well:)
Finally fixed after a rather long week ;-)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Summary|[4.2 only] gfortran include |gfortran include problem
|problem |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (11 preceding siblings ...)
2007-01-30 18:15 ` [Bug fortran/30276] " burnus at gcc dot gnu dot org
@ 2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-24 1:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2007-05-24 02:17 -------
*** Bug 32059 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Catherine dot M dot Moroney
| |at jpl dot nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/30276] gfortran include problem
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
` (12 preceding siblings ...)
2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
@ 2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-24 1:17 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.1.1 4.2.0 4.3.0 |4.1.1
Known to work| |4.2.0 4.3.0
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30276
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-05-24 1:17 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22 10:32 [Bug fortran/30276] New: gfortran include problem aog at terma dot com
2006-12-22 12:56 ` [Bug fortran/30276] " burnus at gcc dot gnu dot org
2006-12-23 14:49 ` steven at gcc dot gnu dot org
2006-12-25 17:55 ` burnus at gcc dot gnu dot org
2006-12-26 12:16 ` tkoenig at gcc dot gnu dot org
2007-01-02 12:51 ` burnus at gcc dot gnu dot org
2007-01-02 15:40 ` patchapp at dberlin dot org
2007-01-02 15:54 ` burnus at gcc dot gnu dot org
2007-01-02 15:55 ` [Bug fortran/30276] [4.2 only] " burnus at gcc dot gnu dot org
2007-01-04 8:57 ` burnus at gcc dot gnu dot org
2007-01-14 11:45 ` pault at gcc dot gnu dot org
2007-01-30 18:13 ` burnus at gcc dot gnu dot org
2007-01-30 18:15 ` [Bug fortran/30276] " burnus at gcc dot gnu dot org
2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
2007-05-24 1:17 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).