public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h>
@ 2008-10-14 1:48 chris dot walter at duke dot edu
2008-10-14 1:51 ` [Bug fortran/37821] " chris dot walter at duke dot edu
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: chris dot walter at duke dot edu @ 2008-10-14 1:48 UTC (permalink / raw)
To: gcc-bugs
If I have a
-Idirectory in my compile path then
#include "file.h" works
but
#include <file.h> does not.
The compiler complains the file does not exist.
I use the binaries from http://quatramaran.ens.fr/~coudert/gfortran/
and this broke between the snapshot in May and August. It seems to correspond
to the switch to internal cpp.
--
Summary: gfortran is ignoring #includes with the syntax <file.h>
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chris dot walter at duke dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
@ 2008-10-14 1:51 ` chris dot walter at duke dot edu
2008-10-14 6:28 ` kargl at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: chris dot walter at duke dot edu @ 2008-10-14 1:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from chris dot walter at duke dot edu 2008-10-14 01:50 -------
I forgot to include version info:
Using built-in specs.
Target: i386-apple-darwin8.10.1
Configured with: /tmp/gfortran-20081006/ibin/../gcc/configure
--prefix=/usr/local/gfortran --enable-languages=c,fortran
--with-gmp=/tmp/gfortran-20081006/gfortran_libs --enable-bootstrap
Thread model: posix
gcc version 4.4.0 20081006 (experimental) [trunk revision 140904] (GCC)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
2008-10-14 1:51 ` [Bug fortran/37821] " chris dot walter at duke dot edu
@ 2008-10-14 6:28 ` kargl at gcc dot gnu dot org
2008-10-14 12:12 ` [Bug fortran/37821] [4.4 Regression] " burnus at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-10-14 6:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kargl at gcc dot gnu dot org 2008-10-14 06:26 -------
Is there a problem with using the standard conforming
INCLUDE statement?
You forgot to include a small test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
2008-10-14 1:51 ` [Bug fortran/37821] " chris dot walter at duke dot edu
2008-10-14 6:28 ` kargl at gcc dot gnu dot org
@ 2008-10-14 12:12 ` burnus at gcc dot gnu dot org
2008-10-14 12:24 ` dfranke at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-10-14 12:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2008-10-14 12:11 -------
Confirm. gcc (the C compiler) has using -I test_directory:
#include "..." search starts here:
#include <...> search starts here:
test_directory
/usr/local/include
/projects/tob/gcc-trunk/include
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed
/usr/include
End of search list.
whereas gfortran has the following:
#include "..." search starts here:
test_directory
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude
.
#include <...> search starts here:
/usr/local/include
/projects/tob/gcc-trunk/include
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed
/usr/include
End of search list.
--
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
Last reconfirmed|0000-00-00 00:00:00 |2008-10-14 12:11:19
date| |
Summary|gfortran is ignoring |[4.4 Regression] gfortran is
|#includes with the syntax |ignoring #includes with the
|<file.h> |syntax <file.h>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
` (2 preceding siblings ...)
2008-10-14 12:12 ` [Bug fortran/37821] [4.4 Regression] " burnus at gcc dot gnu dot org
@ 2008-10-14 12:24 ` dfranke at gcc dot gnu dot org
2008-10-14 12:32 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-10-14 12:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dfranke at gcc dot gnu dot org 2008-10-14 12:23 -------
Bugger. How much time do we have left before 4.4?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
` (3 preceding siblings ...)
2008-10-14 12:24 ` dfranke at gcc dot gnu dot org
@ 2008-10-14 12:32 ` burnus at gcc dot gnu dot org
2008-10-14 13:41 ` chris dot walter at duke dot edu
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-10-14 12:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2008-10-14 12:31 -------
(In reply to comment #3)
> #include "..." search starts here:
> test_directory
> /projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude
> .
That "." comes last is also wrong; it should come first for "...". However, CPP
automatically takes care.
Draft patch below; it works, except that I get the warning (-v -I tes):
ignoring duplicate directory "tes" <<<<<<<<<<<<<<< Warning
#include "..." search starts here:
#include <...> search starts here:
tes
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude
/usr/local/include
/projects/tob/gcc-trunk/include
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed
/usr/include
End of search list.
Index: cpp.c
===================================================================
--- cpp.c (Revision 141104)
+++ cpp.c (Arbeitskopie)
@@ -628,10 +628,9 @@ gfc_cpp_add_include_path (char *path, bo
{
/* CHAIN sets cpp_dir->sysp which differs from 0 if PATH is a system
include path. Fortran does not define any system include paths. */
- int chain = 0;
int cxx_aware = 0;
- add_path (path, chain, cxx_aware, user_supplied);
+ add_path (path, BRACKET, cxx_aware, user_supplied);
}
void
Index: options.c
===================================================================
--- options.c (Revision 141104)
+++ options.c (Arbeitskopie)
@@ -266,8 +266,6 @@ gfc_post_options (const char **pfilename
source_path[i] = 0;
gfc_add_include_path (source_path, true);
}
- else
- gfc_add_include_path (".", true);
if (canon_source_file != gfc_source_file)
gfc_free (CONST_CAST (char *, canon_source_file));
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
` (4 preceding siblings ...)
2008-10-14 12:32 ` burnus at gcc dot gnu dot org
@ 2008-10-14 13:41 ` chris dot walter at duke dot edu
2008-10-15 9:30 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: chris dot walter at duke dot edu @ 2008-10-14 13:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from chris dot walter at duke dot edu 2008-10-14 13:39 -------
Sorry, for leaving out the test case, but I see it is confirmed now.
I can't use the conforming INCLUDE since I am dealing with a large legacy code
base and ~150 colleagues who are also using the code with various compilers
etc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
` (5 preceding siblings ...)
2008-10-14 13:41 ` chris dot walter at duke dot edu
@ 2008-10-15 9:30 ` burnus at gcc dot gnu dot org
2008-11-01 11:41 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-10-15 9:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from burnus at gcc dot gnu dot org 2008-10-15 09:29 -------
Patch does not work - the "." causes problems as a "include" (not "#include")
does not work anymore: The "." is not included. Still there is the issue about
the order "." should be searched before the "-I" paths and it is not needed to
be added for "#include" but only for "include".
The latter can be solved by calling in this case in "gfc_add_include_path" only
"add_path_to_list (&include_dirs" and not "gfc_cpp_add_include_path" but I fear
that also the order for include_dirs has to be changed as well as OPT_I /
-I<dir> come before the filename processing in gfc_post_options.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
` (6 preceding siblings ...)
2008-10-15 9:30 ` burnus at gcc dot gnu dot org
@ 2008-11-01 11:41 ` rguenth at gcc dot gnu dot org
2008-11-03 7:23 ` burnus at gcc dot gnu dot org
2008-11-03 7:36 ` burnus at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-01 11:41 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
` (7 preceding siblings ...)
2008-11-01 11:41 ` rguenth at gcc dot gnu dot org
@ 2008-11-03 7:23 ` burnus at gcc dot gnu dot org
2008-11-03 7:36 ` burnus at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-03 7:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from burnus at gcc dot gnu dot org 2008-11-03 07:21 -------
Subject: Bug 37821
Author: burnus
Date: Mon Nov 3 07:20:24 2008
New Revision: 141544
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141544
Log:
2008-11-03 Tobias Burnus <burnus@net-b.de>
PR fortran/37821
* cpp.c (gfc_cpp_add_include_path): Use BRACKET.
* scanner.c (add_path_to_list): Argument to add at head.
(gfc_add_include_path): Add new argument.
(gfc_add_intrinsic_modules_path) Update call.
(load_file): Print filename/line in the error message.
* gfortran.h (gfc_add_include_path): Update prototype.
* options.c (gfc_post_options,gfc_handle_module_path_options,
gfc_handle_option): Update call.
* lang-spec.h (F951_OPTIONS): Don't insert include path twice.
* arith.c (arith_error): Add -fno-range-error to the message.
2008-11-03 Tobias Burnus <burnus@net-b.de>
PR fortran/37821
* gfortran.dg/include_4.f90: New.
* gfortran.dg/include_5.f90: New.
* gfortran.dg/include_4.inc: New.
Added:
trunk/gcc/testsuite/gfortran.dg/include_4.f90
trunk/gcc/testsuite/gfortran.dg/include_4.inc
trunk/gcc/testsuite/gfortran.dg/include_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/arith.c
trunk/gcc/fortran/cpp.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/lang-specs.h
trunk/gcc/fortran/options.c
trunk/gcc/fortran/scanner.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/37821] [4.4 Regression] gfortran is ignoring #includes with the syntax <file.h>
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
` (8 preceding siblings ...)
2008-11-03 7:23 ` burnus at gcc dot gnu dot org
@ 2008-11-03 7:36 ` burnus at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-03 7:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from burnus at gcc dot gnu dot org 2008-11-03 07:35 -------
FIXED on the trunk.
Thanks for the report and sorry that it took that long to commit the fix.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37821
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-11-03 7:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-14 1:48 [Bug fortran/37821] New: gfortran is ignoring #includes with the syntax <file.h> chris dot walter at duke dot edu
2008-10-14 1:51 ` [Bug fortran/37821] " chris dot walter at duke dot edu
2008-10-14 6:28 ` kargl at gcc dot gnu dot org
2008-10-14 12:12 ` [Bug fortran/37821] [4.4 Regression] " burnus at gcc dot gnu dot org
2008-10-14 12:24 ` dfranke at gcc dot gnu dot org
2008-10-14 12:32 ` burnus at gcc dot gnu dot org
2008-10-14 13:41 ` chris dot walter at duke dot edu
2008-10-15 9:30 ` burnus at gcc dot gnu dot org
2008-11-01 11:41 ` rguenth at gcc dot gnu dot org
2008-11-03 7:23 ` burnus at gcc dot gnu dot org
2008-11-03 7:36 ` burnus 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).