public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [libgomp,patch] Add omp_{integer,logical}_kind to omp_lib.h
@ 2010-06-10 21:48 FX
  2010-06-10 22:24 ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: FX @ 2010-06-10 21:48 UTC (permalink / raw)
  To: rth, gcc-patches, Jakub Jelinek; +Cc: Fortran List

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

PR 42041 is about definitions for omp_integer_kind and omp_logical_kind missing from omp_lib.h (even though they're in omp_lib.f90). This is strictly conforming to OpenMP 3.0 standard, but it was a bug in the standard, due to be fixed by 3.1.

In the process of cleaning some low-hanging bugs in the bugzilla, I propose this patch.
Built and regtested on x86_64-linux, OK to commit to trunk?

FX



[-- Attachment #2: libgomp.diff --]
[-- Type: application/octet-stream, Size: 1724 bytes --]

Index: omp_lib.h.in
===================================================================
--- omp_lib.h.in	(revision 160470)
+++ omp_lib.h.in	(working copy)
@@ -22,9 +22,12 @@
 !  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 !  <http://www.gnu.org/licenses/>.
 
+      integer omp_integer_kind, omp_logical_kind
       integer omp_lock_kind, omp_nest_lock_kind, openmp_version
       integer omp_sched_kind, omp_sched_static, omp_sched_dynamic
       integer omp_sched_guided, omp_sched_auto
+      parameter (omp_integer_kind = 4)
+      parameter (omp_logical_kind = 4)
       parameter (omp_lock_kind = @OMP_LOCK_KIND@)
       parameter (omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@)
       parameter (omp_sched_kind = 4)
@@ -42,16 +45,16 @@
       external omp_set_num_threads
 
       external omp_get_dynamic, omp_get_nested
-      logical(4) omp_get_dynamic, omp_get_nested
+      logical(omp_logical_kind) omp_get_dynamic, omp_get_nested
       external omp_test_lock, omp_in_parallel
-      logical(4) omp_test_lock, omp_in_parallel
+      logical(omp_logical_kind) omp_test_lock, omp_in_parallel
 
       external omp_get_max_threads, omp_get_num_procs
-      integer(4) omp_get_max_threads, omp_get_num_procs
+      integer(omp_integer_kind) omp_get_max_threads, omp_get_num_procs
       external omp_get_num_threads, omp_get_thread_num
-      integer(4) omp_get_num_threads, omp_get_thread_num
+      integer(omp_integer_kind) omp_get_num_threads, omp_get_thread_num
       external omp_test_nest_lock
-      integer(4) omp_test_nest_lock
+      integer(omp_integer_kind) omp_test_nest_lock
 
       external omp_get_wtick, omp_get_wtime
       double precision omp_get_wtick, omp_get_wtime

[-- Attachment #3: libgomp.ChangeLog --]
[-- Type: application/octet-stream, Size: 205 bytes --]

2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR fortran/42041
	* omp_lib.h.in: Add definitions of omp_integer_kind and
	omp_logical_kind, and use them in external function declarations.


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <20100611143040.GA18233@physik.fu-berlin.de>]

end of thread, other threads:[~2010-07-02 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-10 21:48 [libgomp,patch] Add omp_{integer,logical}_kind to omp_lib.h FX
2010-06-10 22:24 ` Jakub Jelinek
     [not found] <20100611143040.GA18233@physik.fu-berlin.de>
2010-07-02 10:27 ` FX
2010-07-02 12:01   ` Tobias Burnus

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).