public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug preprocessor/35055] New: missing path to finclude directory when compiling .F90 files @ 2008-02-02 10:23 hailijuan at gmail dot com 2008-04-05 23:51 ` [Bug preprocessor/35055] " dfranke at gcc dot gnu dot org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: hailijuan at gmail dot com @ 2008-02-02 10:23 UTC (permalink / raw) To: gcc-bugs testcase: (a.F90) #include "omp_lib.h" call omp_set_dynamic (.false.) call omp_set_num_threads(4) !$omp parallel print *, "t#:", omp_get_thread_num() !$omp end parallel end #gfortran a.F90 -fopenmp a.F90:1: error: omp_lib.h: No such file or directory the file omp_lib.h is found in /import/dr3/s10/gcc-4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.3.0/finclude. "cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN" is invoked to preprocess a.F90. the array cpp_include_defaults defined in cppdefault.c has to add in ***/finclude/ and its data structure has to be refined to mark the include is for fortran. -- Summary: missing path to finclude directory when compiling .F90 files Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hailijuan at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35055 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/35055] missing path to finclude directory when compiling .F90 files 2008-02-02 10:23 [Bug preprocessor/35055] New: missing path to finclude directory when compiling .F90 files hailijuan at gmail dot com @ 2008-04-05 23:51 ` dfranke at gcc dot gnu dot org 2008-05-26 21:28 ` burnus at gcc dot gnu dot org 2008-07-12 17:11 ` tromey at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: dfranke at gcc dot gnu dot org @ 2008-04-05 23:51 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from dfranke at gcc dot gnu dot org 2008-04-05 23:50 ------- > #include "omp_lib.h" Question is, whether this should be supported or not. OMP specs 2.5, section 3.1 "Runtime Library Definitions" state: "Interface declarations for the OpenMP Fortran runtime library routines described in this chapter shall be provided in the form of a Fortran include file named omp_lib.h or a Fortran 90 module named omp_lib. It is implementation defined whether the include file or the module file (or both) is provided." Example A.2.1f then shows: INCLUDE "omp_lib.h" ! or USE OMP_LIB gfortran provides both versions. Further, it is possible to define additional include paths at the command-line via -I<path>, these are also passed to the preprocessor. IMO, either use the INCLUDE-statement, USE the module, or pass the path manually. If one insists on adding this path to the default search path, one could do it like this: Index: gcc/fortran/lang-specs.h =================================================================== --- gcc/fortran/lang-specs.h (revision 133799) +++ gcc/fortran/lang-specs.h (working copy) @@ -27,7 +27,7 @@ {".FPP", "@f77-cpp-input", 0, 0, 0}, {"@f77-cpp-input", "cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options) \ - %{E|M|MM:%(cpp_debug_options)}\ + %{E|M|MM:%(cpp_debug_options)} -I finclude%s\ %{!M:%{!MM:%{!E: -o %|.f |\n\ f951 %|.f %{!ffree-form:-ffixed-form} %(cc1_options) %{J*} %{I*}\ -fpreprocessed %{!nostdinc:-fintrinsic-modules-path finclude%s} %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, @@ -37,7 +37,7 @@ {".F08", "@f95-cpp-input", 0, 0, 0}, {"@f95-cpp-input", "cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options) \ - %{E|M|MM:%(cpp_debug_options)}\ + %{E|M|MM:%(cpp_debug_options)} -I finclude%s\ %{!M:%{!MM:%{!E: -o %|.f95 |\n\ f951 %|.f95 %{!ffixed-form:-ffree-form} %(cc1_options) %{J*} %{I*}\ -fpreprocessed %{!nostdinc:-fintrinsic-modules-path finclude%s} %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, Take your pick :) -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfranke at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35055 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/35055] missing path to finclude directory when compiling .F90 files 2008-02-02 10:23 [Bug preprocessor/35055] New: missing path to finclude directory when compiling .F90 files hailijuan at gmail dot com 2008-04-05 23:51 ` [Bug preprocessor/35055] " dfranke at gcc dot gnu dot org @ 2008-05-26 21:28 ` burnus at gcc dot gnu dot org 2008-07-12 17:11 ` tromey at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu dot org @ 2008-05-26 21:28 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from burnus at gcc dot gnu dot org 2008-05-26 21:27 ------- I think this works now (cf. PR18428). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35055 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/35055] missing path to finclude directory when compiling .F90 files 2008-02-02 10:23 [Bug preprocessor/35055] New: missing path to finclude directory when compiling .F90 files hailijuan at gmail dot com 2008-04-05 23:51 ` [Bug preprocessor/35055] " dfranke at gcc dot gnu dot org 2008-05-26 21:28 ` burnus at gcc dot gnu dot org @ 2008-07-12 17:11 ` tromey at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: tromey at gcc dot gnu dot org @ 2008-07-12 17:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from tromey at gcc dot gnu dot org 2008-07-12 17:10 ------- I tried this and it is fixed on trunk. Closing. -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35055 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-12 17:11 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-02-02 10:23 [Bug preprocessor/35055] New: missing path to finclude directory when compiling .F90 files hailijuan at gmail dot com 2008-04-05 23:51 ` [Bug preprocessor/35055] " dfranke at gcc dot gnu dot org 2008-05-26 21:28 ` burnus at gcc dot gnu dot org 2008-07-12 17:11 ` tromey 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).