public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h
@ 2013-02-06 13:27 dnovillo at gcc dot gnu.org
  2013-02-06 18:02 ` [Bug fortran/56224] [4.8 Regression] " burnus at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2013-02-06 13:27 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56224
           Summary: gfortran -fopenmp cannot find omp_lib.h
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dnovillo@gcc.gnu.org
                CC: jakub@redhat.com


$ cat ~/a.f
        include "omp_lib.h"
        end

Compiled with trunk as of 2013-02-04:

$ gcc48/bin/gfortran -c a.f
a.f:1: Error: Can't open included file 'omp_lib.h'

Compiled with GCC 4.7:

$ gcc47/bin/gfortran -c a.f
$

Jakub and I discussed this on IRC:

07:58:20 dnovillo: jakub: i see the file in …./finclude/omp_lib.h, but when i
run the libgomp testsuite with the installed compiler, the #include directives
in the libgomp fortran tests can't find that file.
07:58:22 jakub: dnovillo: it is; omp_lib.h generally should be #included, so
what matters is the standard preprocessor search path, and omp_lib.h should be
there
07:58:41 richi: maybe I should code up a "discover undetected loops" routine
07:58:51 jakub: dnovillo: omp_lib without .h should be USEd
07:59:18 dnovillo: jakub: this is being included by
libgomp.fortran/appendix-a/a.18.1.f90
08:00:08 dnovillo: the problem is that when i run the testsuite standalone, I
don't see a -I to the .../finclude directory.  This works when executed from
the build directory, so I may be missing some settings in my dejagnusetup.
08:00:17 jakub: dnovillo: finclude/ is for modules I thought
08:00:41 dnovillo: well, that's where the file ends up in the installed image.
08:00:54 dnovillo: fortran modules have a different search path?
08:02:22 jakub:       include "omp_lib.h"
08:02:22 jakub:       end
08:02:33 jakub: gfortran -fopenmp -o /tmp/a /tmp/a.f
08:02:46 jakub: works just fine for me with installed compiler (Fedora 17 one)
08:04:10 dnovillo: hmm, there may be another wrinkle here then.  i'm getting
08:04:26 dnovillo: $ bin/gfortran -fopenmp -o /tmp/a.o ~/a.f
/home/dnovillo/a.f:1: Error: Can't open included file 'omp_lib.h'
08:04:50 dnovillo: with gfortran from trunk as of 4/Feb.
08:05:02 jakub: even
08:05:08 jakub: #include "omp_lib.h"
08:05:11 jakub:       end
08:05:21 jakub: gfortran -fopenmp -o /tmp/a /tmp/a.F works for me
08:05:32 dnovillo: with trunk gfortran, i suppose?
08:05:51 jakub: dnovillo> 4.7, but there weren't any changes I'm aware of
08:06:00 jakub: dnovillo: let me try 4.8-RH gfortran
08:06:01 dnovillo: ah, 4.7 works fine for me.
08:06:15 dnovillo: it's 4.8 that i can't get to work.
08:09:01 jakub: dnovillo: ok, I can reproduce the problem with 4.8
08:09:35 dnovillo: i think using USE might work. I see -fintrinsic-modules-path
gcc/x86/bin/../lib/gcc/x86_64-grtev3-linux-gnu/4.8.x-google-integration/finclude
in the -v output
08:09:39 jakub: dnovillo: can you file a bug against fortran component?  The
files are installed the same way as before, so it is the FE that changed in
some weirdo way
08:09:48 dnovillo: jakub: will do.
08:09:56 jakub: dnovillo: use should be used together with omp_lib, not
omp_lib.h
08:10:23 dnovillo: ah, so the test would have to change.  ok.  i'll file the
bug and mark these failures as expected for now in our builds.  thanks.
08:10:38 jakub: dnovillo: perhaps the end of dicsussion will be that omp_lib.h
should be installed into include/ instead of finclude/, where it would
supposedly work
08:11:05 jakub: dnovillo: even in 4.7, gfortran -E with #include "omp_lib.h"
didn't work, but -c worked
08:11:30 dnovillo: heh.  but we'd need it in both places, right?  finclude/ is
used for USE commands?
08:11:38 jakub: dnovillo: having omp_lib.h in include/ on the other side means
that people using C/C++ might try to #include "omp_lib.h" and be very surprised
08:12:15 jakub: dnovillo: omp_lib.h isn't a module, it is a header file, it
should be used in pre-F90 Fortran only
08:12:30 dnovillo: ah
08:12:38 jakub: dnovillo: USE is F90+, needs omp_lib.f90/omp_lib.mod etc. -
i.e. a module


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
@ 2013-02-06 18:02 ` burnus at gcc dot gnu.org
  2013-02-06 20:56 ` tkoenig at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-02-06 18:02 UTC (permalink / raw)
  To: gcc-bugs


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |rejects-valid
   Last reconfirmed|                            |2013-02-06
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |tkoenig at gcc dot gnu.org
     Ever Confirmed|0                           |1
            Summary|gfortran -fopenmp cannot    |[4.8 Regression] gfortran
                   |find omp_lib.h              |-fopenmp cannot find
                   |                            |omp_lib.h
   Target Milestone|---                         |4.8.0

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-02-06 18:01:36 UTC ---
Seems to be caused by the following patch:

http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190144

+2012-08-02  Thomas König  <tkoenig@gcc.gnu.org>
+
+        PR fortran/54033
...
+        * optinons.c (gfc_handle_option):  Do not add directory
+        for intrinsic modules to normal include path.


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
  2013-02-06 18:02 ` [Bug fortran/56224] [4.8 Regression] " burnus at gcc dot gnu.org
@ 2013-02-06 20:56 ` tkoenig at gcc dot gnu.org
  2013-02-06 20:59 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-02-06 20:56 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-02-06 20:55:13 UTC ---
I think the file should go into an include directory.


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
  2013-02-06 18:02 ` [Bug fortran/56224] [4.8 Regression] " burnus at gcc dot gnu.org
  2013-02-06 20:56 ` tkoenig at gcc dot gnu.org
@ 2013-02-06 20:59 ` jakub at gcc dot gnu.org
  2013-02-08 10:29 ` tkoenig at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-06 20:59 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-06 20:58:07 UTC ---
omp_lib.h is either being included through
INCLUDE 'omp_lib.h"
or
#include "omp_lib.h"
As it is a Fortran source, not a C/C++ header, putting it into include/ looks
wrong.


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-02-06 20:59 ` jakub at gcc dot gnu.org
@ 2013-02-08 10:29 ` tkoenig at gcc dot gnu.org
  2013-02-08 15:27 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-02-08 10:29 UTC (permalink / raw)
  To: gcc-bugs


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |tkoenig at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-02-08 10:29 ` tkoenig at gcc dot gnu.org
@ 2013-02-08 15:27 ` rguenth at gcc dot gnu.org
  2013-02-09 20:13 ` tkoenig at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-08 15:27 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-02-08 15:27 ` rguenth at gcc dot gnu.org
@ 2013-02-09 20:13 ` tkoenig at gcc dot gnu.org
  2013-02-14 22:14 ` tkoenig at gcc dot gnu.org
  2013-02-14 22:44 ` tkoenig at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-02-09 20:13 UTC (permalink / raw)
  To: gcc-bugs


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2013-02/msg00415.htm
                   |                            |l

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-02-09 20:13:24 UTC ---
Patch has been posted.


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-02-09 20:13 ` tkoenig at gcc dot gnu.org
@ 2013-02-14 22:14 ` tkoenig at gcc dot gnu.org
  2013-02-14 22:44 ` tkoenig at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-02-14 22:14 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-02-14 22:13:38 UTC ---
Author: tkoenig
Date: Thu Feb 14 22:13:26 2013
New Revision: 196058

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196058
Log:
2013-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/56224
    * gfortran.h (gfc_add_include_path):  Add boolean argument
    for warn.
    * scanner.c (gfc_add_include_path):  Pass along warn argument
    to add_path_to_list.
    * options.c (gfc_post_options):  Add true warn argument to
    gfc_add_include_path.
    (gfc_handle_module_path_options):  Likewise.
    (gfc_handle_option): Also gfc_add_include_path for intrinsic
    modules, without warning.


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


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

* [Bug fortran/56224] [4.8 Regression] gfortran -fopenmp cannot find omp_lib.h
  2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-02-14 22:14 ` tkoenig at gcc dot gnu.org
@ 2013-02-14 22:44 ` tkoenig at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-02-14 22:44 UTC (permalink / raw)
  To: gcc-bugs


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-02-14 22:43:50 UTC ---
Fixed, closaing.


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

end of thread, other threads:[~2013-02-14 22:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 13:27 [Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h dnovillo at gcc dot gnu.org
2013-02-06 18:02 ` [Bug fortran/56224] [4.8 Regression] " burnus at gcc dot gnu.org
2013-02-06 20:56 ` tkoenig at gcc dot gnu.org
2013-02-06 20:59 ` jakub at gcc dot gnu.org
2013-02-08 10:29 ` tkoenig at gcc dot gnu.org
2013-02-08 15:27 ` rguenth at gcc dot gnu.org
2013-02-09 20:13 ` tkoenig at gcc dot gnu.org
2013-02-14 22:14 ` tkoenig at gcc dot gnu.org
2013-02-14 22:44 ` tkoenig at gcc dot gnu.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).