* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
@ 2009-08-18 14:59 ` burnus at gcc dot gnu dot org
2009-08-18 15:00 ` burnus at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-18 14:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2009-08-18 14:59 -------
Confirmed.
Patch for the include file:
--- libgomp/omp_lib.h.in (revision 150873)
+++ libgomp/omp_lib.h.in (working copy)
@@ -45 +45 @@
- logical*4 omp_get_dynamic, omp_get_nested
+ logical(4) omp_get_dynamic, omp_get_nested
@@ -47 +47 @@
- logical*4 omp_test_lock, omp_in_parallel
+ logical(4) omp_test_lock, omp_in_parallel
@@ -50 +50 @@
- integer*4 omp_get_max_threads, omp_get_num_procs
+ integer(4) omp_get_max_threads, omp_get_num_procs
@@ -52 +52 @@
- integer*4 omp_get_num_threads, omp_get_thread_num
+ integer(4) omp_get_num_threads, omp_get_thread_num
@@ -54 +54 @@
- integer*4 omp_test_nest_lock
+ integer(4) omp_test_nest_lock
@@ -64,3 +64,3 @@
- integer*4 omp_get_thread_limit, omp_get_max_active_levels
- integer*4 omp_get_level, omp_get_ancestor_thread_num
- integer*4 omp_get_team_size, omp_get_active_level
+ integer(4) omp_get_thread_limit, omp_get_max_active_levels
+ integer(4) omp_get_level, omp_get_ancestor_thread_num
+ integer(4) omp_get_team_size, omp_get_active_level
--
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
Keywords| |openmp
Last reconfirmed|0000-00-00 00:00:00 |2009-08-18 14:59:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
2009-08-18 14:59 ` [Bug fortran/41102] " burnus at gcc dot gnu dot org
@ 2009-08-18 15:00 ` burnus at gcc dot gnu dot org
2009-08-18 15:58 ` joseph at codesourcery dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-18 15:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2009-08-18 15:00 -------
*** Bug 41099 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
2009-08-18 14:59 ` [Bug fortran/41102] " burnus at gcc dot gnu dot org
2009-08-18 15:00 ` burnus at gcc dot gnu dot org
@ 2009-08-18 15:58 ` joseph at codesourcery dot com
2009-08-18 16:09 ` burnus at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: joseph at codesourcery dot com @ 2009-08-18 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from joseph at codesourcery dot com 2009-08-18 15:58 -------
Subject: Re: New: openMP include file causes errors when
compiling with standards checking
On Tue, 18 Aug 2009, ian dot bush at nag dot co dot uk wrote:
> Due to non-standard code in the supplied openMP header file omp_lib.h compiling
> with standards checking on results in errors due to the include file and not
> the users code:
For C and C++, most diagnostics are disabled by default for code in system
headers. Shouldn't Fortran do something equivalent?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (2 preceding siblings ...)
2009-08-18 15:58 ` joseph at codesourcery dot com
@ 2009-08-18 16:09 ` burnus at gcc dot gnu dot org
2009-08-18 16:46 ` ian dot bush at nag dot co dot uk
` (7 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-18 16:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2009-08-18 16:08 -------
(In reply to comment #3)
> For C and C++, most diagnostics are disabled by default for code in system
> headers. Shouldn't Fortran do something equivalent?
Good question. The problem is that with
include "somebig_chunk_of_code.f90"
one can include other code, which does not necessarily contain just PARAMETERs
(constants) and COMMONs but actual code. For instance octopus (tddft.org) does
this: It has a MODULE and includes one or two other files in it, which contain
subroutines/functions belonging to the MODULE but are for maintenance reasons
in a separate file. (Fortran 2008's submodules would be a better replacement.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (3 preceding siblings ...)
2009-08-18 16:09 ` burnus at gcc dot gnu dot org
@ 2009-08-18 16:46 ` ian dot bush at nag dot co dot uk
2009-08-18 16:52 ` joseph at codesourcery dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: ian dot bush at nag dot co dot uk @ 2009-08-18 16:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ian dot bush at nag dot co dot uk 2009-08-18 16:46 -------
Subject: Re: openMP include file causes errors when compiling
with standards checking
burnus at gcc dot gnu dot org wrote:
> ------- Comment #4 from burnus at gcc dot gnu dot org 2009-08-18 16:08 -------
> (In reply to comment #3)
>> For C and C++, most diagnostics are disabled by default for code in system
>> headers. Shouldn't Fortran do something equivalent?
>
> Good question. The problem is that with
>
> include "somebig_chunk_of_code.f90"
>
> one can include other code, which does not necessarily contain just PARAMETERs
> (constants) and COMMONs but actual code. For instance octopus (tddft.org) does
> this: It has a MODULE and includes one or two other files in it, which contain
> subroutines/functions belonging to the MODULE but are for maintenance reasons
> in a separate file. (Fortran 2008's submodules would be a better replacement.)
>
>
Also Fortran doesn't have the concept of system headers, so how should the
compiler decide what is a "system header" or not ? In some cases, like openMP
it's reasonably clear, but for third party software it's difficult. Hence my
suggestion in the original bug report to somehow allow the user to specify that
diagnostics from certain include files should be ignored.
Also thanks for fixing this so quickly, the joys of open source !! I've lodged
similar bug reports to Cray ( around 6 months ago ) and IBM ( around
6 years ago !! ) about their mpif.h files with absolutely no joy.
Also I hope I'm replying to the right place, I'm new around here ...
Ian
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (4 preceding siblings ...)
2009-08-18 16:46 ` ian dot bush at nag dot co dot uk
@ 2009-08-18 16:52 ` joseph at codesourcery dot com
2009-08-18 16:58 ` ian dot bush at nag dot co dot uk
` (5 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: joseph at codesourcery dot com @ 2009-08-18 16:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from joseph at codesourcery dot com 2009-08-18 16:52 -------
Subject: Re: openMP include file causes errors when
compiling with standards checking
On Tue, 18 Aug 2009, ian dot bush at nag dot co dot uk wrote:
> Also Fortran doesn't have the concept of system headers, so how should the
> compiler decide what is a "system header" or not ? In some cases, like openMP
> it's reasonably clear, but for third party software it's difficult. Hence my
> suggestion in the original bug report to somehow allow the user to specify that
> diagnostics from certain include files should be ignored.
System headers are headers in system header directories: directories of
headers provided by the system (not necessarily just those that come with
GCC) and are searched by default. In the present case, the file is
installed by gcc in libsubdir/finclude, and I don't know what other system
directories gfortran might search by default.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (5 preceding siblings ...)
2009-08-18 16:52 ` joseph at codesourcery dot com
@ 2009-08-18 16:58 ` ian dot bush at nag dot co dot uk
2009-08-19 6:38 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: ian dot bush at nag dot co dot uk @ 2009-08-18 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ian dot bush at nag dot co dot uk 2009-08-18 16:58 -------
Subject: Re: openMP include file causes errors when compiling
with standards checking
joseph at codesourcery dot com wrote:
> ------- Comment #6 from joseph at codesourcery dot com 2009-08-18 16:52 -------
> Subject: Re: openMP include file causes errors when
> compiling with standards checking
>
> On Tue, 18 Aug 2009, ian dot bush at nag dot co dot uk wrote:
>
>> Also Fortran doesn't have the concept of system headers, so how should the
>> compiler decide what is a "system header" or not ? In some cases, like openMP
>> it's reasonably clear, but for third party software it's difficult. Hence my
>> suggestion in the original bug report to somehow allow the user to specify that
>> diagnostics from certain include files should be ignored.
>
> System headers are headers in system header directories: directories of
> headers provided by the system (not necessarily just those that come with
> GCC) and are searched by default. In the present case, the file is
> installed by gcc in libsubdir/finclude, and I don't know what other system
> directories gfortran might search by default.
>
>
OK, my misunderstanding on a piece of terminology. Thanks for educating me.
But still the option to say "please ignore diagnostics generated in this
header/include file" would be useful,
Ian
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (6 preceding siblings ...)
2009-08-18 16:58 ` ian dot bush at nag dot co dot uk
@ 2009-08-19 6:38 ` burnus at gcc dot gnu dot org
2009-08-19 7:01 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-19 6:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from burnus at gcc dot gnu dot org 2009-08-19 06:38 -------
Subject: Bug 41102
Author: burnus
Date: Wed Aug 19 06:38:29 2009
New Revision: 150931
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150931
Log:
2009-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/41102
omp_lib.h.in: Fix -std=f95 errors.
Modified:
trunk/libgomp/ChangeLog
trunk/libgomp/omp_lib.h.in
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (7 preceding siblings ...)
2009-08-19 6:38 ` burnus at gcc dot gnu dot org
@ 2009-08-19 7:01 ` burnus at gcc dot gnu dot org
2009-08-19 7:12 ` burnus at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-19 7:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from burnus at gcc dot gnu dot org 2009-08-19 07:01 -------
Subject: Bug 41102
Author: burnus
Date: Wed Aug 19 07:01:03 2009
New Revision: 150932
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150932
Log:
2009-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/41102
omp_lib.h.in: Fix -std=f95 errors.
Modified:
branches/gcc-4_3-branch/libgomp/ChangeLog
branches/gcc-4_3-branch/libgomp/omp_lib.h.in
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] openMP include file causes errors when compiling with standards checking
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (8 preceding siblings ...)
2009-08-19 7:01 ` burnus at gcc dot gnu dot org
@ 2009-08-19 7:12 ` burnus at gcc dot gnu dot org
2009-08-19 7:14 ` [Bug fortran/41102] Ease error checking of included files located in the SYSTEM_INCLUDE_DIR/ending in .h burnus at gcc dot gnu dot org
2010-05-06 21:40 ` dfranke at gcc dot gnu dot org
11 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-19 7:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from burnus at gcc dot gnu dot org 2009-08-19 07:12 -------
Subject: Bug 41102
Author: burnus
Date: Wed Aug 19 07:11:43 2009
New Revision: 150933
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150933
Log:
2009-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/41102
omp_lib.h.in: Fix -std=f95 errors.
Modified:
branches/gcc-4_4-branch/libgomp/ChangeLog
branches/gcc-4_4-branch/libgomp/omp_lib.h.in
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] Ease error checking of included files located in the SYSTEM_INCLUDE_DIR/ending in .h
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (9 preceding siblings ...)
2009-08-19 7:12 ` burnus at gcc dot gnu dot org
@ 2009-08-19 7:14 ` burnus at gcc dot gnu dot org
2010-05-06 21:40 ` dfranke at gcc dot gnu dot org
11 siblings, 0 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-19 7:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from burnus at gcc dot gnu dot org 2009-08-19 07:14 -------
The lib_omp.h problem is FIXED on the trunk (4.5) and in the 4.3 and 4.4
branches.
I changed the title to the remaining "issue": Having (similarity to C/C++) a
less strict checking for files coming from the system directory
(SYSTEM_INCLUDE_DIR). I fear it won't help with MPI as on many systems "mpif90"
will pass the directory for mpi*.h via "-I" as it is not in
/usr/{,local/}include but, e.g., in /usr/lib64/mpi/gcc/openmpi/include, which
is difficult to distinguish from "-I subdir" (or "-I
/full/path/to/cwd/subdir").
One solution would be to treat ".h" differently from other extensions (such as
.f/.f90/.inc).
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|openmp |
Summary|openMP include file causes |Ease error checking of
|errors when compiling with |included files located in
|standards checking |the
| |SYSTEM_INCLUDE_DIR/ending in
| |.h
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41102
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug fortran/41102] Ease error checking of included files located in the SYSTEM_INCLUDE_DIR/ending in .h
2009-08-18 10:52 [Bug fortran/41102] New: openMP include file causes errors when compiling with standards checking ian dot bush at nag dot co dot uk
` (10 preceding siblings ...)
2009-08-19 7:14 ` [Bug fortran/41102] Ease error checking of included files located in the SYSTEM_INCLUDE_DIR/ending in .h burnus at gcc dot gnu dot org
@ 2010-05-06 21:40 ` dfranke at gcc dot gnu dot org
11 siblings, 0 replies; 17+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-06 21:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from dfranke at gcc dot gnu dot org 2010-05-06 21:40 -------
Related discussion: PR35707
--
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=41102
^ permalink raw reply [flat|nested] 17+ messages in thread