public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20811] New: gfortran include problem (regression from g77)
@ 2005-04-07 14:31 afranck at gmx dot de
  2005-04-07 16:45 ` [Bug fortran/20811] " pinskia at gcc dot gnu dot org
  2005-08-16 16:41 ` bsp at kithrup dot com
  0 siblings, 2 replies; 14+ messages in thread
From: afranck at gmx dot de @ 2005-04-07 14:31 UTC (permalink / raw)
  To: gcc-bugs

Hello,

doing some experiments with gfortran, I stumbled across the following
bug/regression with respect to g77:

consider these two files in a directory "test":

$ cat test/foo.f:
      subroutine foo
      include   'test.h'
      end

$ cat test/test.h
c  just a comment

Now, compiling with g77:

~ $ g77 -c test/foo.f
[works ok]

and with gfortran:

~ $ gfortran -c test/foo.f
Error: Can't open included file 'test.h'

If I compile within "test":

~/test $ gfortran -c foo.f
[works ok]

everything is fine.

But "include" is IMHO supposed to include from where the source file is located,
not only in the current directory?

Greetings,
Andreas

-- 
           Summary: gfortran include problem (regression from g77)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: afranck at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
  2005-04-07 14:31 [Bug fortran/20811] New: gfortran include problem (regression from g77) afranck at gmx dot de
@ 2005-04-07 16:45 ` pinskia at gcc dot gnu dot org
  2005-08-16 16:41 ` bsp at kithrup dot com
  1 sibling, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-07 16:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-07 16:45 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-07 16:45:11
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
  2005-04-07 14:31 [Bug fortran/20811] New: gfortran include problem (regression from g77) afranck at gmx dot de
  2005-04-07 16:45 ` [Bug fortran/20811] " pinskia at gcc dot gnu dot org
@ 2005-08-16 16:41 ` bsp at kithrup dot com
  1 sibling, 0 replies; 14+ messages in thread
From: bsp at kithrup dot com @ 2005-08-16 16:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bsp at kithrup dot com  2005-08-16 16:37 -------
FYI, ifort_8.0.046, Absoft Fortran 95 9.0 EP, pgf95 6.0-2, SGI f90 7.4, and g95
will all find and use the included file in the same directory as the source
without requiring extra '-I' command line options.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2005-11-18 12:40 ` fxcoudert at gcc dot gnu dot org
@ 2005-11-18 12:42 ` fxcoudert at gcc dot gnu dot org
  10 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-18 12:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from fxcoudert at gcc dot gnu dot org  2005-11-18 12:42 -------
This is now fixed on both 4.0 and mainline. Problems underlined in comment #10
fixed too.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2005-11-17 21:30 ` andreast at gcc dot gnu dot org
@ 2005-11-18 12:40 ` fxcoudert at gcc dot gnu dot org
  2005-11-18 12:42 ` fxcoudert at gcc dot gnu dot org
  10 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-18 12:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from fxcoudert at gcc dot gnu dot org  2005-11-18 12:40 -------
Subject: Bug 20811

Author: fxcoudert
Date: Fri Nov 18 12:40:42 2005
New Revision: 107177

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107177
Log:
        PR fortran/20811
        PR fortran/24892

        * io/io.h (unit_access): Add ACCESS_APPEND.
        * io/open.c (access_opt): Add APPEND value for ACCESS keyword.
        (st_open): Use that new value to set the POSITION accordingly.
        * configure.ac: Add "-I ." to AM_FCFLAGS.
        * configure: Regenerate.

        * scanner.c (gfc_open_included_file): Add an extra include_cwd
        argument. Only include files in the current working directory if
        its value is true.
        * gfortran.h: Change prototype for gfc_open_included_file.
        (load_file): Don't search for include files in the current working
        directory.
        * options.c (gfc_post_options): Add the directory of the source file
        to the list of paths for included files.
        * module.c (gfc_use_module): Look for module files in the current
        directory.

Modified:
    branches/gcc-4_0-branch/gcc/fortran/ChangeLog
    branches/gcc-4_0-branch/gcc/fortran/gfortran.h
    branches/gcc-4_0-branch/gcc/fortran/module.c
    branches/gcc-4_0-branch/gcc/fortran/options.c
    branches/gcc-4_0-branch/gcc/fortran/scanner.c
    branches/gcc-4_0-branch/libgfortran/ChangeLog
    branches/gcc-4_0-branch/libgfortran/configure
    branches/gcc-4_0-branch/libgfortran/configure.ac
    branches/gcc-4_0-branch/libgfortran/io/io.h
    branches/gcc-4_0-branch/libgfortran/io/open.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2005-11-17 20:51 ` andreast at gcc dot gnu dot org
@ 2005-11-17 21:30 ` andreast at gcc dot gnu dot org
  2005-11-18 12:40 ` fxcoudert at gcc dot gnu dot org
  2005-11-18 12:42 ` fxcoudert at gcc dot gnu dot org
  10 siblings, 0 replies; 14+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-11-17 21:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from andreast at gcc dot gnu dot org  2005-11-17 21:30 -------
Adding -I. to FC in the Makefile of libgfortran makes my compile happy again.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2005-11-17 12:51 ` fxcoudert at gcc dot gnu dot org
@ 2005-11-17 20:51 ` andreast at gcc dot gnu dot org
  2005-11-17 21:30 ` andreast at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-11-17 20:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from andreast at gcc dot gnu dot org  2005-11-17 20:51 -------
After this patch libgfortran fails to build on darwin-ppc.

it does not find the selected_int_kind.inc in the libgfortran objdir when
building libgfortran. (selected_int_kind.f90 compilation)

Reverting the patch brings me to a successful libgfortran build.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2005-11-16  9:09 ` fxcoudert at gcc dot gnu dot org
@ 2005-11-17 12:51 ` fxcoudert at gcc dot gnu dot org
  2005-11-17 20:51 ` andreast at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-17 12:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from fxcoudert at gcc dot gnu dot org  2005-11-17 12:51 -------
Subject: Bug 20811

Author: fxcoudert
Date: Thu Nov 17 12:51:41 2005
New Revision: 107120

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107120
Log:
        PR fortran/20811
        * scanner.c (gfc_open_included_file): Add an extra include_cwd
        argument. Only include files in the current working directory if
        its value is true.
        * gfortran.h: Change prototype for gfc_open_included_file.
        (load_file): Don't search for include files in the current working
        directory.
        * options.c (gfc_post_options): Add the directory of the source file
        to the list of paths for included files.
        * module.c (gfc_use_module): Look for module files in the current
        directory.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/scanner.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2005-11-15 12:31 ` fxcoudert at gcc dot gnu dot org
@ 2005-11-16  9:09 ` fxcoudert at gcc dot gnu dot org
  2005-11-17 12:51 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-16  9:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from fxcoudert at gcc dot gnu dot org  2005-11-16 09:09 -------
Patch submitted for review.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/fortra
                   |                            |n/2005-11/msg00424.html
  GCC build triplet|i686-pc-cygwin              |
   GCC host triplet|i686-pc-cygwin              |
 GCC target triplet|i686-pc-cygwin              |
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2005-11-04 17:30 ` mesmith dot 15507218 at bloglines dot com
@ 2005-11-15 12:31 ` fxcoudert at gcc dot gnu dot org
  2005-11-16  9:09 ` fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-15 12:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from fxcoudert at gcc dot gnu dot org  2005-11-15 12:31 -------
(In reply to comment #6)
> The two attached files will change the behavior so that included files are
> processed as described in comment #2. I have not checked the results
> extensively.

You should really attach patches and not the files themselves. Now, I don't
know exactly what you changed in those files. And I'm really wondering what you
could possible change in Makefile.in :)

I'm assigning this bug to myself, as I intend to look into it in the next few
days.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-07-07 13:31:38         |2005-11-15 12:31:50
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-11-04 17:24 ` mesmith dot 15507218 at bloglines dot com
@ 2005-11-04 17:30 ` mesmith dot 15507218 at bloglines dot com
  2005-11-15 12:31 ` fxcoudert at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: mesmith dot 15507218 at bloglines dot com @ 2005-11-04 17:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mesmith dot 15507218 at bloglines dot com  2005-11-04 17:30 -------
The two attached files will change the behavior so that included files are
processed as described in comment #2. I have not checked the results
extensively.


-- 

mesmith dot 15507218 at bloglines dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mesmith dot 15507218 at
                   |                            |bloglines dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
  2005-11-01 21:24 ` tobi at gcc dot gnu dot org
  2005-11-04 17:22 ` mesmith dot 15507218 at bloglines dot com
@ 2005-11-04 17:24 ` mesmith dot 15507218 at bloglines dot com
  2005-11-04 17:30 ` mesmith dot 15507218 at bloglines dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: mesmith dot 15507218 at bloglines dot com @ 2005-11-04 17:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mesmith dot 15507218 at bloglines dot com  2005-11-04 17:24 -------
Created an attachment (id=10146)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10146&action=view)
Source in gcc/libgfortran from FC4 gcc 4.0.1 with patches


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
  2005-11-01 21:24 ` tobi at gcc dot gnu dot org
@ 2005-11-04 17:22 ` mesmith dot 15507218 at bloglines dot com
  2005-11-04 17:24 ` mesmith dot 15507218 at bloglines dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: mesmith dot 15507218 at bloglines dot com @ 2005-11-04 17:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mesmith dot 15507218 at bloglines dot com  2005-11-04 17:22 -------
Created an attachment (id=10145)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10145&action=view)
Source in gcc/fortran from FC4 4.0.1 with patches


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/20811] gfortran include problem (regression from g77)
       [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
@ 2005-11-01 21:24 ` tobi at gcc dot gnu dot org
  2005-11-04 17:22 ` mesmith dot 15507218 at bloglines dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-11-01 21:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tobi at gcc dot gnu dot org  2005-11-01 21:24 -------
*** Bug 23460 has been marked as a duplicate of this bug. ***


-- 

tobi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |douglas dot vechinski at
                   |                            |dynetics dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20811


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-11-18 12:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-07 14:31 [Bug fortran/20811] New: gfortran include problem (regression from g77) afranck at gmx dot de
2005-04-07 16:45 ` [Bug fortran/20811] " pinskia at gcc dot gnu dot org
2005-08-16 16:41 ` bsp at kithrup dot com
     [not found] <bug-20811-1270@http.gcc.gnu.org/bugzilla/>
2005-11-01 21:24 ` tobi at gcc dot gnu dot org
2005-11-04 17:22 ` mesmith dot 15507218 at bloglines dot com
2005-11-04 17:24 ` mesmith dot 15507218 at bloglines dot com
2005-11-04 17:30 ` mesmith dot 15507218 at bloglines dot com
2005-11-15 12:31 ` fxcoudert at gcc dot gnu dot org
2005-11-16  9:09 ` fxcoudert at gcc dot gnu dot org
2005-11-17 12:51 ` fxcoudert at gcc dot gnu dot org
2005-11-17 20:51 ` andreast at gcc dot gnu dot org
2005-11-17 21:30 ` andreast at gcc dot gnu dot org
2005-11-18 12:40 ` fxcoudert at gcc dot gnu dot org
2005-11-18 12:42 ` fxcoudert 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).