re PR c++/80029 (valgrind error in new_omp_context(omp_region_type) (gimplify.c:400))
[official-gcc.git] / libgomp / ChangeLog
blob74f50e0f32f240945500a283e6cf50054a4080d1
1 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
3         PR c++/80029
4         * testsuite/libgomp.oacc-c-c++-common/declare-vla.c: New test.
6 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
8         PR c/79940
9         * testsuite/libgomp.c/pr79940.c: New test.
11 2017-02-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13         * testsuite/libgomp.c/pr48591.c: Enable on all __float128
14         targets.
15         Add __float128 options.
17 2017-02-11  John David Anglin  <danglin@gcc.gnu.org>
19         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Remove
20         hppa*-*-* dg-skip-if directive.
22 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
24         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Move
25         dg-skip-if directive into a comment.
27 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
28             Chung-Lin Tang  <cltang@codesourcery.com>
30         * testsuite/libgomp.oacc-c-c++-common/tile-1.c: New.
31         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust and
32         add additional case.
33         * testsuite/libgomp.oacc-c-c++-common/vprop.c: XFAIL under
34         "openacc_nvidia_accel_selected".
35         * libgomp.oacc-fortran/nested-function-1.f90 (test2):
36         Add num_workers(8) clause.
38 2017-02-08  John David Anglin  <danglin@gcc.gnu.org>
40         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Skip on
41         hppa*-*-*.
42         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Don't
43         include complex.h on hppa*-*-hpux*.
44         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise.
46 2017-02-02  Thomas Schwinge  <thomas@codesourcery.com>
48         * plugin/plugin-nvptx.c (nvptx_exec): Make it static.
50         * libgomp-plugin.h (GOMP_OFFLOAD_openacc_parallel): Rename to
51         GOMP_OFFLOAD_openacc_exec.  Adjust all users.
52         (GOMP_OFFLOAD_openacc_get_current_cuda_device): Rename to
53         GOMP_OFFLOAD_openacc_cuda_get_current_device.  Adjust all users.
54         (GOMP_OFFLOAD_openacc_get_current_cuda_context): Rename to
55         GOMP_OFFLOAD_openacc_cuda_get_current_context.  Adjust all users.
56         (GOMP_OFFLOAD_openacc_get_cuda_stream): Rename to
57         GOMP_OFFLOAD_openacc_cuda_get_stream.  Adjust all users.
58         (GOMP_OFFLOAD_openacc_set_cuda_stream): Rename to
59         GOMP_OFFLOAD_openacc_cuda_set_stream.  Adjust all users.
61 2017-01-31  Thomas Schwinge  <thomas@codesourcery.com>
63         * libgomp-plugin.h: #include <stdbool.h>.
64         (GOMP_OFFLOAD_get_name, GOMP_OFFLOAD_get_caps)
65         (GOMP_OFFLOAD_get_type, GOMP_OFFLOAD_get_num_devices)
66         (GOMP_OFFLOAD_init_device, GOMP_OFFLOAD_fini_device)
67         (GOMP_OFFLOAD_version, GOMP_OFFLOAD_load_image)
68         (GOMP_OFFLOAD_unload_image, GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free)
69         (GOMP_OFFLOAD_dev2host, GOMP_OFFLOAD_host2dev)
70         (GOMP_OFFLOAD_dev2dev, GOMP_OFFLOAD_can_run, GOMP_OFFLOAD_run)
71         (GOMP_OFFLOAD_async_run, GOMP_OFFLOAD_openacc_parallel)
72         (GOMP_OFFLOAD_openacc_register_async_cleanup)
73         (GOMP_OFFLOAD_openacc_async_test)
74         (GOMP_OFFLOAD_openacc_async_test_all)
75         (GOMP_OFFLOAD_openacc_async_wait)
76         (GOMP_OFFLOAD_openacc_async_wait_async)
77         (GOMP_OFFLOAD_openacc_async_wait_all)
78         (GOMP_OFFLOAD_openacc_async_wait_all_async)
79         (GOMP_OFFLOAD_openacc_async_set_async)
80         (GOMP_OFFLOAD_openacc_create_thread_data)
81         (GOMP_OFFLOAD_openacc_destroy_thread_data)
82         (GOMP_OFFLOAD_openacc_get_current_cuda_device)
83         (GOMP_OFFLOAD_openacc_get_current_cuda_context)
84         (GOMP_OFFLOAD_openacc_get_cuda_stream)
85         (GOMP_OFFLOAD_openacc_set_cuda_stream): New prototypes.
86         * libgomp.h (struct acc_dispatch_t, struct gomp_device_descr): Use
87         these.
88         * plugin/plugin-hsa.c (GOMP_OFFLOAD_load_image)
89         (GOMP_OFFLOAD_unload_image): Fix argument types.
91 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
93         * testsuite/lib/libgomp.exp
94         (check_effective_target_hsa_offloading_selected_nocache): Fix up
95         check_compile invocation.  Fix up removal of executable.  Drop
96         bogus "2>&1" argument.
98         * testsuite/libgomp.fortran/declare-simd-4.f90: Add cleanup-modules
99         directive.
101 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
102             Martin Jambor  <mjambor@suse.cz>
104         * plugin/hsa.h: Moved to top level include.
105         * plugin/plugin-hsa.c: Chanfgd include of hsa.h accordingly.
107 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
109         PR other/79046
110         * testsuite/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
111         of cat to get version from BASE-VER file.
112         * testsuite/Makefile.in: Regenerated.
114 2017-01-19  Jakub Jelinek  <jakub@redhat.com>
116         * plugin/cuda/cuda.h (CUdeviceptr): Typedef to unsigned long long even
117         for _WIN64.
119 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
121         * plugin/hsa.h: Add GCC runtime library exception.
122         * plugin/hsa_ext_finalize.h: Likewise.
124         * plugin/configfrag.ac: For --without-cuda-driver don't initialize
125         CUDA_DRIVER_INCLUDE nor CUDA_DRIVER_LIB.  If both
126         CUDA_DRIVER_INCLUDE and CUDA_DRIVER_LIB are empty and linking small
127         cuda program fails, define PLUGIN_NVPTX_DYNAMIC to 1 and use
128         plugin/include/cuda as include dir and -ldl instead of -lcuda as
129         library to link ptx plugin against.
130         * plugin/plugin-nvptx.c: Include dlfcn.h if PLUGIN_NVPTX_DYNAMIC.
131         (CUDA_CALLS): Define.
132         (cuda_lib, cuda_lib_inited): New variables.
133         (init_cuda_lib): New function.
134         (CUDA_CALL_PREFIX): Define.
135         (CUDA_CALL_ERET, CUDA_CALL_ASSERT): Use CUDA_CALL_PREFIX.
136         (CUDA_CALL): Use FN instead of (FN).
137         (CUDA_CALL_NOCHECK): Define.
138         (cuda_error, fini_streams_for_device, select_stream_for_async,
139         nvptx_attach_host_thread_to_device, nvptx_open_device, link_ptx,
140         event_gc, nvptx_exec, nvptx_async_test, nvptx_async_test_all,
141         nvptx_wait_all, nvptx_set_clocktick, GOMP_OFFLOAD_unload_image,
142         nvptx_stacks_alloc, nvptx_stacks_free, GOMP_OFFLOAD_run): Use
143         CUDA_CALL_NOCHECK.
144         (nvptx_init): Call init_cuda_lib, if it fails, return false.  Use
145         CUDA_CALL_NOCHECK.
146         (nvptx_get_num_devices): Call init_cuda_lib, if it fails, return 0.
147         Use CUDA_CALL_NOCHECK.
148         * plugin/cuda/cuda.h: New file.
149         * config.h.in: Regenerated.
150         * configure: Regenerated.
152         PR other/79046
153         * configure.ac: Add GCC_BASE_VER.
154         * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
155         get version from BASE-VER file.
156         * testsuite/Makefile.in: Regenerated.
157         * configure: Regenerated.
158         * Makefile.in: Regenerated.
160 2017-01-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
162         PR libgomp/60670
163         * Makefile.am: Make fincludedir multilib-aware.
164         * Makefile.in: Regenerate.
166 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
168         Update copyright years.
170         * libgomp.texi: Bump @copying's copyright year.
172 2016-12-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
174         * libgomp/config/rtems/pool.h (gomp_thread_pool_reservoir): Use
175         pthread_spinlock_t instead of gomp_mutex_t lock.
176         (gomp_get_thread_pool): Likewise.
177         (gomp_release_thread_pool): Likewise.
178         * libgomp/config/rtems/proc.c (allocate_thread_pool_reservoir):
179         Likewise.
181 2016-12-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
183         * config/rtems/pool.h (gomp_get_thread_pool): Return proper
184         thread pool in case nthreads == 1.
186 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
188         * config/nvptx/env.c: Delete.
189         * icv.c: Move definitions of ICV variables back ...
190         * env.c: ...here.  Do not compile environment-related functionality if
191         LIBGOMP_OFFLOADED_ONLY is set.
193 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
195         * configure.ac [nvptx*-*-*] (libgomp_offloaded_only): Set and use it...
196         (LIBGOMP_OFFLOADED_ONLY): ...here; new define.
197         * configure: Regenerate.
198         * config.h.in: Likewise.
200 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
202         * Makefile.in: Regenerate with automake-1.11.6.
203         * aclocal.m4: Likewise.
204         * configure: Likewise.
205         * testsuite/Makefile.in: Likewise.
207 2016-11-28  Alexander Monakov  <amonakov@ispras.ru>
209         * config/nvptx/critical.c: Delete to use generic implementation.
211 2016-11-28  Jonas Hahnfeld  <Hahnfeld@itc.rwth-aachen.de>
213         * config/linux/affinity.c [!HAVE_PTHREAD_AFFINITY_NP]: Include
214         ../../affinity.c as fallback.
215         * config/nvptx/affinity.c: Delete to use fallback implementation.
217 2016-11-23  Alexander Monakov  <amonakov@ispras.ru>
218             Jakub Jelinek  <jakub@redhat.com>
219             Dmitry Melnik  <dm@ispras.ru>
221         * Makefile.am (libgomp_la_SOURCES): Add atomic.c, icv.c, icv-device.c.
222         * Makefile.in. Regenerate.
223         * configure.ac [nvptx*-*-*] (libgomp_use_pthreads): Set and use it...
224         (LIBGOMP_USE_PTHREADS): ...here; new define.
225         * configure: Regenerate.
226         * config.h.in: Likewise.
227         * config/posix/affinity.c: Move to...
228         * affinity.c: ...here (new file).  Guard use of Pthreads-specific
229         interface by LIBGOMP_USE_PTHREADS. 
230         * critical.c: Split out GOMP_atomic_{start,end} into...
231         * atomic.c: ...here (new file).
232         * env.c: Split out ICV definitions into...
233         * icv.c: ...here (new file) and...
234         * icv-device.c: ...here. New file.
235         * config/linux/lock.c (gomp_init_lock_30): Move to generic lock.c.
236         (gomp_destroy_lock_30): Ditto.
237         (gomp_set_lock_30): Ditto.
238         (gomp_unset_lock_30): Ditto.
239         (gomp_test_lock_30): Ditto.
240         (gomp_init_nest_lock_30): Ditto.
241         (gomp_destroy_nest_lock_30): Ditto.
242         (gomp_set_nest_lock_30): Ditto.
243         (gomp_unset_nest_lock_30): Ditto.
244         (gomp_test_nest_lock_30): Ditto.
245         * lock.c: New.
246         * config/nvptx/lock.c: New.
247         * config/nvptx/bar.c: New.
248         * config/nvptx/bar.h: New.
249         * config/nvptx/doacross.h: New.
250         * config/nvptx/error.c: New.
251         * config/nvptx/icv-device.c: New.
252         * config/nvptx/mutex.h: New.
253         * config/nvptx/pool.h: New.
254         * config/nvptx/proc.c: New.
255         * config/nvptx/ptrlock.h: New.
256         * config/nvptx/sem.h: New.
257         * config/nvptx/simple-bar.h: New.
258         * config/nvptx/target.c: New.
259         * config/nvptx/task.c: New.
260         * config/nvptx/team.c: New.
261         * config/nvptx/time.c: New.
262         * config/posix/simple-bar.h: New.
263         * libgomp.h: Guard pthread.h inclusion.  Include simple-bar.h.
264         (gomp_num_teams_var): Declare.
265         (struct gomp_thread_pool): Change threads_dock member to
266         gomp_simple_barrier_t.
267         [__nvptx__] (gomp_thread): New implementation.
268         (gomp_thread_attr): Guard by LIBGOMP_USE_PTHREADS.
269         (gomp_thread_destructor): Ditto.
270         (gomp_init_thread_affinity): Ditto.
271         * team.c: Guard uses of Pthreads-specific interfaces by
272         LIBGOMP_USE_PTHREADS.  Adjust all uses of threads_dock.
273         (gomp_free_thread) [__nvptx__]: Do not call 'free'.
274         * config/nvptx/alloc.c: Delete.
275         * config/nvptx/barrier.c: Ditto.
276         * config/nvptx/fortran.c: Ditto.
277         * config/nvptx/iter.c: Ditto.
278         * config/nvptx/iter_ull.c: Ditto.
279         * config/nvptx/loop.c: Ditto.
280         * config/nvptx/loop_ull.c: Ditto.
281         * config/nvptx/ordered.c: Ditto.
282         * config/nvptx/parallel.c: Ditto.
283         * config/nvptx/priority_queue.c: Ditto.
284         * config/nvptx/sections.c: Ditto.
285         * config/nvptx/single.c: Ditto.
286         * config/nvptx/splay-tree.c: Ditto.
287         * config/nvptx/work.c: Ditto.
288         * testsuite/libgomp.fortran/fortran.exp (lang_link_flags): Pass
289         -foffload=-lgfortran in addition to -lgfortran.
290         * testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags): Ditto.
291         * plugin/plugin-nvptx.c: Include <limits.h>.
292         (struct targ_fn_descriptor): Add new fields.
293         (struct ptx_device): Ditto.  Set them...
294         (nvptx_open_device): ...here.
295         (nvptx_adjust_launch_bounds): New.
296         (nvptx_host2dev): Allow NULL 'nvthd'.
297         (nvptx_dev2host): Ditto.
298         (GOMP_OFFLOAD_get_caps): Add GOMP_OFFLOAD_CAP_OPENMP_400.
299         (link_ptx): Adjust log sizes.
300         (nvptx_host2dev): Allow NULL 'nvthd'.
301         (nvptx_dev2host): Ditto.
302         (nvptx_set_clocktick): New.  Use it...
303         (GOMP_OFFLOAD_load_image): ...here.  Set new targ_fn_descriptor
304         fields.
305         (GOMP_OFFLOAD_dev2dev): New.
306         (nvptx_adjust_launch_bounds): New.
307         (nvptx_stacks_size): New.
308         (nvptx_stacks_alloc): New.
309         (nvptx_stacks_free): New.
310         (GOMP_OFFLOAD_run): New.
311         (GOMP_OFFLOAD_async_run): New (stub).
313 2016-11-23  Martin Jambor  <mjambor@suse.cz>
315         * testsuite/libgomp.hsa.c/bits-insns.c: New test.
316         * testsuite/libgomp.hsa.c/tiling-1.c: Likewise.
317         * testsuite/libgomp.hsa.c/tiling-2.c: Likewise.
319 2016-11-23  Martin Liska  <mliska@suse.cz>
320             Martin Jambor  <mjambor@suse.cz>
322         * plugin/hsa.h: New file.
323         * plugin/hsa_ext_finalize.h: New file.
324         * plugin/configfrag.ac: Remove hsa-kmt-lib test.  Added checks for
325         header file unistd.h, and functions secure_getenv, __secure_getenv,
326         getuid, geteuid, getgid and getegid.
327         * plugin/Makefrag.am (libgomp_plugin_hsa_la_CPPFLAGS): Added
328         -D_GNU_SOURCE.
329         * plugin/plugin-hsa.c: Include config.h, inttypes.h and stdbool.h.
330         Handle various cases of secure_getenv presence, add an implementation
331         when we can test effective UID and GID.
332         (struct hsa_runtime_fn_info): New structure.
333         (hsa_runtime_fn_info hsa_fns): New variable.
334         (hsa_runtime_lib): Likewise.
335         (support_cpu_devices): Likewise.
336         (init_enviroment_variables): Load newly introduced ENV
337         variables.
338         (hsa_warn): Call hsa run-time functions via hsa_fns structure.
339         (hsa_fatal): Likewise.
340         (DLSYM_FN): New macro.
341         (init_hsa_runtime_functions): New function.
342         (suitable_hsa_agent_p): Call hsa run-time functions via hsa_fns
343         structure.  Depending on environment, also allow CPU devices.
344         (init_hsa_context): Call hsa run-time functions via hsa_fns structure.
345         (get_kernarg_memory_region): Likewise.
346         (GOMP_OFFLOAD_init_device): Likewise.
347         (destroy_hsa_program): Likewise.
348         (init_basic_kernel_info): New function.
349         (GOMP_OFFLOAD_load_image): Use it.
350         (create_and_finalize_hsa_program): Call hsa run-time functions via
351         hsa_fns structure.
352         (create_single_kernel_dispatch): Likewise.
353         (release_kernel_dispatch): Likewise.
354         (init_single_kernel): Likewise.
355         (parse_target_attributes): Allow up multiple HSA grid dimensions.
356         (get_group_size): New function.
357         (run_kernel): Likewise.
358         (GOMP_OFFLOAD_run): Outline most functionality to run_kernel.
359         (GOMP_OFFLOAD_fini_device): Call hsa run-time functions via hsa_fns
360         structure.
361         * testsuite/lib/libgomp.exp: Remove hsa_kmt_lib support.
362         * testsuite/libgomp-test-support.exp.in: Likewise.
363         * Makefile.in: Regenerated.
364         * aclocal.m4: Likewise.
365         * config.h.in: Likewise.
366         * configure: Likewise.
367         * testsuite/Makefile.in: Likewise.
369 2016-11-15  Martin Jambor  <mjambor@suse.cz>
370             Alexander Monakov  <amonakov@ispras.ru>
372         * testsuite/libgomp.fortran/examples-4/device-1.f90 (e_57_1): Add
373         mapping clauses to target constructs.
374         * testsuite/libgomp.fortran/examples-4/device-3.f90 (e_57_3): Ditto.
376 2016-11-15  Matthias Klose  <doko@ubuntu.com>
378         * configure: Regenerate.
380 2016-11-10  Jakub Jelinek  <jakub@redhat.com>
382         * omp_lib.f90.in (openmp_version): Change to 201511 from 201307.
383         * omp_lib.h.in (openmp_version): Likewise.
384         * testsuite/libgomp.fortran/openmp_version-1.f: Expect 201511 instead
385         of 201307.
386         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
388         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90
389         (fib_wrapper): Add map(from: x) clause.
390         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90
391         (e_53_2): Likewise.
392         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90
393         (accum): Add map(tmp) clause.
394         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90
395         (accum): Add map(tofrom: tmp) clause.
396         * testsuite/libgomp.fortran/examples-4/target_data-3.f90
397         (gramSchmidt): Likewise.
398         * testsuite/libgomp.fortran/examples-4/teams-2.f90 (dotprod): Add
399         map(tofrom: sum) clause.
400         * testsuite/libgomp.fortran/nestedfn5.f90 (foo): Add twice
401         map (alloc: a, l) clause.  Add defaultmap(tofrom: scalar) clause.
402         * testsuite/libgomp.fortran/pr66199-2.f90: Adjust for linear clause
403         only allowed on the loop iterator.
404         * testsuite/libgomp.fortran/target4.f90 (foo): Add map(t) clause.
405         * testsuite/libgomp.fortran/taskloop2.f90: New test.
406         * testsuite/libgomp.fortran/taskloop4.f90: New test.
407         * testsuite/libgomp.fortran/doacross1.f90: New test.
408         * testsuite/libgomp.fortran/doacross3.f90: New test.
409         * testsuite/libgomp.fortran/taskloop1.f90: New test.
410         * testsuite/libgomp.fortran/taskloop3.f90: New test.
411         * testsuite/libgomp.fortran/doacross2.f90: New test.
412         * testsuite/libgomp.c/doacross-1.c (main): Add missing
413         #pragma omp atomic read.
414         * testsuite/libgomp.c/doacross-2.c (main): Likewise.
415         * testsuite/libgomp.c/doacross-3.c (main): Likewise.
417 2016-11-02  Cesar Philippidis  <cesar@codesourcery.com>
418             Nathan Sidwell  <nathan@acm.org>
420         * plugin/plugin-nvptx.c (nvptx_exec): Interrogate board attributes
421         to determine default geometry.
422         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Set gang
423         dimension.
425 2016-11-01  Jakub Jelinek  <jakub@redhat.com>
427         * hashtab.h: Use standard GPLv3 with runtime exception
428         boilerplate.
430 2016-10-27  Aldy Hernandez  <aldyh@redhat.com>
432         * oacc-init.c (goacc_new_thread): Use sizeof of the appropriate
433         size when allocating new thread.
435 2016-09-14  Marek Polacek  <polacek@redhat.com>
437         * testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated.
439 2016-08-19  Jakub Jelinek  <jakub@redhat.com>
441         PR fortran/71014
442         * testsuite/libgomp.fortran/pr71014.f90: New test.
444 2016-08-18  Chung-Lin Tang  <cltang@codesourcery.com>
446         PR middle-end/70895
447         * testsuite/libgomp.oacc-fortran/reduction-7.f90: Add explicit
448         firstprivate clauses.
449         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Remove explicit
450         copy clauses.
451         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
452         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise.
453         * testsuite/libgomp.oacc-c-c++-common/reduction-flt.c: Likewise.
454         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
455         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise.
456         * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
457         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
458         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.
459         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
460         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
461         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
462         * testsuite/libgomp.oacc-c-c++-common/reduction-dbl.c: Likewise.
464 2016-08-14  Chung-Lin Tang  <cltang@codesourcery.com>
466         PR fortran/70598
467         * testsuite/libgomp.oacc-fortran/host_data-1.f90: New test.
469 2016-08-08  Jakub Jelinek  <jakub@redhat.com>
471         PR c++/58706
472         * testsuite/libgomp.c++/pr58706.C: New test.
474 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
476         * testsuite/libgomp.oacc-c++/routine-1-auto.C: New file.
477         * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Likewise.
478         * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
479         Likewise.
480         * testsuite/libgomp.oacc-c++/routine-1-template.C: Likewise.
481         * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C:
482         Likewise.
483         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Adjust.
485         * testsuite/libgomp.oacc-c-c++-common/crash-1.c: Make it a "link"
486         test, and don't hardcode -O0.
488 2016-08-03  Nathan Sidwell  <nathan@codesourcery.com>
490         * testsuite/libgomp.oacc-c-c++-common/crash-1.c: New.
492 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
494         * testsuite/libgomp.oacc-c-c++-common/zero_length_subarrays.c: New
495         test.
497 2016-07-03  H.J. Lu  <hongjiu.lu@intel.com>
499         PR middle-end/71734
500         * testsuite/libgomp.fortran/pr71734-1.f90: New test.
501         * testsuite/libgomp.fortran/pr71734-2.f90: Likewise.
503 2016-07-01  Jakub Jelinek  <jakub@redhat.com>
505         PR fortran/71717
506         * testsuite/libgomp.fortran/associate3.f90: New test.
508 2016-06-17  Jakub Jelinek  <jakub@redhat.com>
510         * testsuite/libgomp.c++/target-21.C: New test.
512 2016-06-16  Jakub Jelinek  <jakub@redhat.com>
514         * testsuite/libgomp.c++/target-20.C: New test.
516 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
517             Cesar Philippidis  <cesar@codesourcery.com>
519         PR middle-end/71373
520         * libgomp.oacc-c/nested-function-1.c: New file.
521         * libgomp.oacc-c/nested-function-2.c: Likewise.
522         * libgomp.oacc-fortran/nested-function-1.f90: Likewise.
523         * libgomp.oacc-fortran/nested-function-2.f90: Likewise.
524         * libgomp.oacc-fortran/nested-function-3.f90: Likewise.
526 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
528         PR c/71381
529         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: #include
530         "../../../gcc/testsuite/c-c++-common/goacc/cache-1.c".
531         * testsuite/libgomp.oacc-fortran/cache-1.f95: New file.
533 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
535         * testsuite/libgomp.oacc-fortran/reduction-8.f90: New testcase.
536         * testsuite/libgomp.oacc-c-c++-common/reduction-8.c: New testcase.
538 2016-06-01  Cesar Philippidis  <cesar@codesourcery.com>
540         PR c/70688
541         * testsuite/libgomp.oacc-c-c++-common/pr70688.c: New file.
543 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
545         * testsuite/libgomp.c/doacross-1.c (main): Use schedule(static)
546         instead of invalid schedule(static, 0).
547         * testsuite/libgomp.c/doacross-2.c (main): Likewise.
549 2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>
551         * oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter.
552         * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Add 'int async'
553         parameter, use to set async stream around call to gomp_unmap_vars,
554         call gomp_unmap_vars() with 'do_copyfrom' set to true.
555         * plugin/plugin-nvptx.c (struct ptx_event): Add 'int val' field.
556         (event_gc): Adjust event handling loop, collect PTX_EVT_ASYNC_CLEANUP
557         events and call GOMP_PLUGIN_async_unmap_vars() for each of them.
558         (event_add): Add int parameter, initialize 'val' field when
559         adding new ptx_event struct.
560         (nvptx_evec): Adjust event_add() call arguments.
561         (nvptx_host2dev): Likewise.
562         (nvptx_dev2host): Likewise.
563         (nvptx_wait_async): Likewise.
564         (nvptx_wait_all_async): Likewise.
565         (GOMP_OFFLOAD_openacc_register_async_cleanup): Add async parameter,
566         pass to event_add() call.
567         * oacc-host.c (host_openacc_register_async_cleanup): Add 'int async'
568         parameter.
569         * oacc-mem.c (gomp_acc_remove_pointer): Adjust async case to
570         call openacc.register_async_cleanup_func() hook.
571         * oacc-parallel.c (GOACC_parallel_keyed): Likewise.
572         * target.c (gomp_copy_from_async): Delete function.
573         (gomp_map_vars): Remove async_refcount.
574         (gomp_unmap_vars): Likewise.
575         (gomp_load_image_to_device): Likewise.
576         (omp_target_associate_ptr): Likewise.
577         * libgomp.h (struct splay_tree_key_s): Remove async_refcount.
578         (acc_dispatch_t.register_async_cleanup_func): Add int parameter.
579         (gomp_copy_from_async): Remove.
581 2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>
583         * target.c (gomp_device_copy): New function.
584         (gomp_copy_host2dev): Likewise.
585         (gomp_copy_dev2host): Likewise.
586         (gomp_free_device_memory): Likewise.
587         (gomp_map_vars_existing): Adjust to call gomp_copy_host2dev.
588         (gomp_map_pointer): Likewise.
589         (gomp_map_vars): Adjust to call gomp_copy_host2dev, handle
590         NULL value from alloc_func plugin hook.
591         (gomp_unmap_tgt): Adjust to call gomp_free_device_memory.
592         (gomp_copy_from_async): Adjust to call gomp_copy_dev2host.
593         (gomp_unmap_vars): Likewise.
594         (gomp_update): Adjust to call gomp_copy_dev2host and
595         gomp_copy_host2dev functions.
596         (gomp_unload_image_from_device): Handle false value from
597         unload_image_func plugin hook.
598         (gomp_init_device): Handle false value from init_device_func
599         plugin hook.
600         (gomp_exit_data): Adjust to call gomp_copy_dev2host.
601         (omp_target_free): Adjust to call gomp_free_device_memory.
602         (omp_target_memcpy): Handle return values from host2dev_func,
603         dev2host_func, and dev2dev_func plugin hooks.
604         (omp_target_memcpy_rect_worker): Likewise.
605         (gomp_target_fini): Handle false value from fini_device_func
606         plugin hook.
607         * libgomp.h (struct gomp_device_descr): Adjust return type of
608         init_device_func, fini_device_func, unload_image_func, free_func,
609         dev2host_func,host2dev_func, and dev2dev_func plugin hooks to 'bool'.
610         * oacc-init.c (acc_shutdown_1): Handle false value from
611         fini_device_func plugin hook.
612         * oacc-host.c (host_init_device): Change return type to bool.
613         (host_fini_device): Likewise.
614         (host_unload_image): Likewise.
615         (host_free): Likewise.
616         (host_dev2host): Likewise.
617         (host_host2dev): Likewise.
618         * oacc-mem.c (acc_free): Handle plugin hook fatal error case.
619         (acc_memcpy_to_device): Likewise.
620         (acc_memcpy_from_device): Likewise.
621         (delete_copyout): Add libfnname parameter, handle free_func
622         hook fatal error case.
623         (acc_delete): Adjust delete_copyout call.
624         (acc_copyout): Likewise.
625         (update_dev_host): Move gomp_mutex_unlock to after
626         host2dev/dev2host hook calls.
628         * plugin/plugin-hsa.c (hsa_warn): Adjust 'hsa_error' local variable
629         to 'hsa_error_msg', for clarity.
630         (hsa_fatal): Likewise.
631         (hsa_error): New function.
632         (init_hsa_context): Change return type to bool, adjust to return
633         false on error.
634         (GOMP_OFFLOAD_get_num_devices): Adjust to handle init_hsa_context
635         return value.
636         (GOMP_OFFLOAD_init_device): Change return type to bool, adjust to
637         return false on error.
638         (get_agent_info): Adjust to return NULL on error.
639         (destroy_hsa_program): Change return type to bool, adjust to
640         return false on error.
641         (GOMP_OFFLOAD_load_image): Adjust to return -1 on error.
642         (destroy_module): Change return type to bool, adjust to
643         return false on error.
644         (GOMP_OFFLOAD_unload_image): Likewise.
645         (GOMP_OFFLOAD_fini_device): Likewise.
646         (GOMP_OFFLOAD_alloc): Change to return NULL when called.
647         (GOMP_OFFLOAD_free): Change to return false when called.
648         (GOMP_OFFLOAD_dev2host): Likewise.
649         (GOMP_OFFLOAD_host2dev): Likewise.
650         (GOMP_OFFLOAD_dev2dev): Likewise.
652         * plugin/plugin-nvptx.c (CUDA_CALL_ERET): New convenience macro.
653         (CUDA_CALL): Likewise.
654         (CUDA_CALL_ASSERT): Likewise.
655         (map_init): Change return type to bool, use CUDA_CALL* macros.
656         (map_fini): Likewise.
657         (init_streams_for_device): Change return type to bool, adjust
658         call to map_init.
659         (fini_streams_for_device): Change return type to bool, adjust
660         call to map_fini.
661         (select_stream_for_async): Release stream_lock before calls to
662         GOMP_PLUGIN_fatal, adjust call to map_init.
663         (nvptx_init): Use CUDA_CALL* macros.
664         (nvptx_attach_host_thread_to_device): Change return type to bool,
665         use CUDA_CALL* macros.
666         (nvptx_open_device): Use CUDA_CALL* macros.
667         (nvptx_close_device): Change return type to bool, use CUDA_CALL*
668         macros.
669         (nvptx_get_num_devices): Use CUDA_CALL* macros.
670         (link_ptx): Change return type to bool, use CUDA_CALL* macros.
671         (nvptx_exec): Use CUDA_CALL* macros.
672         (nvptx_alloc): Use CUDA_CALL* macros.
673         (nvptx_free): Change return type to bool, use CUDA_CALL* macros.
674         (nvptx_host2dev): Likewise.
675         (nvptx_dev2host): Likewise.
676         (nvptx_wait): Use CUDA_CALL* macros.
677         (nvptx_wait_async): Likewise.
678         (nvptx_wait_all): Likewise.
679         (nvptx_wait_all_async): Likewise.
680         (nvptx_set_cuda_stream): Adjust order of stream_lock acquire,
681         use CUDA_CALL* macros, adjust call to map_fini.
682         (GOMP_OFFLOAD_init_device): Change return type to bool,
683         adjust code accordingly.
684         (GOMP_OFFLOAD_fini_device): Likewise.
685         (GOMP_OFFLOAD_load_image): Adjust calls to
686         nvptx_attach_host_thread_to_device/link_ptx to handle errors,
687         use CUDA_CALL* macros.
688         (GOMP_OFFLOAD_unload_image): Change return type to bool, adjust
689         return code.
690         (GOMP_OFFLOAD_alloc): Adjust calls to code to handle error return.
691         (GOMP_OFFLOAD_free): Change return type to bool, adjust calls to
692         handle error return.
693         (GOMP_OFFLOAD_dev2host): Likewise.
694         (GOMP_OFFLOAD_host2dev): Likewise.
695         (GOMP_OFFLOAD_openacc_register_async_cleanup): Use CUDA_CALL* macros.
696         (GOMP_OFFLOAD_openacc_create_thread_data): Likewise.
698 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
700         * oacc-mem.c (acc_malloc): Update handling of shared-memory targets.
701         (acc_free): Likewise.
702         (acc_memcpy_to_device): Likewise.
703         (acc_memcpy_from_device): Likewise.
704         (acc_deviceptr): Likewise.
705         (acc_hostptr): Likewise.
706         (acc_is_present): Likewise.
707         (acc_map_data): Likewise.
708         (acc_unmap_data): Likewise.
709         (present_create_copy): Likewise.
710         (delete_copyout): Likewise.
711         (update_dev_host): Likewise.
712         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Remove xfail.
713         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: New test.
714         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Adjust test.
715         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
716         * testsuite/libgomp.oacc-c-c++-common/enter_exit-lib.c: New test.
717         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Adjust test so that
718         it only runs on nvptx targets.
719         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
720         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
721         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
722         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
723         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
724         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
725         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
726         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
727         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
728         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
729         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
730         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
731         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
732         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
733         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
734         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
735         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
736         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
737         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
738         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
739         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
740         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
741         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
743 2016-05-23  Martin Jambor  <mjambor@suse.cz>
745         * testsuite/libgomp.hsa.c/switch-sbr-2.c: New test.
747 2016-05-17  Chung-Lin Tang  <cltang@codesourcery.com>
749         * oacc-init.c (acc_init): Remove !cached_base_dev condition on call
750         to gomp_init_targets_once.
751         (acc_set_device_type): Remove !cached_base_dev condition on call to
752         gomp_init_targets_once, move call to before acc_device_lock acquire,
753         to avoid deadlock.
754         (acc_get_device_num): Remove !cached_base_dev condition on call to
755         gomp_init_targets_once.
756         (acc_set_device_num): Likewise.
758 2016-05-16  Martin Jambor  <mjambor@suse.cz>
760         * testsuite/libgomp.hsa.c/complex-align-2.c: New test.
762 2016-05-02  Nathan Sidwell  <nathan@codesourcery.com>
764         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust
765         expected partitioning.
767 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
769         PR middle-end/70626
770         * testsuite/libgomp.oacc-c++/template-reduction.C: Adjust test.
771         * testsuite/libgomp.oacc-c-c++-common/combined-reduction.c: New test.
772         * testsuite/libgomp.oacc-fortran/combined-reduction.f90: New test.
774 2016-04-21  Alexander Monakov  <amonakov@ispras.ru>
776         * plugin/plugin-nvptx.c (map_fini): Make cuMemFreeHost error
777         non-fatal.
779 2016-04-19  Jakub Jelinek  <jakub@redhat.com>
781         PR middle-end/70680
782         * testsuite/libgomp.c/pr70680-1.c: New test.
783         * testsuite/libgomp.c/pr70680-2.c: New test.
785 2016-04-14  Cesar Philippidis  <cesar@codesourcery.com>
787         * testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Don't
788         pass parameter variables to subroutines.
790 2016-04-14  Cesar Philippidis  <cesar@codesourcery.com>
792         PR middle-end/70643
793         * testsuite/libgomp.oacc-fortran/pr70643.f90: New test.
795 2016-04-13  Cesar Philippidis  <cesar@codesourcery.com>
797         PR testsuite/68242
798         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Adjust test.
799         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
801 2016-04-12  Thomas Schwinge  <thomas@codesourcery.com>
803         * libgomp_g.h: Rename GOACC_parallel_keyd prototype to
804         GOACC_parallel_keyed, restore GOACC_parallel prototype, new
805         GOACC_declare prototype.
807         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c:
808         Merge this file, and...
809         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gv-np-1.c:
810         ... this file, and...
811         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c:
812         ... this file, and...
813         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c:
814         ... this file, and...
815         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c:
816         ... this file, and...
817         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c:
818         ... this file, and...
819         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c:
820         ... this file, and...
821         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c:
822         ... this file, and...
823         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c:
824         ... this file, and...
825         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c:
826         ... this file, and...
827         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c:
828         ... this file, and...
829         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c:
830         ... this file, and...
831         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c:
832         ... this file into...
833         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: ... this
834         file.
836         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c:
837         Make failure observable.
839 2016-04-12  Jakub Jelinek  <jakub@redhat.com>
841         * libgomp.h (struct gomp_target_task): Remove firstprivate_copies
842         field.
843         * target.c (gomp_target_fallback_firstprivate,
844         gomp_target_unshare_firstprivate): Removed.
845         (GOMP_target_ext): Copy firstprivate vars into gomp_allocaed memory
846         before waiting for dependencies.
847         (gomp_target_task_fn): Don't copy firstprivate vars here.
848         * task.c (GOMP_PLUGIN_target_task_completion): Don't free
849         firstprivate_copies here.
850         (gomp_create_target_task): Don't initialize firstprivate_copies field.
851         * testsuite/libgomp.c/target-25.c (main): Use map (to:) instead of
852         explicit/implicit firstprivate.
854 2016-04-08  Cesar Philippidis  <cesar@codesourcery.com>
856         PR lto/70289
857         PR ipa/70348
858         PR tree-optimization/70373
859         PR middle-end/70533
860         PR middle-end/70534
861         PR middle-end/70535
862         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c: New
863         test.
864         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c: New
865         test.
866         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c: New
867         test.
868         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c: New
869         test.
870         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c: New
871         test.
872         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c: New
873         test.
874         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c: New
875         test.
876         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c: New
877         test.
878         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c: New
879         test.
880         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c: New test.
881         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c: New test.
882         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c: New test.
883         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c: New
884         test.
885         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c: New
886         test.
887         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c: New
888         test.
889         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c: New
890         test.
891         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Add test
892         coverage.
893         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
894         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
895         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: New test.
896         * testsuite/libgomp.oacc-c-c++-common/pr70289.c: New test.
897         * testsuite/libgomp.oacc-c-c++-common/pr70373.c: New test.
898         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Add test
899         coverage.
900         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
901         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
902         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
903         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
904         * testsuite/libgomp.oacc-c-c++-common/reduction-6.c: New test.
905         * testsuite/libgomp.oacc-c-c++-common/reduction.h: New test.
906         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: New test.
907         * testsuite/libgomp.oacc-fortran/pr70289.f90: New test.
908         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Add test coverage.
909         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
910         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
911         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
912         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
913         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
914         * testsuite/libgomp.oacc-fortran/reduction-7.f90: New test.
916 2016-03-30  Thomas Schwinge  <thomas@codesourcery.com>
917             James Norris  <jnorris@codesourcery.com>
918             Nathan Sidwell  <nathan@codesourcery.com>
919             Julian Brown  <julian@codesourcery.com>
920             Cesar Philippidis  <cesar@codesourcery.com>
921             Chung-Lin Tang  <cltang@codesourcery.com>
922             Tom de Vries  <tom@codesourcery.com>
924         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Update.
925         * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
926         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
927         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Likewise.
928         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
929         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
930         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
931         * testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise.
932         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
933         XFAIL.
934         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Update.
935         Incorporate...
936         * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: ... this
937         file.
938         * testsuite/libgomp.oacc-c++/template-reduction.C: New file.
939         * testsuite/libgomp.oacc-c-c++-common/gang-static-1.c: Likewise.
940         * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Likewise.
941         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-clauses.c:
942         Likewise.
943         * testsuite/libgomp.oacc-c-c++-common/private-variables.c:
944         Likewise.
945         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
946         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Likewise.
947         * testsuite/libgomp.oacc-c-c++-common/routine-4.c: Likewise.
948         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise.
949         * testsuite/libgomp.oacc-fortran/clauses-1.f90: Likewise.
950         * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
951         * testsuite/libgomp.oacc-fortran/firstprivate-1.f90: Likewise.
952         * testsuite/libgomp.oacc-fortran/gang-static-1.f90: Likewise.
953         * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
954         * testsuite/libgomp.oacc-fortran/implicit-firstprivate-ref.f90:
955         Likewise.
956         * testsuite/libgomp.oacc-fortran/pr68813.f90: Likewise.
957         * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
958         * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Merge this
959         file...
960         * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: ..., and this
961         file into...
962         * testsuite/libgomp.oacc-c-c++-common/data-clauses.h: ... this new
963         file.  Update.
964         * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels.c: New
965         file.
966         * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel.c:
967         Likewise.
968         * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: Rename to...
969         * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c:
970         ... this new file.  Update.
971         * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: Rename to...
972         * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c:
973         ... this new file.  Update.
974         * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: New
975         file.  Incorporate...
976         * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c: ... this
977         file, and...
978         * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: ... this
979         file, and...
980         * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: ... this
981         file.
982         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Remove file.
984 2016-03-29  Thomas Schwinge  <thomas@codesourcery.com>
986         * testsuite/libgomp.oacc-c++/c++.exp [!lang_test_file_found]: Call
987         set-torture-options.
989 2016-03-24  Thomas Schwinge  <thomas@codesourcery.com>
991         * testsuite/libgomp.oacc-c++/c++.exp: Set up torture testing, use
992         gcc-dg-runtest.
993         * testsuite/libgomp.oacc-c/c.exp: Likewise.
994         * testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: Specify
995         -fno-builtin-acc_on_device instead of -O0.
996         * testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: Skip for
997         -O0.
998         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
999         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c:
1000         Likewise.
1001         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
1002         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
1003         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
1004         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
1005         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
1006         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
1007         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
1008         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
1009         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
1010         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
1011         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
1012         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
1013         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
1014         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise.
1015         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise.
1016         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
1017         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise.
1018         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-2.c:
1019         Don't specify -O2.
1020         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-3.c:
1021         Likewise.
1022         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta.c:
1023         Likewise.
1025 2016-03-24  Martin Liska  <mliska@suse.cz>
1027         * plugin/plugin-hsa.c (packet_store_release): New function
1028         that is taken from the HSA runtime manual.
1029         (GOMP_OFFLOAD_run): Use the function.
1031 2016-03-23  Jakub Jelinek  <jakub@redhat.com>
1033         PR c++/70376
1034         * testsuite/libgomp.c++/pr70376.C: New test.
1036 2016-03-23  Tom de Vries  <tom@codesourcery.com>
1038         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Add missing
1039         initialization of lresult and lvresult.
1040         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Same.
1042 2016-03-23  James Norris  <jnorris@codesourcery.com>
1043             Daichi Fukuoka <dc-fukuoka@sgi.com>
1045         PR libgomp/69414
1046         * oacc-mem.c (delete_copyout, update_dev_host): Fix device address.
1047         * testsuite/libgomp.oacc-c-c++-common/update-1.c: Additional tests.
1048         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
1049         * testsuite/libgomp.oacc-fortran/update-1.f90: New file.
1051 2016-03-23  Martin Liska  <mliska@suse.cz>
1053         PR hsa/70337
1054         * plugin/plugin-hsa.c (GOMP_OFFLOAD_run): Copy shadow
1055         argument just in case a dispatched kernel uses that argument.
1057 2016-03-16  Thomas Schwinge  <thomas@codesourcery.com>
1059         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Adjust to
1060         -ftree-parallelize-loops/-fopenacc changes.
1061         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95:
1062         Likewise.
1063         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95:
1064         Likewise.
1065         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95:
1066         Likewise.
1067         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95:
1068         Likewise.
1069         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Likewise.
1070         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Likewise.
1072 2016-03-13  Thomas Schwinge  <thomas@codesourcery.com>
1074         * testsuite/lib/libgomp.exp (libgomp_init): Potentially append to
1075         always_ld_library_path the path to libgcc_s.
1077 2016-03-10  Cesar Philippidis  <cesar@codesourcery.com>
1079         PR testsuite/70009
1080         * testsuite/libgomp.oacc-c-c++-common/vprop.c: Make test data signed.
1082 2016-03-09  Tom de Vries  <tom@codesourcery.com>
1084         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: New test.
1085         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95: Same.
1086         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95:
1087         Same.
1088         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95: Same.
1089         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95: Same.
1090         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Same.
1091         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Same.
1093 2016-03-07  Martin Jambor  <mjambor@suse.cz>
1095         * testsuite/lib/libgomp.exp
1096         (check_effective_target_hsa_offloading_selected_nocache): New.
1097         (check_effective_target_hsa_offloading_selected): Likewise.
1098         * testsuite/libgomp.hsa.c/c.exp: Likewise.
1099         * testsuite/libgomp.hsa.c/alloca-1.c: Likewise.
1100         * testsuite/libgomp.hsa.c/bitfield-1.c: Likewise.
1101         * testsuite/libgomp.hsa.c/builtins-1.c: Likewise.
1102         * testsuite/libgomp.hsa.c/complex-1.c: Likewise.
1103         * testsuite/libgomp.hsa.c/formal-actual-args-1.c: Likewise.
1104         * testsuite/libgomp.hsa.c/function-call-1.c: Likewise.
1105         * testsuite/libgomp.hsa.c/get-level-1.c: Likewise.
1106         * testsuite/libgomp.hsa.c/gridify-1.c: Likewise.
1107         * testsuite/libgomp.hsa.c/gridify-2.c: Likewise.
1108         * testsuite/libgomp.hsa.c/gridify-3.c: Likewise.
1109         * testsuite/libgomp.hsa.c/gridify-4.c: Likewise.
1110         * testsuite/libgomp.hsa.c/memory-operations-1.c: Likewise.
1111         * testsuite/libgomp.hsa.c/pr69568.c: Likewise.
1112         * testsuite/libgomp.hsa.c/rotate-1.c: Likewise.
1113         * testsuite/libgomp.hsa.c/switch-1.c: Likewise.
1114         * testsuite/libgomp.hsa.c/switch-branch-1.c: Likewise.
1116 2016-03-07  Martin Jambor  <mjambor@suse.cz>
1118         * testsuite/libgomp.c/examples-4/async_target-2.c: Only run on
1119         non-shared memory accelerators.
1120         * testsuite/libgomp.c/examples-4/device-1.c: Likewise.
1121         * testsuite/libgomp.c/examples-4/target-5.c: Likewise.
1122         * testsuite/libgomp.c/examples-4/target_data-6.c: Likewise.
1123         * testsuite/libgomp.c/examples-4/target_data-7.c: Likewise.
1124         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: Likewise.
1125         * testsuite/libgomp.fortran/examples-4/device-1.f90: Likewise.
1126         * testsuite/libgomp.fortran/examples-4/target-5.f90: Likewise.
1127         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: Likewise.
1128         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: Likewise.
1130 2016-03-07  Martin Jambor  <mjambor@suse.cz>
1132         * testsuite/lib/libgomp.exp (libgomp_init): Append -Wno-hsa to
1133         ALWAYS_CFLAGS.
1135 2016-03-02  Jakub Jelinek  <jakub@redhat.com>
1137         PR libgomp/69555
1138         * testsuite/libgomp.c++/pr69555-1.C: New test.
1139         * testsuite/libgomp.c++/pr69555-2.C: New test.
1141 2016-02-26  Keith McDaniel <k.allen.mcdaniel@gmail.com>
1142             Martin Jambor  <mjambor@suse.cz>
1144         * testsuite/lib/libgomp.exp
1145         (check_effective_target_offload_device_shared_as): New proc.
1146         * testsuite/libgomp.c++/declare_target-1.C: New test.
1148 2016-02-25  Ilya Verbin  <ilya.verbin@intel.com>
1150         PR driver/68463
1151         * testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: Remove.
1153 2016-02-23  Thomas Schwinge  <thomas@codesourcery.com>
1155         * oacc-parallel.c (GOACC_parallel_keyed): Initialize dims.
1156         * plugin/plugin-nvptx.c (nvptx_exec): Provide default values for
1157         dims.
1158         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Adjust to
1159         -ftree-parallelize-loops/-fopenacc changes.
1160         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Likewise.
1161         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c:
1162         Likewise.
1163         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c:
1164         Likewise.
1165         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c:
1166         Likewise.
1167         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c:
1168         Likewise.
1169         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c:
1170         Likewise.
1171         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c:
1172         Likewise.
1173         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c:
1174         Likewise.
1175         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Likewise.
1176         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c:
1177         Likewise.
1178         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Likewise.
1179         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c:
1180         Likewise.
1181         * testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Likewise.
1182         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c:
1183         Likewise.
1185 2016-02-22  Cesar Philippidis  <cesar@codesourcery.com>
1187         * testsuite/libgomp.oacc-c-c++-common/vprop.c: New test.
1189 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
1191         PR driver/69805
1192         * testsuite/libgomp.c/pr69805.c: New test.
1194 2016-02-16  Tom de Vries  <tom@codesourcery.com>
1196         PR lto/67709
1197         * testsuite/libgomp.fortran/declare-simd-4.f90: New test.
1199 2016-02-09  Tom de Vries  <tom@codesourcery.com>
1201         PR tree-optimization/69599
1202         * testsuite/libgomp.c/omp-nested-3.c: New test.
1203         * testsuite/libgomp.c/pr46032-2.c: New test.
1204         * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: New test.
1205         * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: New test.
1207 2016-02-09  Tom de Vries  <tom@codesourcery.com>
1209         PR lto/69707
1210         * testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: New test.
1212 2016-02-02  Alexander Monakov  <amonakov@ispras.ru>
1214         * testsuite/libgomp.c/target-31.c: Fix testcase.
1216 2016-02-02  Alexander Monakov  <amonakov@ispras.ru>
1218         * testsuite/libgomp.c/examples-4/teams-3.c: Add missing reduction
1219         clause.
1220         * testsuite/libgomp.c/examples-4/teams-4.c: Likewise.
1221         * testsuite/libgomp.fortran/examples-4/teams-3.f90: Add missing
1222         reduction and map clauses.
1223         * testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise.
1225 2016-02-02  James Norris  <jnorris@codesourcery.com>
1227         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Fix clause.
1229 2016-02-02  Thomas Schwinge  <thomas@codesourcery.com>
1231         * libgomp.map (GOACC_2.0): Remove GOACC_host_data.
1232         * oacc-parallel.c (GOACC_host_data): Remove function definition.
1234         * testsuite/lib/libgomp.exp: Skip hsa offloading for OpenACC test
1235         cases.
1237         * plugin/configfrag.ac (HSA_KMT_LIB, HSA_KMT_LDFLAGS): New
1238         variables.
1239         * testsuite/libgomp-test-support.exp.in (hsa_runtime_lib)
1240         (hsa_kmt_lib): Set variables.
1241         * testsuite/lib/libgomp.exp (libgomp_init): Use them to amend
1242         always_ld_library_path.
1243         * Makefile.in: Regenerate.
1244         * configure: Likewise.
1245         * testsuite/Makefile.in: Likewise.
1247         * plugin/configfrag.ac (offload_additional_options)
1248         (offload_additional_lib_paths): Don't amend for hsa offloading.
1249         * configure: Regenerate.
1251         * plugin/configfrag.ac: Don't configure for offloading target if
1252         we don't build the corresponding plugin.
1253         * configure: Regenerate.
1255 2016-02-01  Nathan Sidwell  <nathan@codesourcery.com>
1257         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: New.
1258         * testsuite/libgomp.oacc-fortran/routine-7.f90: Serialize loop.
1260 2016-01-26  Tom de Vries  <tom@codesourcery.com>
1262         PR tree-optimization/69110
1263         * testsuite/libgomp.c/pr69110.c: New test.
1265 2016-01-25  Richard Biener  <rguenther@suse.de>
1267         PR lto/69393
1268         * testsuite/libgomp.c++/pr69393.C: New testcase.
1270 2016-01-22  Ilya Verbin  <ilya.verbin@intel.com>
1272         * target.c (gomp_get_target_fn_addr): Allow host fallback if target
1273         function wasn't mapped to the device with non-shared memory.
1275 2016-01-20  Ilya Verbin  <ilya.verbin@intel.com>
1277         * task.c (gomp_create_target_task): Set firstprivate_copies to NULL.
1279 2016-01-19  Martin Jambor  <mjambor@suse.cz>
1280             Martin Liska  <mliska@suse.cz>
1282         * plugin/Makefrag.am: Add HSA plugin requirements.
1283         * plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable.
1284         (HSA_RUNTIME_LIB): Likewise.
1285         (HSA_RUNTIME_CPPFLAGS): Likewise.
1286         (HSA_RUNTIME_INCLUDE): New substitution.
1287         (HSA_RUNTIME_LIB): Likewise.
1288         (HSA_RUNTIME_LDFLAGS): Likewise.
1289         (hsa-runtime): New configure option.
1290         (hsa-runtime-include): Likewise.
1291         (hsa-runtime-lib): Likewise.
1292         (PLUGIN_HSA): New substitution variable.
1293         Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new
1294         configure options.
1295         (PLUGIN_HSA_CPPFLAGS): Likewise.
1296         (PLUGIN_HSA_LDFLAGS): Likewise.
1297         (PLUGIN_HSA_LIBS): Likewise.
1298         Check that we have access to HSA run-time.
1299         * libgomp-plugin.h (offload_target_type): New element
1300         OFFLOAD_TARGET_TYPE_HSA.
1301         * libgomp.h (gomp_target_task): New fields firstprivate_copies and
1302         args.
1303         (bool gomp_create_target_task): Updated.
1304         (gomp_device_descr): Extra parameter of run_func and async_run_func,
1305         new field can_run_func.
1306         * libgomp_g.h (GOMP_target_ext): Update prototype.
1307         * oacc-host.c (host_run): Added a new parameter args.
1308         * target.c (calculate_firstprivate_requirements): New function.
1309         (copy_firstprivate_data): Likewise.
1310         (gomp_target_fallback_firstprivate): Use them.
1311         (gomp_target_unshare_firstprivate): New function.
1312         (gomp_get_target_fn_addr): Allow returning NULL for shared memory
1313         devices.
1314         (GOMP_target): Do host fallback for all shared memory devices.  Do not
1315         pass any args to plugins.
1316         (GOMP_target_ext): Introduce device-specific argument parameter args.
1317         Allow host fallback if device shares memory.  Do not remap data if
1318         device has shared memory.
1319         (gomp_target_task_fn): Likewise.  Also treat shared memory devices
1320         like host fallback for mappings.
1321         (GOMP_target_data): Treat shared memory devices like host fallback.
1322         (GOMP_target_data_ext): Likewise.
1323         (GOMP_target_update): Likewise.
1324         (GOMP_target_update_ext): Likewise.  Also pass NULL as args to
1325         gomp_create_target_task.
1326         (GOMP_target_enter_exit_data): Likewise.
1327         (omp_target_alloc): Treat shared memory devices like host fallback.
1328         (omp_target_free): Likewise.
1329         (omp_target_is_present): Likewise.
1330         (omp_target_memcpy): Likewise.
1331         (omp_target_memcpy_rect): Likewise.
1332         (omp_target_associate_ptr): Likewise.
1333         (gomp_load_plugin_for_device): Also load can_run.
1334         * task.c (GOMP_PLUGIN_target_task_completion): Free
1335         firstprivate_copies.
1336         (gomp_create_target_task): Accept new argument args and store it to
1337         ttask.
1338         * plugin/plugin-hsa.c: New file.
1340 2016-01-18  Tom de Vries  <tom@codesourcery.com>
1342         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: New test.
1343         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Same.
1344         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c: Same.
1345         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c: Same.
1346         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c: Same.
1347         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c: Same.
1348         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c: Same.
1349         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c: Same.
1350         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c: Same.
1351         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-2.c: Same.
1352         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit-2.c:
1353         Same.
1354         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit.c:
1355         Same.
1356         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-update.c: Same.
1357         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data.c: Same.
1358         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Same.
1359         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c: Same.
1360         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Same.
1361         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c: Same.
1362         * testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Same.
1363         * testsuite/libgomp.oacc-c-c++-common/kernels-parallel-loop-data-enter-exit.c:
1364         Same.
1365         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c: Same.
1367 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
1369         * task.c (GOMP_PLUGIN_target_task_completion): Add missing return.
1371 2016-01-15  Cesar Philippidis  <cesar@codesourcery.com>
1373         * testsuite/libgomp.oacc-fortran/kernels-data.f90: New test.
1375 2016-01-12  James Norris  <jnorris@codesourcery.com>
1377         * libgomp.texi: Updates for OpenACC.
1379 2016-01-11  Alexander Monakov  <amonakov@ispras.ru>
1381         * plugin/plugin-nvptx.c (link_ptx): Do not set CU_JIT_TARGET.
1383 2016-01-07  H.J. Lu  <hongjiu.lu@intel.com>
1385         PR fortran/66680
1386         * testsuite/libgomp.fortran/pr66680.f90: New test.
1388 2016-01-07  Jakub Jelinek  <jakub@redhat.com>
1390         PR middle-end/68960
1391         * testsuite/libgomp.c/pr68960.c: New test.
1393 2016-01-06  Nathan Sidwell  <nathan@acm.org>
1395         * openacc.h (acc_on_device): Add routine pragma for C++ wrapper.
1396         * testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: New.
1398 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1400         Update copyright years.
1402         * libgomp.texi: Bump @copying's copyright year.
1404 2015-12-31  Nathan Sidwell  <nathan@acm.org>
1406         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Correct
1407         dg-additional-options syntax.
1408         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
1409         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
1410         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise.
1411         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
1412         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise.
1413         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
1414         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
1415         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
1416         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
1417         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise.
1418         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
1419         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
1420         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
1421         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise.
1422         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
1423         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
1424         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
1425         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
1427 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
1429         * libgomp.h (REFCOUNT_LINK): Define.
1430         (struct splay_tree_key_s): Add link_key.
1431         * target.c (gomp_map_vars): Treat REFCOUNT_LINK objects as not mapped.
1432         Replace target address of the pointer with target address of newly
1433         mapped object in the splay tree.  Set link pointer on target to the
1434         device address of the mapped object.
1435         (gomp_unmap_vars): Restore target address of the pointer in the splay
1436         tree for REFCOUNT_LINK objects after unmapping.
1437         (gomp_load_image_to_device): Set refcount to REFCOUNT_LINK for "omp
1438         declare target link" objects.
1439         (gomp_unload_image_from_device): Replace j with i.  Force unmap of all
1440         "omp declare target link" objects, which were mapped for the image.
1441         (gomp_exit_data): Restore target address of the pointer in the splay
1442         tree for REFCOUNT_LINK objects after unmapping.
1443         * testsuite/libgomp.c/target-link-1.c: New file.
1445 2015-12-14  Ilya Verbin  <ilya.verbin@intel.com>
1447         * libgomp.h (gomp_device_state): New enum.
1448         (struct gomp_device_descr): Replace is_initialized with state.
1449         (gomp_fini_device): Remove declaration.
1450         * oacc-host.c (host_dispatch): Use state instead of is_initialized.
1451         * oacc-init.c (acc_init_1): Use state instead of is_initialized.
1452         (acc_shutdown_1): Likewise.  Inline gomp_fini_device.
1453         (acc_set_device_type): Use state instead of is_initialized.
1454         (acc_set_device_num): Likewise.
1455         * target.c (resolve_device): Use state instead of is_initialized.
1456         Do not initialize finalized device.
1457         (gomp_map_vars): Do nothing if device is finalized.
1458         (gomp_unmap_vars): Likewise.
1459         (gomp_update): Likewise.
1460         (GOMP_offload_register_ver): Use state instead of is_initialized.
1461         (GOMP_offload_unregister_ver): Likewise.
1462         (gomp_init_device): Likewise.
1463         (gomp_unload_device): Likewise.
1464         (gomp_fini_device): Remove.
1465         (gomp_get_target_fn_addr): Do nothing if device is finalized.
1466         (GOMP_target): Go to host fallback if device is finalized.
1467         (GOMP_target_ext): Likewise.
1468         (gomp_exit_data): Do nothing if device is finalized.
1469         (gomp_target_task_fn): Go to host fallback if device is finalized.
1470         (gomp_target_fini): New static function.
1471         (gomp_target_init): Use state instead of is_initialized.
1472         Call gomp_target_fini at exit.
1474 2015-12-09  Tom de Vries  <tom@codesourcery.com>
1476         PR tree-optimization/68716
1477         * testsuite/libgomp.c/omp-nested-2.c: New test.
1479 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
1481         * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: Restrict to
1482         target openacc_nvidia_accel_selected.
1483         * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: Likewise.
1484         * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: Likewise.
1485         * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: Remove file.
1486         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: Remove file.
1488 2015-12-01  Julian Brown  <julian@codesourcery.com>
1489             James Norris  <James_Norris@mentor.com>
1491         * oacc-parallel.c (GOACC_host_data): New function.
1492         * libgomp.map (GOACC_host_data): Add to GOACC_2.0.1.
1493         * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: New test.
1494         * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: New test.
1495         * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: New test.
1496         * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: New test.
1497         * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: New test.
1498         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: New test.
1500 2015-11-30  James Norris  <jnorris@codesourcery.com>
1501             Cesar Philippidis  <cesar@codesourcery.com>
1503         libgomp/
1504         * libgomp.oacc-fortran/routine-5.f90: New test.
1505         * libgomp.oacc-fortran/routine-7.f90: New test.
1506         * libgomp.oacc-fortran/routine-9.f90: New test.
1508 2015-11-30  Tom de Vries  <tom@codesourcery.com>
1510         PR tree-optimization/46032
1511         * testsuite/libgomp.c/pr46032.c: New test.
1513 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
1515         PR libgomp/68579
1516         * task.c (gomp_task_run_post_handle_depend_hash): New forward decl.
1517         (gomp_create_target_task): Call it before freeing
1518         GOMP_TARGET_TASK_DATA tasks.
1520         PR c/63326
1521         * testsuite/libgomp.c/cancel-parallel-2.c (foo): Add semicolon
1522         in between case label and OpenMP standalone directives.
1523         * testsuite/libgomp.c++/cancel-parallel-2.C (foo): Likewise.
1525 2015-11-26  David Edelsohn  <dje.gcc@gmail.com>
1527         * configure: Regenerate.
1529 2015-11-26  Jakub Jelinek  <jakub@redhat.com>
1531         * testsuite/libgomp.c/target-35.c: New test.
1533 2015-11-22  James Norris  <jnorris@codesourcery.com>
1534             Cesar Philippidis  <cesar@codesourcery.com>
1536         * testsuite/libgomp.oacc-fortran/declare-1.f90: New test.
1537         * testsuite/libgomp.oacc-fortran/declare-2.f90: Likewise.
1538         * testsuite/libgomp.oacc-fortran/declare-3.f90: Likewise.
1539         * testsuite/libgomp.oacc-fortran/declare-4.f90: Likewise.
1540         * testsuite/libgomp.oacc-fortran/declare-5.f90: Likewise.
1542 2015-11-20  Jakub Jelinek  <jakub@redhat.com>
1544         PR middle-end/68221
1545         * testsuite/libgomp.c/reduction-11.c: Remove xfail.
1546         * testsuite/libgomp.c/reduction-12.c: Likewise.
1547         * testsuite/libgomp.c++/reduction-11.C: Likewise.
1548         * testsuite/libgomp.c++/reduction-12.C: Likewise.
1550 2015-11-19  Nathan Sidwell  <nathan@codesourcery.com>
1552         * libgomp.oacc-c-c++-common/reduction-dbl.c: New.
1553         * libgomp.oacc-c-c++-common/reduction-flt.c: New.
1554         * libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Use typedef.
1555         * libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Use typedef.
1556         * libgomp.oacc-c-c++-common/reduction-2.c: Uncomment broken tests
1557         and fix.
1558         * libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
1559         * libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
1561 2015-11-18  Nathan Sidwell  <nathan@codesourcery.com>
1563         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Add
1564         worker & gang cases.
1565         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.
1567 2015-11-17  Cesar Philippidis  <cesar@codesourcery.com>
1569         * config/nvptx/priority_queue.c: New file.
1571 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
1573         * libgomp.texi: Update references from OpenMP 4.0 to OpenMP 4.5
1574         sections.
1576 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
1577             Aldy Hernandez  <aldyh@redhat.com>
1578             Ilya Verbin  <ilya.verbin@intel.com>
1580         * ordered.c (gomp_doacross_init, GOMP_doacross_post,
1581         GOMP_doacross_wait, gomp_doacross_ull_init, GOMP_doacross_ull_post,
1582         GOMP_doacross_ull_wait): For GFS_GUIDED don't divide number of
1583         iterators or IV by chunk size.
1584         * parallel.c (gomp_resolve_num_threads): Don't assume that
1585         if thr->ts.team is non-NULL, then pool must be non-NULL.
1586         * libgomp-plugin.h (GOMP_PLUGIN_target_task_completion): Declare.
1587         * libgomp.map (GOMP_PLUGIN_1.1): New symbol version, export
1588         GOMP_PLUGIN_target_task_completion.
1589         * Makefile.am (libgomp_la_SOURCES): Add priority_queue.c.
1590         * Makefile.in: Regenerate.
1591         * libgomp.h: Shuffle prototypes and forward definitions around so
1592         priority queues can be defined.
1593         (enum gomp_task_kind): Add GOMP_TASK_ASYNC_RUNNING.
1594         (enum gomp_target_task_state): New enum.
1595         (struct gomp_target_task): Add state, tgt, task and team fields.
1596         (gomp_create_target_task): Change return type to bool, add
1597         state argument.
1598         (gomp_target_task_fn): Change return type to bool.
1599         (struct gomp_device_descr): Add async_run_func.
1600         (struct gomp_task): Remove children, next_child, prev_child,
1601         next_queue, prev_queue, next_taskgroup, prev_taskgroup.
1602         Add pnode field.
1603         (struct gomp_taskgroup): Remove children.
1604         Add taskgroup_queue.
1605         (struct gomp_team): Change task_queue type to a priority queue.
1606         (splay_compare): Define inline.
1607         (priority_queue_offset): New.
1608         (priority_node_to_task): New.
1609         (task_to_priority_node): New.
1610         * oacc-mem.c: Do not include splay-tree.h.
1611         * priority_queue.c: New file.
1612         * priority_queue.h: New file.
1613         * splay-tree.c: Do not include splay-tree.h.
1614         (splay_tree_foreach_internal): New.
1615         (splay_tree_foreach): New.
1616         * splay-tree.h: Become re-entrant if splay_tree_prefix is defined.
1617         (splay_tree_callback): Define typedef.
1618         * target.c (splay_compare): Move to libgomp.h.
1619         (GOMP_target): Don't adjust *thr in any way around running offloaded
1620         task.
1621         (GOMP_target_ext): Likewise.  Handle target nowait.
1622         (GOMP_target_update_ext, GOMP_target_enter_exit_data): Check
1623         return value from gomp_create_target_task, if false, fallthrough
1624         as if no dependencies exist.
1625         (gomp_target_task_fn): Change return type to bool, return true
1626         if the task should have another part scheduled later.  Handle
1627         target nowait.
1628         (gomp_load_plugin_for_device): Initialize async_run.
1629         * task.c (gomp_init_task): Initialize children_queue.
1630         (gomp_clear_parent_in_list): New.
1631         (gomp_clear_parent_in_tree): New.
1632         (gomp_clear_parent): Handle priorities.
1633         (GOMP_task): Likewise.
1634         (priority_queue_move_task_first,
1635         gomp_target_task_completion, GOMP_PLUGIN_target_task_completion):
1636         New functions.
1637         (gomp_create_target_task): Use priority queues.  Change return type
1638         to bool, add state argument, return false if for async
1639         {{enter,exit} data,update} constructs no dependencies need to be
1640         waited for, handle target nowait.  Set task->fn to NULL instead of
1641         gomp_target_task_fn.
1642         (verify_children_queue): Remove.
1643         (priority_list_upgrade_task): New.
1644         (priority_queue_upgrade_task): New.
1645         (verify_task_queue): Remove.
1646         (priority_list_downgrade_task): New.
1647         (priority_queue_downgrade_task): New.
1648         (gomp_task_run_pre): Use priority queues.
1649         Abstract code out to priority_queue_downgrade_task.
1650         (gomp_task_run_post_handle_dependers): Use priority queues.
1651         (gomp_task_run_post_remove_parent): Likewise.
1652         (gomp_task_run_post_remove_taskgroup): Likewise.
1653         (gomp_barrier_handle_tasks): Likewise.  Handle target nowait target
1654         tasks specially.
1655         (GOMP_taskwait): Likewise.
1656         (gomp_task_maybe_wait_for_dependencies): Likewise.  Abstract code to
1657         priority-queue_upgrade_task.
1658         (GOMP_taskgroup_start): Use priority queues.
1659         (GOMP_taskgroup_end): Likewise.  Handle target nowait target tasks
1660         specially.  If taskgroup is NULL, and thr->ts.level is 0, act as a
1661         barrier.
1662         * taskloop.c (GOMP_taskloop): Handle priorities.
1663         * team.c (gomp_new_team): Call priority_queue_init.
1664         (free_team): Call priority_queue_free.
1665         (gomp_free_thread): Call gomp_team_end if thr->ts.team is artificial
1666         team created for target nowait in implicit parallel region.
1667         (gomp_team_start): For nested check, test thr->ts.level instead of
1668         thr->ts.team != NULL.
1669         * testsuite/libgomp.c/doacross-3.c: New test.
1670         * testsuite/libgomp.c/ordered-5.c: New test.
1671         * testsuite/libgomp.c/priority.c: New test.
1672         * testsuite/libgomp.c/target-31.c: New test.
1673         * testsuite/libgomp.c/target-32.c: New test.
1674         * testsuite/libgomp.c/target-33.c: New test.
1675         * testsuite/libgomp.c/target-34.c: New test.
1677 2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>
1679         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: New.
1681         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Sequential
1682         loop is sequential.
1684 2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>
1686         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: New.
1687         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: New.
1689 2015-11-12  James Norris  <jnorris@codesourcery.com>
1690             Joseph Myers  <joseph@codesourcery.com>
1692         * libgomp.map (GOACC_2.0.1): Export GOACC_declare.
1693         * oacc-parallel.c (GOACC_declare): New function.
1694         * testsuite/libgomp.oacc-c-c++-common/declare-1.c: New test.
1695         * testsuite/libgomp.oacc-c-c++-common/declare-2.c: Likewise.
1696         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Likewise.
1697         * testsuite/libgomp.oacc-c-c++-common/declare-5.c: Likewise.
1698         * testsuite/libgomp.oacc-c++/declare-1.C: Likewise.
1700 2015-11-12  Nathan Sidwell  <nathan@codesourcery.com>
1702         * testsuite/libgomp.oacc-c-c++-common/default-1.c: New.
1704 2015-11-1  Nathan Sidwell  <nathan@codesourcery.com>
1706         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: New.
1707         * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: New.
1709 2015-11-09  Nathan Sidwell  <nathan@codesourcery.com>
1711         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Remove
1712         inadvertent commit.
1714 2015-11-09  Nathan Sidwell  <nathan@codesourcery.com>
1716         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: New.
1717         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: New.
1718         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: New.
1719         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: New.
1720         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: New.
1722 2015-11-06  Thomas Schwinge  <thomas@codesourcery.com>
1724         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: XFAIL.
1725         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
1727 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
1728             Ilya Verbin  <ilya.verbin@intel.com>
1730         * libgomp_g.h (GOMP_loop_nonmonotonic_dynamic_next,
1731         GOMP_loop_nonmonotonic_dynamic_start,
1732         GOMP_loop_nonmonotonic_guided_next,
1733         GOMP_loop_nonmonotonic_guided_start,
1734         GOMP_loop_ull_nonmonotonic_dynamic_next,
1735         GOMP_loop_ull_nonmonotonic_dynamic_start,
1736         GOMP_loop_ull_nonmonotonic_guided_next,
1737         GOMP_loop_ull_nonmonotonic_guided_start,
1738         GOMP_parallel_loop_nonmonotonic_dynamic,
1739         GOMP_parallel_loop_nonmonotonic_guided): New prototypes.
1740         (GOMP_target_41): Renamed to ...
1741         (GOMP_target_ext): ... this.  Add num_teams and thread_limit
1742         arguments.
1743         (GOMP_target_data_41): Renamed to ...
1744         (GOMP_target_data_ext): ... this.
1745         (GOMP_target_update_41): Renamed to ...
1746         (GOMP_target_update_ext): ... this.
1747         * libgomp.map (GOMP_4.5): Export GOMP_target_ext,
1748         GOMP_target_data_ext and GOMP_target_update_ext instead of
1749         GOMP_target_41, GOMP_target_data_41 and GOMP_target_update_41.
1750         Export GOMP_loop_nonmonotonic_dynamic_next,
1751         GOMP_loop_nonmonotonic_dynamic_start,
1752         GOMP_loop_nonmonotonic_guided_next,
1753         GOMP_loop_nonmonotonic_guided_start,
1754         GOMP_loop_ull_nonmonotonic_dynamic_next,
1755         GOMP_loop_ull_nonmonotonic_dynamic_start,
1756         GOMP_loop_ull_nonmonotonic_guided_next,
1757         GOMP_loop_ull_nonmonotonic_guided_start,
1758         GOMP_parallel_loop_nonmonotonic_dynamic and
1759         GOMP_parallel_loop_nonmonotonic_guided.
1760         * loop.c (GOMP_parallel_loop_nonmonotonic_dynamic,
1761         GOMP_parallel_loop_nonmonotonic_guided,
1762         GOMP_loop_nonmonotonic_dynamic_start,
1763         GOMP_loop_nonmonotonic_guided_start,
1764         GOMP_loop_nonmonotonic_dynamic_next,
1765         GOMP_loop_nonmonotonic_guided_next): New aliases or functions.
1766         * loop_ull.c (GOMP_loop_ull_nonmonotonic_dynamic_start,
1767         GOMP_loop_ull_nonmonotonic_guided_start,
1768         GOMP_loop_ull_nonmonotonic_dynamic_next,
1769         GOMP_loop_ull_nonmonotonic_guided_next): Likewise.
1770         * target.c (gomp_map_0len_lookup, gomp_map_val): New inline
1771         functions.
1772         (gomp_map_vars): Handle GOMP_MAP_ALWAYS_POINTER.  For
1773         GOMP_MAP_ZERO_LEN_ARRAY_SECTION use gomp_map_0len_lookup.
1774         Use gomp_map_val function.
1775         (gomp_target_fallback_firstprivate): New static function.
1776         (GOMP_target_41): Renamed to ...
1777         (GOMP_target_ext): ... this.  Add num_teams and thread_limit
1778         arguments.  Move firstprivate fallback handling into a new
1779         function.
1780         (GOMP_target_data_41): Renamed to ...
1781         (GOMP_target_data_ext): ... this.
1782         (GOMP_target_update_41): Renamed to ...
1783         (GOMP_target_update_ext): ... this.
1784         (gomp_exit_data): For GOMP_MAP_*ZERO_LEN* use
1785         gomp_map_0len_lookup instead of gomp_map_lookup.
1786         (omp_target_is_present): Use gomp_map_0len_lookup instead of
1787         gomp_map_lookup.
1788         * testsuite/libgomp.c/target-28.c: Likewise.
1789         * testsuite/libgomp.c/monotonic-1.c: New test.
1790         * testsuite/libgomp.c/monotonic-2.c: New test.
1791         * testsuite/libgomp.c/nonmonotonic-1.c: New test.
1792         * testsuite/libgomp.c/nonmonotonic-2.c: New test.
1793         * testsuite/libgomp.c/pr66199-5.c: New test.
1794         * testsuite/libgomp.c/pr66199-6.c: New test.
1795         * testsuite/libgomp.c/pr66199-7.c: New test.
1796         * testsuite/libgomp.c/pr66199-8.c: New test.
1797         * testsuite/libgomp.c/pr66199-9.c: New test.
1798         * testsuite/libgomp.c/reduction-11.c: New test.
1799         * testsuite/libgomp.c/reduction-12.c: New test.
1800         * testsuite/libgomp.c/reduction-13.c: New test.
1801         * testsuite/libgomp.c/reduction-14.c: New test.
1802         * testsuite/libgomp.c/reduction-15.c: New test.
1803         * testsuite/libgomp.c/target-12.c (main): Adjust for
1804         omp_target_is_present change for one-past-last element.
1805         * testsuite/libgomp.c/target-17.c (foo): Drop tests where
1806         the same var is both mapped and privatized.
1807         * testsuite/libgomp.c/target-19.c (foo): Adjust for different
1808         handling of zero-length array sections.
1809         * testsuite/libgomp.c/target-28.c: New test.
1810         * testsuite/libgomp.c/target-29.c: New test.
1811         * testsuite/libgomp.c/target-30.c: New test.
1812         * testsuite/libgomp.c/target-teams-1.c: New test.
1813         * testsuite/libgomp.c++/member-6.C: New test.
1814         * testsuite/libgomp.c++/member-7.C: New test.
1815         * testsuite/libgomp.c++/monotonic-1.C: New test.
1816         * testsuite/libgomp.c++/monotonic-2.C: New test.
1817         * testsuite/libgomp.c++/nonmonotonic-1.C: New test.
1818         * testsuite/libgomp.c++/nonmonotonic-2.C: New test.
1819         * testsuite/libgomp.c++/pr66199-3.C: New test.
1820         * testsuite/libgomp.c++/pr66199-4.C: New test.
1821         * testsuite/libgomp.c++/pr66199-5.C: New test.
1822         * testsuite/libgomp.c++/pr66199-6.C: New test.
1823         * testsuite/libgomp.c++/pr66199-7.C: New test.
1824         * testsuite/libgomp.c++/pr66199-8.C: New test.
1825         * testsuite/libgomp.c++/pr66199-9.C: New test.
1826         * testsuite/libgomp.c++/reduction-11.C: New test.
1827         * testsuite/libgomp.c++/reduction-12.C: New test.
1828         * testsuite/libgomp.c++/target-13.C: New test.
1829         * testsuite/libgomp.c++/target-14.C: New test.
1830         * testsuite/libgomp.c++/target-15.C: New test.
1831         * testsuite/libgomp.c++/target-16.C: New test.
1832         * testsuite/libgomp.c++/target-17.C: New test.
1833         * testsuite/libgomp.c++/target-18.C: New test.
1834         * testsuite/libgomp.c++/target-19.C: New test.
1836 2015-11-04  Nathan Sidwell  <nathan@codesourcery.com>
1838         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Fix dimensions
1839         and reduction copy.
1840         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
1841         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
1842         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
1843         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
1844         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Likewise.
1845         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
1846         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
1847         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
1848         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
1849         * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c: Likewise.
1850         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
1851         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
1852         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
1853         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: New.
1855 2015-11-04  Nathan Sidwell  <nathan@codesourcery.com>
1857         * libgomp.oacc-c-c++-common/loop-red-g-1.c: New.
1858         * libgomp.oacc-c-c++-common/loop-red-gwv-1.c: New.
1859         * libgomp.oacc-c-c++-common/loop-red-v-1.c: New.
1860         * libgomp.oacc-c-c++-common/loop-red-v-2.c: New.
1861         * libgomp.oacc-c-c++-common/loop-red-w-1.c: New.
1862         * libgomp.oacc-c-c++-common/loop-red-w-2.c: New.
1863         * libgomp.oacc-c-c++-common/loop-red-wv-1.c: New.
1864         * libgomp.oacc-fortran/reduction-5.f90: Avoid reference var.
1866 2015-11-03  Nathan Sidwell  <nathan@codesourcery.com>
1868         * libgomp.h (struct acc_dispatch_t): Remove args from exec_func.
1869         * plugin/plugin-nvptx.c (nvptx_exec): Remove sizes & kinds arg.
1870         (GOMP_OFFLOAD_openacc_parallel): Likewise.
1871         * oacc-host.c (host_openacc_exec): Likewise.
1872         * oacc-parallel.c (GOACC_parallel_keyed): Adjust exec_func call.
1874 2015-11-03  Julian Brown  <julian@codesourcery.com>
1875             Thomas Schwinge  <thomas@codesourcery.com>
1877         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: New file.
1878         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
1879         * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c:
1880         Likewise.
1881         * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: Likewise.
1882         * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: Likewise.
1884 2015-11-03  James Norris  <jnorris@codesourcery.com>
1886         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-1.c: New
1887         file.
1888         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-2.c:
1889         Likewise.
1890         * testsuite/libgomp.oacc-c-c++-common/atomic_rw-1.c: Likewise.
1891         * testsuite/libgomp.oacc-c-c++-common/atomic_update-1.c: Likewise.
1892         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Likewise.
1893         * testsuite/libgomp.oacc-fortran/atomic_rw-1.f90: New file.
1894         * testsuite/libgomp.oacc-fortran/atomic_update-1.f90: Likewise.
1896 2015-10-29  Nathan Sidwell  <nathan@codesourcery.com>
1898         * openacc.h (enum acc_device_t): Reformat. Ensure layout
1899         compatibility.
1900         (enum acc_async_t): Reformat.
1901         (acc_on_device): Declare compatible with builtin and provide C++
1902         wrapper.
1903         * testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: New.
1905 2015-10-29  Thomas Schwinge  <thomas@codesourcery.com>
1906             Cesar Philippidis  <cesar@codesourcery.com>
1908         * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: Rename to...
1909         * testsuite/libgomp.oacc-c-c++-common/combined-directives-1.c:
1910         ... this.  Add a description of the test at the top of the file.
1911         * testsuite/libgomp.oacc-fortran/combdir-1.f90: Rename file to...
1912         * testsuite/libgomp.oacc-fortran/combined-directives-1.f90:
1913         ... this.  Add a description of the test at the top of the file.
1915 2015-10-28  Nathan Sidwell  <nathan@codesourcery.com>
1917         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: New.
1918         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: New.
1919         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: New.
1920         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: New.
1921         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: New.
1922         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: New.
1924 2015-10-27  Nathan Sidwell  <nathan@codesourcery.com>
1926         * plugin/plugin-nvptx.c (nvptx_exec): Remove check on compute
1927         dimensions.
1929 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
1931         PR testsuite/68063
1932         * testsuite/libgomp.c++/member-1.C (A::m1): Add missing private clause.
1934 2015-10-27  James Norris  <jnorris@codesourcery.com>
1936         * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: New file.
1937         * testsuite/libgomp.oacc-fortran/combdir-1.f90: Likewise.
1939 2015-10-26  Thomas Schwinge  <thomas@codesourcery.com>
1941         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Print to stderr.
1942         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
1944         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Remove explicit
1945         acc_device_nvidia usage.
1946         * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
1947         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
1948         * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
1950         * oacc-init.c (acc_shutdown): Call gomp_init_targets_once.
1951         * testsuite/libgomp.oacc-c-c++-common/lib-8.c: New file.
1953         PR libgomp/66518
1954         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Resolve XFAIL.
1956         PR libgomp/65437
1957         PR libgomp/66518
1958         * oacc-mem.c (update_dev_host): Call goacc_lazy_initialize.
1959         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Remove XFAIL.
1961 2015-10-23  Tom de Vries  <tom@codesourcery.com>
1963         PR testsuite/68063
1964         * testsuite/libgomp.c++/member-2.C (A::m1): Add missing private clause.
1966 2015-10-20  Nathan Sidwell  <nathan@codesourcery.com>
1968         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Set sane
1969         vector_length.
1970         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
1972 2015-10-14  Ilya Verbin  <ilya.verbin@intel.com>
1973             Aleksander Ivanushenko  <aleksander.ivanushenko@intel.com>
1975         * target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end
1976         to 0 when mapnum is 0.
1978 2015-10-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1980         * fortran.c (omp_get_place_proc_ids_, omp_get_partition_place_nums_):
1981         Cast to int from int32_t.
1983 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
1984             Aldy Hernandez  <aldyh@redhat.com>
1985             Ilya Verbin  <ilya.verbin@intel.com>
1987         * config/linux/affinity.c (omp_get_place_num_procs,
1988         omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
1989         * config/linux/doacross.h: New file.
1990         * config/posix/affinity.c (omp_get_place_num_procs,
1991         omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
1992         * config/posix/doacross.h: New file.
1993         * env.c: Include gomp-constants.h.
1994         (struct gomp_task_icv): Rename run_sched_modifier to
1995         run_sched_chunk_size.
1996         (gomp_max_task_priority_var): New variable.
1997         (parse_schedule): Rename run_sched_modifier to run_sched_chunk_size.
1998         (handle_omp_display_env): Change _OPENMP value from 201307 to
1999         201511.  Print OMP_MAX_TASK_PRIORITY.
2000         (initialize_env): Parse OMP_MAX_TASK_PRIORITY.
2001         (omp_set_schedule, omp_get_schedule): Rename modifier argument to
2002         chunk_size and run_sched_modifier to run_sched_chunk_size.
2003         (omp_get_max_task_priority, omp_get_initial_device,
2004         omp_get_num_places, omp_get_place_num, omp_get_partition_num_places,
2005         omp_get_partition_place_nums): New functions.
2006         * fortran.c (omp_set_schedule_, omp_set_schedule_8_,
2007         omp_get_schedule_, omp_get_schedule_8_): Rename modifier argument
2008         to chunk_size.
2009         (omp_get_num_places_, omp_get_place_num_procs_,
2010         omp_get_place_num_procs_8_, omp_get_place_proc_ids_,
2011         omp_get_place_proc_ids_8_, omp_get_place_num_,
2012         omp_get_partition_num_places_, omp_get_partition_place_nums_,
2013         omp_get_partition_place_nums_8_, omp_get_initial_device_,
2014         omp_get_max_task_priority_): New functions.
2015         * libgomp_g.h (GOMP_loop_doacross_static_start,
2016         GOMP_loop_doacross_dynamic_start, GOMP_loop_doacross_guided_start,
2017         GOMP_loop_doacross_runtime_start, GOMP_loop_ull_doacross_static_start,
2018         GOMP_loop_ull_doacross_dynamic_start,
2019         GOMP_loop_ull_doacross_guided_start,
2020         GOMP_loop_ull_doacross_runtime_start, GOMP_doacross_post,
2021         GOMP_doacross_wait, GOMP_doacross_ull_post, GOMP_doacross_wait,
2022         GOMP_taskloop, GOMP_taskloop_ull, GOMP_target_41,
2023         GOMP_target_data_41, GOMP_target_update_41,
2024         GOMP_target_enter_exit_data): New prototypes.
2025         (GOMP_task): Add prototype argument.
2026         * libgomp.h (_LIBGOMP_CHECKING_): Define to 0 if not yet defined.
2027         (struct gomp_doacross_work_share): New type.
2028         (struct gomp_work_share): Add doacross field.
2029         (struct gomp_task_icv): Rename run_sched_modifier to
2030         run_sched_chunk_size.
2031         (enum gomp_task_kind): Rename GOMP_TASK_IFFALSE to
2032         GOMP_TASK_UNDEFERRED.  Add comments.
2033         (struct gomp_task_depend_entry): Add comments.
2034         (struct gomp_task): Likewise.
2035         (struct gomp_taskgroup): Likewise.
2036         (struct gomp_target_task): New type.
2037         (struct gomp_team): Add comment.
2038         (gomp_get_place_proc_ids_8, gomp_doacross_init,
2039         gomp_doacross_ull_init, gomp_task_maybe_wait_for_dependencies,
2040         gomp_create_target_task, gomp_target_task_fn): New prototypes.
2041         (struct target_var_desc): New type.
2042         (struct target_mem_desc): Adjust comment.  Use struct
2043         target_var_desc instead of splay_tree_key for list.
2044         (REFCOUNT_INFINITY): Define.
2045         (struct splay_tree_key_s): Remove copy_from field.
2046         (struct gomp_device_descr): Add dev2dev_func field.
2047         (enum gomp_map_vars_kind): New enum.
2048         (gomp_map_vars): Add one argument.
2049         * libgomp.map (OMP_4.5): Export omp_get_max_task_priority,
2050         omp_get_max_task_priority_, omp_get_num_places, omp_get_num_places_,
2051         omp_get_place_num_procs, omp_get_place_num_procs_,
2052         omp_get_place_num_procs_8_, omp_get_place_proc_ids,
2053         omp_get_place_proc_ids_, omp_get_place_proc_ids_8_, omp_get_place_num,
2054         omp_get_place_num_, omp_get_partition_num_places,
2055         omp_get_partition_num_places_, omp_get_partition_place_nums,
2056         omp_get_partition_place_nums_, omp_get_partition_place_nums_8_,
2057         omp_get_initial_device, omp_get_initial_device_, omp_target_alloc,
2058         omp_target_free, omp_target_is_present, omp_target_memcpy,
2059         omp_target_memcpy_rect, omp_target_associate_ptr and
2060         omp_target_disassociate_ptr.
2061         (GOMP_4.0.2): Renamed to ...
2062         (GOMP_4.5): ... this.  Export GOMP_target_41, GOMP_target_data_41,
2063         GOMP_target_update_41, GOMP_target_enter_exit_data, GOMP_taskloop,
2064         GOMP_taskloop_ull, GOMP_loop_doacross_dynamic_start,
2065         GOMP_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
2066         GOMP_loop_doacross_static_start, GOMP_doacross_post,
2067         GOMP_doacross_wait, GOMP_loop_ull_doacross_dynamic_start,
2068         GOMP_loop_ull_doacross_guided_start,
2069         GOMP_loop_ull_doacross_runtime_start,
2070         GOMP_loop_ull_doacross_static_start, GOMP_doacross_ull_post and
2071         GOMP_doacross_ull_wait.
2072         * libgomp.texi: Document omp_get_max_task_priority.
2073         Rename modifier argument to chunk_size for omp_set_schedule and
2074         omp_get_schedule.  Document OMP_MAX_TASK_PRIORITY env var.
2075         * loop.c (GOMP_loop_runtime_start): Adjust for run_sched_modifier
2076         to run_sched_chunk_size renaming.
2077         (GOMP_loop_ordered_runtime_start): Likewise.
2078         (gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start,
2079         gomp_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
2080         GOMP_parallel_loop_runtime_start): New functions.
2081         (GOMP_parallel_loop_runtime): Adjust for run_sched_modifier
2082         to run_sched_chunk_size renaming.
2083         (GOMP_loop_doacross_static_start, GOMP_loop_doacross_dynamic_start,
2084         GOMP_loop_doacross_guided_start): New functions or aliases.
2085         * loop_ull.c (GOMP_loop_ull_runtime_start): Adjust for
2086         run_sched_modifier to run_sched_chunk_size renaming.
2087         (GOMP_loop_ull_ordered_runtime_start): Likewise.
2088         (gomp_loop_ull_doacross_static_start,
2089         gomp_loop_ull_doacross_dynamic_start,
2090         gomp_loop_ull_doacross_guided_start,
2091         GOMP_loop_ull_doacross_runtime_start): New functions.
2092         (GOMP_loop_ull_doacross_static_start,
2093         GOMP_loop_ull_doacross_dynamic_start,
2094         GOMP_loop_ull_doacross_guided_start): New functions or aliases.
2095         * oacc-mem.c (acc_map_data, present_create_copy,
2096         gomp_acc_insert_pointer): Pass GOMP_MAP_VARS_OPENACC instead of false
2097         to gomp_map_vars.
2098         (gomp_acc_remove_pointer): Use copy_from from target_var_desc.
2099         * oacc-parallel.c (GOACC_data_start): Pass GOMP_MAP_VARS_OPENACC
2100         instead of false to gomp_map_vars.
2101         (GOACC_parallel_keyed): Likewise.  Use copy_from from target_var_desc.
2102         * omp.h.in (omp_lock_hint_t): New type.
2103         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
2104         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
2105         omp_get_place_num, omp_get_partition_num_places,
2106         omp_get_partition_place_nums, omp_get_initial_device,
2107         omp_get_max_task_priority, omp_target_alloc, omp_target_free,
2108         omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect,
2109         omp_target_associate_ptr, omp_target_disassociate_ptr): New
2110         prototypes.
2111         * omp_lib.f90.in (omp_lock_hint_kind): New parameter.
2112         (omp_lock_hint_none, omp_lock_hint_uncontended,
2113         omp_lock_hint_contended, omp_lock_hint_nonspeculative,
2114         omp_lock_hint_speculative): New parameters.
2115         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
2116         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
2117         omp_get_place_num, omp_get_partition_num_places,
2118         omp_get_partition_place_nums, omp_get_initial_device,
2119         omp_get_max_task_priority): New interfaces.
2120         (omp_set_schedule, omp_get_schedule): Rename modifier argument
2121         to chunk_size.
2122         * omp_lib.h.in (omp_lock_hint_kind): New parameter.
2123         (omp_lock_hint_none, omp_lock_hint_uncontended,
2124         omp_lock_hint_contended, omp_lock_hint_nonspeculative,
2125         omp_lock_hint_speculative): New parameters.
2126         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
2127         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
2128         omp_get_place_num, omp_get_partition_num_places,
2129         omp_get_partition_place_nums, omp_get_initial_device,
2130         omp_get_max_task_priority): New functions and subroutines.
2131         * ordered.c: Include stdarg.h and string.h.
2132         (MAX_COLLAPSED_BITS): Define.
2133         (gomp_doacross_init, GOMP_doacross_post, GOMP_doacross_wait,
2134         gomp_doacross_ull_init, GOMP_doacross_ull_post,
2135         GOMP_doacross_ull_wait): New functions.
2136         * target.c: Include errno.h.
2137         (resolve_device): If device is not initialized, call
2138         gomp_init_device on it.
2139         (gomp_map_lookup): New function.
2140         (gomp_map_vars_existing): Add tgt_var argument, fill it in.
2141         Don't bump refcount if REFCOUNT_INFINITY.  Handle
2142         GOMP_MAP_ALWAYS_TO_P.
2143         (get_kind): Rename is_openacc argument to short_mapkind.
2144         (gomp_map_pointer): Use gomp_map_lookup.
2145         (gomp_map_fields_existing): New function.
2146         (gomp_map_vars): Rename is_openacc argument to short_mapkind
2147         and is_target to pragma_kind.  Handle GOMP_MAP_VARS_ENTER_DATA,
2148         handle GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_STRUCT,
2149         GOMP_MAP_USE_DEVICE_PTR, GOMP_MAP_ZERO_LEN_ARRAY_SECTION.
2150         Adjust for tgt->list changed type and copy_from living in there.
2151         (gomp_copy_from_async): Adjust for tgt->list changed type and
2152         copy_from living in there.
2153         (gomp_unmap_vars): Likewise.
2154         (gomp_update): Likewise.  Rename is_openacc argument to
2155         short_mapkind.  Don't fail if object is not mapped.
2156         (gomp_load_image_to_device): Initialize refcount to
2157         REFCOUNT_INFINITY.
2158         (gomp_target_fallback): New function.
2159         (gomp_get_target_fn_addr): Likewise.
2160         (GOMP_target): Adjust gomp_map_vars caller, use
2161         gomp_get_target_fn_addr and gomp_target_fallback.
2162         (GOMP_target_41): New function.
2163         (gomp_target_data_fallback): New function.
2164         (GOMP_target_data): Use it, adjust gomp_map_vars caller.
2165         (GOMP_target_data_41): New function.
2166         (GOMP_target_update): Adjust gomp_update caller.
2167         (GOMP_target_update_41): New function.
2168         (gomp_exit_data, GOMP_target_enter_exit_data,
2169         gomp_target_task_fn, omp_target_alloc, omp_target_free,
2170         omp_target_is_present, omp_target_memcpy,
2171         omp_target_memcpy_rect_worker, omp_target_memcpy_rect,
2172         omp_target_associate_ptr, omp_target_disassociate_ptr,
2173         gomp_load_plugin_for_device): New functions.
2174         * task.c: Include gomp-constants.h.  Include taskloop.c
2175         twice to get GOMP_taskloop and GOMP_taskloop_ull definitions.
2176         (gomp_task_handle_depend): New function.
2177         (GOMP_task): Use it.  Add priority argument.  Use
2178         gomp-constant.h constants instead of hardcoded numbers.
2179         Rename GOMP_TASK_IFFALSE to GOMP_TASK_UNDEFERRED.
2180         (gomp_create_target_task): New function.
2181         (verify_children_queue, verify_taskgroup_queue,
2182         verify_task_queue): New functions.
2183         (gomp_task_run_pre): Call verify_*_queue functions.
2184         If an upcoming tied task is about to leave the sibling or
2185         taskgroup queues in an invalid state, adjust appropriately.
2186         Remove taskgroup argument.  Add comments.
2187         (gomp_task_run_post_handle_dependers): Add comments.
2188         (gomp_task_run_post_remove_parent): Likewise.
2189         (gomp_barrier_handle_tasks): Adjust gomp_task_run_pre caller.
2190         (GOMP_taskwait): Likewise.  Add comments.
2191         (gomp_task_maybe_wait_for_dependencies): Fix scheduling
2192         problem such that the first non parent_depends_on task does not
2193         end up at the end of the children queue.
2194         (GOMP_taskgroup_start): Rename GOMP_TASK_IFFALSE to
2195         GOMP_TASK_UNDEFERRED.
2196         (GOMP_taskgroup_end): Adjust gomp_task_run_pre caller.
2197         * taskloop.c: New file.
2198         * testsuite/lib/libgomp.exp
2199         (check_effective_target_offload_device_nonshared_as): New proc.
2200         * testsuite/libgomp.c/affinity-2.c: New test.
2201         * testsuite/libgomp.c/doacross-1.c: New test.
2202         * testsuite/libgomp.c/doacross-2.c: New test.
2203         * testsuite/libgomp.c/examples-4/declare_target-1.c (fib_wrapper):
2204         Add map clause to target.
2205         * testsuite/libgomp.c/examples-4/declare_target-4.c (accum): Likewise.
2206         * testsuite/libgomp.c/examples-4/declare_target-5.c (accum): Likewise.
2207         * testsuite/libgomp.c/examples-4/device-1.c (main): Likewise.
2208         * testsuite/libgomp.c/examples-4/device-3.c (main): Likewise.
2209         * testsuite/libgomp.c/examples-4/target_data-3.c (gramSchmidt):
2210         Likewise.
2211         * testsuite/libgomp.c/examples-4/teams-2.c (dotprod): Likewise.
2212         * testsuite/libgomp.c/examples-4/teams-3.c (dotprod): Likewise.
2213         * testsuite/libgomp.c/examples-4/teams-4.c (dotprod): Likewise.
2214         * testsuite/libgomp.c/for-2.h (OMPTGT, OMPTO, OMPFROM): Define if
2215         not defined.  Use those where needed.
2216         * testsuite/libgomp.c/for-4.c: New test.
2217         * testsuite/libgomp.c/for-5.c: New test.
2218         * testsuite/libgomp.c/for-6.c: New test.
2219         * testsuite/libgomp.c/linear-1.c: New test.
2220         * testsuite/libgomp.c/ordered-4.c: New test.
2221         * testsuite/libgomp.c/pr66199-2.c (f2): Adjust for linear clause
2222         only allowed on the loop iterator.
2223         * testsuite/libgomp.c/pr66199-3.c: New test.
2224         * testsuite/libgomp.c/pr66199-4.c: New test.
2225         * testsuite/libgomp.c/reduction-7.c: New test.
2226         * testsuite/libgomp.c/reduction-8.c: New test.
2227         * testsuite/libgomp.c/reduction-9.c: New test.
2228         * testsuite/libgomp.c/reduction-10.c: New test.
2229         * testsuite/libgomp.c/target-1.c (fn2, fn3, fn4): Add
2230         map(tofrom:s).
2231         * testsuite/libgomp.c/target-2.c (fn2, fn3, fn4): Likewise.
2232         * testsuite/libgomp.c/target-7.c (foo): Add map(h) where needed.
2233         * testsuite/libgomp.c/target-11.c: New test.
2234         * testsuite/libgomp.c/target-12.c: New test.
2235         * testsuite/libgomp.c/target-13.c: New test.
2236         * testsuite/libgomp.c/target-14.c: New test.
2237         * testsuite/libgomp.c/target-15.c: New test.
2238         * testsuite/libgomp.c/target-16.c: New test.
2239         * testsuite/libgomp.c/target-17.c: New test.
2240         * testsuite/libgomp.c/target-18.c: New test.
2241         * testsuite/libgomp.c/target-19.c: New test.
2242         * testsuite/libgomp.c/target-20.c: New test.
2243         * testsuite/libgomp.c/target-21.c: New test.
2244         * testsuite/libgomp.c/target-22.c: New test.
2245         * testsuite/libgomp.c/target-23.c: New test.
2246         * testsuite/libgomp.c/target-24.c: New test.
2247         * testsuite/libgomp.c/target-25.c: New test.
2248         * testsuite/libgomp.c/target-26.c: New test.
2249         * testsuite/libgomp.c/target-27.c: New test.
2250         * testsuite/libgomp.c/taskloop-1.c: New test.
2251         * testsuite/libgomp.c/taskloop-2.c: New test.
2252         * testsuite/libgomp.c/taskloop-3.c: New test.
2253         * testsuite/libgomp.c/taskloop-4.c: New test.
2254         * testsuite/libgomp.c++/ctor-13.C: New test.
2255         * testsuite/libgomp.c++/doacross-1.C: New test.
2256         * testsuite/libgomp.c++/examples-4/declare_target-2.C:
2257         Replace offload_device with offload_device_nonshared_as.
2258         * testsuite/libgomp.c++/for-12.C: New test.
2259         * testsuite/libgomp.c++/for-13.C: New test.
2260         * testsuite/libgomp.c++/for-14.C: New test.
2261         * testsuite/libgomp.c++/linear-1.C: New test.
2262         * testsuite/libgomp.c++/member-1.C: New test.
2263         * testsuite/libgomp.c++/member-2.C: New test.
2264         * testsuite/libgomp.c++/member-3.C: New test.
2265         * testsuite/libgomp.c++/member-4.C: New test.
2266         * testsuite/libgomp.c++/member-5.C: New test.
2267         * testsuite/libgomp.c++/ordered-1.C: New test.
2268         * testsuite/libgomp.c++/reduction-5.C: New test.
2269         * testsuite/libgomp.c++/reduction-6.C: New test.
2270         * testsuite/libgomp.c++/reduction-7.C: New test.
2271         * testsuite/libgomp.c++/reduction-8.C: New test.
2272         * testsuite/libgomp.c++/reduction-9.C: New test.
2273         * testsuite/libgomp.c++/reduction-10.C: New test.
2274         * testsuite/libgomp.c++/reference-1.C: New test.
2275         * testsuite/libgomp.c++/simd14.C: New test.
2276         * testsuite/libgomp.c++/target-2.C (fn2): Add map(tofrom: s) clause.
2277         * testsuite/libgomp.c++/target-5.C: New test.
2278         * testsuite/libgomp.c++/target-6.C: New test.
2279         * testsuite/libgomp.c++/target-7.C: New test.
2280         * testsuite/libgomp.c++/target-8.C: New test.
2281         * testsuite/libgomp.c++/target-9.C: New test.
2282         * testsuite/libgomp.c++/target-10.C: New test.
2283         * testsuite/libgomp.c++/target-11.C: New test.
2284         * testsuite/libgomp.c++/target-12.C: New test.
2285         * testsuite/libgomp.c++/taskloop-1.C: New test.
2286         * testsuite/libgomp.c++/taskloop-2.C: New test.
2287         * testsuite/libgomp.c++/taskloop-3.C: New test.
2288         * testsuite/libgomp.c++/taskloop-4.C: New test.
2289         * testsuite/libgomp.c++/taskloop-5.C: New test.
2290         * testsuite/libgomp.c++/taskloop-6.C: New test.
2291         * testsuite/libgomp.c++/taskloop-7.C: New test.
2292         * testsuite/libgomp.c++/taskloop-8.C: New test.
2293         * testsuite/libgomp.c++/taskloop-9.C: New test.
2294         * testsuite/libgomp.fortran/affinity1.f90: New test.
2295         * testsuite/libgomp.fortran/affinity2.f90: New test.
2297 2015-10-13  Tom de Vries  <tom@codesourcery.com>
2299         PR tree-optimization/67476
2300         * testsuite/libgomp.c/autopar-3.c: New test.
2301         * testsuite/libgomp.c/autopar-4.c: New test.
2302         * testsuite/libgomp.c/autopar-5.c: New test.
2303         * testsuite/libgomp.c/autopar-6.c: New test.
2304         * testsuite/libgomp.c/autopar-7.c: New test.
2305         * testsuite/libgomp.c/autopar-8.c: New test.
2307 2015-10-12  James Norris  <jnorris@codesourcery.com>
2309         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Fix loop
2310         initializer.
2312 2015-10-09  David Malcolm  <dmalcolm@redhat.com>
2314         * testsuite/lib/libgomp.exp: Load multiline.exp before prune.exp,
2315         using load_gcc_lib.
2317 2015-10-02  Thomas Schwinge  <thomas@codesourcery.com>
2319         * oacc-ptx.h: Remove file, moving its content into...
2320         * config/nvptx/fortran.c: ... here...
2321         * config/nvptx/oacc-init.c: ..., here...
2322         * config/nvptx/oacc-parallel.c: ..., and here.
2323         * config/nvptx/openacc.f90: New file.
2324         * plugin/plugin-nvptx.c: Don't include "oacc-ptx.h".
2325         (link_ptx): Don't link in predefined bits of PTX code.
2327 2015-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2328             Bernd Schmidt <bernds@codesourcery.com>
2330         * plugin/plugin-nvptx.c (targ_fn_launch): Use GOMP_DIM_MAX.
2331         (struct targ_ptx_obj): New.
2332         (nvptx_tdata): Move earlier, change data format.
2333         (link_ptx): Take targ_ptx_obj ptr and count.  Allow multiple
2334         objects.
2335         (GOMP_OFFLOAD_load_image): Adjust.
2337 2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>
2339         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Add checkpoint.
2340         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
2341         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
2342         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
2343         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
2344         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
2345         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
2346         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
2347         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
2348         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
2349         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
2350         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
2351         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
2352         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
2353         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
2354         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
2355         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
2356         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
2357         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
2358         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
2359         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
2360         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
2361         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
2362         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
2363         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
2364         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
2365         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
2366         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
2367         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
2368         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
2369         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
2370         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
2371         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
2372         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
2373         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
2374         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
2375         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
2376         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
2377         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
2378         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
2379         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
2380         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
2381         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
2382         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
2383         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
2384         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
2385         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
2386         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
2387         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
2388         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
2389         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
2390         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
2391         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
2392         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
2393         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
2394         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
2395         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
2396         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
2397         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
2398         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
2399         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
2400         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
2401         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
2403 2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2405         * oacc-init.c (acc_on_device): Force optimization level.
2407 2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2409         * plugin/plugin-nvptx.c (ARRAYSIZE): Delete.
2410         (cuda_errlist): Delete.
2411         (cuda_error): Reimplement.
2413 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
2415         * libgomp.h (acc_dispatch_t): Replace separate geometry args with
2416         array.
2417         * libgomp.map (GOACC_parallel_keyed): New.
2418         * oacc-parallel.c (goacc_wait): Take pointer to va_list.  Adjust
2419         all callers.
2420         (GOACC_parallel_keyed): New interface.  Lose geometry arguments
2421         and take keyed varargs list.  Adjust call to exec_func.
2422         (GOACC_parallel): Force host fallback.
2423         * libgomp_g.h (GOACC_parallel): Remove.
2424         (GOACC_parallel_keyed): Declare.
2425         * plugin/plugin-nvptx.c (struct targ_fn_launch): New struct.
2426         (stuct targ_gn_descriptor): Replace name field with launch field.
2427         (nvptx_exec): Lose separate geometry args, take array.  Process
2428         dynamic dimensions and adjust.
2429         (struct nvptx_tdata): Replace fn_names field with fn_descs.
2430         (GOMP_OFFLOAD_load_image): Adjust for change in function table
2431         data.
2432         (GOMP_OFFLOAD_openacc_parallel): Adjust for change in dimension
2433         passing.
2434         * oacc-host.c (host_openacc_exec): Adjust for change in dimension
2435         passing.
2437 2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>
2439         PR libgomp/67141
2440         * oacc-int.h (goacc_host_init): Add declaration.
2441         * oacc-host.c (goacc_host_init): Remove static and constructor attribute.
2442         * oacc-init.c (goacc_runtime_initialize): Call goacc_host_init() at end.
2444 2015-09-08  Aditya Kumar  <hiraditya@msn.com>
2445             Sebastian Pop  <s.pop@samsung.com>
2447         * testsuite/libgomp.graphite/bounds.c (int foo): Modifed test case to
2448         match o/p.
2449         * testsuite/libgomp.graphite/force-parallel-1.c (void parloop): Same.
2450         * testsuite/libgomp.graphite/force-parallel-4.c: Same.
2451         * testsuite/libgomp.graphite/force-parallel-5.c: Same.
2452         * testsuite/libgomp.graphite/force-parallel-7.c: Same.
2453         * testsuite/libgomp.graphite/force-parallel-8.c: Same.
2455 2015-09-03  Jakub Jelinek  <jakub@redhat.com>
2457         * configure.tgt: Add missing ;; in between nvptx and rtems
2458         snippets.
2460 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2462         * config/posix/pool.h (gomp_adjust_thread_attr): New.
2463         * config/rtems/pool.h (gomp_adjust_thread_attr): Likewise.
2464         (gomp_thread_pool_reservoir): Add priority member.
2465         * confi/rtems/proc.c (allocate_thread_pool_reservoir): Add
2466         priority.
2467         (parse_thread_pools): Likewise.
2468         * team.c (gomp_team_start): Call configuration provided
2469         gomp_adjust_thread_attr(). Destroy thread attributes if
2470         necessary.
2471         * libgomp.texi: Document GOMP_RTEMS_THREAD_POOLS.
2473 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2475         * config/posix/pool.h: New.
2476         * config/rtems/pool.h: Likewise.
2477         * config/rtems/proc.c: Likewise.
2478         * libgomp.h (gomp_thread_destructor): Declare.
2479         * team.c: Include configuration provided "pool.h".
2480         (gomp_get_thread_pool): Define in configuration.
2481         (gomp_team_end): Call configuration defined
2482         gomp_release_thread_pool().
2484 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2486         * config/rtems/bar.c: New.
2487         * config/rtems/bar.h: Likewise.
2488         * config/rtems/mutex.c: Likewise.
2489         * config/rtems/mutex.h: Likewise.
2490         * config/rtems/sem.c: Likewise.
2491         * config/rtems/sem.h: Likewise.
2492         * configure.ac (*-*-rtems*): Check that Newlib provides a proper
2493         <sys/lock.h> header file.
2494         * configure.tgt (*-*-rtems*): Enable RTEMS configuration if
2495         supported by Newlib.
2496         * configure: Regenerate.
2498 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2500         * team.c (gomp_new_thread_pool): Delete and move content to ...
2501         (gomp_get_thread_pool): ... new function.  Allocate and
2502         initialize thread pool on demand.
2503         (get_last_team): Use gomp_get_thread_pool().
2504         (gomp_team_start): Delete thread pool initialization.
2506 2015-09-03  Tom de Vries  <tom@codesourcery.com>
2508         PR tree-optimization/65637
2509         * testsuite/libgomp.c/autopar-2.c: New test.
2511 2015-08-29  Tom de Vries  <tom@codesourcery.com>
2513         PR tree-optimization/46193
2514         * testsuite/libgomp.c/pr46193.c: New test.
2516 2015-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2518         libgomp/
2519         * libgomp.map: Add 4.0.2 version.
2520         * target.c (offload_image_descr): Add version field.
2521         (gomp_load_image_to_device): Add version argument.  Adjust plugin
2522         call.  Improve load mismatch diagnostic.
2523         (gomp_unload_image_from_device): Add version argument.  Adjust plugin
2524         call.
2525         (GOMP_offload_regster): Make stub function, move bulk to ...
2526         (GOMP_offload_register_ver): ... here.  Process version argument.
2527         (GOMP_offload_unregister): Make stub function, move bulk to ...
2528         (GOMP_offload_unregister_ver): ... here.  Process version argument.
2529         (gomp_init_device): Process version field.
2530         (gomp_unload_device): Process version field.
2531         (gomp_load_plugin_for_device): Reimplement DLSYM & DLSYM_OPT
2532         macros.  Check plugin version.
2533         * libgomp.h (gomp_device_descr): Add version function field.  Adjust
2534         loader and unloader types.
2535         * oacc-host.c: Include gomp-constants.h.
2536         (host_version): New.
2537         (host_load_image, host_unload_image): Adjust.
2538         (host_dispatch): Add host_version.
2539         * plugin/plugin-nvptx.c: Include gomp-constants.h.
2540         (GOMP_OFFLOAD_version): New.
2541         (GOMP_OFFLOAD_load_image): Add version arg and check it.
2542         (GOMP_OFFLOAD_unload_image): Likewise.
2543         * plugin/plugin-host.c: Include gomp-constants.h.
2544         (GOMP_OFFLOAD_version): New.
2545         (GOMP_OFFLOAD_load_image): Add version arg.
2546         (GOMP_OFFLOAD_unload_image): Likewise.
2548 2015-08-24  Tom de Vries  <tom@codesourcery.com>
2550         PR tree-optimization/65468
2551         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: New test.
2553 2015-08-24  Tom de Vries  <tom@codesourcery.com>
2555         PR tree-optimization/65468
2556         * testsuite/libgomp.c/static-chunk-size-one.c: New test.
2558 2015-08-24  Joost VandeVondele  <vondele@gnu.gcc.org>
2560         PR libgomp/66761
2561         PR libgomp/67303
2562         * iter.c (gomp_iter_dynamic_next): Employ an atomic load.
2563         (gomp_iter_guided_next): Idem.
2564         * iter_ull.c (gomp_iter_ull_dynamic_next): Idem.
2565         (gomp_iter_ull_guided_next): Idem.
2566         * config/linux/wait.h (do_spin): Idem.
2568 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
2570         * libgomp-plugin.h (enum offload_target_type): Remove
2571         OFFLOAD_TARGET_TYPE_HOST_NONSHM.
2572         * openacc.f90 (openacc_kinds): Remove acc_device_host_nonshm.
2573         * openacc.h (enum acc_device_t): Likewise.
2574         * openacc_lib.h: Likewise.
2575         * oacc-init.c (name_of_acc_device_t): Don't handle it.
2576         (acc_on_device): Just use __builtin_acc_on_device.
2577         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Don't forbid usage
2578         of acc_on_device builtin.
2579         * plugin/plugin-host.h: Remove file.
2580         * plugin/plugin-host.c: Likewise, but salvage some content into...
2581         * oacc-host.c: ... this file.
2582         * plugin/Makefrag.am: Don't build libgomp-plugin-host_nonshm.la.
2583         * plugin/configfrag.ac (offload_targets): Don't add host_nonshm.
2584         * Makefile.in: Regenerate.
2585         * configure: Likewise.
2586         * testsuite/lib/libgomp.exp
2587         (check_effective_target_openacc_host_nonshm_selected): Remove.
2588         * testsuite/libgomp.oacc-c++/c++.exp: Don't handle
2589         ACC_DEVICE_TYPE=host_nonshm.
2590         * testsuite/libgomp.oacc-c/c.exp: Likewise.
2591         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
2592         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
2593         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
2594         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
2595         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
2597 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
2598             Jakub Jelinek  <jakub@redhat.com>
2600         * config/nvptx/affinity.c: New file.
2601         * config/nvptx/alloc.c: Likewise.
2602         * config/nvptx/bar.c: Likewise.
2603         * config/nvptx/barrier.c: Likewise.
2604         * config/nvptx/critical.c: Likewise.
2605         * config/nvptx/env.c: Likewise.
2606         * config/nvptx/error.c: Likewise.
2607         * config/nvptx/fortran.c: Likewise.
2608         * config/nvptx/iter.c: Likewise.
2609         * config/nvptx/iter_ull.c: Likewise.
2610         * config/nvptx/libgomp-plugin.c: Likewise.
2611         * config/nvptx/lock.c: Likewise.
2612         * config/nvptx/loop.c: Likewise.
2613         * config/nvptx/loop_ull.c: Likewise.
2614         * config/nvptx/mutex.c: Likewise.
2615         * config/nvptx/oacc-async.c: Likewise.
2616         * config/nvptx/oacc-cuda.c: Likewise.
2617         * config/nvptx/oacc-host.c: Likewise.
2618         * config/nvptx/oacc-init.c: Likewise.
2619         * config/nvptx/oacc-mem.c: Likewise.
2620         * config/nvptx/oacc-parallel.c: Likewise.
2621         * config/nvptx/oacc-plugin.c: Likewise.
2622         * config/nvptx/omp-lock.h: Likewise.
2623         * config/nvptx/ordered.c: Likewise.
2624         * config/nvptx/parallel.c: Likewise.
2625         * config/nvptx/proc.c: Likewise.
2626         * config/nvptx/ptrlock.c: Likewise.
2627         * config/nvptx/sections.c: Likewise.
2628         * config/nvptx/sem.c: Likewise.
2629         * config/nvptx/single.c: Likewise.
2630         * config/nvptx/splay-tree.c: Likewise.
2631         * config/nvptx/target.c: Likewise.
2632         * config/nvptx/task.c: Likewise.
2633         * config/nvptx/team.c: Likewise.
2634         * config/nvptx/time.c: Likewise.
2635         * config/nvptx/work.c: Likewise.
2636         * configure.ac: Don't probe pthreads support for host nvptx*-*-*.
2637         * configure: Regenerate.
2638         * configure.tgt (config_path): Set to "nvptx" for target
2639         nvptx*-*-*.
2641 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
2643         * testsuite/libgomp.oacc-c-c++-common/vector-type-1.c: New file.
2645 2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2647         * plugin/plugin-nvptx.c: Don't include dlfcn.h.
2648         (cuda_errlist): Constify.
2649         (errmsg):  Move into ...
2650         (cuda_error): ... here.  Make smaller.
2651         (_XSTR, _STR): Delete.
2652         (cuda_synames): Delete.
2653         (verify_device_library): Delete.
2654         (nvptx_init): Don't call it.
2656 2015-07-28  Tom de Vries  <tom@codesourcery.com>
2658         * testsuite/libgomp.c/uns-outer-4.c: New test.
2660 2015-07-24  Cesar Philippidis  <cesar@codesourcery.com>
2662         * testsuite/libgomp.c/pr66714.c: New test.
2664 2015-07-22  Maxim Blumenthal  <maxim.blumenthal@intel.com>
2666         PR libgomp/66950
2667         * testsuite/libgomp.c/examples-4/simd-7.c (N): Change to 30 from 45.
2668         (fib_ref): New function.
2669         (fib): Correct corner cases in the recursion.
2670         (main): Replace the non-simd loop with fib_ref call.
2671         * testsuite/libgomp.fortran/examples-4/simd-7.f90: (fib_ref): New
2672         subroutine.
2673         (fibonacci): Lower the parameter N to 30.  Correct accordingly check
2674         for the last array element value.  Replace the non-simd loop with
2675         fib_ref call.  Remove redundant b_ref array.  Remove the comparison
2676         of the last array element with according Fibonacci sequence element.
2677         (fib): Correct corner cases in the recursion.
2679 2015-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2681         * target.c (gomp_offload_image_to_device): Rename to ...
2682         (gomp_load_image_to_device): ... here.
2683         (GOMP_offload_register): Adjust call.
2684         (gomp_init_device): Likewise.
2685         (gomp_unload_image_from_device): New.  Broken out of ...
2686         (GOMP_offload_unregister): ... here.  Call it.
2687         (gomp_unload_device): New.
2688         * libgomp.h (gomp_unload_device): Declare.
2689         * oacc-init.c (acc_shutdown_1): Unload from device before deleting
2690         mem maps.
2692 2015-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2694         * oacc-parallel.c (GOACC_parallel): Move variadic handling into
2695         wait=-specific if.
2696         (GOACC_enter_exit_data, GOACC_update): Use consistent num_waits
2697         !=0 condition.
2698         (goacc_waits): Move !num_waits handling to ...
2699         (GOACC_wait): ... here, the only caller that might have zero waits.
2701         * plugin/plugin-nvptx.c (struct targ_fn_descriptor): Move later.
2702         (struct ptx_image_data): Move earlier, add fns field.
2703         (struct ptx_device): Add images and image_lock fields.
2704         (ptx_images, ptx_image_lock): Delete.
2705         (nvptx_open_device): Initialize images and image_lock fields.
2706         (nvptx_close_device): Destroy image_lock.
2707         (GOMP_OFFLOAD_load_image): Register image to device-specific fields.
2708         (GOMP_OFFLOAD_unload_image): Unregister image from device-specific
2709         fields.
2711 2015-07-17  Nathan Sidwell  <nathan@codesourcery.com>
2713         * target.c (GOMP_offload_register): Use int for device type arg.
2714         (GOMP_offload_unregister): Likewise.
2716         * target.c (struct_offload_image_descr): Constify host_table.
2717         (gomp_offload_image_to_device): Likewise.
2718         (GOMP_offload_register, GOMP_offload_unregister): Likewise.
2720         * libgomp.h (gomp_device_descr): Constify target data arguments.
2721         * target.c (struct offload_image_descr): Constify target_data.
2722         (gomp_offload_image_to_device): Likewise.
2723         (GOMP_offload_register): Likewise.
2724         (GOMP_offload_unrefister): Likewise.
2725         * plugin/plugin-host.c (GOMP_OFFLOAD_load_image,
2726         GOMP_OFFLOAD_unload_image): Constify target data.
2727         * plugin/plugin-nvptx.c (struct ptx_image_data): Constify target data.
2728         (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): Likewise.
2730 2015-07-16  Nathan Sidwell  <nathan@codesourcery.com>
2732         * plugin/plugin-nvptx.c (link_ptx): Constify string argument.
2733         Workaround driver library const error.
2734         (struct nvptx_tdata, nvptx_tdata_t): New.
2735         (GOMP_OFFLOAD_load_image): Use struct for target_data's real
2736         type.
2738 2015-07-15  Maxim Blumenthal  <maxim.blumenthal@intel.com>
2740         * testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Change type
2741         of EPS parameter from integer to real.
2742         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: (check): Change
2743         type of EPS parameter from integer to real.
2745 2015-07-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2747         * team.c (get_last_team): New.
2748         (gomp_new_team): Recycle last non-nested team if possible.
2749         (gomp_team_end): Move team work share list free lock destruction
2750         to ...
2751         (free_team): ... here.
2753 2015-07-14  Maxim Blumenthal  <maxim.blumenthal@intel.com>
2755         * testsuite/libgomp.c/examples-4/simd-3.c: (main): Change type of res
2756         and ref from int to double.  Replaced their comparison with
2757         an inequality of their difference and EPS.
2758         * testsuite/libgomp.c/examples-4/simd-8.c: (main): Replace the
2759         comparison of pri and a reference number with an inequality of their
2760         difference and EPS.
2761         * testsuite/libgomp.fortran/examples-4/simd-3.f90: (main): Replaced
2762         the comparison of sum and sum_ref with an inequality of their
2763         difference and EPS.
2764         * testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Replace
2765         the comparison of pri and a reference number with an inequality of
2766         their difference and EPS.
2768 2015-07-13  Maxim Blumenthal  <maxim.blumenthal@intel.com>
2770         * testsuite/libgomp.c++/examples-4/e.53.2.C: Renamed to...
2771         * testsuite/libgomp.c++/examples-4/declare_target-2.C: ...this.
2772         * testsuite/libgomp.c++/examples-4/e.51.5.C: Renamed to...
2773         * testsuite/libgomp.c++/examples-4/target_data-5.C: ...this.
2774         * testsuite/libgomp.c/examples-4/e.56.3.c: Renamed to...
2775         * testsuite/libgomp.c/examples-4/array_sections-3.c: ...this.
2776         * testsuite/libgomp.c/examples-4/e.56.4.c: Renamed to...
2777         * testsuite/libgomp.c/examples-4/array_sections-4.c: ...this.
2778         * testsuite/libgomp.c/examples-4/e.55.1.c: Renamed to...
2779         * testsuite/libgomp.c/examples-4/async_target-1.c: ...this.
2780         * testsuite/libgomp.c/examples-4/e.55.2.c: Renamed to...
2781         * testsuite/libgomp.c/examples-4/async_target-2.c: ...this.
2782         (vec_mult_ref): Remove v1 and v2 arguments, turn them into local
2783         variables.
2784         (vec_mult): Likewise.  Add #pragma omp taskwait.
2785         (main): Adjust caller.
2786         * testsuite/libgomp.c/examples-4/e.53.1.c: Renamed to...
2787         * testsuite/libgomp.c/examples-4/declare_target-1.c: ...this.
2788         * testsuite/libgomp.c/examples-4/e.53.3.c: Renamed to...
2789         * testsuite/libgomp.c/examples-4/declare_target-3.c: ...this.
2790         * testsuite/libgomp.c/examples-4/e.53.4.c: Renamed to...
2791         * testsuite/libgomp.c/examples-4/declare_target-4.c: ...this.
2792         * testsuite/libgomp.c/examples-4/e.53.5.c: Renamed to...
2793         * testsuite/libgomp.c/examples-4/declare_target-5.c: ...this.
2794         * testsuite/libgomp.c/examples-4/e.57.1.c: Renamed to...
2795         * testsuite/libgomp.c/examples-4/device-1.c: ...this.
2796         * testsuite/libgomp.c/examples-4/e.57.2.c: Renamed to...
2797         * testsuite/libgomp.c/examples-4/device-2.c: ...this.
2798         * testsuite/libgomp.c/examples-4/e.57.3.c: Renamed to...
2799         * testsuite/libgomp.c/examples-4/device-3.c: ...this.
2800         * testsuite/libgomp.c/examples-4/simd-1.c: New file.
2801         * testsuite/libgomp.c/examples-4/simd-2.c: New file.
2802         * testsuite/libgomp.c/examples-4/simd-3.c: New file.
2803         * testsuite/libgomp.c/examples-4/simd-4.c: New file.
2804         * testsuite/libgomp.c/examples-4/simd-5.c: New file.
2805         * testsuite/libgomp.c/examples-4/simd-6.c: New file.
2806         * testsuite/libgomp.c/examples-4/simd-7.c: New file.
2807         * testsuite/libgomp.c/examples-4/simd-8.c: New file.
2808         * testsuite/libgomp.c/examples-4/e.50.1.c: Renamed to...
2809         * testsuite/libgomp.c/examples-4/target-1.c: ...this.
2810         * testsuite/libgomp.c/examples-4/e.50.2.c: Renamed to...
2811         * testsuite/libgomp.c/examples-4/target-2.c: ...this.
2812         * testsuite/libgomp.c/examples-4/e.50.3.c: Renamed to...
2813         * testsuite/libgomp.c/examples-4/target-3.c: ...this.
2814         * testsuite/libgomp.c/examples-4/e.50.4.c: Renamed to...
2815         * testsuite/libgomp.c/examples-4/target-4.c: ...this.
2816         * testsuite/libgomp.c/examples-4/e.50.5.c: Renamed to...
2817         * testsuite/libgomp.c/examples-4/target-5.c: ...this.
2818         * testsuite/libgomp.c/examples-4/e.51.1.c: Renamed to...
2819         * testsuite/libgomp.c/examples-4/target_data-1.c: ...this.
2820         * testsuite/libgomp.c/examples-4/e.51.2.c: Renamed to...
2821         * testsuite/libgomp.c/examples-4/target_data-2.c: ...this.
2822         * testsuite/libgomp.c/examples-4/e.51.3.c: Renamed to...
2823         * testsuite/libgomp.c/examples-4/target_data-3.c: ...this.
2824         * testsuite/libgomp.c/examples-4/e.51.4.c: Renamed to...
2825         * testsuite/libgomp.c/examples-4/target_data-4.c: ...this.
2826         * testsuite/libgomp.c/examples-4/e.51.6.c: Renamed to...
2827         * testsuite/libgomp.c/examples-4/target_data-6.c: ...this.
2828         * testsuite/libgomp.c/examples-4/e.51.7.c: Renamed to...
2829         * testsuite/libgomp.c/examples-4/target_data-7.c: ...this.
2830         * testsuite/libgomp.c/examples-4/e.52.1.c: Renamed to...
2831         * testsuite/libgomp.c/examples-4/target_update-1.c: ...this.
2832         * testsuite/libgomp.c/examples-4/e.52.2.c: Renamed to...
2833         * testsuite/libgomp.c/examples-4/target_update-2.c: ...this.
2834         * testsuite/libgomp.c/examples-4/task_dep-1.c: New file.
2835         * testsuite/libgomp.c/examples-4/task_dep-2.c: New file.
2836         * testsuite/libgomp.c/examples-4/task_dep-3.c: New file.
2837         * testsuite/libgomp.c/examples-4/task_dep-4.c: New file.
2838         * testsuite/libgomp.c/examples-4/task_dep-5.c: New file.
2839         * testsuite/libgomp.c/examples-4/e.54.2.c: Renamed to...
2840         * testsuite/libgomp.c/examples-4/teams-2.c: ...this.
2841         * testsuite/libgomp.c/examples-4/e.54.3.c: Renamed to...
2842         * testsuite/libgomp.c/examples-4/teams-3.c: ...this.
2843         * testsuite/libgomp.c/examples-4/e.54.4.c: Renamed to...
2844         * testsuite/libgomp.c/examples-4/teams-4.c: ...this.
2845         * testsuite/libgomp.c/examples-4/e.54.5.c: Renamed to...
2846         * testsuite/libgomp.c/examples-4/teams-5.c: ...this.
2847         * testsuite/libgomp.c/examples-4/e.54.6.c: Renamed to...
2848         * testsuite/libgomp.c/examples-4/teams-6.c: ...this.
2849         * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Renamed to...
2850         * testsuite/libgomp.fortran/examples-4/array_sections-3.f90: ...this.
2851         * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Renamed to...
2852         * testsuite/libgomp.fortran/examples-4/array_sections-4.f90: ...this.
2853         * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Renamed to...
2854         * testsuite/libgomp.fortran/examples-4/async_target-1.f90: ...this.
2855         * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Renamed to...
2856         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: ...this.
2857         (vec_mult): Add !$omp taskwait.
2858         * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Renamed to...
2859         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: ...this.
2860         * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Renamed to...
2861         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: ...this.
2862         * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Renamed to...
2863         * testsuite/libgomp.fortran/examples-4/declare_target-3.f90: ...this.
2864         * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Renamed to...
2865         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90: ...this.
2866         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Renamed to...
2867         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90: ...this.
2868         * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Renamed to...
2869         * testsuite/libgomp.fortran/examples-4/device-1.f90: ...this.
2870         * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Renamed to...
2871         * testsuite/libgomp.fortran/examples-4/device-2.f90: ...this.
2872         * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Renamed to...
2873         * testsuite/libgomp.fortran/examples-4/device-3.f90: ...this.
2874         * testsuite/libgomp.fortran/examples-4/simd-1.f90: New file.
2875         * testsuite/libgomp.fortran/examples-4/simd-2.f90: New file.
2876         * testsuite/libgomp.fortran/examples-4/simd-3.f90: New file.
2877         * testsuite/libgomp.fortran/examples-4/simd-4.f90: New file.
2878         * testsuite/libgomp.fortran/examples-4/simd-5.f90: New file.
2879         * testsuite/libgomp.fortran/examples-4/simd-6.f90: New file.
2880         * testsuite/libgomp.fortran/examples-4/simd-7.f90: New file.
2881         * testsuite/libgomp.fortran/examples-4/simd-8.f90: New file.
2882         * testsuite/libgomp.fortran/examples-4/e.50.1.f90: Renamed to...
2883         * testsuite/libgomp.fortran/examples-4/target-1.f90: ...this.
2884         * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Renamed to...
2885         * testsuite/libgomp.fortran/examples-4/target-2.f90: ...this.
2886         * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Renamed to...
2887         * testsuite/libgomp.fortran/examples-4/target-3.f90: ...this.
2888         * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Renamed to...
2889         * testsuite/libgomp.fortran/examples-4/target-4.f90: ...this.
2890         * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Renamed to...
2891         * testsuite/libgomp.fortran/examples-4/target-5.f90: ...this.
2892         * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Renamed to...
2893         * testsuite/libgomp.fortran/examples-4/target_data-1.f90: ...this.
2894         * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Renamed to...
2895         * testsuite/libgomp.fortran/examples-4/target_data-2.f90: ...this.
2896         * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Renamed to...
2897         * testsuite/libgomp.fortran/examples-4/target_data-3.f90: ...this.
2898         * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Renamed to...
2899         * testsuite/libgomp.fortran/examples-4/target_data-4.f90: ...this.
2900         * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Renamed to...
2901         * testsuite/libgomp.fortran/examples-4/target_data-5.f90: ...this.
2902         * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Renamed to...
2903         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: ...this.
2904         * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Renamed to...
2905         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: ...this.
2906         * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Renamed to...
2907         * testsuite/libgomp.fortran/examples-4/target_update-1.f90: ...this.
2908         * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Renamed to...
2909         * testsuite/libgomp.fortran/examples-4/target_update-2.f90: ...this.
2910         * testsuite/libgomp.fortran/examples-4/task_dep-1.f90: New file.
2911         * testsuite/libgomp.fortran/examples-4/task_dep-2.f90: New file.
2912         * testsuite/libgomp.fortran/examples-4/task_dep-3.f90: New file.
2913         * testsuite/libgomp.fortran/examples-4/task_dep-4.f90: New file.
2914         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: New file.
2915         * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Renamed to...
2916         * testsuite/libgomp.fortran/examples-4/teams-2.f90: ...this.
2917         * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Renamed to...
2918         * testsuite/libgomp.fortran/examples-4/teams-3.f90: ...this.
2919         * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Renamed to...
2920         * testsuite/libgomp.fortran/examples-4/teams-4.f90: ...this.
2921         * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Renamed to...
2922         * testsuite/libgomp.fortran/examples-4/teams-5.f90: ...this.
2923         * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Renamed to...
2924         * testsuite/libgomp.fortran/examples-4/teams-6.f90: ...this.
2926 2015-07-10  Tom de Vries  <tom@codesourcery.com>
2928         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: New test.
2929         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: New test.
2931 2015-07-08  Thomas Schwinge  <thomas@codesourcery.com>
2933         PR libgomp/65099
2934         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not
2935         in a 64-bit configuration.
2936         * testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia
2937         offloading testing if no such device is available.
2938         * testsuite/libgomp.oacc-c/c.exp: Likewise.
2939         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
2941 2015-07-08  Tom de Vries  <tom@codesourcery.com>
2943         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Fix
2944         second call to f.
2945         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
2947 2015-07-07  Tom de Vries  <tom@codesourcery.com>
2949         PR tree-optimization/66642
2950         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Test low
2951         iteration count case.
2952         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c (init): New
2953         function, factor out of ...
2954         (main): ... here.  Test low iteration count case.
2956 2015-07-06  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2958         * libgomp.h (gomp_thread_pool): Comment last_team field.
2960 2015-07-02  Uros Bizjak  <ubizjak@gmail.com>
2962         * testsuite/libgomp.c++/pr66702-1.C: Require
2963         vect_simd_clones effective target.
2964         * testsuite/libgomp.c++/pr66702-2.C: Ditto.
2966 2015-06-30  Tom de Vries  <tom@codesourcery.com>
2968         * testsuite/libgomp.oacc-c++/c++.exp: Set DEFAULT_CFLAGS to -O2 if not
2969         already set.  Use DEFAULT_CFLAGS in dg-runtest.
2970         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Remove dg-options
2971         "-O2".
2973 2015-06-30  Tom de Vries  <tom@codesourcery.com>
2975         * testsuite/libgomp.c++/c++.exp: Set DEFAULT_CFLAGS to -O2 if not
2976         already set.  Use DEFAULT_CFLAGS in dg-runtest.
2977         * testsuite/libgomp.c++/atomic-16.C: Remove dg-options "-O2 -fopenmp".
2978         * testsuite/libgomp.c++/pr64824.C: Same.
2979         * testsuite/libgomp.c++/pr64868.C: Same.
2980         * testsuite/libgomp.c++/pr66199-1.C: Same.
2981         * testsuite/libgomp.c++/pr66199-2.C: Same.
2982         * testsuite/libgomp.c++/target-2.C: Same.
2983         * testsuite/libgomp.c++/for-7.C: Use dg-additional-options for
2984         -std=<standard> option.
2985         * testsuite/libgomp.c++/udr-11.C: Same.
2986         * testsuite/libgomp.c++/udr-12.C: Same.
2987         * testsuite/libgomp.c++/udr-13.C: Same.
2988         * testsuite/libgomp.c++/udr-14.C: Same.
2989         * testsuite/libgomp.c++/udr-15.C: Same.
2990         * testsuite/libgomp.c++/udr-16.C: Same.
2991         * testsuite/libgomp.c++/udr-17.C: Same.
2992         * testsuite/libgomp.c++/udr-18.C: Same.
2993         * testsuite/libgomp.c++/udr-19.C: Same.
2994         * testsuite/libgomp.c++/atomic-1.C: Remove dg-options "-O2".
2995         * testsuite/libgomp.c++/simd-1.C: Same.
2996         * testsuite/libgomp.c++/simd-2.C: Same.
2997         * testsuite/libgomp.c++/simd-3.C: Same.
2998         * testsuite/libgomp.c++/simd-4.C: Same.
2999         * testsuite/libgomp.c++/simd-5.C: Same.
3000         * testsuite/libgomp.c++/simd-6.C: Same.
3001         * testsuite/libgomp.c++/simd-7.C: Same.
3002         * testsuite/libgomp.c++/simd-8.C: Same.
3003         * testsuite/libgomp.c++/simd-9.C: Same.
3004         * testsuite/libgomp.c++/simd10.C: Same.
3005         * testsuite/libgomp.c++/simd11.C: Same.
3006         * testsuite/libgomp.c++/simd12.C: Same.
3007         * testsuite/libgomp.c++/simd13.C: Same.
3009 2015-06-30  Jakub Jelinek  <jakub@redhat.com>
3011         PR middle-end/66702
3012         * testsuite/libgomp.c++/pr66702-1.C: New test.
3013         * testsuite/libgomp.c++/pr66702-2.C: New test.
3015 2015-06-30  Tom de Vries  <tom@codesourcery.com>
3017         * testsuite/libgomp.c/parloops-exit-first-loop-alt-5.c: New test.
3018         * testsuite/libgomp.c/parloops-exit-first-loop-alt-6.c: New test.
3019         * testsuite/libgomp.c/parloops-exit-first-loop-alt-7.c: New test.
3020         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Update comment.
3022 2015-06-30  Tom de Vries  <tom@codesourcery.com>
3024         PR tree-optimization/66652
3025         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (f): Rewrite
3026         using restrict pointers.
3027         (main): Add arguments to calls to f.
3028         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
3030 2015-06-23  Andreas Tobler  <andreast@gcc.gnu.org>
3032         * configure.ac: Fix check for header <sys/sysctl.h>.
3033         * configure: Regenerate.
3034         * config.h.in: Likewise.
3036 2015-06-23  Tom de Vries  <tom@codesourcery.com>
3038         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Use
3039         abort.
3040         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c (main): Same.
3042 2015-06-19  Thomas Schwinge  <thomas@codesourcery.com>
3044         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Only consider for
3045         acc_device_nvidia.
3047         PR libgomp/66518
3048         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: XFAIL.
3049         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
3051 2015-06-15  Tom de Vries  <tom@codesourcery.com>
3053         * testsuite/libgomp.c/atomic-1.c: Remove dg-options "-O2".  Use
3054         dg-additional-options for any remaining options.
3055         * testsuite/libgomp.c/atomic-2.c: Same.
3056         * testsuite/libgomp.c/atomic-4.c: Same.
3057         * testsuite/libgomp.c/atomic-5.c: Same.
3058         * testsuite/libgomp.c/atomic-6.c: Same.
3059         * testsuite/libgomp.c/autopar-1.c: Same.
3060         * testsuite/libgomp.c/copyin-1.c: Same.
3061         * testsuite/libgomp.c/copyin-2.c: Same.
3062         * testsuite/libgomp.c/copyin-3.c: Same.
3063         * testsuite/libgomp.c/examples-4/e.53.5.c: Same.
3064         * testsuite/libgomp.c/nestedfn-5.c: Same.
3065         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Same.
3066         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Same.
3067         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: Same.
3068         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
3069         * testsuite/libgomp.c/pr32362-1.c: Same.
3070         * testsuite/libgomp.c/pr32362-2.c: Same.
3071         * testsuite/libgomp.c/pr32362-3.c: Same.
3072         * testsuite/libgomp.c/pr39591-1.c: Same.
3073         * testsuite/libgomp.c/pr39591-2.c: Same.
3074         * testsuite/libgomp.c/pr39591-3.c: Same.
3075         * testsuite/libgomp.c/pr58392.c: Same.
3076         * testsuite/libgomp.c/pr58756.c: Same.
3077         * testsuite/libgomp.c/simd-1.c: Same.
3078         * testsuite/libgomp.c/simd-10.c: Same.
3079         * testsuite/libgomp.c/simd-11.c: Same.
3080         * testsuite/libgomp.c/simd-12.c: Same.
3081         * testsuite/libgomp.c/simd-13.c: Same.
3082         * testsuite/libgomp.c/simd-14.c: Same.
3083         * testsuite/libgomp.c/simd-15.c: Same.
3084         * testsuite/libgomp.c/simd-2.c: Same.
3085         * testsuite/libgomp.c/simd-3.c: Same.
3086         * testsuite/libgomp.c/simd-4.c: Same.
3087         * testsuite/libgomp.c/simd-5.c: Same.
3088         * testsuite/libgomp.c/simd-6.c: Same.
3089         * testsuite/libgomp.c/simd-7.c: Same.
3090         * testsuite/libgomp.c/simd-8.c: Same.
3091         * testsuite/libgomp.c/simd-9.c: Same.
3093 2015-06-15  Tom de Vries  <tom@codesourcery.com>
3095         * testsuite/libgomp.c/pr35625.c: Fix typo.
3097 2015-06-15  Tom de Vries  <tom@codesourcery.com>
3099         * testsuite/libgomp.c/atomic-18.c: Remove superfluous -fopenmp setting
3100         in dg-options.
3101         * testsuite/libgomp.c/atomic-3.c: Same.
3102         * testsuite/libgomp.c/debug-1.c: Same.
3103         * testsuite/libgomp.c/nqueens-1.c: Same.
3104         * testsuite/libgomp.c/pr26171.c: Same.
3105         * testsuite/libgomp.c/pr48591.c: Same.
3106         * testsuite/libgomp.c/pr64824.c: Same.
3107         * testsuite/libgomp.c/pr64868.c: Same.
3108         * testsuite/libgomp.c/pr66133.c: Same.
3109         * testsuite/libgomp.c/pr66199-1.c: Same.
3110         * testsuite/libgomp.c/pr66199-2.c: Same.
3111         * testsuite/libgomp.c/target-8.c: Same.
3113 2015-06-15  Tom de Vries  <tom@codesourcery.com>
3115         * testsuite/libgomp.c/collapse-3.c: Use dg-additional-options for
3116         -std={gnu99,c99}.
3117         * testsuite/libgomp.c/for-1.c: Same.
3118         * testsuite/libgomp.c/for-2.c: Same.
3119         * testsuite/libgomp.c/for-3.c: Same.
3120         * testsuite/libgomp.c/pr35625.c: Same.
3121         * testsuite/libgomp.c/pr39154.c: Same.
3122         * testsuite/libgomp.c/simd-16.c: Same.
3123         * testsuite/libgomp.c/simd-17.c: Same.
3125 2015-06-13  Tom de Vries  <tom@codesourcery.com>
3127         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: New test.
3129 2015-06-13  Tom de Vries  <tom@codesourcery.com>
3131         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Add comment.
3132         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
3133         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Add comment.
3134         (N): Define.
3135         (main): Use N instead of hardcoded constants.
3137 2015-06-05  Tom de Vries  <tom@codesourcery.com>
3139         merge from gomp4 branch:
3140         2015-05-28  Tom de Vries  <tom@codesourcery.com>
3142         PR tree-optimization/65443
3143         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: New test.
3144         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: New test.
3145         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: New test.
3147 2015-05-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
3149         * testsuite/libgomp.graphite/bounds.c: Adjust for
3150         cleanup-tree-dump removal.
3151         * testsuite/libgomp.graphite/force-parallel-1.c: Likewise.
3152         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
3153         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
3154         * testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
3155         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
3156         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
3157         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
3158         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
3159         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
3160         * testsuite/libgomp.graphite/pr41118.c: Likewise.
3162 2015-05-28  Uros Bizjak  <ubizjak@gmail.com>
3164         * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Remove function.
3165         (futex_wait) [!__x86_64__]: Use __asm operand instead of sys_futex0.
3166         (futex_wake) [!__x86_64__]: Ditto.
3168 2015-05-28  Julian Brown  <julian@codesourcery.com>
3170         * oacc-init.c (resolve_device): Add FAIL_IS_ERROR argument. Update
3171         function comment. Only call gomp_fatal if new argument is true.
3172         (acc_dev_num_out_of_range): New function.
3173         (acc_init_1, acc_shutdown_1): Update call to resolve_device. Call
3174         acc_dev_num_out_of_range as appropriate.
3175         (acc_get_num_devices, acc_set_device_type, acc_get_device_type)
3176         (acc_get_device_num, acc_set_device_num): Update calls to
3177         resolve_device.
3178         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Update expected test
3179         output.
3181 2015-05-28  Julian Brown  <julian@codesourcery.com>
3183         PR libgomp/65742
3184         * oacc-init.c (plugin/plugin-host.h): Include.
3185         (acc_on_device): Check whether we're in an offloaded region for
3186         host_nonshm
3187         plugin. Don't use __builtin_acc_on_device.
3188         * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_parallel): Set
3189         nonshm_exec flag in thread-local data.
3190         (GOMP_OFFLOAD_openacc_create_thread_data): Allocate thread-local
3191         data for host_nonshm plugin.
3192         (GOMP_OFFLOAD_openacc_destroy_thread_data): Free thread-local data
3193         for host_nonshm plugin.
3194         * plugin/plugin-host.h: New.
3196 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
3198         * config/linux/ia64/futex.h (sys_futex0) Change operand "op" to int.
3200 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
3202         * config/linux/wait.h (gomp_futex_wait, gomp_futex_wake):
3203         Declare as int.
3204         (FUTEX_PRIVATE_FLAG): Remove L suffix.
3205         * config/linux/mutex.c (gomp_futex_wait, gomp_futex_wake):
3206         Declare as int.
3208 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
3210         * config/linux/x86/futex.h (sys_futex0) [__PIC__]: Remove function.
3212 2015-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
3214         * target.c (gomp_map_pointer): New function abstracting out
3215         GOMP_MAP_POINTER handling.
3216         (gomp_map_vars): Remove GOMP_MAP_POINTER handling code and use
3217         gomp_map_pointer().
3219 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
3221         PR middle-end/66199
3222         * testsuite/libgomp.c/pr66199-1.c: New test.
3223         * testsuite/libgomp.c/pr66199-2.c: New test.
3224         * testsuite/libgomp.c++/pr66199-1.C: New test.
3225         * testsuite/libgomp.c++/pr66199-2.C: New test.
3226         * testsuite/libgomp.fortran/pr66199-1.f90: New test.
3227         * testsuite/libgomp.fortran/pr66199-2.f90: New test.
3229 2015-05-19  Julian Brown  <julian@codesourcery.com>
3231         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return zero
3232         on cuInit failure.
3234 2015-05-13  Jakub Jelinek  <jakub@redhat.com>
3236         PR middle-end/66133
3237         * testsuite/libgomp.c/pr66133.c: New test.
3239 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
3241         * Makefile.in: Regenerated with automake-1.11.6.
3242         * aclocal.m4: Likewise.
3243         * config.h.in: Likewise.
3244         * configure: Likewise.
3245         * testsuite/Makefile.in: Likewise.
3247 2015-05-08  Jason Merrill  <jason@redhat.com>
3249         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c (main): Use
3250         _Complex.
3252         * openacc.h (__GOACC_NOTHROW): Fix noexcept syntax.
3254 2015-05-06  Julian Brown  <julian@codesourcery.com>
3256         * oacc-init.c (acc_device_lock): Add explanatory comment.
3257         (resolve_device): Add comment about locking requirement.
3258         (acc_init_1, acc_shutdown_1): Likewise. Add locking around
3259         gomp_init_device and gomp_fini_device calls.
3260         (acc_get_num_devices, acc_set_device_type, acc_get_device_type)
3261         (acc_get_device_num, acc_set_device_num): Add locking around
3262         resolve_device and gomp_init_device calls.
3264 2015-05-06  Julian Brown  <julian@codesourcery.com>
3266         * oacc-init.c (acc_shutdown_1): Call gomp_mutex_unlock for
3267         goacc_thread_lock on error paths.
3268         * oacc-mem.c (lookup_host): Remove locking from function. Note
3269         locking requirement for caller in function comment.
3270         (lookup_dev): Likewise.
3271         (acc_free, acc_deviceptr, acc_hostptr, acc_is_present)
3272         (acc_map_data, acc_unmap_data, present_create_copy, delete_copyout)
3273         (update_dev_host, gomp_acc_insert_pointer, gomp_acc_remove_pointer):
3274         Add locking.
3276 2015-05-05  Thomas Schwinge  <thomas@codesourcery.com>
3278         PR testsuite/65205
3279         PR libgomp/65993
3280         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: In dg-output,
3281         don't expect "0x" prefix for "%p" format specifier, don't expect
3282         "(nil)" for NULL pointer.
3283         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
3284         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
3285         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
3286         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
3287         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
3288         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
3289         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
3290         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
3291         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
3292         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
3293         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
3294         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
3295         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
3296         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
3297         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
3298         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
3299         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
3300         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
3301         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
3302         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
3303         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
3304         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
3305         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
3306         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
3307         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
3308         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
3309         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
3310         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
3311         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: More
3312         accurately specify what we're looking for.
3313         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
3314         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
3315         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
3316         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
3317         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
3319 2015-04-30  James Norris  <jnorris@codesourcery.com>
3321         PR testsuite/65205
3322         * testsuite/lib/libgomp.exp
3323         (check_effective_target_openacc_host_selected)
3324         (check_effective_target_openacc_host_nonshm_selected): New
3325         procedures.
3326         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Fix misuse of
3327         dg-shouldfail.
3328         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
3329         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
3330         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
3331         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
3332         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
3333         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
3334         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
3335         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
3336         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
3337         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
3338         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
3339         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
3340         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
3341         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
3342         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
3343         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
3344         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
3345         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
3346         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
3347         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
3348         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
3349         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
3350         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
3351         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
3352         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
3353         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
3354         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
3355         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
3356         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
3357         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
3358         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
3359         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
3360         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
3361         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
3362         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
3363         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
3364         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
3365         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
3366         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
3367         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
3368         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
3369         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
3370         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
3372 2015-04-08  Julian Brown  <julian@codesourcery.com>
3374         * libgomp.h (target_mem_desc: Remove mem_map field.
3375         (acc_dispatch_t): Remove open_device_func, close_device_func,
3376         get_device_num_func, set_device_num_func, target_data members.
3377         Change create_thread_data_func argument to device number instead of
3378         generic pointer.
3379         * oacc-async.c (assert.h): Include.
3380         (acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
3381         (acc_wait_all, acc_wait_all_async): Use current host thread's
3382         active device, not base_dev.
3383         * oacc-cuda.c (acc_get_current_cuda_device)
3384         (acc_get_current_cuda_context, acc_get_cuda_stream)
3385         (acc_set_cuda_stream): Likewise.
3386         * oacc-host.c (host_dispatch): Don't set open_device_func,
3387         close_device_func, get_device_num_func or set_device_num_func.
3388         * oacc-init.c (base_dev, init_key): Remove.
3389         (cached_base_dev): New.
3390         (name_of_acc_device_t): New.
3391         (acc_init_1): Initialise default-numbered device, not zeroth.
3392         (acc_shutdown_1): Close all devices of a given type.
3393         (goacc_destroy_thread): Don't use base_dev.
3394         (lazy_open, lazy_init, lazy_init_and_open): Remove.
3395         (goacc_attach_host_thread_to_device): New.
3396         (acc_init): Reimplement with goacc_attach_host_thread_to_device.
3397         (acc_get_num_devices): Don't use base_dev.
3398         (acc_set_device_type): Reimplement.
3399         (acc_get_device_type): Don't use base_dev.
3400         (acc_get_device_num): Tweak logic.
3401         (acc_set_device_num): Likewise.
3402         (acc_on_device): Use acc_get_device_type.
3403         (goacc_runtime_initialize): Initialize cached_base_dev not base_dev.
3404         (goacc_lazy_initialize): Reimplement with acc_init and
3405         goacc_attach_host_thread_to_device.
3406         * oacc-int.h (goacc_thread): Add base_dev field.
3407         (base_dev): Remove extern declaration.
3408         (goacc_attach_host_thread_to_device): Add prototype.
3409         * oacc-mem.c (acc_malloc): Use current thread's device instead of
3410         base_dev.
3411         (acc_free): Likewise.
3412         (acc_memcpy_to_device): Likewise.
3413         (acc_memcpy_from_device): Likewise.
3414         * oacc-parallel.c (select_acc_device): Remove. Replace calls with
3415         goacc_lazy_initialize (throughout).
3416         (GOACC_parallel): Use tgt_offset to locate target functions.
3417         * target.c (gomp_map_vars): Don't set tgt->mem_map.
3418         (gomp_unmap_vars): Use devicep->mem_map pointer not tgt->mem_map.
3419         (gomp_load_plugin_for_device): Remove open_device, close_device,
3420         get_device_num, set_device_num openacc hook initialisation. Don't set
3421         openacc.target_data.
3422         * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_open_device)
3423         (GOMP_OFFLOAD_openacc_close_device)
3424         (GOMP_OFFLOAD_openacc_get_device_num)
3425         (GOMP_OFFLOAD_openacc_set_device_num): Remove.
3426         (GOMP_OFFLOAD_openacc_create_thread_data): Change (unused) argument
3427         to int.
3428         * plugin/plugin-nvptx.c (ptx_inited): Remove.
3429         (instantiated_devices, ptx_dev_lock): New.
3430         (struct ptx_image_data): New.
3431         (ptx_devices, ptx_images, ptx_image_lock): New.
3432         (fini_streams_for_device): Reorder cuStreamDestroy call.
3433         (nvptx_get_num_devices): Remove forward declaration.
3434         (nvptx_init): Change return type to bool.
3435         (nvptx_fini): Remove.
3436         (nvptx_attach_host_thread_to_device): New.
3437         (nvptx_open_device): Return struct ptx_device* instead of void*.
3438         (nvptx_close_device): Change argument type to struct ptx_device*,
3439         return type to void.
3440         (nvptx_get_num_devices): Use instantiated_devices not ptx_inited.
3441         (kernel_target_data, kernel_host_table): Remove static globals.
3442         (GOMP_OFFLOAD_register_image, GOMP_OFFLOAD_get_table): Remove.
3443         (GOMP_OFFLOAD_init_device): Reimplement.
3444         (GOMP_OFFLOAD_fini_device): Likewise.
3445         (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New.
3446         (GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free, GOMP_OFFLOAD_dev2host)
3447         (GOMP_OFFLOAD_host2dev): Use ORD argument.
3448         (GOMP_OFFLOAD_openacc_open_device)
3449         (GOMP_OFFLOAD_openacc_close_device)
3450         (GOMP_OFFLOAD_openacc_set_device_num)
3451         (GOMP_OFFLOAD_openacc_get_device_num): Remove.
3452         (GOMP_OFFLOAD_openacc_create_thread_data): Change argument to int
3453         (device number).
3455         testsuite/
3456         * libgomp.oacc-c-c++-common/lib-9.c: Fix devnum check in test.
3458 2015-04-06  Ilya Verbin  <ilya.verbin@intel.com>
3460         * libgomp-plugin.h (struct mapping_table): Replace with addr_pair.
3461         * libgomp.h (struct gomp_memory_mapping): Remove.
3462         (struct target_mem_desc): Change type of mem_map from
3463         gomp_memory_mapping * to splay_tree_s *.
3464         (struct gomp_device_descr): Remove register_image_func, get_table_func.
3465         Add load_image_func, unload_image_func.
3466         Change type of mem_map from gomp_memory_mapping to splay_tree_s.
3467         Remove offload_regions_registered.
3468         (gomp_init_tables): Remove.
3469         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
3470         to splay_tree_s *.
3471         * libgomp.map (GOMP_4.0.1): Add GOMP_offload_unregister.
3472         * oacc-host.c (host_dispatch): Do not initialize register_image_func,
3473         get_table_func, mem_map.is_initialized, mem_map.splay_tree.root,
3474         offload_regions_registered.
3475         Initialize load_image_func, unload_image_func, mem_map.root.
3476         (goacc_host_init): Do not initialize host_dispatch.mem_map.lock.
3477         * oacc-init.c (lazy_open): Don't call gomp_init_tables.
3478         (acc_shutdown_1): Use dev's lock and splay_tree instead of mem_map's.
3479         * oacc-mem.c (lookup_host): Get gomp_device_descr *dev instead of
3480         gomp_memory_mapping *.  Use dev's lock and splay_tree.
3481         (lookup_dev): Use dev's lock.
3482         (acc_deviceptr): Pass dev to lookup_host instead of mem_map.
3483         (acc_is_present): Likewise.
3484         (acc_map_data): Likewise.
3485         (acc_unmap_data): Likewise.  Use dev's lock.
3486         (present_create_copy): Likewise.
3487         (delete_copyout): Pass dev to lookup_host instead of mem_map.
3488         (update_dev_host): Likewise.
3489         (gomp_acc_remove_pointer): Likewise.  Use dev's lock.
3490         * oacc-parallel.c (GOACC_parallel): Use dev's lock and splay_tree.
3491         * plugin/plugin-host.c (GOMP_OFFLOAD_register_image): Remove.
3492         (GOMP_OFFLOAD_get_table): Remove
3493         (GOMP_OFFLOAD_load_image): New function.
3494         (GOMP_OFFLOAD_unload_image): New function.
3495         * target.c (register_lock): New mutex for offload image registration.
3496         (num_devices): Do not guard with PLUGIN_SUPPORT.
3497         (gomp_realloc_unlock): New static function.
3498         (gomp_map_vars_existing): Add device descriptor argument.  Unlock mutex
3499         before gomp_fatal.
3500         (gomp_map_vars): Use dev's lock and splay_tree instead of mem_map's.
3501         Pass devicep to gomp_map_vars_existing.  Unlock mutex before gomp_fatal.
3502         (gomp_copy_from_async): Use dev's lock and splay_tree instead of
3503         mem_map's.
3504         (gomp_unmap_vars): Likewise.
3505         (gomp_update): Remove gomp_memory_mapping argument.  Use dev's lock and
3506         splay_tree instead of mm's.  Unlock mutex before gomp_fatal.
3507         (gomp_offload_image_to_device): New static function.
3508         (GOMP_offload_register): Add mutex lock.
3509         Call gomp_offload_image_to_device for all initialized devices.
3510         Replace gomp_realloc with gomp_realloc_unlock.
3511         (GOMP_offload_unregister): New function.
3512         (gomp_init_tables): Replace with gomp_init_device.  Replace a call to
3513         get_table_func from the plugin with calls to init_device_func and
3514         gomp_offload_image_to_device.
3515         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
3516         to splay_tree_s *.
3517         (GOMP_target): Do not call gomp_init_tables.  Use dev's lock and
3518         splay_tree instead of mem_map's.  Unlock mutex before gomp_fatal.
3519         (GOMP_target_data): Do not call gomp_init_tables.
3520         (GOMP_target_update): Likewise.  Remove argument from gomp_update.
3521         (gomp_load_plugin_for_device): Replace register_image and get_table
3522         with load_image and unload_image in DLSYM ().
3523         (gomp_register_images_for_device): Remove function.
3524         (gomp_target_init): Do not initialize current_device.mem_map.*,
3525         current_device.offload_regions_registered.
3526         Remove call to gomp_register_images_for_device.
3527         Do not free offload_images and num_offload_images.
3529 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
3531         PR fortran/65597
3532         * testsuite/libgomp.fortran/pr65597.f90: New test.
3534 2015-03-27  Tom de Vries  <tom@codesourcery.com>
3536         PR testsuite/65594
3537         * testsuite/libgomp.graphite/force-parallel-6.c (abort): Declare.
3538         (init, check): New function.
3539         (foo): Change return type to void.
3540         (main): Call init and check.
3542 2015-03-27  Tom de Vries  <tom@codesourcery.com>
3544         PR testsuite/65594
3545         * testsuite/libgomp.graphite/force-parallel-6.c (M): Define.
3546         (foo): Use M for non-inner loops to scale down test-case.
3548 2015-03-25  Kai Tietz  <ktietz@redhat.com>
3550         PR libgomp/64972
3551         * oacc-parallel.c (GOACC_parallel): Use PRIu64 if available.
3552         (GOACC_data_start): Likewise.
3553         * target.c (gomp_map_vars): Likewise.
3555 2015-03-21  John David Anglin  <danglin@gcc.gnu.org>
3557         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Don't run on
3558         hppa*-*-hpux*.
3560 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
3562         * testsuite/libgomp.c/target-10.c: New test.
3563         * testsuite/libgomp.c++/target-4.C: New test.
3565 2015-03-13  Ilya Verbin  <ilya.verbin@intel.com>
3567         * testsuite/libgomp.fortran/declare-target-1.f90: New test.
3568         * testsuite/libgomp.fortran/declare-target-2.f90: New file.
3570 2015-03-13  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3572         * configure.tgt (*-*-rtems*): Use local-exec TLS model.
3573         * configure.ac (*-*-rtems*): Assume Pthread is supported.
3574         (pthread.h): Check for this header file.
3575         * configure: Regenerate.
3577 2015-02-25  Tom de Vries  <tom@codesourcery.com>
3579         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (DO_PRAGMA)
3580         (check_reduction_op, check_reduction_macro, max, min):
3581         Declare.
3582         (test_reductions_int, test_reductions_minmax, test_reductions_bool): New
3583         function.
3584         (main): Use new functions.
3586 2015-02-18  Ilya Tocar  <ilya.tocar@intel.com>
3588         * target.c (gomp_load_plugin_for_device): Use const char * instead of
3589         char * for variables holding dlerror return values.
3590         (DLSYM_OPT): Ditto.
3592 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
3594         * libgomp-plugin.c (GOMP_PLUGIN_debug): Fix typo.
3596 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
3597             Cesar Philippidis  <cesar@codesourcery.com>
3599         * oacc-ptx.h (GOACC_INTERNAL_PTX): Add GOACC_tid, GOACC_ntid,
3600         GOACC_ctaid, and GOACC_nctaid routines.
3602 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
3604         PR c/64824
3605         * testsuite/libgomp.c/atomic-18.c: New test.
3606         * testsuite/libgomp.c++/atomic-16.C: New test.
3608 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
3610         PR c/64824
3611         PR c/64868
3612         * testsuite/libgomp.c/pr64824.c: New test.
3613         * testsuite/libgomp.c/pr64868.c: New test.
3614         * testsuite/libgomp.c++/pr64824.C: New test.
3615         * testsuite/libgomp.c++/pr64868.C: New test.
3617 2015-02-01  David Edelsohn  <dje.gcc@gmail.com>
3619         PR libgomp/64635
3620         * configure.tgt (*-*-aix*): Use standard posix plugin-suffix.h.
3621         Link with -lpthread.
3622         * config/aix/plugin-suffix.h: Delete.
3624 2015-01-28  Jack Howarth  <howarth.at.gcc@gmail.com>
3626         PR libgomp/64635
3627         * configure.tgt (*-*-aix*): Use config_path "aix posix".
3628         (*-*-darwin*): Use config_path "bsd darwin posix".
3629         (*-*-hpux*): Use config_path "hpux posix".
3630         * target.c: Add include of plugin-suffix.h and use
3631         SONAME_SUFFIX macro.
3632         * config/aix/plugin-suffix.h: New file.
3633         * config/darwin/plugin-suffix.h: New file.
3634         * config/hpux/plugin-suffix.h: New file.
3635         * config/posix/plugin-suffix.h: New file.
3637 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
3639         PR middle-end/64734
3640         * libgomp.c/pr64734.c: New test.
3642 2015-01-23  Tom de Vries  <tom@codesourcery.com>
3644         PR libgomp/64672
3645         * testsuite/libgomp.oacc-c-c++-common/abort-5.c: New test.
3647 2015-01-23  Tom de Vries  <tom@codesourcery.com>
3649         PR libgomp/64707
3650         * testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to
3651         dg-options.
3653 2015-01-19  Thomas Schwinge  <thomas@codesourcery.com>
3655         PR libgomp/64625
3656         * libgomp_g.h (GOACC_data_start, GOACC_enter_exit_data)
3657         (GOACC_parallel, GOACC_update): Remove const_void *offload_table
3658         formal parameter.  Update all users.
3659         * target.c (GOMP_target, GOMP_target_data, GOMP_target_update):
3660         Document unused formal parameter.
3662 2015-01-16  Thomas Schwinge  <thomas@codesourcery.com>
3664         * oacc-parallel.c: Don't include <alloca.h>.
3665         (GOACC_parallel): Use gomp_alloca instead of alloca.
3667 2015-01-16  Gerald Pfeifer  <gerald@pfeifer.com>
3669         * target.c (num_devices): Guard with PLUGIN_SUPPORT.
3671 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3672             James Norris  <jnorris@codesourcery.com>
3673             Tom de Vries  <tom@codesourcery.com>
3674             Julian Brown  <julian@codesourcery.com>
3675             Cesar Philippidis  <cesar@codesourcery.com>
3676             Nathan Sidwell  <nathan@codesourcery.com>
3677             Tobias Burnus  <burnus@net-b.de>
3679         * Makefile.am (search_path): Add $(top_srcdir)/../include.
3680         (libgomp_la_SOURCES): Add splay-tree.c, libgomp-plugin.c,
3681         oacc-parallel.c, oacc-host.c, oacc-init.c, oacc-mem.c,
3682         oacc-async.c, oacc-plugin.c, oacc-cuda.c.
3683         [USE_FORTRAN] (libgomp_la_SOURCES): Add openacc.f90.
3684         Include $(top_srcdir)/plugin/Makefrag.am.
3685         (nodist_libsubinclude_HEADERS): Add openacc.h.
3686         [USE_FORTRAN] (nodist_finclude_HEADERS): Add openacc_lib.h,
3687         openacc.f90, openacc.mod, openacc_kinds.mod.
3688         (omp_lib.mod): Generalize into...
3689         (%.mod): ... this new rule.
3690         (openacc_kinds.mod, openacc.mod): New rules.
3691         * plugin/configfrag.ac: New file.
3692         * configure.ac: Move plugin/offloading support into it.  Include
3693         it.  Instantiate testsuite/libgomp-test-support.pt.exp.
3694         * plugin/Makefrag.am: New file.
3695         * testsuite/Makefile.am (OFFLOAD_TARGETS)
3696         (OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS): Don't
3697         export.
3698         (libgomp-test-support.exp): New rule.
3699         (all-local): Depend on it.
3700         * Makefile.in: Regenerate.
3701         * testsuite/Makefile.in: Regenerate.
3702         * config.h.in: Likewise.
3703         * configure: Likewise.
3704         * configure.tgt: Harden shell syntax.
3705         * env.c: Include "oacc-int.h".
3706         (parse_acc_device_type): New function.
3707         (gomp_debug_var, goacc_device_type, goacc_device_num): New
3708         variables.
3709         (initialize_env): Initialize those.  Call
3710         goacc_runtime_initialize.
3711         * error.c (gomp_vdebug, gomp_debug, gomp_vfatal): New functions.
3712         (gomp_fatal): Call gomp_vfatal.
3713         * libgomp.h: Include "libgomp-plugin.h" and <stdarg.h>.
3714         (gomp_debug_var, goacc_device_type, goacc_device_num, gomp_vdebug)
3715         (gomp_debug, gomp_verror, gomp_vfatal, gomp_init_targets_once)
3716         (splay_tree_node, splay_tree, splay_tree_key)
3717         (struct target_mem_desc, struct splay_tree_key_s)
3718         (struct gomp_memory_mapping, struct acc_dispatch_t)
3719         (struct gomp_device_descr, gomp_acc_insert_pointer)
3720         (gomp_acc_remove_pointer, target_mem_desc, gomp_copy_from_async)
3721         (gomp_unmap_vars, gomp_init_device, gomp_init_tables)
3722         (gomp_free_memmap, gomp_fini_device): New declarations.
3723         (gomp_vdebug, gomp_debug): New macros.
3724         Include "splay-tree.h".
3725         * libgomp.map (OACC_2.0): New symbol version.  Use for
3726         acc_get_num_devices, acc_get_num_devices_h_, acc_set_device_type,
3727         acc_set_device_type_h_, acc_get_device_type,
3728         acc_get_device_type_h_, acc_set_device_num, acc_set_device_num_h_,
3729         acc_get_device_num, acc_get_device_num_h_, acc_async_test,
3730         acc_async_test_h_, acc_async_test_all, acc_async_test_all_h_,
3731         acc_wait, acc_wait_h_, acc_wait_async, acc_wait_async_h_,
3732         acc_wait_all, acc_wait_all_h_, acc_wait_all_async,
3733         acc_wait_all_async_h_, acc_init, acc_init_h_, acc_shutdown,
3734         acc_shutdown_h_, acc_on_device, acc_on_device_h_, acc_malloc,
3735         acc_free, acc_copyin, acc_copyin_32_h_, acc_copyin_64_h_,
3736         acc_copyin_array_h_, acc_present_or_copyin,
3737         acc_present_or_copyin_32_h_, acc_present_or_copyin_64_h_,
3738         acc_present_or_copyin_array_h_, acc_create, acc_create_32_h_,
3739         acc_create_64_h_, acc_create_array_h_, acc_present_or_create,
3740         acc_present_or_create_32_h_, acc_present_or_create_64_h_,
3741         acc_present_or_create_array_h_, acc_copyout, acc_copyout_32_h_,
3742         acc_copyout_64_h_, acc_copyout_array_h_, acc_delete,
3743         acc_delete_32_h_, acc_delete_64_h_, acc_delete_array_h_,
3744         acc_update_device, acc_update_device_32_h_,
3745         acc_update_device_64_h_, acc_update_device_array_h_,
3746         acc_update_self, acc_update_self_32_h_, acc_update_self_64_h_,
3747         acc_update_self_array_h_, acc_map_data, acc_unmap_data,
3748         acc_deviceptr, acc_hostptr, acc_is_present, acc_is_present_32_h_,
3749         acc_is_present_64_h_, acc_is_present_array_h_,
3750         acc_memcpy_to_device, acc_memcpy_from_device,
3751         acc_get_current_cuda_device, acc_get_current_cuda_context,
3752         acc_get_cuda_stream, acc_set_cuda_stream.
3753         (GOACC_2.0): New symbol version.  Use for GOACC_data_end,
3754         GOACC_data_start, GOACC_enter_exit_data, GOACC_parallel,
3755         GOACC_update, GOACC_wait, GOACC_get_thread_num,
3756         GOACC_get_num_threads.
3757         (GOMP_PLUGIN_1.0): New symbol version.  Use for
3758         GOMP_PLUGIN_malloc, GOMP_PLUGIN_malloc_cleared,
3759         GOMP_PLUGIN_realloc, GOMP_PLUGIN_debug, GOMP_PLUGIN_error,
3760         GOMP_PLUGIN_fatal, GOMP_PLUGIN_async_unmap_vars,
3761         GOMP_PLUGIN_acc_thread.
3762         * libgomp.texi: Update for OpenACC changes, and GOMP_DEBUG
3763         environment variable.
3764         * libgomp_g.h (GOACC_data_start, GOACC_data_end)
3765         (GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait)
3766         (GOACC_get_num_threads, GOACC_get_thread_num): New declarations.
3767         * splay-tree.h (splay_tree_lookup, splay_tree_insert)
3768         (splay_tree_remove): New declarations.
3769         (rotate_left, rotate_right, splay_tree_splay, splay_tree_insert)
3770         (splay_tree_remove, splay_tree_lookup): Move into...
3771         * splay-tree.c: ... this new file.
3772         * target.c: Include "oacc-plugin.h", "oacc-int.h", <assert.h>.
3773         (splay_tree_node, splay_tree, splay_tree_key)
3774         (struct target_mem_desc, struct splay_tree_key_s)
3775         (struct gomp_device_descr): Don't declare.
3776         (num_devices_openmp): New variable.
3777         (gomp_get_num_devices ): Use it.
3778         (gomp_init_targets_once): New function.
3779         (gomp_get_num_devices ): Use it.
3780         (get_kind, gomp_copy_from_async, gomp_free_memmap)
3781         (gomp_fini_device, gomp_register_image_for_device): New functions.
3782         (gomp_map_vars): Add devaddrs parameter.
3783         (gomp_update): Add mm parameter.
3784         (gomp_init_device): Move most of it into...
3785         (gomp_init_tables): ... this new function.
3786         (gomp_register_images_for_device): Remove function.
3787         (splay_compare, gomp_map_vars, gomp_unmap_vars, gomp_init_device):
3788         Make them hidden instead of static.
3789         (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_vars)
3790         (gomp_update, gomp_init_device, GOMP_target, GOMP_target_data)
3791         (GOMP_target_end_data, GOMP_target_update)
3792         (gomp_load_plugin_for_device, gomp_target_init): Update for
3793         OpenACC changes.
3794         * oacc-async.c: New file.
3795         * oacc-cuda.c: Likewise.
3796         * oacc-host.c: Likewise.
3797         * oacc-init.c: Likewise.
3798         * oacc-int.h: Likewise.
3799         * oacc-mem.c: Likewise.
3800         * oacc-parallel.c: Likewise.
3801         * oacc-plugin.c: Likewise.
3802         * oacc-plugin.h: Likewise.
3803         * oacc-ptx.h: Likewise.
3804         * openacc.f90: Likewise.
3805         * openacc.h: Likewise.
3806         * openacc_lib.h: Likewise.
3807         * plugin/plugin-host.c: Likewise.
3808         * plugin/plugin-nvptx.c: Likewise.
3809         * libgomp-plugin.c: Likewise.
3810         * libgomp-plugin.h: Likewise.
3811         * libgomp_target.h: Remove file after merging content into the
3812         former file.  Update all users.
3813         * testsuite/lib/libgomp.exp: Load libgomp-test-support.exp.
3814         (offload_targets_s, offload_targets_s_openacc): New variables.
3815         (check_effective_target_openacc_nvidia_accel_present)
3816         (check_effective_target_openacc_nvidia_accel_selected): New
3817         procedures.
3818         (libgomp_init): Update for OpenACC changes.
3819         * testsuite/libgomp-test-support.exp.in: New file.
3820         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
3821         * testsuite/libgomp.oacc-c/c.exp: Likewise.
3822         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
3823         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Likewise.
3824         * testsuite/libgomp.oacc-c-c++-common/abort-2.c: Likewise.
3825         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
3826         * testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise.
3827         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
3828         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
3829         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: Likewise.
3830         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Likewise.
3831         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
3832         * testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise.
3833         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
3834         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
3835         * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
3836         * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
3837         * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
3838         * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
3839         * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
3840         * testsuite/libgomp.oacc-c-c++-common/data-1.c: Likewise.
3841         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
3842         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
3843         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
3844         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
3845         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
3846         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
3847         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
3848         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
3849         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
3850         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
3851         * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
3852         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
3853         * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Likewise.
3854         * testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise.
3855         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
3856         * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
3857         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
3858         * testsuite/libgomp.oacc-c-c++-common/lib-12.c: Likewise.
3859         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
3860         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
3861         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
3862         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
3863         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
3864         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
3865         * testsuite/libgomp.oacc-c-c++-common/lib-19.c: Likewise.
3866         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
3867         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
3868         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
3869         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
3870         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
3871         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
3872         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
3873         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
3874         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
3875         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
3876         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
3877         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
3878         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
3879         * testsuite/libgomp.oacc-c-c++-common/lib-31.c: Likewise.
3880         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
3881         * testsuite/libgomp.oacc-c-c++-common/lib-33.c: Likewise.
3882         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
3883         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
3884         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
3885         * testsuite/libgomp.oacc-c-c++-common/lib-37.c: Likewise.
3886         * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Likewise.
3887         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
3888         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
3889         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
3890         * testsuite/libgomp.oacc-c-c++-common/lib-41.c: Likewise.
3891         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
3892         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
3893         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
3894         * testsuite/libgomp.oacc-c-c++-common/lib-45.c: Likewise.
3895         * testsuite/libgomp.oacc-c-c++-common/lib-46.c: Likewise.
3896         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
3897         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
3898         * testsuite/libgomp.oacc-c-c++-common/lib-49.c: Likewise.
3899         * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Likewise.
3900         * testsuite/libgomp.oacc-c-c++-common/lib-50.c: Likewise.
3901         * testsuite/libgomp.oacc-c-c++-common/lib-51.c: Likewise.
3902         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
3903         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
3904         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
3905         * testsuite/libgomp.oacc-c-c++-common/lib-55.c: Likewise.
3906         * testsuite/libgomp.oacc-c-c++-common/lib-56.c: Likewise.
3907         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
3908         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
3909         * testsuite/libgomp.oacc-c-c++-common/lib-59.c: Likewise.
3910         * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise.
3911         * testsuite/libgomp.oacc-c-c++-common/lib-60.c: Likewise.
3912         * testsuite/libgomp.oacc-c-c++-common/lib-61.c: Likewise.
3913         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
3914         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
3915         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
3916         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
3917         * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Likewise.
3918         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
3919         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
3920         * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
3921         * testsuite/libgomp.oacc-c-c++-common/lib-7.c: Likewise.
3922         * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
3923         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
3924         * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
3925         * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
3926         * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
3927         * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
3928         * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
3929         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
3930         * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
3931         * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
3932         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
3933         * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
3934         * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
3935         * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
3936         * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
3937         * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
3938         * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise.
3939         * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise.
3940         * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise.
3941         * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise.
3942         * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
3943         * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
3944         * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
3945         * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise.
3946         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
3947         * testsuite/libgomp.oacc-c-c++-common/nested-2.c: Likewise.
3948         * testsuite/libgomp.oacc-c-c++-common/offset-1.c: Likewise.
3949         * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: Likewise.
3950         * testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise.
3951         * testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: Likewise.
3952         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
3953         * testsuite/libgomp.oacc-c-c++-common/present-2.c: Likewise.
3954         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
3955         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
3956         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
3957         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
3958         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
3959         * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c:
3960         Likewise.
3961         * testsuite/libgomp.oacc-c-c++-common/subr.h: Likewise.
3962         * testsuite/libgomp.oacc-c-c++-common/subr.ptx: Likewise.
3963         * testsuite/libgomp.oacc-c-c++-common/timer.h: Likewise.
3964         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
3965         * testsuite/libgomp.oacc-c-c++-common/update-1.c: Likewise.
3966         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
3967         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
3968         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
3969         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
3970         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
3971         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
3972         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
3973         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
3974         * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
3975         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
3976         * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
3977         * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
3978         * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
3979         * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
3980         * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
3981         * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
3982         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
3983         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
3984         * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
3985         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
3986         * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
3987         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
3988         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
3989         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
3990         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
3991         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
3992         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
3993         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
3994         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
3995         * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
3996         * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
3997         * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
3998         * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
3999         * testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
4000         * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
4001         * testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
4002         * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
4003         * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
4004         * testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
4005         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
4006         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
4007         * testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
4008         * testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
4009         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
4010         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
4011         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
4012         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
4013         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
4014         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
4015         * testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
4016         * testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
4017         * testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
4018         * testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
4019         * testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
4020         * testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
4022 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
4023             Julian Brown  <julian@codesourcery.com>
4024             David Malcolm  <dmalcolm@redhat.com>
4026         * configure.ac: Rename libgomp from "GNU OpenMP Runtime Library"
4027         to "GNU Offloading and Multi Processing Runtime Library".  Change
4028         all users.
4029         * configure: Regenerate.
4030         * libgomp.texi: Update.
4032 2015-01-08  Thomas Schwinge  <thomas@codesourcery.com>
4034         * configure.ac [tgt_dir] (offload_additional_lib_paths): Also add
4035         "$tgt_dir/lib32".
4036         * configure: Regenerate.
4038         * testsuite/lib/libgomp.exp (libgomp_init): Correctly match
4039         "intelmic" in $offload_targets.
4041 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
4043         Update copyright years.
4045         * libgomp.texi: Bump @copying's copyright year.
4047 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4049         * testsuite/lib/libgomp.exp: Load target-utils.exp.
4050         Move load of target-supportes.exp earlier.
4052 2014-12-10  Ilya Verbin  <ilya.verbin@intel.com>
4054         * testsuite/libgomp.c/target-9.c: New test.
4056 2014-12-09  Varvara Rainchik  <varvara.rainchik@intel.com>
4058         * config.h.in: Regenerate.
4059         * configure: Regenerate.
4060         * configure.ac: Add GCC_CHECK_EMUTLS.
4061         * libgomp.h: Add check for USE_EMUTLS: this case
4062         is equal to HAVE_TLS.
4063         * team.c: Likewise.
4065 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
4067         * configure.tgt (x86_64-*-linux*): Tune -m32 multilib to generic.
4069 2014-11-28  Andrey Turetskiy  <andrey.turetskiy@intel.com>
4070             Ilya Verbin  <ilya.verbin@intel.com>
4072         * testsuite/libgomp.c/target-critical-1.c: New test.
4074 2014-11-26  Jakub Jelinek  <jakub@redhat.com>
4076         * testsuite/libgomp.c/examples-4/e.53.4.c: Add -DITESTITERS=20
4077         to dg-options unless expensive testing is on.
4078         (TESTITERS): Define to N if not defined.
4079         (main): Use TESTITERS instead of N.
4080         * testsuite/libgomp.c/examples-4/e.55.1.c: Define CHUNKSZ from
4081         dg-additional-options depending on whether expensive testing is on.
4082         * testsuite/libgomp.fortran/examples-4/e.55.1.f90 (e_55_1_mod):
4083         Decrease N to 100000 and CHUNKSZ to 10000.
4085 2014-11-24  Jakub Jelinek  <jakub@redhat.com>
4087         PR fortran/63938
4088         * testsuite/libgomp.fortran/pr63938-1.f90: New test.
4089         * testsuite/libgomp.fortran/pr63938-2.f90: New test.
4091 2014-11-21  Steve Ellcey  <sellcey@imgtec.com>
4093         * config/linux/mips/futex.h (SYS_futex): Define if not already done.
4095 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
4097         PR bootstrap/63784
4098         * configure: Regenerated.
4100 2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
4102         * testsuite/libgomp.c/examples-4/e.53.5.c: Require
4103         vect_simd_clones effective target.
4104         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
4106 2014-11-14  Jakub Jelinek  <jakub@redhat.com>
4108         * libgomp.c/examples-4/e.54.2.c (main): Use N / 8 instead
4109         of 32 as block_size.
4110         * libgomp.fortran/examples-4/e.54.2.f90 (e_54_1): Use n / 8
4111         instead of 32 as block_size.
4113 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
4114             Ilya Verbin  <ilya.verbin@intel.com>
4116         * Makefile.in: Regenerate.
4117         * configure: Regenerate.
4118         * configure.ac: Set up offload_additional_options,
4119         offload_additional_lib_paths and offload_targets.
4120         * testsuite/Makefile.am: Export environment variables: OFFLOAD_TARGETS,
4121         OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS.
4122         * testsuite/Makefile.in: Regenerate.
4123         * testsuite/lib/libgomp.exp (libgomp_init): Append
4124         offload_additional_lib_paths to LD_LIBRARY_PATH.  Append
4125         offload_additional_options to ALWAYS_CFLAGS.  Append liboffloadmic
4126         build directory to LD_LIBRARY_PATH for intelmic offload targets.
4128 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
4129             Ilya Verbin  <ilya.verbin@intel.com>
4130             Kirill Yukhin  <kirill.yukhin@intel.com>
4131             Ilya Tocar  <ilya.tocar@intel.com>
4133         * testsuite/lib/libgomp.exp
4134         (check_effective_target_offload_device): New.
4135         * testsuite/libgomp.c++/c++.exp: Include tests from subdirectories.
4136         * testsuite/libgomp.c++/examples-4/e.51.5.C: New test.
4137         * testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto.
4138         * testsuite/libgomp.c/examples-4/e.50.1.c: Ditto.
4139         * testsuite/libgomp.c/examples-4/e.50.2.c: Ditto.
4140         * testsuite/libgomp.c/examples-4/e.50.3.c: Ditto.
4141         * testsuite/libgomp.c/examples-4/e.50.4.c: Ditto.
4142         * testsuite/libgomp.c/examples-4/e.50.5.c: Ditto.
4143         * testsuite/libgomp.c/examples-4/e.51.1.c: Ditto.
4144         * testsuite/libgomp.c/examples-4/e.51.2.c: Ditto.
4145         * testsuite/libgomp.c/examples-4/e.51.3.c: Ditto.
4146         * testsuite/libgomp.c/examples-4/e.51.4.c: Ditto.
4147         * testsuite/libgomp.c/examples-4/e.51.6.c: Ditto.
4148         * testsuite/libgomp.c/examples-4/e.51.7.c: Ditto.
4149         * testsuite/libgomp.c/examples-4/e.52.1.c: Ditto.
4150         * testsuite/libgomp.c/examples-4/e.52.2.c: Ditto.
4151         * testsuite/libgomp.c/examples-4/e.53.1.c: Ditto.
4152         * testsuite/libgomp.c/examples-4/e.53.3.c: Ditto.
4153         * testsuite/libgomp.c/examples-4/e.53.4.c: Ditto.
4154         * testsuite/libgomp.c/examples-4/e.53.5.c: Ditto.
4155         * testsuite/libgomp.c/examples-4/e.54.2.c: Ditto.
4156         * testsuite/libgomp.c/examples-4/e.54.3.c: Ditto.
4157         * testsuite/libgomp.c/examples-4/e.54.4.c: Ditto.
4158         * testsuite/libgomp.c/examples-4/e.54.5.c: Ditto.
4159         * testsuite/libgomp.c/examples-4/e.54.6.c: Ditto.
4160         * testsuite/libgomp.c/examples-4/e.55.1.c: Ditto.
4161         * testsuite/libgomp.c/examples-4/e.55.2.c: Ditto.
4162         * testsuite/libgomp.c/examples-4/e.56.3.c: Ditto.
4163         * testsuite/libgomp.c/examples-4/e.56.4.c: Ditto.
4164         * testsuite/libgomp.c/examples-4/e.57.1.c: Ditto.
4165         * testsuite/libgomp.c/examples-4/e.57.2.c: Ditto.
4166         * testsuite/libgomp.c/examples-4/e.57.3.c: Ditto.
4167         * testsuite/libgomp.c/target-7.c: Fix test.
4168         * testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test.
4169         * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto.
4170         * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto.
4171         * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto.
4172         * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto.
4173         * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto.
4174         * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto.
4175         * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto.
4176         * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto.
4177         * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto.
4178         * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto.
4179         * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto.
4180         * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto.
4181         * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto.
4182         * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto.
4183         * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto.
4184         * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto.
4185         * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto.
4186         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
4187         * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto.
4188         * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto.
4189         * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto.
4190         * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto.
4191         * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto.
4192         * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto.
4193         * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto.
4194         * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto.
4195         * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto.
4196         * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto.
4197         * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto.
4198         * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto.
4200 2014-11-13  Jakub Jelinek  <jakub@redhat.com>
4201             Ilya Verbin  <ilya.verbin@intel.com>
4202             Thomas Schwinge  <thomas@codesourcery.com>
4203             Andrey Turetskiy  <andrey.turetskiy@intel.com>
4205         * libgomp.map (GOMP_4.0.1): New symbol version.
4206         Add GOMP_offload_register.
4207         * libgomp_target.h: New file.
4208         * splay-tree.h: New file.
4209         * target.c: Include config.h, libgomp_target.h, dlfcn.h, splay-tree.h.
4210         (gomp_target_init): New forward declaration.
4211         (gomp_is_initialized): New static variable.
4212         (splay_tree_node, splay_tree, splay_tree_key): New typedefs.
4213         (struct target_mem_desc, struct splay_tree_key_s, offload_image_descr):
4214         New structures.
4215         (offload_images, num_offload_images, devices, num_devices): New static
4216         variables.
4217         (splay_compare): New static function.
4218         (struct gomp_device_descr): New structure.
4219         (gomp_get_num_devices): Call gomp_target_init.
4220         (resolve_device, gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt)
4221         (gomp_unmap_vars, gomp_update, gomp_init_device): New static functions.
4222         (GOMP_offload_register): New function.
4223         (GOMP_target): Arrange for host callback to be performed in a separate
4224         initial thread and contention group, inheriting ICVs from
4225         gomp_global_icv etc.  Call gomp_map_vars and gomp_unmap_vars.
4226         Add device initialization and lookup for target function in splay tree.
4227         (GOMP_target_data): Add device initialization and call gomp_map_vars.
4228         (GOMP_target_end_data): Call gomp_unmap_vars.
4229         (GOMP_target_update): Add device initialization and call gomp_update.
4230         (gomp_load_plugin_for_device, gomp_register_images_for_device)
4231         (gomp_target_init): New static functions.
4233 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
4234             Thomas Schwinge  <thomas@codesourcery.com>
4235             Ilya Verbin  <ilya.verbin@intel.com>
4236             Andrey Turetskiy  <andrey.turetskiy@intel.com>
4238         * config.h.in: Regenerate.
4239         * configure: Regenerate.
4240         * configure.ac: Check for libdl, required for plugin support.
4241         (PLUGIN_SUPPORT): Define if plugins are supported.
4242         (enable_offload_targets): Support Intel MIC targets.
4243         (OFFLOAD_TARGETS): List of target names suitable for offloading.
4245 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4247         PR target/63610
4248         * configure: Regenerate.
4250 2014-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4252         * config/posix/lock.c (_XOPEN_SOURCE) Define as 600.
4254 2014-10-06  Marek Polacek  <polacek@redhat.com>
4256         * testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
4257         * testsuite/libgomp.c/nqueens-1.c: Include <stdlib.h>.
4258         * testsuite/libgomp.c/thread-limit-1.c: Include <omp.h>
4259         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
4261 2014-10-06  Marek Polacek  <polacek@redhat.com>
4263         * testsuite/libgomp.c/affinity-1.c: Fix implicit declarations.
4264         * testsuite/libgomp.c/nqueens-1.c: Likewise.
4265         * testsuite/libgomp.c/pr26943-3.c: Likewise.
4266         * testsuite/libgomp.c/pr26943-4.c: Likewise.
4267         * testsuite/libgomp.c/pr36802-2.c: Likewise.
4268         * testsuite/libgomp.c/pr36802-3.c: Likewise.
4269         * testsuite/libgomp.c/thread-limit-1.c: Likewise.
4270         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
4271         * testsuite/libgomp.c/appendix-a/a.15.1.c: Include <omp.h>.
4272         * testsuite/libgomp.c/omp-loop02.c: Fix defaulting to int.
4273         * testsuite/libgomp.c/omp-parallel-for.c: Likewise.
4274         * testsuite/libgomp.c/omp-parallel-if.c: Likewise.
4275         * testsuite/libgomp.c/omp-single-1.c: Likewise.
4276         * testsuite/libgomp.c/omp-single-2.c: Likewise.
4277         * testsuite/libgomp.c/omp_matvec.c: Likewise.
4278         * testsuite/libgomp.c/omp_workshare3.c: Likewise.
4279         * testsuite/libgomp.c/omp_workshare4.c: Likewise.
4280         * testsuite/libgomp.c/shared-1.c: Fix defaulting to int.  Fix implicit
4281         declarations.
4283 2014-10-03  Jakub Jelinek  <jakub@redhat.com>
4285         PR libgomp/61200
4286         * testsuite/libgomp.c/pr61200.c: New test.
4288 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
4290         PR c++/63248
4291         * testsuite/libgomp.c++/pr63248.C: New test.
4293 2014-08-04  Jakub Jelinek  <jakub@redhat.com>
4295         * task.c (GOMP_taskgroup_end): If taskgroup->num_children
4296         is not zero, but taskgroup->children is NULL and there are
4297         any task->children, schedule those instead of waiting.
4298         * testsuite/libgomp.c/depend-6.c: New test.
4299         * testsuite/libgomp.c/depend-7.c: New test.
4300         * testsuite/libgomp.c/depend-8.c: New test.
4301         * testsuite/libgomp.c/depend-9.c: New test.
4302         * testsuite/libgomp.c/depend-10.c: New test.
4304 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
4306         * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
4307         (struct gomp_taskwait): New type.
4308         (struct gomp_task): Add taskwait and parent_depends_on, remove
4309         in_taskwait and taskwait_sem fields.
4310         (gomp_finish_task): Don't destroy taskwait_sem.
4311         * task.c (gomp_init_task): Don't init in_taskwait, instead init
4312         taskwait and parent_depends_on.
4313         (GOMP_task): For if (0) tasks with depend clause that depend on
4314         earlier tasks don't defer them, instead call
4315         gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
4316         Initialize redundant_out field, for redundant out entries just
4317         move them at the end of linked list instead of removing them
4318         completely, and set redundant_out flag instead of redundant.
4319         (gomp_task_run_pre): Update last_parent_depends_on if scheduling
4320         that task.
4321         (gomp_task_run_post_handle_dependers): If parent is in
4322         gomp_task_maybe_wait_for_dependencies and newly runnable task
4323         is not parent_depends_on, queue it in parent->children linked
4324         list after all runnable tasks with parent_depends_on set.
4325         Adjust for addition of taskwait indirection.
4326         (gomp_task_run_post_remove_parent): If parent is in
4327         gomp_task_maybe_wait_for_dependencies and task to be removed
4328         is parent_depends_on, decrement n_depend and if needed awake
4329         parent.  Adjust for addition of taskwait indirection.
4330         (GOMP_taskwait): Adjust for addition of taskwait indirection.
4331         (gomp_task_maybe_wait_for_dependencies): New function.
4332         * testsuite/libgomp.c/depend-5.c: New test.
4334 2014-07-13  Tobias Burnus  <burnus@net-b.de>
4336         * testsuite/libgomp.fortran/pr34020.f90: Make compile
4337         with TS 18508/Fortran 2015.
4339 2014-07-06  Marek Polacek  <polacek@redhat.com>
4341         PR c/6940
4342         * testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.
4344 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
4346         * testsuite/lib/libgomp.exp (libgomp_target_compile): If $source
4347         matches regex $lang_source_re, add $lang_include_flags to options.
4348         * testsuite/libgomp.c/c.exp: Unset lang_include_flags.
4349         * testsuite/libgomp.c++/c++.exp: Likewise.
4350         * testsuite/libgomp.fortran/fortran.exp: Likewise.  Set lang_source_re
4351         and lang_include_flags instead of adding -fintrinsic-modules-path= to
4352         ALWAYS_CFLAGS.
4353         * testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags.
4355 2014-07-03  Thomas Schwinge  <thomas@codesourcery.com>
4357         * testsuite/libgomp.fortran/fortran.exp: Explain
4358         gfortran-dg-runtest usage.
4360 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
4362         * testsuite/libgomp.fortran/simd5.f90: New test.
4363         * testsuite/libgomp.fortran/simd6.f90: New test.
4364         * testsuite/libgomp.fortran/simd7.f90: New test.
4366 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
4368         * testsuite/libgomp.c/for-2.c: Define SC to static for
4369         #pragma omp for simd testing.
4370         * testsuite/libgomp.c/for-2.h (SC): Define if not defined.
4371         (N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use
4372         SC macro.
4373         * testsuite/libgomp.c/simd-14.c: New test.
4374         * testsuite/libgomp.c/simd-15.c: New test.
4375         * testsuite/libgomp.c/simd-16.c: New test.
4376         * testsuite/libgomp.c/simd-17.c: New test.
4377         * testsuite/libgomp.c++/for-10.C: Define SC to static for
4378         #pragma omp for simd testing.
4379         * testsuite/libgomp.c++/simd10.C: New test.
4380         * testsuite/libgomp.c++/simd11.C: New test.
4381         * testsuite/libgomp.c++/simd12.C: New test.
4382         * testsuite/libgomp.c++/simd13.C: New test.
4384         * testsuite/libgomp.fortran/aligned1.f03: New test.
4385         * testsuite/libgomp.fortran/nestedfn5.f90: New test.
4386         * testsuite/libgomp.fortran/target7.f90: Surround loop spawning
4387         tasks with !$omp parallel !$omp single.
4388         * testsuite/libgomp.fortran/target8.f90: New test.
4389         * testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust
4390         not to use trim in the combiner, instead call elemental function.
4391         (fn): New elemental function.
4392         * testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init):
4393         Make elemental.
4394         * testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out,
4395         omp_in): Likewise.
4396         * testsuite/libgomp.fortran/udr12.f90: New test.
4397         * testsuite/libgomp.fortran/udr13.f90: New test.
4398         * testsuite/libgomp.fortran/udr14.f90: New test.
4399         * testsuite/libgomp.fortran/udr15.f90: New test.
4401 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
4403         * omp_lib.f90.in (openmp_version): Set to 201307.
4404         * omp_lib.h.in (openmp_version): Likewise.
4405         * testsuite/libgomp.c/target-8.c: New test.
4406         * testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch
4407         and inbranch clauses.
4408         * testsuite/libgomp.fortran/depend-3.f90: New test.
4409         * testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new
4410         openmp_version.
4411         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
4412         * testsuite/libgomp.fortran/target1.f90: New test.
4413         * testsuite/libgomp.fortran/target2.f90: New test.
4414         * testsuite/libgomp.fortran/target3.f90: New test.
4415         * testsuite/libgomp.fortran/target4.f90: New test.
4416         * testsuite/libgomp.fortran/target5.f90: New test.
4417         * testsuite/libgomp.fortran/target6.f90: New test.
4418         * testsuite/libgomp.fortran/target7.f90: New test.
4420 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
4422         PR fortran/60928
4423         * testsuite/libgomp.fortran/allocatable9.f90: New test.
4424         * testsuite/libgomp.fortran/allocatable10.f90: New test.
4425         * testsuite/libgomp.fortran/allocatable11.f90: New test.
4426         * testsuite/libgomp.fortran/allocatable12.f90: New test.
4427         * testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
4428         * testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
4429         * testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
4430         * testsuite/libgomp.fortran/associate1.f90: New test.
4431         * testsuite/libgomp.fortran/associate2.f90: New test.
4432         * testsuite/libgomp.fortran/procptr1.f90: New test.
4434 2014-06-06  Jakub Jelinek  <jakub@redhat.com>
4436         * testsuite/libgomp.fortran/simd1.f90: New test.
4437         * testsuite/libgomp.fortran/udr1.f90: New test.
4438         * testsuite/libgomp.fortran/udr2.f90: New test.
4439         * testsuite/libgomp.fortran/udr3.f90: New test.
4440         * testsuite/libgomp.fortran/udr4.f90: New test.
4441         * testsuite/libgomp.fortran/udr5.f90: New test.
4442         * testsuite/libgomp.fortran/udr6.f90: New test.
4443         * testsuite/libgomp.fortran/udr7.f90: New test.
4444         * testsuite/libgomp.fortran/udr8.f90: New test.
4445         * testsuite/libgomp.fortran/udr9.f90: New test.
4446         * testsuite/libgomp.fortran/udr10.f90: New test.
4447         * testsuite/libgomp.fortran/udr11.f90: New test.
4449 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
4451         * testsuite/libgomp.fortran/declare-simd-1.f90: Require
4452         vect_simd_clones effective target.
4453         * testsuite/libgomp.fortran/declare-simd-2.f90: Ditto.
4455 2014-05-21  Jakub Jelinek  <jakub@redhat.com>
4457         PR middle-end/61252
4458         * testsuite/libgomp.c++/simd-9.C: New test.
4460 2014-05-18  Uros Bizjak  <ubizjak@gmail.com>
4462         * libgomp.texi (Runitme Library Routines): Remove multiple @menu.
4463         (Environment Variables) Move OMP_PROC_BIND and OMP_STACKSIZE node
4464         texts according to their @menu entry positions.
4466 2014-05-11  Jakub Jelinek  <jakub@redhat.com>
4468         * testsuite/libgomp.fortran/cancel-do-1.f90: New test.
4469         * testsuite/libgomp.fortran/cancel-do-2.f90: New test.
4470         * testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
4471         * testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
4472         * testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
4473         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
4474         * testsuite/libgomp.fortran/declare-simd-1.f90: New test.
4475         * testsuite/libgomp.fortran/declare-simd-2.f90: New test.
4476         * testsuite/libgomp.fortran/declare-simd-3.f90: New test.
4477         * testsuite/libgomp.fortran/depend-1.f90: New test.
4478         * testsuite/libgomp.fortran/depend-2.f90: New test.
4479         * testsuite/libgomp.fortran/omp_atomic5.f90: New test.
4480         * testsuite/libgomp.fortran/simd1.f90: New test.
4481         * testsuite/libgomp.fortran/simd2.f90: New test.
4482         * testsuite/libgomp.fortran/simd3.f90: New test.
4483         * testsuite/libgomp.fortran/simd4.f90: New test.
4484         * testsuite/libgomp.fortran/taskgroup1.f90: New test.
4486 2014-05-02  Jakub Jelinek  <jakub@redhat.com>
4488         * testsuite/libgomp.c/simd-10.c: New test.
4489         * testsuite/libgomp.c/simd-11.c: New test.
4490         * testsuite/libgomp.c/simd-12.c: New test.
4491         * testsuite/libgomp.c/simd-13.c: New test.
4493 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
4495         * testsuite/libgomp.c++/atomic-14.C: Allow seq_cst and
4496         atomic type clauses in any order and optional comma in between.
4497         * testsuite/libgomp.c++/atomic-15.C: Likewise.
4498         * testsuite/libgomp.c/atomic-17.c: Likewise.
4500         * testsuite/libgomp.c/simd-7.c: New test.
4501         * testsuite/libgomp.c/simd-8.c: New test.
4502         * testsuite/libgomp.c/simd-9.c: New test.
4503         * testsuite/libgomp.c/loop-16.c: New test.
4505 2014-04-02  Richard Henderson  <rth@redhat.com>
4507         * config/linux/futex.h (futex_wait): Get error value from errno.
4508         (futex_wake): Likewise.
4510 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
4512         PR c++/60331
4513         * testsuite/libgomp.c++/udr-11.C: New test.
4514         * testsuite/libgomp.c++/udr-12.C: New test.
4515         * testsuite/libgomp.c++/udr-13.C: New test.
4516         * testsuite/libgomp.c++/udr-14.C: New test.
4517         * testsuite/libgomp.c++/udr-15.C: New test.
4518         * testsuite/libgomp.c++/udr-16.C: New test.
4519         * testsuite/libgomp.c++/udr-17.C: New test.
4520         * testsuite/libgomp.c++/udr-18.C: New test.
4521         * testsuite/libgomp.c++/udr-19.C: New test.
4523 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4525         Update copyright years
4527 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4529         * hashtab.h: Use the standard form for the copyright notice.
4531 2014-01-02  Tobias Burnus  <burnus@net-b.de>
4533         * libgomp.texi: Bump @copying's copyright year.
4535 2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>
4537         * testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude. Replace
4538         alloca () with __builtin_alloca ().
4539         * testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
4540         * testsuite/libgomp.c/lock-3.c: Likewise.
4541         * testsuite/libgomp.c/pr48591.c: Likewise.
4543 2013-12-17  Jakub Jelinek  <jakub@redhat.com>
4545         PR testsuite/59534
4546         * testsuite/libgomp.fortran/retval1.f90 (e5): Avoid non-shortcircuited
4547         comparisons.
4549 2013-12-16  Jakub Jelinek  <jakub@redhat.com>
4551         PR libgomp/58756
4552         * testsuite/libgomp.c/pr58756.c: New test.
4554 2013-12-12  Jakub Jelinek  <jakub@redhat.com>
4556         PR libgomp/59467
4557         * testsuite/libgomp.fortran/crayptr2.f90: Add private (d) clause to
4558         !$omp parallel.
4560 2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
4562         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
4563         ALWAYS_CFLAGS.
4564         * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
4565         * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
4566         * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
4567         * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
4568         Likewise.
4570         * libgomp_g.h: Include <stddef.h> for size_t.
4572         * libgomp.spec.in: Update comment about libgomp's dependencies.
4573         * configure.ac: Likewise.
4574         * configure: Regenerate.
4576 2013-10-16  Tobias Burnus  <burnus@net-b.de>
4578         * libgomp.texi: (Runtime Library Routines): Update references for
4579         OpenMP 4.0. Add omp_get_cancellation, omp_get_default_device,
4580         omp_get_num_devices, omp_get_num_teams, omp_get_proc_bind,
4581         omp_get_team_num, omp_is_initial_device, omp_set_default_device.
4582         (Environment Variables): Update references for OpenMP 4.0. Add
4583         OMP_CANCELLATION, OMP_DEFAULT_DEVICE, OMP_PLACES.
4584         Move OMP_DISPLAY_ENV and OMP_PROC_BIND up to be in alphabetical
4585         order.
4587 2013-10-14  Jakub Jelinek  <jakub@redhat.com>
4589         * env.c (parse_bind_var): Initialize value to avoid
4590         (false positive) warning.
4592 2013-10-12  Jakub Jelinek  <jakub@redhat.com>
4594         PR libgomp/58691
4595         * config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
4596         to check variable.
4597         (gomp_init_num_threads): Move i variable declaration into
4598         #ifdef CPU_ALLOC_SIZE block.
4599         * config/linux/affinity.c (gomp_affinity_init_level): Test
4600         gomp_places_list_len == 0 rather than gomp_places_list == 0
4601         when checking for topology reading error.
4602         * team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
4603         * env.c (parse_affinity): Add ignore argument, if true, don't populate
4604         gomp_places_list, only parse env var and always return false.
4605         (parse_places_var): Likewise.  Don't check gomp_global_icv.bind_var.
4606         (initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
4607         vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
4608         and either of these variables were parsed correctly into a places
4609         list.
4611 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
4612             Jakub Jelinek  <jakub@redhat.com>
4614         * testsuite/libgomp.graphite/force-parallel-1.c: Expect 4 instead
4615         of 5 loopfn matches.
4616         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
4617         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
4618         * testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
4619         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
4620         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
4621         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
4622         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
4623         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
4625 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
4627         * Makefile.am (omp_lib.mod): Streamline rule.
4628         * Makefile.in: Regenerate.
4630         * libgomp.texi (Runtime Library Routines): C linkage, don't throw
4631         exceptions.
4633         * testsuite/libgomp.c/lib-1.c (main): Add missing error check.
4634         * testsuite/libgomp.fortran/lib1.f90: Likewise.
4635         * testsuite/libgomp.fortran/lib2.f: Likewise.
4636         * testsuite/libgomp.fortran/lib3.f: Likewise.
4638         * configure.ac: Typo fix.
4639         * configure: Regenerate.
4641         * testsuite/libgomp.fortran/openmp_version-1.f: New file.
4642         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
4644         * omp.h.in: Don't touch the user's namespace.
4646 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
4647             Tobias Burnus  <burnus@net-b.de>
4648             Richard Henderson  <rth@redhat.com>
4650         * target.c: New file.
4651         * Makefile.am (libgomp_la_SOURCES): Add target.c.
4652         * Makefile.in: Regenerated.
4653         * libgomp_g.h (GOMP_task): Add depend argument.
4654         (GOMP_barrier_cancel, GOMP_loop_end_cancel,
4655         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
4656         GOMP_target_end_data, GOMP_target_update, GOMP_teams,
4657         GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
4658         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
4659         GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
4660         GOMP_taskgroup_start, GOMP_taskgroup_end,
4661         GOMP_parallel_sections): New prototypes.
4662         * fortran.c (omp_is_initial_device): Add ialias_redirect.
4663         (omp_is_initial_device_): New function.
4664         (ULP, STR1, STR2, ialias_redirect): Removed.
4665         (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
4666         omp_set_default_device_8_, omp_get_default_device_,
4667         omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
4668         functions.
4669         * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
4670         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
4671         GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
4672         @@GOMP_4.0.
4673         (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
4674         omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
4675         omp_set_default_device, omp_set_default_device_,
4676         omp_set_default_device_8_, omp_get_default_device,
4677         omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
4678         omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
4679         omp_get_team_num_): Export @@OMP_4.0.
4680         * team.c (struct gomp_thread_start_data): Add place field.
4681         (gomp_thread_start): Clear thr->thread_pool and
4682         thr->task before returning.  Use gomp_team_barrier_wait_final
4683         instead of gomp_team_barrier_wait.  Initialize thr->place.
4684         (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
4685         team_cancelled and task_queued_count fields.
4686         (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
4687         before calling pthread_exit.
4688         (gomp_free_thread): No longer static.  Use
4689         gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
4690         (gomp_team_start): Add flags argument.  Set
4691         thr->thread_pool->threads_busy to nthreads immediately after creating
4692         new pool.  Use gomp_managed_threads_lock instead of
4693         gomp_remaining_threads_lock.  Handle OpenMP 4.0 affinity.
4694         (gomp_team_end): Use gomp_managed_threads_lock instead of
4695         gomp_remaining_threads_lock.  Use gomp_team_barrier_wait_final instead
4696         of gomp_team_barrier_wait.  If team->team_cancelled, call
4697         gomp_fini_worshare on ws chain starting at team->work_shares_to_free
4698         rather than thr->ts.work_share.
4699         (initialize_team): Don't call gomp_sem_init here.
4700         * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
4701         caller.
4702         (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
4703         * env.c (gomp_global_icv): Add default_device_var, target_data and
4704         bind_var initializers.
4705         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
4706         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
4707         gomp_places_list_len): New variables.
4708         (parse_bind_var, parse_one_place, parse_places_var): New functions.
4709         (parse_affinity): Rewritten to construct OMP_PLACES list with unit
4710         sized places.
4711         (gomp_cancel_var): New global variable.
4712         (parse_int): New function.
4713         (handle_omp_display_env): New function.
4714         (initialize_env): Use it.  Initialize default_device_var.
4715         Parse OMP_CANCELLATION env var.  Use parse_bind_var to parse
4716         OMP_PROC_BIND instead of parse_boolean.  Use parse_places_var for
4717         OMP_PLACES parsing.  Don't call parse_affinity if OMP_PLACES has
4718         been successfully parsed (and call gomp_init_affinity in that case).
4719         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
4720         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
4721         omp_get_team_num, omp_is_initial_device): New functions.
4722         * libgomp.h: Include stdlib.h.
4723         (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
4724         Define.
4725         (struct target_mem_desc): Forward declare.
4726         (struct gomp_task_icv): Add default_device_var, target_data, bind_var
4727         and thread_limit_var fields.
4728         (gomp_get_num_devices): New prototype.
4729         (gomp_cancel_var): New extern decl.
4730         (struct gomp_team): Add work_shares_to_free, work_share_cancelled,
4731         team_cancelled and task_queued_count fields.  Add comments about
4732         task_{,queued_,running_}count.
4733         (gomp_cancel_kind): New enum.
4734         (gomp_work_share_end_cancel): New prototype.
4735         (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
4736         copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
4737         and depend fields.
4738         (struct gomp_taskgroup): New type.
4739         (struct gomp_task_depend_entry,
4740         struct gomp_dependers_vec): New types.
4741         (gomp_finish_task): Free depend_hash if non-NULL.
4742         (struct gomp_team_state): Add place_partition_off
4743         and place_partition_len fields.
4744         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
4745         gomp_places_list_len): New extern decls.
4746         (struct gomp_thread): Add place field.
4747         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
4748         (gomp_init_thread_affinity): Add place argument.
4749         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
4750         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
4751         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
4752         gomp_affinity_init_level, gomp_affinity_print_place): New
4753         prototypes.
4754         (gomp_team_start): Add flags argument.
4755         (gomp_thread_limit_var, gomp_remaining_threads_count,
4756         gomp_remaining_threads_lock): Remove.
4757         (gomp_managed_threads_lock): New variable.
4758         (struct gomp_thread_pool): Add threads_busy field.
4759         (gomp_free_thread): New prototype.
4760         * task.c: Include hashtab.h.
4761         (hash_entry_type): New typedef.
4762         (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
4763         (gomp_init_task): Clear dependers, depend_hash, depend_count,
4764         copy_ctors_done and taskgroup fields.
4765         (GOMP_task): Add depend argument, handle depend clauses.  If
4766         gomp_team_barrier_cancelled or if it's taskgroup has been
4767         cancelled, don't queue or start new tasks.  Set copy_ctors_done
4768         field if needed.  Initialize taskgroup field.  If copy_ctors_done
4769         and already cancelled, don't discard the task.  If taskgroup is
4770         non-NULL, enqueue the task into taskgroup queue.  Increment
4771         num_children field in taskgroup.  Increment task_queued_count.
4772         (gomp_task_run_pre, gomp_task_run_post_remove_parent,
4773         gomp_task_run_post_remove_taskgroup): New inline functions.
4774         (gomp_task_run_post_handle_depend_hash,
4775         gomp_task_run_post_handle_dependers,
4776         gomp_task_run_post_handle_depend): New functions.
4777         (GOMP_taskwait): Use them.  If more than one new tasks
4778         have been queued, wake other threads if needed.
4779         (gomp_barrier_handle_tasks): Likewise.  If
4780         gomp_team_barrier_cancelled, don't start any new tasks, just free
4781         all tasks.
4782         (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
4783         * omp_lib.f90.in
4784         (omp_proc_bind_kind, omp_proc_bind_false,
4785         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
4786         omp_proc_bind_spread): New params.
4787         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
4788         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
4789         omp_get_team_num, omp_is_initial_device): New interfaces.
4790         (omp_get_dynamic, omp_get_nested, omp_in_parallel,
4791         omp_get_max_threads, omp_get_num_procs, omp_get_num_threads,
4792         omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels,
4793         omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num,
4794         omp_get_team_size, omp_get_active_level, omp_in_final): Remove
4795         useless use omp_lib_kinds.
4796         * omp.h.in (omp_proc_bind_t): New typedef.
4797         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
4798         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
4799         omp_get_team_num, omp_is_initial_device): New prototypes.
4800         * loop.c (gomp_parallel_loop_start): Add flags argument, pass it
4801         through to gomp_team_start.
4802         (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
4803         GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
4804         Adjust gomp_parallel_loop_start callers.
4805         (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
4806         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
4807         GOMP_loop_end_cancel): New functions.
4808         (GOMP_parallel_end): Add ialias_redirect.
4809         * hashtab.h: New file.
4810         * libgomp.texi (Environment Variables): Minor cleanup,
4811         update section refs to OpenMP 4.0rc2.
4812         (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
4813         environment variables.
4814         * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
4815         team->work_shares_to_free to thr->ts.work_share before calling
4816         free_work_share.
4817         (gomp_work_share_end_cancel): New function.
4818         * config/linux/proc.c: Include errno.h.
4819         (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
4820         (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
4821         sizeof (cpu_set_t) to determine number of iterations.  Fix up check
4822         extern decl.  Use CPU_COUNT_S if available, or CPU_COUNT if
4823         gomp_cpuset_size is sizeof (cpu_set_t).
4824         (gomp_init_num_threads): Initialize gomp_cpuset_size,
4825         gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
4826         of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
4827         to pthread_getaffinity_np.  Free and clear gomp_cpusetp if it didn't
4828         contain any logical CPUs.
4829         (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
4830         is NULL.  Use gomp_cpusetp instead of &cpuset and pass
4831         gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
4832         pthread_getaffinity_np.  Check gomp_places_list instead of
4833         gomp_cpu_affinity.  Adjust gomp_cpuset_popcount caller.
4834         * config/linux/bar.c (gomp_barrier_wait_end,
4835         gomp_barrier_wait_last): Use BAR_* defines.
4836         (gomp_team_barrier_wait_end): Likewise.  Clear BAR_CANCELLED
4837         from state where needed.  Set work_share_cancelled to 0 on last
4838         thread.
4839         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
4840         gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
4841         functions.
4842         * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
4843         Add cpusetsize argument.
4844         (gomp_cpuset_size, gomp_cpusetp): Declare.
4845         * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
4846         (affinity_counter): Remove.
4847         (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
4848         if CPU_ALLOC_SIZE isn't defined.
4849         (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
4850         silently create OMP_PLACES=threads, if it is non-NULL afterwards,
4851         bind current thread to the first place.
4852         (gomp_init_thread_affinity): Rewritten.  Add place argument, just
4853         pthread_setaffinity_np to gomp_places_list[place].
4854         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
4855         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
4856         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
4857         gomp_affinity_init_level, gomp_affinity_print_place): New functions.
4858         * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
4859         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
4860         (gomp_barrier_t): Add awaited_final field.
4861         (gomp_barrier_init): Initialize awaited_final field.
4862         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
4863         gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
4864         prototypes.
4865         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.  Use BAR_*
4866         defines.
4867         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
4868         gomp_team_barrier_cancelled): New inline functions.
4869         (gomp_barrier_last_thread,
4870         gomp_team_barrier_set_task_pending,
4871         gomp_team_barrier_clear_task_pending,
4872         gomp_team_barrier_set_waiting_for_tasks,
4873         gomp_team_barrier_waiting_for_tasks,
4874         gomp_team_barrier_done): Use BAR_* defines.
4875         * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
4876         (gomp_barrier_wait_end): Use BAR_* defines.
4877         (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
4878         Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
4879         Use BAR_* defines.
4880         (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
4881         gomp_team_barrier_cancel): New functions.
4882         * config/posix/affinity.c (gomp_init_thread_affinity): Add place
4883         argument.
4884         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
4885         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
4886         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
4887         gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
4888         * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
4889         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
4890         (gomp_barrier_t): Add cancellable field.
4891         (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
4892         gomp_team_barrier_cancel): New prototypes.
4893         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
4894         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
4895         gomp_team_barrier_cancelled): New inline functions.
4896         (gomp_barrier_wait_start, gomp_barrier_last_thread,
4897         gomp_team_barrier_set_task_pending,
4898         gomp_team_barrier_clear_task_pending,
4899         gomp_team_barrier_set_waiting_for_tasks,
4900         gomp_team_barrier_waiting_for_tasks,
4901         gomp_team_barrier_done): Use BAR_* defines.
4902         * barrier.c (GOMP_barrier_cancel): New function.
4903         * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
4904         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
4905         omp_proc_bind_spread): New params.
4906         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
4907         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
4908         omp_get_team_num, omp_is_initial_device): New externals.
4909         * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
4910         New functions.
4911         (gomp_resolve_num_threads): Adjust for thread_limit now being in
4912         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
4913         infinity.  If not nested, just return minimum of max_num_threads
4914         and icv->thread_limit_var and if thr->thread_pool, set threads_busy
4915         to the returned value.  Otherwise, don't update atomically
4916         gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
4917         (GOMP_parallel_end): Adjust for thread_limit now being in
4918         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
4919         infinity.  Adjust threads_busy in the pool rather than
4920         gomp_remaining_threads_count.  Remember team->nthreads and call
4921         gomp_team_end before adjusting threads_busy, if not nested
4922         afterwards, just set it to 1 non-atomically.  Add ialias.
4923         (GOMP_parallel_start): Adjust gomp_team_start caller.
4924         * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
4925         * testsuite/libgomp.c/affinity-1.c: New test.
4926         * testsuite/libgomp.c/atomic-15.c: New test.
4927         * testsuite/libgomp.c/atomic-16.c: New test.
4928         * testsuite/libgomp.c/atomic-17.c: New test.
4929         * testsuite/libgomp.c/cancel-for-1.c: New test.
4930         * testsuite/libgomp.c/cancel-for-2.c: New test.
4931         * testsuite/libgomp.c/cancel-parallel-1.c: New test.
4932         * testsuite/libgomp.c/cancel-parallel-2.c: New test.
4933         * testsuite/libgomp.c/cancel-parallel-3.c: New test.
4934         * testsuite/libgomp.c/cancel-sections-1.c: New test.
4935         * testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
4936         * testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
4937         * testsuite/libgomp.c/depend-1.c: New test.
4938         * testsuite/libgomp.c/depend-2.c: New test.
4939         * testsuite/libgomp.c/depend-3.c: New test.
4940         * testsuite/libgomp.c/depend-4.c: New test.
4941         * testsuite/libgomp.c/for-1.c: New test.
4942         * testsuite/libgomp.c/for-1.h: New file.
4943         * testsuite/libgomp.c/for-2.c: New test.
4944         * testsuite/libgomp.c/for-2.h: New file.
4945         * testsuite/libgomp.c/for-3.c: New test.
4946         * testsuite/libgomp.c/pr58392.c: New test.
4947         * testsuite/libgomp.c/simd-1.c: New test.
4948         * testsuite/libgomp.c/simd-2.c: New test.
4949         * testsuite/libgomp.c/simd-3.c: New test.
4950         * testsuite/libgomp.c/simd-4.c: New test.
4951         * testsuite/libgomp.c/simd-5.c: New test.
4952         * testsuite/libgomp.c/simd-6.c: New test.
4953         * testsuite/libgomp.c/target-1.c: New test.
4954         * testsuite/libgomp.c/target-2.c: New test.
4955         * testsuite/libgomp.c/target-3.c: New test.
4956         * testsuite/libgomp.c/target-4.c: New test.
4957         * testsuite/libgomp.c/target-5.c: New test.
4958         * testsuite/libgomp.c/target-6.c: New test.
4959         * testsuite/libgomp.c/target-7.c: New test.
4960         * testsuite/libgomp.c/taskgroup-1.c: New test.
4961         * testsuite/libgomp.c/thread-limit-1.c: New test.
4962         * testsuite/libgomp.c/thread-limit-2.c: New test.
4963         * testsuite/libgomp.c/thread-limit-3.c: New test.
4964         * testsuite/libgomp.c/udr-1.c: New test.
4965         * testsuite/libgomp.c/udr-2.c: New test.
4966         * testsuite/libgomp.c/udr-3.c: New test.
4967         * testsuite/libgomp.c++/affinity-1.C: New test.
4968         * testsuite/libgomp.c++/atomic-10.C: New test.
4969         * testsuite/libgomp.c++/atomic-11.C: New test.
4970         * testsuite/libgomp.c++/atomic-12.C: New test.
4971         * testsuite/libgomp.c++/atomic-13.C: New test.
4972         * testsuite/libgomp.c++/atomic-14.C: New test.
4973         * testsuite/libgomp.c++/atomic-15.C: New test.
4974         * testsuite/libgomp.c++/cancel-for-1.C: New test.
4975         * testsuite/libgomp.c++/cancel-for-2.C: New test.
4976         * testsuite/libgomp.c++/cancel-parallel-1.C: New test.
4977         * testsuite/libgomp.c++/cancel-parallel-2.C: New test.
4978         * testsuite/libgomp.c++/cancel-parallel-3.C: New test.
4979         * testsuite/libgomp.c++/cancel-sections-1.C: New test.
4980         * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
4981         * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
4982         * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
4983         * testsuite/libgomp.c++/cancel-test.h: New file.
4984         * testsuite/libgomp.c++/for-9.C: New test.
4985         * testsuite/libgomp.c++/for-10.C: New test.
4986         * testsuite/libgomp.c++/for-11.C: New test.
4987         * testsuite/libgomp.c++/simd-1.C: New test.
4988         * testsuite/libgomp.c++/simd-2.C: New test.
4989         * testsuite/libgomp.c++/simd-3.C: New test.
4990         * testsuite/libgomp.c++/simd-4.C: New test.
4991         * testsuite/libgomp.c++/simd-5.C: New test.
4992         * testsuite/libgomp.c++/simd-6.C: New test.
4993         * testsuite/libgomp.c++/simd-7.C: New test.
4994         * testsuite/libgomp.c++/simd-8.C: New test.
4995         * testsuite/libgomp.c++/target-1.C: New test.
4996         * testsuite/libgomp.c++/target-2.C: New test.
4997         * testsuite/libgomp.c++/target-2-aux.cc: New file.
4998         * testsuite/libgomp.c++/target-3.C: New test.
4999         * testsuite/libgomp.c++/taskgroup-1.C: New test.
5000         * testsuite/libgomp.c++/udr-1.C: New test.
5001         * testsuite/libgomp.c++/udr-2.C: New test.
5002         * testsuite/libgomp.c++/udr-3.C: New test.
5003         * testsuite/libgomp.c++/udr-4.C: New test.
5004         * testsuite/libgomp.c++/udr-5.C: New test.
5005         * testsuite/libgomp.c++/udr-6.C: New test.
5006         * testsuite/libgomp.c++/udr-7.C: New test.
5007         * testsuite/libgomp.c++/udr-8.C: New test.
5008         * testsuite/libgomp.c++/udr-9.C: New test.
5010 2013-09-20  Jakub Jelinek  <jakub@redhat.com>
5012         PR testsuite/57605
5013         * testsuite/lib/libgomp.exp: Add -fdiagnostics-color=never to
5014         ALWAYS_CFLAGS.
5016 2013-09-20  Alan Modra  <amodra@gmail.com>
5018         * configure: Regenerate.
5020 2013-09-19  Jakub Jelinek  <jakub@redhat.com>
5022         * testsuite/libgomp.c/sections-2.c: New test.
5024 2013-06-28  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5026         * testsuite/libgomp.fortran/strassen.f90:
5027         Add dg-skip-if aarch64_tiny.
5029 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
5030             Cesar Philippidis  <cesar@codesourcery.com>
5032         * testsuite/lib/libgomp.exp: Reorder lib loads into dependency order.
5033         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
5034         * testsuite/libgomp.c/c.exp: load_gcc_lib gcc-dg.exp.
5035         * testsuite/libgomp.fortran/fortran.exp: Likewise.
5036         * testsuite/libgomp.graphite/graphite.exp: Likewise.
5037         * testsuite/libgomp.c++/c++.exp: load_gcc_lib gcc-dg.exp.
5038         Use dg-runtest rather than gfortran-dg-runtest.
5040 2013-06-10  Thomas Schwinge  <thomas@codesourcery.com>
5042         * testsuite/libgomp.c/icv-2.c: Extend current handling of
5043         Linux-based x86 systems to cover all GNU systems.
5044         * testsuite/libgomp.c/lock-3.c: Likewise.
5045         * testsuite/libgomp.c/pr48591.c: Likewise.
5047 2013-06-06  Thomas Schwinge  <thomas@codesourcery.com>
5049         * configure.tgt (XCFLAGS): Add -ftls-model=initial-exec for
5050         GNU/Hurd, as done for Linux-based systems.
5052         * config/posix/ptrlock.h: Fix comment.
5054 2013-05-27  Tobias Burnus  <burnus@net-b.de>
5056         PR fortran/57423
5057         * libgomp.texi (omp_set_dynamic, omp_set_nested, omp_set_nested,
5058         omp_set_num_threads, omp_init_lock, omp_set_lock, omp_test_lock,
5059         omp_unset_lock, omp_destroy_lock, omp_init_nest_lock,
5060         omp_set_nest_lock, omp_test_nest_lock, omp_unset_nest_lock,
5061         omp_destroy_nest_lock): Correct arguments to match the one in
5062         the OpenMP spec.
5063         * omp_lib.f90.in (omp_init_lock, omp_init_nest_lock, omp_destroy_lock
5064         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock, omp_unset_lock,
5065         omp_unset_nest_lock, omp_set_dynamic, omp_set_nested,
5066         omp_set_num_threads, omp_test_lock, omp_test_nest_lock): Ditto.
5068 2013-05-16  Jakub Jelinek  <jakub@redhat.com>
5070         * testsuite/libgomp.c/loop-13.c: New test.
5071         * testsuite/libgomp.c/loop-14.c: New test.
5072         * testsuite/libgomp.c/loop-15.c: New test.
5073         * testsuite/libgomp.c++/loop-13.C: New test.
5074         * testsuite/libgomp.c++/loop-14.C: New test.
5075         * testsuite/libgomp.c++/loop-15.C: New test.
5077 2013-02-06  Jakub Jelinek  <jakub@redhat.com>
5079         PR middle-end/56217
5080         * testsuite/libgomp.c++/pr56217.C: New test.
5082 2013-02-01  Alan Modra  <amodra@gmail.com>
5084         * task.c (GOMP_task, GOMP_taskwait): Comment.
5086 2013-01-31  Dmitry Vyukov  <dvyukov@gcc.gnu.org>
5087             Joost VandeVondele  <Joost.VandeVondele@mat.ethz.ch>
5089         PR libgomp/55561
5090         * config/linux/wait.h (do_spin): Use atomic load for addr.
5091         * config/linux/ptrlock.c (gomp_ptrlock_get_slow): Use atomic
5092         for intptr and ptrlock.
5093         * config/linux/ptrlock.h (gomp_ptrlock_get): Use atomic load
5094         for ptrlock.
5096 2013-01-22  Alan Modra  <amodra@gmail.com>
5098         PR libgomp/51376
5099         PR libgomp/56073
5100         * task.c (GOMP_task): Revert 2011-12-09 change.
5101         (GOMP_taskwait): Likewise.  Instead use atomic load with acquire
5102         barrier to read task->children..
5103         (gomp_barrier_handle_tasks): ..and matching atomic store with
5104         release barrier here when setting parent->children to NULL.
5106 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
5107             Tobias Burnus  <burnus@net-b.de>
5109         PR driver/55884
5110         * testsuite/libgomp.fortran/fortran.exp: Use
5111         -fintrinsic-modules-path= instead of
5112         -fintrinsic-modules-path.
5114 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
5116         Update copyright years.
5118 2012-12-19  Tobias Burnus  <burnus@net-b.de>
5120         * testsuite/libgomp.fortran/fortran.exp: Set
5121         -fintrinsic-modules-path.
5123 2012-12-19  Tobias Burnus  <burnus@net-b.de>
5125         * testsuite/libgomp.fortran/use_intrinsic_1.f90: New; moved
5126         from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90.
5128 2012-11-21  Jakub Jelinek  <jakub@redhat.com>
5130         PR libgomp/55411
5131         * team.c (gomp_free_thread): Decrease gomp_managed_threads
5132         if pool had any threads_used.
5134 2012-11-07  Jack Howarth <howarth@bromo.med.uc.edu>
5136         * testsuite/libgomp.c++/pr24455.C: Use
5137         -Wl,-undefined,dynamic_lookup on darwin.
5139 2012-11-07  David Edelsohn  <dje.gcc@gmail.com>
5141         * testsuite/libgomp.c++/pr24455.C: Use -Wl,-G on AIX.
5143 2012-10-24  Dominique d'Humieres  <dominiq@lps.ens.fr>
5145         * testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.
5147 2012-10-23  Ian Bolton  <ian.bolton@arm.com>
5148             Jim MacArthur  <jim.macarthur@arm.com>
5149             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5150             Nigel Stephens  <nigel.stephens@arm.com>
5151             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5152             Richard Earnshaw  <rearnsha@arm.com>
5153             Sofiane Naci  <sofiane.naci@arm.com>
5154             Stephen Thomas  <stephen.thomas@arm.com>
5155             Tejas Belagod  <tejas.belagod@arm.com>
5156             Yufeng Zhang  <yufeng.zhang@arm.com>
5158         * configure.tgt: Add AArch64.
5160 2012-10-04  Jason Merrill  <jason@redhat.com>
5162         * testsuite/libgomp.c++/tls-init1.C: New.
5164 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
5166         * configure: Regenerated.
5168 2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>
5170         * config/linux/mips/futex.h (sys_futex0): Change to static
5171         function with noinline, nomips16 attributes under MIPS16. Adjust
5172         asm statement to place 'li v0,SYS_futex' immediately before
5173         syscall insn.
5175 2012-07-04  Sandra Loosemore <sandra@codesourcery.com>
5177         * libgomp.texi (Library Index): Renamed from "Index" to prevent
5178         conflict with index.html on case-insensitive file systems.
5180 2012-07-03  Uros Bizjak  <ubizjak@gmail.com>
5182         * config/linux/x86/futex.h (cpu_relax): Use __builtin_ia32_pause.
5183         * testsuite/libgomp.c/sort-1.c (busy_wait): Ditto.
5185 2012-07-02  Richard Guenther  <rguenther@suse.de>
5186             Michael Matz  <matz@suse.de>
5187             Tobias Grosser <tobias@grosser.es>
5188             Sebastian Pop <sebpop@gmail.com>
5190         * testsuite/libgomp.graphite/force-parallel-4.c: Adjust.
5191         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
5192         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
5193         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
5195 2012-06-28  Andreas Schwab  <schwab@linux-m68k.org>
5197         * libgomp.texi: Include gpl_v3.texi instead of gpl.texi.
5199 2012-06-22  Richard Guenther  <rguenther@suse.de>
5201         Merge from graphite branch
5202         2012-01-13  Tobias Grosser  <tobias@grosser.es>
5204         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
5205         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
5207 2012-06-07  Jakub Jelinek  <jakub@redhat.com>
5209         PR middle-end/53580
5210         * testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
5211         use GOMP_barrier () call instead.
5212         * testsuite/libgomp.c/pr26943-3.c: Likewise.
5213         * testsuite/libgomp.c/pr26943-4.c: Likewise.
5214         * testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
5215         call GOMP_barrier instead.
5216         * testsuite/libgomp.fortran/vla5.f90: Likewise.
5218 2012-06-06  Jakub Jelinek  <jakub@redhat.com>
5220         PR libgomp/52993
5221         * config/linux/lock.c (gomp_init_nest_lock_25): Fix up last
5222         argument to memset call.
5224 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
5226         * configure: Regenerated.
5228 2012-04-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5230         * testsuite/lib/libgomp.exp: Add -fno-diagnostics-show-caret.
5232 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
5234         PR bootstrap/52812
5235         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
5237 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
5239         PR middle-end/52547
5240         * testsuite/libgomp.c/pr52547.c: New test.
5242 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
5244         * testsuite/lib/libgomp.exp: load fortran-modules.exp
5246 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5248         * configure.tgt (mips-sgi-irix6*): Remove.
5250 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5252         * configure.tgt (alpha*-dec-osf*): Remove.
5254         * config/osf/sem.h: Remove.
5255         * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally.
5257 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
5259         * config/linux/sparc/futex.h (cpu_relax): Read from CC register.
5261 2012-02-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5263         PR libstdc++/52188
5264         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove symvers_renaming.
5265         Remove ENABLE_SYMVERS_SOL2.
5266         * configure: Regenerate.
5267         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
5268         (PREPROCESS): New variable.
5269         (libgomp.ver): New target.
5270         [LIBGOMP_BUILD_VERSIONED_SHLIB &&
5271         LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
5272         LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
5273         Use libgomp.ver.
5274         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
5275         * Makefile.in: Regenerate.
5277 2012-02-14  Walter Lee  <walt@tilera.com>
5279         * configure.tgt: Handle tilegx and tilepro.
5280         * config/linux/tile/futex.h: New file.
5282 2012-02-08  Richard Guenther  <rguenther@suse.de>
5284         PR tree-optimization/46886
5285         * testsuite/libgomp.c/pr46886.c: New testcase.
5287 2012-01-25  Matthias Klose  <doko@ubuntu.com>
5289         * config/linux/arm: Remove empty directory.
5290         * configure.tgt (config_path): Remove linux-arm for arm*-*-linux*.
5292 2011-12-09  Alan Modra  <amodra@gmail.com>
5294         PR libgomp/51376
5295         * task.c (GOMP_taskwait): Don't access task->children outside of
5296         task_lock mutex region.
5297         (GOMP_task): Likewise.
5299 2011-12-06  Jakub Jelinek  <jakub@redhat.com>
5301         PR libgomp/51132
5302         * testsuite/libgomp.graphite/force-parallel-1.c: Move large arrays
5303         to file scope.
5304         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
5305         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
5306         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
5307         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
5308         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
5310 2011-12-02  Alan Modra  <amodra@gmail.com>
5312         * config/linux/affinity.c: Use atomic rather than sync builtin.
5313         * config/linux/lock.c: Likewise.
5314         * config/linux/ptrlock.h: Likewise.
5315         * config/linux/ptrlock.c: Likewise.
5316         * config/linux/ptrlock.h (gomp_ptrlock_set): Always write here..
5317         * config/linux/ptrlock.c (gomp_ptrlock_set_slow): ..not here.
5318         * config/linux/futex.h (atomic_write_barrier): Delete unused function.
5319         * config/linux/alpha/futex.h (atomic_write_barrier): Likewise.
5320         * config/linux/ia64/futex.h (atomic_write_barrier): Likewise.
5321         * config/linux/mips/futex.h (atomic_write_barrier): Likewise.
5322         * config/linux/powerpc/futex.h (atomic_write_barrier): Likewise.
5323         * config/linux/s390/futex.h (atomic_write_barrier): Likewise.
5324         * config/linux/sparc/futex.h (atomic_write_barrier): Likewise.
5325         * config/linux/x86/futex.h (atomic_write_barrier): Likewise.
5327 2011-11-30  Alan Modra  <amodra@gmail.com>
5329         PR libgomp/51298
5330         * config/linux/bar.h: Use atomic rather than sync builtins.
5331         * config/linux/bar.c: Likewise.  Add missing acquire
5332         synchronisation on generation field.
5333         * task.c (gomp_barrier_handle_tasks): Regain lock so as to not
5334         double unlock.
5336 2011-11-30  Alan Modra  <amodra@gmail.com>
5338         * ordered.c (gomp_ordered_sync): Add MEMMODEL_ACQ_REL fence.
5339         * critical.c (GOMP_critical_start): Add MEMMODEL_RELEASE fence.
5340         * config/linux/mutex.h: Use atomic rather than sync builtins.
5341         * config/linux/mutex.c: Likewise.  Comment.  Use -1 for waiting state.
5342         * config/linux/omp-lock.h: Comment fix.
5343         * config/linux/arm/mutex.h: Delete.
5344         * config/linux/powerpc/mutex.h: Delete.
5345         * config/linux/ia64/mutex.h: Delete.
5346         * config/linux/mips/mutex.h: Delete.
5348 2011-11-30  Alan Modra  <amodra@gmail.com>
5350         PR libgomp/51249
5351         * config/linux/sem.h: Rewrite.
5352         * config/linux/sem.c: Rewrite.
5354 2011-11-28  Richard Henderson  <rth@redhat.com>
5356         * libgomp.h (enum memmodel): New.
5358 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
5360         * configure: Regenerate.
5362 2011-10-10  Matthias Klose  <doko@ubuntu.com>
5364         * config/posix95: Remove empty directory.
5366 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
5368         * testsuite/libgomp.fortran/threadprivate4.f90: New test.
5370 2011-08-19  Jakub Jelinek  <jakub@redhat.com>
5372         PR fortran/49792
5373         * testsuite/libgomp.fortran/pr49792-1.f90: New test.
5374         * testsuite/libgomp.fortran/pr49792-2.f90: New test.
5376 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5378         * config/posix95/lock.c, posix95/omp-lock.h: Remove.
5380 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5382         PR libgomp/49965
5383         * testsuite/libgomp.c++/task-8.C: Replaced err by errval.
5385 2011-08-03  Uros Bizjak  <ubizjak@gmail.com>
5387         * config/linux/proc.h: New.
5388         * config/linux/proc.c: Include "proc.h".  Do not include <sched.h>.
5389         (gomp_cpuset_popcount): Rename from cpuset_popcount.  No more static.
5390         (gomp_init_num_threads): Update call to cpuset_popcount.
5391         (get_num_procs): Ditto.
5392         * config/linux/affinity.c (gomp_init_affinity): Call
5393         gomp_cpuset_popcount.
5395 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
5397         PR fortran/42041
5398         PR fortran/46752
5399         * omp.h.in (omp_in_final): New prototype.
5400         * omp_lib.f90.in (omp_in_final): New interface.
5401         (omp_integer_kind, omp_logical_kind): Remove
5402         and replace all its uses in the module with 4.
5403         (openmp_version): Change to 201107.
5404         * omp_lib.h.in (omp_sched_static, omp_sched_dynamic,
5405         omp_sched_guided, omp_sched_auto): Use omp_sched_kind
5406         kind for the parameters.
5407         (omp_in_final): New external.
5408         (openmp_version): Change to 201107.
5409         * task.c (omp_in_final): New function.
5410         (gomp_init_task): Initialize final_task.
5411         (GOMP_task): Remove unused attribute from flags.  Handle final
5412         tasks.
5413         (GOMP_taskyield): New function.
5414         (omp_in_final): Return true if if (false) or final (true) task
5415         or descendant of final (true).
5416         * fortran.c (omp_in_final_): New function.
5417         * libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_.
5418         (GOMP_3.0): Export GOMP_taskyield.
5419         * env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New
5420         variables.
5421         (parse_unsigned_long_list): New function.
5422         (initialize_env): Use it for OMP_NUM_THREADS.  Call parse_boolean
5423         with "OMP_PROC_BIND".  If OMP_PROC_BIND=true, call gomp_init_affinity
5424         even if parse_affinity returned false.
5425         * config/linux/affinity.c (gomp_init_affinity): Handle
5426         gomp_cpu_affinity_len == 0.
5427         * libgomp_g.h (GOMP_taskyield): New prototype.
5428         * libgomp.h (struct gomp_task): Add final_task field.
5429         (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs.
5430         * team.c (gomp_team_start): Override new task's nthreads_var icv
5431         if list form OMP_NUM_THREADS has been used and it has value for
5432         the new nesting level.
5434         * testsuite/libgomp.c/atomic-11.c: New test.
5435         * testsuite/libgomp.c/atomic-12.c: New test.
5436         * testsuite/libgomp.c/atomic-13.c: New test.
5437         * testsuite/libgomp.c/atomic-14.c: New test.
5438         * testsuite/libgomp.c/reduction-6.c: New test.
5439         * testsuite/libgomp.c/task-5.c: New test.
5440         * testsuite/libgomp.c++/atomic-2.C: New test.
5441         * testsuite/libgomp.c++/atomic-3.C: New test.
5442         * testsuite/libgomp.c++/atomic-4.C: New test.
5443         * testsuite/libgomp.c++/atomic-5.C: New test.
5444         * testsuite/libgomp.c++/atomic-6.C: New test.
5445         * testsuite/libgomp.c++/atomic-7.C: New test.
5446         * testsuite/libgomp.c++/atomic-8.C: New test.
5447         * testsuite/libgomp.c++/atomic-9.C: New test.
5448         * testsuite/libgomp.c++/task-8.C: New test.
5449         * testsuite/libgomp.c++/reduction-4.C: New test.
5450         * testsuite/libgomp.fortran/allocatable7.f90: New test.
5451         * testsuite/libgomp.fortran/allocatable8.f90: New test.
5452         * testsuite/libgomp.fortran/crayptr3.f90: New test.
5453         * testsuite/libgomp.fortran/omp_atomic3.f90: New test.
5454         * testsuite/libgomp.fortran/omp_atomic4.f90: New test.
5455         * testsuite/libgomp.fortran/pointer1.f90: New test.
5456         * testsuite/libgomp.fortran/pointer2.f90: New test.
5457         * testsuite/libgomp.fortran/task4.f90: New test.
5459 2011-08-02  Tobias Burnus  <burnus@net-b.de>
5461         * libgomp.texi: Update OpenMP spec references to 3.1.
5462         (omp_in_final,OMP_PROC_BIND): New sections.
5463         (OMP_NUM_THREADS): Document that the value can be now a list.
5464         (GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref.
5466 2011-08-02  H.J. Lu  <hongjiu.lu@intel.com>
5468         * config/linux/x86/futex.h: Check __x86_64__ instead of
5469         __LP64__.
5471 2011-07-29  Jakub Jelinek  <jakub@redhat.com>
5473         PR middle-end/49897
5474         PR middle-end/49898
5475         * testsuite/libgomp.c/pr49897-1.c: New test.
5476         * testsuite/libgomp.c/pr49897-2.c: New test.
5477         * testsuite/libgomp.c/pr49898-1.c: New test.
5478         * testsuite/libgomp.c/pr49898-2.c: New test.
5480 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
5482         * testsuite/lib/libgomp.exp (libgomp_init): Add -march=i486
5483         for ia32 instead of ilp32.
5485         * testsuite/libgomp.c/atomic-1.c: Require ia32 instead of ilp32.
5486         * testsuite/libgomp.c/atomic-6.c: Likewise.
5488 2011-07-23  Sebastian Pop  <sebastian.pop@amd.com>
5490         * testsuite/libgomp.graphite/force-parallel-1.c: Un-xfail.
5491         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust pattern.
5493 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5495         PR libgomp/45351
5496         * config/osf/sem.h: New file.
5497         * configure.tgt (alpha*-dec-osf*): Prepend osf to config_path.
5499 2011-07-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5501         PR target/49541
5502         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -lgomp to
5503         ldflags.
5505 2011-07-15  Jakub Jelinek  <jakub@redhat.com>
5507         * config/linux/wait.h (do_spin): New inline, largely copied
5508         from do_wait, just don't do futex_wait here, instead return true if
5509         it should be done.
5510         (do_wait): Implement using do_spin.
5511         * config/linux/mutex.h (gomp_mutex_lock_slow): Add an int argument
5512         to prototype.
5513         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
5514         __sync_bool_compare_and_swap, pass the oldval to
5515         gomp_mutex_lock_slow.
5516         * config/linux/mutex.c (gomp_mutex_lock_slow): Add oldval argument.
5517         If all mutex contenders are just spinning and not sleeping, don't
5518         change state to 2 unnecessarily.  Optimize the loop when state has
5519         already become 2 to use just one atomic operation per loop instead
5520         of two.
5521         * config/linux/ia64/mutex.h (gomp_mutex_lock_slow): Add an int argument
5522         to prototype.
5523         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
5524         __sync_bool_compare_and_swap, pass the oldval to
5525         gomp_mutex_lock_slow.
5527 2011-06-22  Jakub Jelinek  <jakub@redhat.com>
5529         PR libgomp/49490
5530         * iter.c (gomp_iter_static_next): For chunk size 0
5531         only use n ceil/ nthreads size for the first
5532         n % nthreads threads in the team instead of
5533         all threads except for the last few ones which
5534         get less work or none at all.
5535         * iter_ull.c (gomp_iter_ull_static_next): Likewise.
5536         * env.c (parse_schedule): If OMP_SCHEDULE doesn't have
5537         chunk argument, set run_sched_modifier to 0 for static
5538         resp. 1 for other kinds.  If chunk argument is 0
5539         and not static, set value to 1.
5541 2011-05-19  Jakub Jelinek  <jakub@redhat.com>
5543         PR c++/49043
5544         * testsuite/libgomp.c++/pr49043.C: New test.
5546         PR c++/48869
5547         * testsuite/libgomp.c++/pr48869.C: New test.
5549 2011-05-06  Jakub Jelinek  <jakub@redhat.com>
5551         PR fortran/48894
5552         * fortran.c: Include limits.h.
5553         (TO_INT): Define.
5554         (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
5555         *set.
5556         (omp_set_num_threads_8_, omp_set_schedule_8_,
5557         omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
5558         omp_get_team_size_8_): Use TO_INT macro.
5559         * testsuite/libgomp.fortran/pr48894.f90: New test.
5561 2011-04-13  Jakub Jelinek  <jakub@redhat.com>
5563         PR middle-end/48591
5564         * testsuite/libgomp.c/pr48591.c: New test.
5566 2011-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5568         PR bootstrap/48135
5569         * acinclude.m4 (enable_symvers): Handle --disable-symvers.
5570         * configure: Regenerate.
5572 2011-02-27  Jakub Jelinek  <jakub@redhat.com>
5574         PR fortran/47886
5575         * testsuite/libgomp.fortran/task3.f90: New test.
5577 2011-02-24  Tobias Burnus  <burnus@net-b.de>
5579         * libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.
5581 2011-02-23  Jakub Jelinek  <jakub@redhat.com>
5583         PR libgomp/47854
5584         * libgomp.texi (omp_get_wtime): Don't say time in the past
5585         must be Unix Epoch.
5587 2011-02-18  Jakub Jelinek  <jakub@redhat.com>
5589         PR libgomp/47804
5590         * testsuite/libgomp.fortran/fortran.exp: Check for both
5591         libquadmath.a and libquadmath.${shlib_ext}.  If neither exists,
5592         but $blddir != "", still append ${blddir}/${lang_library_path}
5593         to ld_library_path.
5595 2011-02-16  Tobias Burnus  <burnus@net-b.de>
5597         PR libgomp/47758
5598         * testsuite/libgomp.fortran/fortran.exp: Check for the existence
5599         of libquadmath.a before adding its libpath to ldflags.
5601 2011-02-14  Jakub Jelinek  <jakub@redhat.com>
5603         PR libgomp/47731
5604         * config/linux/futex.h (futex_wait): Pass NULL as timeout argument
5605         to FUTEX_WAIT futex syscall.
5606         * config/linux/wait.h: Include <futex.h> instead of "futex.h".
5608 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5610         * configure: Regenerate.
5612 2011-01-20  Benjamin Kosnik  <bkoz@redhat.com>
5614         PR libstdc++/36104
5615         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Accept gnu variants.
5617 2011-01-16  Gerald Pfeifer
5619         * configure.tgt (*-*-freebsd*): Add -lpthread to XLDFLAGS.
5621 2010-12-14  Jakub Jelinek  <jakub@redhat.com>
5623         PR fortran/46874
5624         * libgomp.fortran/allocatable6.f90: New test.
5626 2010-12-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5628         * acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
5629         * configure: Regenerate.
5631 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
5633         PR target/40125
5634         PR lto/46695
5635         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
5636         * Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags.
5637         * aclocal.m4: Regenerate.
5638         * configure: Regenerate.
5639         * Makefile.in: Regenerate.
5640         * testsuite/Makefile.in: Regenerate.
5642 2010-12-02  Jakub Jelinek  <jakub@redhat.com>
5644         PR fortran/46753
5645         * libgomp.fortran/pr46753.f90: New test.
5647         PR libgomp/43706
5648         * env.c (initialize_env): Default to spin count 300000
5649         instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
5650         is specified.
5652         PR libgomp/45240
5653         * parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
5654         at the end if sync builtins aren't supported.
5656 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5658         * configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
5660 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5662         * testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0.
5664 2010-11-24  Iain Sandoe  <iains@gcc.gnu.org>
5666         * testsuite/libgomp.fortran/fortran.exp: Add paths for libquadmath.
5668 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
5669             Tobias Burnus  <burnus@net-b.de>
5671         PR fortran/32049
5672         * configure.ac:
5673         * configure: Regenerate.
5675 2010-10-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5677         * config/linux/futex.h: New.
5678         * config/linux/arm/mutex.h: New.
5679         * configure.tgt (arm*-*-linux*): Add config path.
5681 2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
5683         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
5685 2010-09-23  Tobias Burnus  <burnus@net-b.de>
5687         * libgomp.texi (omp_get_nested, omp_set_nested, omp_set_dynamic):
5688         Change Fortran datatype to LOGICAL.
5689         (omp_set_lock, omp_test_lock, omp_unset_lock, omp_set_nested_lock,
5690         omp_unset_nested_lock): Use intent(inout) instead of intent(out).
5692 2010-08-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5694         * configure: Regenerate.
5696 2010-07-26  Jakub Jelinek  <jakub@redhat.com>
5698         * libgomp.texi: Add function keyword to a couple of Fortran
5699         interfaces, use integer instead of int for Fortran.
5701 2010-07-26  Aldy Hernandez  <aldyh@redhat.com>
5703         * libgomp.texi: Fix spelling and pasto problems throughout.
5704         Adjust prototypes to match code.
5706 2010-07-24  Tobias Burnus  <burnus@net-b.de>
5708         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to
5709         silence -fwhole-file warning.
5711 2010-07-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5713         * configure.tgt (*-*-solaris2.[56]*): Removed.
5715 2010-07-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5717         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
5718         Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU,
5719         LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals.
5720         (HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless
5721         targetting solaris2*.
5722         * configure: Regenerate.
5723         * config.h.in: Regenerate.
5725         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect
5726         libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU.
5727         Add libgomp_version_dep.
5728         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol
5729         versioning.
5730         [!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep.
5731         (libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep).
5732         * Makefile.in: Regenerate.
5734         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless
5735         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
5736         * libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0
5737         to common block, protected by
5738         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
5740 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
5742         * libgomp.texi: Move to GFDL version 1.3.  Update copyright years.
5744 2010-06-09  Iain Sandoe  <iains@gcc.gnu.org>
5746         PR bootstrap/43170
5747         * configure: Regenerate.
5749 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5751         PR other/43620
5752         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
5753         * configure: Regenerate.
5754         * Makefile.in: Regenerate.
5755         * testsuite/Makefile.in: Regenerate.
5757 2010-04-26  Jakub Jelinek  <jakub@redhat.com>
5759         PR c/43893
5760         * testsuite/libgomp.c/pr43893.c: New test.
5761         * testsuite/libgomp.c++/pr43893.C: New test.
5763 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
5765         PR middle-end/43570
5766         * testsuite/libgomp.fortran/vla8.f90: New test.
5768 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
5770         PR libgomp/43706
5771         * config/linux/affinity.c (gomp_init_affinity): Decrease
5772         gomp_available_cpus if affinity mask confines the process to fewer
5773         CPUs.
5774         * config/linux/proc.c (get_num_procs): If gomp_cpu_affinity is
5775         non-NULL, just return gomp_available_cpus.
5777         PR libgomp/43569
5778         * sections.c (gomp_sections_init): Initialize ws->mode.
5780 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
5782         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Remove set but
5783         not unused bar variable.
5784         * configure: Regenerate.
5786 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5788         * Makefile.in: Regenerate.
5789         * aclocal.m4: Regenerate.
5790         * testsuite/Makefile.in: Regenerate.
5792 2010-03-22  Jakub Jelinek  <jakub@redhat.com>
5794         PR libgomp/42942
5795         * env.c (parse_unsigned_long): Add ALLOW_ZERO argument.
5796         (initialize_env): Adjust callers.
5797         (omp_set_max_active_levels): Set gomp_max_active_levels_var even
5798         when the argument is 0.
5800         * testsuite/libgomp.c/pr42942.c: New test.
5802 2010-03-08  Tobias Grosser  <grosser@fim.uni-passau.de>
5804         PR middle-end/42644
5805         PR middle-end/42130
5806         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
5807         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust.
5809 2010-01-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5811         * testsuite/libgomp.c++/task-1.C: Renamed err to e.
5812         * testsuite/libgomp.c++/task-6.C: Likewise.
5814 2010-01-28  Steve Ellcey  <sje@cup.hp.com>
5816         * configure.tgt (*-*-hpux*): Add -frandom-seed flag.
5818 2010-01-26  Paolo Bonzini  <bonzini@gnu.org>
5820         * configure.ac: Test for executability of _the first word_ of GFORTRAN.
5821         * configure: Regenerate.
5823 2010-01-26  Jakub Jelinek  <jakub@redhat.com>
5825         PR fortran/42866
5826         * testsuite/libgomp.fortran/allocatable5.f90: New test.
5828 2010-01-20  Paolo Bonzini  <bonzini@gnu.org>
5830         * configure.ac: Test for executability of GFORTRAN.
5831         * configure: Regenerate.
5833 2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5835         * configure: Regenerate.
5837 2010-01-04  H.J. Lu  <hongjiu.lu@intel.com>
5839         PR libgomp/42602
5840         * libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.
5842 2010-01-03  Richard Guenther  <rguenther@suse.de>
5844         * testsuite/libgomp.fortran/recursion1.f90: New testcase.
5846 2009-12-23  Sebastian Pop  <sebpop@gmail.com>
5848         * testsuite/libgomp.graphite/pr4118.c: New.
5850 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
5852         * testsuite/libgomp.fortran/crayptr2.f90: Remove forced static linkage
5853         for darwin, protect the test with require-effective-target tls_runtime.
5854         * testsuite/libgomp.fortran/pr32550.f90: Ditto.
5856 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
5858         PR target/41605
5859         * testsuite/lib/libgomp.exp: Provide -B options to allow for
5860         link spec %s substitutions for static libraries.
5862 2009-12-18  Jack Howarth <howarth@bromo.med.uc.edu>
5864         PR testsuite/42135
5865         * libgomp.graphite/force-parallel-2.c: Reduce array size.
5867 2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5869         * Makefile.in: Regenerate.
5870         * configure: Regenerate.
5871         * testsuite/Makefile.in: Regenerate.
5873 2009-11-30  Dave Korn  <dave.korn.cygwin@gmail.com>
5875         * testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
5876         settings for LC_ALL and LANG.
5878 2009-11-25  Jakub Jelinek  <jakub@redhat.com>
5880         PR fortran/42162
5881         * testsuite/libgomp.fortran/pr42162.f90: New test.
5883 2009-11-13  Jakub Jelinek  <jakub@redhat.com>
5885         PR middle-end/42029
5886         * testsuite/libgomp.c/pr42029.c: New test.
5888 2009-10-26  Jakub Jelinek  <jakub@redhat.com>
5890         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
5891         *s.  Accept ld version without text in ()s.
5892         * configure: Regenerated.
5894 2009-10-22  Razya Ladelsky  <razya@il.ibm.com>
5896         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust scan.
5898 2009-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5900         PR libgomp/41418
5901         * configure.ac: Set FC to "no" if $GFORTRAN starts with "no"
5902         or a hyphen (happens with fortran language disabled).
5903         * configure: Regenerate.
5905 2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5907         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid 'head',
5908         use sed script portable to Solaris /bin/sed for extracting ld
5909         version.
5910         * configure: Regenerate.
5912 2009-09-17  Alexander Monakov  <amonakov@ispras.ru>
5914         * testsuite/libgomp.graphite/bounds.c: New test.
5916 2009-09-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5918         * Makefile.am (libgomp_la_LINK): New.
5919         * Makefile.in: Regenerate.
5921 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5923         * configure.ac (AC_PREREQ): Bump to 2.64.
5925 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5927         * Makefile.am (install-html, install-pdf): Remove.
5928         * Makefile.in: Regenerate.
5930         * Makefile.in: Regenerate.
5931         * aclocal.m4: Regenerate.
5932         * config.h.in: Regenerate.
5933         * configure: Regenerate.
5934         * testsuite/Makefile.in: Regenerate.
5936 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5938         * Makefile.am (LINK): Add $(AM_LIBTOOLFLAGS) and $(LIBTOOLFLAGS).
5939         * Makefile.in: Regenerate.
5941 2009-08-20  Dave Korn  <dave.korn.cygwin@gmail.com>
5943         * Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
5944         * Makefile.in: Regenerate.
5946 2009-08-19  Tobias Burnus  <burnus@net-b.de>
5948         PR fortran/41102
5949         omp_lib.h.in: Fix -std=f95 errors.
5951 2009-08-14  David Edelsohn  <edelsohn@gnu.org>
5953         * testsuite/libgomp.graphite: Move from gcc.dg/graphite.
5954         * testsuite/libgomp.graphite/graphite_autopar.exp: Delete.
5955         * testsuite/libgomp.graphite/graphite.exp: New.
5957 2009-08-05  Andreas Tobler  <a.tobler@schweiz.org>
5959         * testsuite/libgomp.fortran/fortran.exp: Add flags in case of shared
5960         only build.
5962 2009-08-04  David Daney  <ddaney@caviumnetworks.com>
5964         * config/linux/mutex.h (gomp_mutex_unlock): Add comment about
5965         needed memory barrier semantics.
5966         * config/linux/mips/mutex.h: New file.
5968 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5970         * configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
5972 2009-07-16  Joseph Myers  <joseph@codesourcery.com>
5974         * configure: Regenerate.
5976 2009-07-11  Richard Sandiford  <rdsandiford@googlemail.com>
5978         PR testsuite/40699
5979         PR testsuite/40707
5980         PR testsuite/40709
5981         * testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
5982         * testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
5983         testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.
5985 2009-07-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
5987         * testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
5988         options when choosing a multilib.
5990 2009-06-30  Richard Sandiford  <r.sandiford@uk.ibm.com>
5992         * testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
5993         ld_library_path.  Use add_path.  Add just find_libgcc_s to
5994         ld_library_path, not every libgcc multilib directory.
5995         * testsuite/libgomp.c/c.exp (ld_library_path): Don't call
5996         gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
5997         * testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
5998         Use add_path.
5999         * testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.
6001 2009-06-09  Nathan Froyd  <froydnj@codesourcery.com>
6003         * Makefile.am (LTLDFLAGS): Define.
6004         (LINK): Define.
6005         * Makefile.in: Regenerate.
6007 2009-05-27  Janne Blomqvist  <jb@gcc.gnu.org>
6009         PR fortran/39718
6010         * testsuite/libgomp.fortran/fortran.exp: Don't link with
6011         libgfortranbegin, check existence of libgfortran.a instead of
6012         libgfortranbegin.a.
6014 2009-05-20  Jakub Jelinek  <jakub@redhat.com>
6016         PR libgomp/40174
6017         * team.c (gomp_thread_start): Destroy thr->release semaphore.
6018         (gomp_free_pool_helper): Likewise.
6020 2009-04-20  Vasilis Liaskovitis  <vliaskov@gmail.com>
6021             Jakub Jelinek  <jakub@redhat.com>
6023         PR fortran/35423
6024         * testsuite/libgomp.fortran/workshare2.f90: New test.
6026 2009-04-09  Nick Clifton  <nickc@redhat.com>
6028         * iter.c: Change copyright header to refer to version 3 of the
6029         GNU General Public License with version 3.1 of the GCC Runtime
6030         Library Exception and to point readers at the COPYING3 and
6031         COPYING3.RUNTIME files and the FSF's license web page.
6032         * alloc.c: Likewise.
6033         * barrier.c: Likewise.
6034         * config/bsd/proc.c: Likewise.
6035         * config/linux/affinity.c: Likewise.
6036         * config/linux/alpha/futex.h: Likewise.
6037         * config/linux/bar.c: Likewise.
6038         * config/linux/bar.h: Likewise.
6039         * config/linux/ia64/futex.h: Likewise.
6040         * config/linux/ia64/mutex.h: Likewise.
6041         * config/linux/lock.c: Likewise.
6042         * config/linux/mips/futex.h: Likewise.
6043         * config/linux/mutex.c: Likewise.
6044         * config/linux/mutex.h: Likewise.
6045         * config/linux/powerpc/futex.h: Likewise.
6046         * config/linux/proc.c: Likewise.
6047         * config/linux/ptrlock.c: Likewise.
6048         * config/linux/ptrlock.h: Likewise.
6049         * config/linux/s390/futex.h: Likewise.
6050         * config/linux/sem.c: Likewise.
6051         * config/linux/sem.h: Likewise.
6052         * config/linux/sparc/futex.h: Likewise.
6053         * config/linux/wait.h: Likewise.
6054         * config/linux/x86/futex.h: Likewise.
6055         * config/mingw32/proc.c: Likewise.
6056         * config/mingw32/time.c: Likewise.
6057         * config/posix/affinity.c: Likewise.
6058         * config/posix/bar.c: Likewise.
6059         * config/posix/bar.h: Likewise.
6060         * config/posix/lock.c: Likewise.
6061         * config/posix/mutex.h: Likewise.
6062         * config/posix/proc.c: Likewise.
6063         * config/posix/ptrlock.h: Likewise.
6064         * config/posix/sem.c: Likewise.
6065         * config/posix/sem.h: Likewise.
6066         * config/posix/time.c: Likewise.
6067         * config/posix95/lock.c: Likewise.
6068         * critical.c: Likewise.
6069         * env.c: Likewise.
6070         * error.c: Likewise.
6071         * fortran.c: Likewise.
6072         * iter_ull.c: Likewise.
6073         * libgomp.h: Likewise.
6074         * libgomp_f.h.in: Likewise.
6075         * libgomp_g.h: Likewise.
6076         * loop.c: Likewise.
6077         * loop_ull.c: Likewise.
6078         * omp.h.in: Likewise.
6079         * omp_lib.f90.in: Likewise.
6080         * omp_lib.h.in: Likewise.
6081         * ordered.c: Likewise.
6082         * parallel.c: Likewise.
6083         * sections.c: Likewise.
6084         * single.c: Likewise.
6085         * task.c: Likewise.
6086         * team.c: Likewise.
6087         * work.c: Likewise.
6089 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
6091         * testsuite/config/default.exp: Change copyright header to refer to
6092         version 3 of the GNU General Public License and to point readers
6093         at the COPYING3 file and the FSF's license web page.
6095 2009-04-08  Jakub Jelinek  <jakub@redhat.com>
6097         PR middle-end/39573
6098         * libgomp.c++/pr39573.C: New test.
6100 2009-04-01  Jakub Jelinek  <jakub@redhat.com>
6102         PR other/39591
6103         * testsuite/libgomp.c/pr39591-1.c: New test.
6104         * testsuite/libgomp.c/pr39591-2.c: New test.
6105         * testsuite/libgomp.c/pr39591-3.c: New test.
6107 2009-03-25  Uros Bizjak  <ubizjak@gmail.com>
6109         * testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
6110         * testsuite/libgomp.c/atomic-6.c: Ditto.
6112 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
6114         PR c/39495
6115         * testsuite/libgomp.c/loop-12.c: New test.
6116         * testsuite/libgomp.c/loop-11.c: New test.
6117         * testsuite/libgomp.c++/loop-11.C: New test.
6118         * testsuite/libgomp.c++/loop-12.C: New test.
6119         * testsuite/libgomp.c++/for-8.C: New test.
6121 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6123         * configure: Regenerate.
6125 2009-02-11  Jakub Jelinek  <jakub@redhat.com>
6127         PR middle-end/39154
6128         * testsuite/libgomp.c/pr39154.c: New test.
6130 2009-01-30  Ian Lance Taylor  <iant@google.com>
6132         * acinclude.m4 (LIBCOMP_CHECK_LINKER_FEATURES): Set
6133         libgomp_ld_is_gold.  Get gold version number.
6134         (LIBGOMP_ENABLE_SYMVERS): Gold always support symbol versioning.
6135         * configure: Rebuild.
6137 2009-01-19  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
6139         * testsuite/lib/libgomp.exp: Add -B option for targets that
6140         use libgfortran.a%s in their specs.
6142 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
6144         PR libgomp/38086
6145         * acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check.
6146         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if
6147         HAVE_AS_SYMVER_DIRECTIVE is not defined.
6148         * configure: Regenerated.
6149         * config.h.in: Likewise.
6151 2008-12-28  Jakub Jelinek  <jakub@redhat.com>
6153         PR c++/38650
6154         * testsuite/libgomp.c/pr38650.c: New test.
6155         * testsuite/libgomp.c++/pr38650.C: New test.
6157 2008-12-27  Jakub Jelinek  <jakub@redhat.com>
6159         * testsuite/libgomp.c/collapse-1.c (main): Add private(k) clause.
6161 2008-12-26  Uros Bizjak  <ubizjak@gmail.com>
6163         * testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.
6165 2008-12-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6167         * configure: Regenerate.
6169 2008-12-08  Jakub Jelinek  <jakub@redhat.com>
6171         PR middle-end/36802
6172         * testsuite/libgomp.c/pr36802-1.c: New test.
6173         * testsuite/libgomp.c/pr36802-2.c: New test.
6174         * testsuite/libgomp.c/pr36802-3.c: New test.
6176 2008-12-01  Janis Johnson  <janis187@us.ibm.com>
6178         PR libgomp/38270
6179         * config/linux/powerpc/mutex.h: New.
6181 2008-12-01  Jakub Jelinek  <jakub@redhat.com>
6183         PR c++/38257
6184         * testsuite/libgomp.c++/for-7.C: New test.
6186         PR c++/38348
6187         * testsuite/libgomp.c++/for-6.C: New test.
6189 2008-11-26  Janis Johnson  <janis187@us.ibm.com>
6191         PR testsuite/28870
6192         * testsuite/lib/libgomp.exp: Include new timeout library files.
6193         (libgomp_target_compile): Set timeout value from new proc.
6195 2008-11-13  Steve Ellcey  <sje@cup.hp.com>
6197         PR libgomp/37938
6198         * config/linux/ia64/mutex.h: New.
6200 2008-11-04  Tobias Burnus  <burnus@net-b.de>
6202         PR libgomp/37935
6203         * libgomp.texi (Runtime library routines, environment variables):
6204         Update for OpenMP version 3.0.
6206 2008-09-26  Peter O'Gorman  <pogma@thewrittenword.com>
6207             Steve Ellcey  <sje@cup.hp.com>
6209         * configure: Regenerate for new libtool.
6210         * Makefile.in: Ditto.
6211         * testsuite/Makefile.in: Ditto.
6213 2008-09-19  Jakub Jelinek  <jakub@redhat.com>
6214             Andreas Tobler  <a.tobler@schweiz.org>
6216         * config/bsd/proc.c: New file.
6217         * configure.tgt (*-*-darwin*): Use config_path "bsd posix".
6218         * configure.ac: Check for header <sys/sysctl.h>
6219         * configure: Regenerate.
6220         * config.h.in: Likewise.
6222 2008-09-05  Janis Johnson  <janis187@us.ibm.com>
6224         * testsuite/ligbomp.c/c.exp: Unset lang_test_file only if it exists.
6226 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
6228         * Makefile.am (libgomp_la_LDFLAGS): Add -no-undefined.
6229         * Makefile.in: Regenerated.
6230         * testsuite/Makefile.in: Regenerated.
6232 2008-08-21  Nathan Froyd  <froydnj@codesourcery.com>
6234         * testsuite/lib/libgomp.exp (libgomp_init): Only set things that
6235         depend on blddir if blddir exists.
6236         (libgomp_target_compile): Likewise.
6237         * testsuite/libgomp.c++/c++.exp: Likewise.
6238         * testsuite/libgomp.fortran/fortran.exp: Likewise.
6240 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6242         * libgomp.texi: Update to GFDL 1.2.  Update copyright years.
6243         Do not list GPL as Invariant Section.
6245 2008-07-28  Ilie Garbacea  <ilie@mips.com>
6246             Chao-ying Fu  <fu@mips.com>
6248         * configure.tgt: Enable futex for MIPS.
6249         * config/linux/mips/futex.h: New file.
6251 2008-07-16  Jakub Jelinek  <jakub@redhat.com>
6253         * team.c (gomp_team_end): Free team immediately if it has
6254         just one thread.
6256 2008-07-08  David Edelsohn  <edelsohn@gnu.org>
6258         * testsuite/libgomp.c++/c++.exp: Append multilib library path.
6259         * testsuite/libgomp.fortran/fortran.exp: Same.
6260         * testsuite/libgomp.c/c.exp: Same.
6261         * testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
6262         directory to library path first.
6264 2008-06-29  Krister Walfridsson  <krister.walfridsson@gmail.com>
6266         * env.c (parse_stacksize): Add cast to avoid warning.
6267         (parse_spincount): Likewise.
6269 2008-06-27  Jakub Jelinek  <jakub@redhat.com>
6271         * testsuite/libgomp.c/loop-10.c: New test.
6272         * libgomp.c/loop-3.c (main): Add lastprivate clause.
6273         * libgomp.c++/loop-6.C (main): Likewise.
6275         PR debug/36617
6276         * testsuite/libgomp.c/debug-1.c: New test.
6278 2008-06-19  Jakub Jelinek  <jakub@redhat.com>
6280         * testsuite/libgomp.c/nqueens-1.c: New test.
6282         PR c++/36523
6283         * testsuite/libgomp.c++/task-7.C: New function.
6285 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6287         * configure: Regenerate.
6289 2008-06-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6291         * env.c (initialize_env): Always initialize gomp_remaining_threads_lock
6292         mutex when HAVE_SYNC_BUILTINS isn't defined.
6294 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6296         * libgomp.texi (omp_test_lock): Fix typo.
6298 2008-06-12  Tobias Burnus  <burnus@net-b.de>
6300         * omp_lib.f90.in: Add "implicit none".
6302 2008-06-12  Jakub Jelinek  <jakub@redhat.com>
6304         PR middle-end/36506
6305         * testsuite/libgomp.c/reduction-5.c: New test.
6307 2008-06-11  Jakub Jelinek  <jakub@redhat.com>
6309         * libgomp.h (struct gomp_task): Add in_tied_task field.
6310         * task.c (gomp_init_task): Initialize it.
6311         (GOMP_task): Likewise.  Call gomp_team_barrier_set_task_pending
6312         unconditionally.  Don't call gomp_team_barrier_wake if
6313         current task is implicit or if(0) from implicit and number of
6314         running tasks is equal to nthreads - 1.
6316         PR libgomp/36471
6317         * omp_lib.f90.in (omp_get_ancestor_thread_num_8,
6318         omp_get_team_size_8): Fix pastos.
6320         PR libgomp/36469
6321         * configure.ac: Add AC_CHECK_FUNCS (strtoull).
6322         * configure: Regenerated.
6323         * config.h.in: Regenerated.
6324         * env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
6325         defined.
6327 2008-06-06  Andreas Tobler  <a.tobler@schweiz.org>
6329         PR bootstrap/36452
6330         * loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
6331         (GOMP_loop_ull_dynamic_start): Likewise.
6332         (GOMP_loop_ull_guided_start): Likewise.
6333         (GOMP_loop_ull_ordered_static_start): Likewise.
6334         (GOMP_loop_ull_ordered_dynamic_start): Likewise.
6335         (GOMP_loop_ull_ordered_guided_start): Likewise.
6337 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
6338             Richard Henderson  <rth@redhat.com>
6339             Ulrich Drepper  <drepper@redhat.com>
6340             Jakob Blomer  <jakob.blomer@ira.uka.de>
6342         * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
6343         Substitute also OMP_*LOCK_25*.
6344         * configure: Regenerated.
6345         * config.h.in: Regenerated.
6346         * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
6347         ptrlock.c and task.c.
6348         * Makefile.in: Regenerated.
6349         * testsuite/Makefile.in: Regenerated.
6350         * task.c: New file.
6351         * loop_ull.c: New file.
6352         * iter_ull.c: New file.
6353         * libgomp.h: Include ptrlock.h.
6354         (enum gomp_task_kind): New type.
6355         (struct gomp_team): Add task_lock, task_queue, task_count,
6356         task_running_count, single_count fields.  Add
6357         work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
6358         Remove work_share_lock, generation_mask,
6359         oldest_live_gen, num_live_gen and init_work_shares fields, add
6360         work work_share_list_alloc, work_share_list_free and work_share_chunk
6361         fields.  Change work_shares from pointer to pointers into an array.
6362         Change ordered_release field into gomp_sem_t ** from flexible array
6363         member.  Add implicit_task and initial_work_shares fields.
6364         Move close to the end of the struct.
6365         (struct gomp_team_state): Add single_count, last_work_share,
6366         active_level and level fields, remove work_share_generation.
6367         (gomp_barrier_handle_tasks): New prototype.
6368         (gomp_finish_task): New inline function.
6369         (struct gomp_work_share): Move chunk_size, end, incr into
6370         transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
6371         next_ll fields.  Reshuffle fields.  Add next_alloc,
6372         next_ws, next_free and inline_ordered_team_ids fields, change
6373         ordered_team_ids into pointer from flexible array member.
6374         Add mode field.  Put lock and next into a different cache line
6375         from most of the write-once fields.
6376         (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
6377         gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
6378         gomp_iter_ull_guided_next): New prototypes.
6379         (gomp_new_icv): New prototype.
6380         (struct gomp_thread): Add thread_pool and task fields.
6381         (struct gomp_thread_pool): New type.
6382         (gomp_new_team): New prototype.
6383         (gomp_team_start): Change type of last argument.
6384         (gomp_new_work_share): Removed.
6385         (gomp_init_work_share, gomp_fini_work_share): New prototypes.
6386         (gomp_work_share_init_done): New static inline.
6387         (gomp_throttled_spin_count_var, gomp_available_cpus,
6388         gomp_managed_threads): New extern decls.
6389         (gomp_init_task): New prototype.
6390         (gomp_spin_count_var): New extern var decl.
6391         (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
6392         or no alias support, or if not PIC.
6393         (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
6394         gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
6395         gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
6396         gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
6397         gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
6398         gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
6399         gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
6400         gomp_test_nest_lock_25): New prototypes.
6401         (omp_lock_symver, strong_alias): Define.
6402         (gomp_remaining_threads_count, gomp_remaining_threads_lock): New
6403         decls.
6404         (gomp_end_task): New.
6405         (struct gomp_task_icv, gomp_global_icv): New.
6406         (gomp_thread_limit_var, gomp_max_active_levels_var): New.
6407         (struct gomp_task): New.
6408         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
6409         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
6410         (gomp_icv): New.
6411         (gomp_schedule_type): Reorder enum to match
6412         omp_sched_t.
6413         * team.c (struct gomp_thread_start_data): Add thread_pool and task
6414         fields.
6415         (gomp_thread_start): Add gomp_team_barrier_wait call.
6416         For non-nested case remove clearing of docked thread thr fields.
6417         Use pool fields instead of global gomp_* variables.  Use
6418         gomp_barrier_wait_last when needed.  Initialize ts.active_level.
6419         Create tasks for each member thread.
6420         (free_team): Only destroy team barrier, task_lock here and free it.
6421         (gomp_free_thread): Free last_team if non-NULL.
6422         (gomp_team_end): Call gomp_team_barrier_wait instead of
6423         gomp_barrier_wait.  For nested case call one extra
6424         gomp_barrier_wait.  Move here some destruction from free_team.
6425         Call free_team on pool->last_team if any, rather than freeing
6426         current team.  Destroy work_share_list_free_lock ifndef
6427         HAVE_SYNC_BUILTINS.
6428         (gomp_new_icv): New function.
6429         (gomp_threads, gomp_threads_size, gomp_threads_used,
6430         gomp_threads_dock): Removed.
6431         (gomp_thread_destructor): New variable.
6432         (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
6433         functions.
6434         (gomp_team_start): Create new pool if current thread doesn't have
6435         one.  Use pool fields instead of global gomp_* variables.
6436         Initialize thread_pool field for new threads.  Clear single_count.
6437         Change last argument from ws to team, don't create
6438         new team, set ts.work_share to &team->work_shares[0] and clear
6439         ts.last_work_share.  Don't clear ts.work_share_generation.
6440         If number of threads changed, adjust atomically gomp_managed_threads.
6441         Use gomp_init_task instead of gomp_new_task,
6442         set thr->task to the corresponding implicit_task array entry.
6443         Create tasks for each member thread.  Initialize ts.level.
6444         (initialize_team): Call pthread_key_create on
6445         gomp_thread_destructor.
6446         (team_destructor): New function.
6447         (new_team): Removed.
6448         (gomp_new_team): New function.
6449         (free_team): Free gomp_work_share blocks chained through next_alloc,
6450         instead of freeing work_shares and destroying work_share_lock.
6451         (gomp_team_end): Call gomp_fini_work_share.  If number of threads
6452         changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
6453         * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
6454         of gomp_barrier_wait.
6455         * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
6456         instead of gomp_barrier_wait.  Call gomp_work_share_init_done
6457         if gomp_work_share_start returned true.  Don't unlock ws->lock.
6458         (GOMP_single_copy_end): Call gomp_team_barrier_wait instead
6459         of gomp_barrier_wait.
6460         (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
6461         gomp_work_share_init_done if gomp_work_share_start returned true.
6462         Don't unlock ws->lock.
6463         * work.c: Include stddef.h.
6464         (free_work_share): Use work_share_list_free_lock instead
6465         of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
6466         Call gomp_fini_work_share and then either free ws if orphaned, or
6467         put it into work_share_list_free list of the current team.
6468         (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
6469         functions.
6470         (gomp_work_share_start, gomp_work_share_end,
6471         gomp_work_share_end_nowait): Rewritten.
6472         * omp_lib.f90.in Change some tabs to spaces to prevent warnings.
6473         (openmp_version): Set to 200805.
6474         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
6475         omp_sched_guided, omp_sched_auto): New parameters.
6476         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
6477         omp_set_max_active_levels, omp_get_max_active_levels,
6478         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
6479         omp_get_active_level): New interfaces.
6480         * omp_lib.h.in (openmp_version): Set to 200805.
6481         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
6482         omp_sched_guided, omp_sched_auto): New parameters.
6483         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
6484         omp_set_max_active_levels, omp_get_max_active_levels,
6485         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
6486         omp_get_active_level): New externals.
6487         * loop.c: Include limits.h.
6488         (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
6489         GFS_AUTO.
6490         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
6491         Likewise.  Use gomp_icv.
6492         (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
6493         ts.static_trip here.
6494         (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
6495         gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
6496         (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
6497         gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
6498         don't unlock ws->lock, otherwise lock it.
6499         (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
6500         gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
6501         (gomp_parallel_loop_start): Call gomp_new_team instead of
6502         gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
6503         Adjust gomp_team_start caller.  Pass 0 as second argument to
6504         gomp_resolve_num_threads.
6505         (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
6506         If adding ws->chunk_size nthreads + 1 times after end won't
6507         overflow, set ws->mode to 1.
6508         * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
6509         GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
6510         GOMP_loop_ull_ordered_static_start,
6511         GOMP_loop_ull_ordered_dynamic_start,
6512         GOMP_loop_ull_ordered_guided_start,
6513         GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
6514         GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
6515         GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
6516         GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
6517         GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
6518         prototypes.
6519         * libgomp.map: Export lock routines also @@OMP_2.0.
6520         (GOMP_loop_ordered_dynamic_first,
6521         GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
6522         GOMP_loop_ordered_static_first): Remove.
6523         (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
6524         GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
6525         GOMP_loop_ull_ordered_dynamic_next,
6526         GOMP_loop_ull_ordered_dynamic_start,
6527         GOMP_loop_ull_ordered_guided_next,
6528         GOMP_loop_ull_ordered_guided_start,
6529         GOMP_loop_ull_ordered_runtime_next,
6530         GOMP_loop_ull_ordered_runtime_start,
6531         GOMP_loop_ull_ordered_static_next,
6532         GOMP_loop_ull_ordered_static_start,
6533         GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
6534         GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
6535         GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
6536         (omp_set_schedule, omp_get_schedule,
6537         omp_get_thread_limit, omp_set_max_active_levels,
6538         omp_get_max_active_levels, omp_get_level,
6539         omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
6540         omp_set_schedule_, omp_set_schedule_8_,
6541         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
6542         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
6543         omp_get_max_active_levels_, omp_get_level_,
6544         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
6545         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
6546         New exports @@OMP_3.0.
6547         * omp.h.in (omp_sched_t): New type.
6548         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
6549         omp_set_max_active_levels, omp_get_max_active_levels,
6550         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
6551         omp_get_active_level): New prototypes.
6552         * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
6553         gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
6554         gomp_thread_limit_var, gomp_remaining_threads_count,
6555         gomp_remaining_threads_lock): New variables.
6556         (parse_spincount): New function.
6557         (initialize_env): Call gomp_init_num_threads unconditionally.
6558         Initialize gomp_available_cpus.  Call parse_spincount,
6559         initialize gomp_{,throttled_}spin_count_var
6560         depending on presence and value of OMP_WAIT_POLICY and
6561         GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
6562         Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
6563         OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
6564         for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
6565         gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
6566         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
6567         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
6568         (gomp_global_icv): New.
6569         (parse_schedule): Use it.  Parse "auto".
6570         (omp_set_num_threads): Use gomp_icv.
6571         (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
6572         Likewise.
6573         (omp_get_max_threads): Move from parallel.c.
6574         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
6575         omp_set_max_active_levels, omp_get_max_active_levels): New functions,
6576         add ialias.
6577         (parse_stacksize, parse_wait_policy): New functions.
6578         * fortran.c: Rewrite lock wrappers, if symbol versioning provide
6579         both wrappers for compatibility and new locks.
6580         (omp_set_schedule, omp_get_schedule,
6581         omp_get_thread_limit, omp_set_max_active_levels,
6582         omp_get_max_active_levels, omp_get_level,
6583         omp_get_ancestor_thread_num, omp_get_team_size,
6584         omp_get_active_level): New ialias_redirect.
6585         (omp_set_schedule_, omp_set_schedule_8_,
6586         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
6587         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
6588         omp_get_max_active_levels_, omp_get_level_,
6589         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
6590         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
6591         New functions.
6592         * parallel.c: Include limits.h.
6593         (gomp_resolve_num_threads): Add count argument.  Rewritten.
6594         (GOMP_parallel_start): Call gomp_new_team and pass that as last
6595         argument to gomp_team_start.  Pass 0 as second argument to
6596         gomp_resolve_num_threads.
6597         (GOMP_parallel_end): Decrease gomp_remaining_threads_count
6598         if gomp_thread_limit_var != ULONG_MAX.
6599         (omp_in_parallel): Implement using ts.active_level.
6600         (omp_get_max_threads): Move to env.c.
6601         (omp_get_level, omp_get_ancestor_thread_num,
6602         omp_get_team_size, omp_get_active_level): New functions,
6603         add ialias.
6604         * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
6605         after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
6606         gomp_iter_dynamic_next instead of the _locked variant and don't take
6607         lock around it, otherwise acquire it before calling
6608         gomp_iter_dynamic_next_locked.
6609         (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
6610         gomp_iter_dynamic_next instead of the _locked variant and don't take
6611         lock around it.
6612         (GOMP_parallel_sections_start): Call gomp_new_team instead of
6613         gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
6614         Adjust gomp_team_start caller.  Pass count as second argument to
6615         gomp_resolve_num_threads, don't adjust num_threads after the call.
6616         Use gomp_icv.
6617         * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
6618         ws->chunk_size by incr.
6619         (gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
6620         code.
6621         * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
6622         types.
6623         (omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
6624         (omp_check_defines): Check even the compat defines.
6625         * config/linux/ptrlock.c: New file.
6626         * config/linux/ptrlock.h: New file.
6627         * config/linux/wait.h: New file.
6628         * config/posix/ptrlock.c: New file.
6629         * config/posix/ptrlock.h: New file.
6630         * config/linux/bar.h (gomp_team_barrier_wait,
6631         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
6632         (gomp_team_barrier_set_task_pending,
6633         gomp_team_barrier_clear_task_pending,
6634         gomp_team_barrier_set_waiting_for_tasks,
6635         gomp_team_barrier_waiting_for_tasks,
6636         gomp_team_barrier_done): New inlines.
6637         (gomp_barrier_t): Rewritten.
6638         (gomp_barrier_state_t): New typedef.
6639         (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
6640         gomp_barrier_wait_start): Rewritten.
6641         (gomp_barrier_wait_end): Change second argument to
6642         gomp_barrier_state_t.
6643         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
6644         inlines.
6645         * config/linux/bar.c: Include wait.h instead of libgomp.h and
6646         futex.h.
6647         (gomp_barrier_wait_end): Rewritten.
6648         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
6649         gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
6650         * config/posix/bar.h (gomp_barrier_t): Add generation field.
6651         (gomp_barrier_state_t): New typedef.
6652         (gomp_team_barrier_wait,
6653         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
6654         (gomp_barrier_wait_start): Or all but low 2 bits from generation
6655         into the return value.  Return gomp_barrier_state_t.
6656         (gomp_team_barrier_set_task_pending,
6657         gomp_team_barrier_clear_task_pending,
6658         gomp_team_barrier_set_waiting_for_tasks,
6659         gomp_team_barrier_waiting_for_tasks,
6660         gomp_team_barrier_done): New inlines.
6661         (gomp_barrier_wait_end): Change second argument to
6662         gomp_barrier_state_t.
6663         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
6664         inlines.
6665         * config/posix/bar.c (gomp_barrier_init): Clear generation field.
6666         (gomp_barrier_wait_end): Change second argument to
6667         gomp_barrier_state_t.
6668         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
6669         gomp_team_barrier_wake): New functions.
6670         * config/linux/mutex.c: Include wait.h instead of libgomp.h and
6671         futex.h.
6672         (gomp_futex_wake, gomp_futex_wait): New variables.
6673         (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
6674         * config/linux/lock.c: Rewrite to make locks task owned,
6675         for backwards compatibility provide the old entrypoints
6676         if symbol versioning.  Include wait.h instead of libgomp.h and
6677         futex.h.
6678         (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
6679         * config/posix95/lock.c: Rewrite to make locks task owned,
6680         for backwards compatibility provide the old entrypoints
6681         if symbol versioning.
6682         * config/posix/lock.c: Rewrite to make locks task owned,
6683         for backwards compatibility provide the old entrypoints
6684         if symbol versioning.
6685         * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
6686         (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
6687         * config/posix/proc.c, config/mingw32/proc.c: Similarly.
6688         * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
6689         (sys_futex0): Return error code.
6690         (futex_wake, futex_wait): If ENOSYS was returned, clear
6691         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
6692         (cpu_relax, atomic_write_barrier): New static inlines.
6693         * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
6694         (futex_wake, futex_wait): If ENOSYS was returned, clear
6695         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
6696         (cpu_relax, atomic_write_barrier): New static inlines.
6697         * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
6698         (sys_futex0): Return error code.
6699         (futex_wake, futex_wait): If ENOSYS was returned, clear
6700         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
6701         (cpu_relax, atomic_write_barrier): New static inlines.
6702         * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
6703         (sys_futex0): Return error code.
6704         (futex_wake, futex_wait): If ENOSYS was returned, clear
6705         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
6706         (cpu_relax, atomic_write_barrier): New static inlines.
6707         * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
6708         (sys_futex0): Return error code.
6709         (futex_wake, futex_wait): If ENOSYS was returned, clear
6710         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
6711         (cpu_relax, atomic_write_barrier): New static inlines.
6712         * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
6713         (sys_futex0): Return error code.
6714         (futex_wake, futex_wait): If ENOSYS was returned, clear
6715         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
6716         (cpu_relax, atomic_write_barrier): New static inlines.
6717         * config/linux/sem.c: Include wait.h instead of libgomp.h and
6718         futex.h.
6719         (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
6720         * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
6721         * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
6722         types.
6723         (omp_nest_lock_t): Change owner into void *, add lock field.
6724         * config/posix95/omp-lock.h: Include semaphore.h.
6725         (omp_lock_25_t, omp_nest_lock_25_t): New types.
6726         (omp_lock_t): Use sem_t instead of mutex if semaphores
6727         aren't broken.
6728         (omp_nest_lock_t): Likewise.  Change owner to void *.
6729         * config/posix/omp-lock.h: Include semaphore.h.
6730         (omp_lock_25_t, omp_nest_lock_25_t): New types.
6731         (omp_lock_t): Use sem_t instead of mutex if semaphores
6732         aren't broken.
6733         (omp_nest_lock_t): Likewise.  Add owner field.
6735 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
6737         * testsuite/libgomp.c/collapse-1.c: New test.
6738         * testsuite/libgomp.c/collapse-2.c: New test.
6739         * testsuite/libgomp.c/collapse-3.c: New test.
6740         * testsuite/libgomp.c/icv-1.c: New test.
6741         * testsuite/libgomp.c/icv-2.c: New test.
6742         * testsuite/libgomp.c/lib-2.c: New test.
6743         * testsuite/libgomp.c/lock-1.c: New test.
6744         * testsuite/libgomp.c/lock-2.c: New test.
6745         * testsuite/libgomp.c/lock-3.c: New test.
6746         * testsuite/libgomp.c/loop-4.c: New test.
6747         * testsuite/libgomp.c/loop-5.c: New test.
6748         * testsuite/libgomp.c/loop-6.c: New test.
6749         * testsuite/libgomp.c/loop-7.c: New test.
6750         * testsuite/libgomp.c/loop-8.c: New test.
6751         * testsuite/libgomp.c/loop-9.c: New test.
6752         * testsuite/libgomp.c/nested-3.c: New test.
6753         * testsuite/libgomp.c/nestedfn-6.c: New test.
6754         * testsuite/libgomp.c/sort-1.c: New test.
6755         * testsuite/libgomp.c/task-1.c: New test.
6756         * testsuite/libgomp.c/task-2.c: New test.
6757         * testsuite/libgomp.c/task-3.c: New test.
6758         * testsuite/libgomp.c/task-4.c: New test.
6759         * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
6760         to C++ testsuite default compiler options.
6761         * testsuite/libgomp.c++/collapse-1.C: New test.
6762         * testsuite/libgomp.c++/collapse-2.C: New test.
6763         * testsuite/libgomp.c++/ctor-10.C: New test.
6764         * testsuite/libgomp.c++/for-1.C: New test.
6765         * testsuite/libgomp.c++/for-2.C: New test.
6766         * testsuite/libgomp.c++/for-3.C: New test.
6767         * testsuite/libgomp.c++/for-4.C: New test.
6768         * testsuite/libgomp.c++/for-5.C: New test.
6769         * testsuite/libgomp.c++/loop-8.C: New test.
6770         * testsuite/libgomp.c++/loop-9.C: New test.
6771         * testsuite/libgomp.c++/loop-10.C: New test.
6772         * testsuite/libgomp.c++/task-1.C: New test.
6773         * testsuite/libgomp.c++/task-2.C: New test.
6774         * testsuite/libgomp.c++/task-3.C: New test.
6775         * testsuite/libgomp.c++/task-4.C: New test.
6776         * testsuite/libgomp.c++/task-5.C: New test.
6777         * testsuite/libgomp.c++/task-6.C: New test.
6778         * testsuite/libgomp.fortran/allocatable1.f90: New test.
6779         * testsuite/libgomp.fortran/allocatable2.f90: New test.
6780         * testsuite/libgomp.fortran/allocatable3.f90: New test.
6781         * testsuite/libgomp.fortran/allocatable4.f90: New test.
6782         * testsuite/libgomp.fortran/collapse1.f90: New test.
6783         * testsuite/libgomp.fortran/collapse2.f90: New test.
6784         * testsuite/libgomp.fortran/collapse3.f90: New test.
6785         * testsuite/libgomp.fortran/collapse4.f90: New test.
6786         * testsuite/libgomp.fortran/lastprivate1.f90: New test.
6787         * testsuite/libgomp.fortran/lastprivate2.f90: New test.
6788         * testsuite/libgomp.fortran/lib4.f90: New test.
6789         * testsuite/libgomp.fortran/lock-1.f90: New test.
6790         * testsuite/libgomp.fortran/lock-2.f90: New test.
6791         * testsuite/libgomp.fortran/nested1.f90: New test.
6792         * testsuite/libgomp.fortran/nestedfn4.f90: New test.
6793         * testsuite/libgomp.fortran/strassen.f90: New test.
6794         * testsuite/libgomp.fortran/tabs1.f90: New test.
6795         * testsuite/libgomp.fortran/tabs2.f: New test.
6796         * testsuite/libgomp.fortran/task1.f90: New test.
6797         * testsuite/libgomp.fortran/task2.f90: New test.
6798         * testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
6799         * testsuite/libgomp.fortran/vla5.f90: Likewise.
6800         * testsuite/libgomp.c/pr26943-2.c: Likewise.
6801         * testsuite/libgomp.c/pr26943-3.c: Likewise.
6802         * testsuite/libgomp.c/pr26943-4.c: Likewise.
6804 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
6806         PR c++/36308
6807         * testsuite/libgomp.c++/ctor-11.C: New test.
6808         * testsuite/libgomp.c++/ctor-12.C: New test.
6810 2008-05-15  Janis Johnson  <janis187@us.ibm.com>
6812         * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.
6814 2008-05-07  Jakub Jelinek  <jakub@redhat.com>
6816         PR middle-end/36106
6817         * testsuite/libgomp.c/atomic-5.c: New test.
6818         * testsuite/libgomp.c/atomic-6.c: New test.
6819         * testsuite/libgomp.c/autopar-1.c: New test.
6821 2008-04-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6823         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
6824         (LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
6825         (LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
6826         (LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
6827         * configure: Regenerate.
6828         * Makefile.in, testsuite/Makefile.in: Likewise.
6830 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
6832         PR bootstrap/35457
6833         * aclocal.m4: Regenerate.
6834         * configure: Regenerate.
6836 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
6838         PR middle-end/35611
6839         * testsuite/libgomp.c/atomic-4.c: New test.
6841         PR libgomp/35625
6842         * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
6843         (gomp_iter_guided_next): Likewise.
6844         * testsuite/libgomp.c/pr35625.c: New test.
6846 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6848         * aclocal.m4: Regenerate.
6849         * configure: Likewise.
6850         * Makefile.in: Likewise.
6851         * testsuite/Makefile.in: Likewise.
6853 2008-03-13  Jakub Jelinek  <jakub@redhat.com>
6855         PR middle-end/35185
6856         * testsuite/libgomp.c++/pr35185.C: New test.
6858 2008-03-12  Jakub Jelinek  <jakub@redhat.com>
6860         PR middle-end/35549
6861         * testsuite/libgomp.c/pr35549.c: New test.
6863 2008-03-06  Jakub Jelinek  <jakub@redhat.com>
6865         * testsuite/libgomp.c/atomic-3.c: New test.
6867 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6869         PR fortran/33197
6870         * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
6871         .F08 file suffixes.
6873 2008-03-03  Peter O'Gorman  <pogma@thewrittenword.com>
6875         PR libgomp/33131
6876         * configure.ac: Add ACX_HEADER_STRING.
6877         * env.c: Include strings.h.
6878         * aclocal.m4: Regenerate.
6879         * config.h.in: Regenerate.
6880         * configure: Regenerate.
6881         * Makefile.in: Regenerate.
6882         * testsuite/Makefile.in: Regenerate.
6884 2008-02-15  Jakub Jelinek  <jakub@redhat.com>
6886         PR middle-end/35196
6887         * testsuite/libgomp.c/pr35196.c: New test.
6889         PR middle-end/35130
6890         * testsuite/libgomp.fortran/pr35130.f90: New test.
6891         * testsuite/libgomp.c/pr35130.c: New test.
6893 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
6895         PR middle-end/33880
6896         * testsuite/libgomp.c/pr33880.c: New test.
6897         * testsuite/libgomp.fortran/pr33880.f90: New test.
6899 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
6901         * configure: Regenerate.
6903 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
6905         * configure.ac: Move futex checking into ../config/futex.m4.
6906         * configure: Rebuilt.
6907         * aclocal.m4: Rebuilt.
6908         * Makefile.in: Rebuilt.
6910         * configure.tgt: Rename have_tls to gcc_cv_have_tls to match
6911         2007-10-15 ../config/tls.m4 change.
6913 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
6915         PR c++/34513
6916         * testsuite/libgomp.c/pr34513.c: New test.
6917         * testsuite/libgomp.c++/pr34513.C: New test.
6919 2007-12-17  Jack Howarth  <howarth@bromo.med.uc.edu>
6921         PR target/32765
6922         * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
6924 2007-12-04  Jakub Jelinek  <jakub@redhat.com>
6926         * omp.h.in (__GOMP_NOTHROW): Define.  Use it on omp_* prototypes.
6928 2007-12-03  Jakub Jelinek  <jakub@redhat.com>
6930         * testsuite/libgomp.c/private-1.c: New test.
6932 2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>
6933             Paolo Bonzini  <bonzini@gnu.org>
6935         * Makefile.am: Use space as vpath separator.  Use 'vpath %'
6936         instead of 'VPATH ='.
6937         * Makefile.in: Regenerate.
6939 2007-11-23  Matthias Klose  <doko@ubuntu.com>
6941         * configure.ac: Adjust makeinfo version check.
6942         * configure: Regenerate.
6944 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
6946         PR fortran/34020
6947         * testsuite/libgomp.fortran/pr34020.f90: New test.
6949 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
6951         PR c++/33894
6952         * testsuite/libgomp.c++/atomic-1.C: New test.
6954 2007-10-25  Jakub Jelinek  <jakub@redhat.com>
6956         PR libgomp/33275
6957         * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
6958         Make x and y integers rather than (implicit) reals.  Add private (j)
6959         clause to the last omp parallel.
6961 2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
6963         * configure: Regenerate following changes to ../config/tls.m4.
6965 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
6967         * testsuite/libgomp.fortran/stack.f90: New test.
6969 2007-09-10  Danny Smith  <dannysmith@users.sourceforge.net>
6971         * config/mingw32/proc.c: New file.
6973 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
6975         * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
6976         (main): Use __get_cpuid to get i386 target fetaures.
6977         * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
6978         (main): Use __get_cpuid to get x86_64 target fetaures.
6980 2007-08-15  Jack Howarth  <howarth@bromo.med.uc.edu>
6982         PR target/32765
6983         * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
6984         * testsuite/libgomp.fortran/crayptr2.f90: Likwise.
6986 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
6988         PR fortran/32550
6989         * testsuite/libgomp.fortran/pr32550.f90: New test.
6990         * testsuite/libgomp.fortran/crayptr2.f90: New test.
6992 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
6994         * aclocal.m4: Regenerated.
6996 2007-07-05  Tobias Burnus  <burnus@net-b.de>
6998         PR fortran/32359
6999         * testsuite/libgomp.fortran/pr32359.f90: New.
7001 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
7003         PR libgomp/32468
7004         * sections.c (GOMP_parallel_sections_start): Only decrease
7005         number of threads to COUNT if dyn_var is true.
7006         * testsuite/libgomp.c/pr32468.c: New test.
7008 2007-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7010         PR libgomp/26308
7011         * config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.
7013 2007-06-21  Jakub Jelinek  <jakub@redhat.com>
7015         PR middle-end/32362
7016         * testsuite/libgomp.c/pr32362-1.c: New test.
7017         * testsuite/libgomp.c/pr32362-2.c: New test.
7018         * testsuite/libgomp.c/pr32362-3.c: New test.
7020 2007-06-07  Jakub Jelinek  <jakub@redhat.com>
7022         * team.c (gomp_team_start): Fix setting up thread_attr
7023         stack size.
7025 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
7027         * configure: Regenerate.
7029 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
7031         * Makefile.in: Regenerate.
7032         * configure: Regenerate.
7033         * aclocal.m4: Regenerate.
7034         * testsuite/Makefile.in: Regenerate.
7036 2007-05-04  Jakub Jelinek  <jakub@redhat.com>
7038         * config/linux/proc.c: New file.
7040         PR libgomp/28482
7041         * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
7043 2007-04-19  Daniel Franke  <franke.daniel@gmail.com>
7045         * libgomp.texi (GOMP_CPU_AFFINITY): Updated.
7047 2007-04-16  Matthias Klose  <doko@debian.org>
7049         * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
7050         flags if not building with -m64.
7051         * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
7052         flag for i?86-*-* targets, if current target matches -m64.
7054 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
7056         * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
7057         * Makefile.in: Regenerate.
7059 2007-04-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7061         PR testsuite/31369
7062         * testsuite/libgomp.c++/c++.exp: Don't use concat when setting
7063         ld_library_path.
7064         * testsuite/libgomp.fortran/fortran.exp: Likewise.
7066 2007-04-04  Jakub Jelinek  <jakub@redhat.com>
7068         * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
7069         decls.
7070         (gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
7071         * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
7072         (parse_affinity): New function.
7073         (initialize_env): Call it and gomp_init_affinity.
7074         * team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
7075         create new pthread_attr_t and call gomp_init_thread_affinity
7076         on it for each thread before passing the attribute to pthread_create.
7077         * config/linux/affinity.c: New file.
7078         * config/posix/affinity.c: New file.
7079         * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
7080         * configure: Rebuilt.
7081         * config.h.in: Rebuilt.
7082         * Makefile.am (libgomp_la_SOURCES): Add affinity.c.
7083         * Makefile.in: Rebuilt.
7085 2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>
7087         * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
7088         *-*-darwin*.
7089         * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
7090         and use it if found.
7092 2007-03-18  Uros Bizjak  <ubizjak@gmail.com>
7094         * testsuite/config/default.exp: New file.
7095         * testsuite/lib/libgomp.exp: New file.
7096         * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
7097         libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
7098         load_lib *, load_gcc_lib *): Move to libgomp.exp.
7099         (libgomp_load): Remove.
7100         * testsuite/lib/libgomp.exp (libgomp_init): Compute
7101         always_ld_library_path, not ld_library_path.  Set additional_flags
7102         to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
7103         (target_compile): Do not call libgomp_init.  Append lang_library_path
7104         and lang_link_flags to options.
7105         * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
7106         ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
7107         here.
7108         * testsuite/libgomp.c++/c++.exp: Set ld_library_path from
7109         always_ld_library_path.  Set LD_LIBRARY_PATH here.
7110         * testsuite/libgomp.fortran/fortran.exp: Ditto.
7111         * testsuite/libgomp.c/atomic-1.c: Set dg-options to
7112         "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
7113         CX8 flag.
7114         * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
7115         lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
7116         * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
7117         * testsuite/libgomp.c/pr29947-1.c: Ditto.
7118         * testsuite/libgomp.c/atomic-10.c: Ditto.
7120 2007-03-21  Jakub Jelinek  <jakub@redhat.com>
7122         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
7123         dg-final cleanup-modules line.
7124         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
7125         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
7126         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
7127         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
7128         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
7129         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
7130         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
7132 2007-03-18  Andreas Schwab  <schwab@suse.de>
7134         * acinclude.m4: Adjust regular expression for ld version
7135         extraction.
7136         * configure: Regenerate.
7138 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
7140         * Makefile.am: Add install-pdf target as copied from
7141         automake v1.10 rules.
7142         * Makefile.in: Regenerate
7144 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
7146         PR libgomp/28486
7147         * configure: Regenerate.
7149         PR c++/30703
7150         * testsuite/libgomp.c++/pr30703.C: New test.
7152 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
7154         Revert:
7155         2006-07-05  Eric Christopher  <echristo@apple.com>
7156         * configure.ac: Depend addition of -pthread on host OS.
7157         * configure: Regenerate.
7159 2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7161         * libgomp.texi: Fix spacing after abbreviations.
7163 2007-01-31  Daniel Franke <franke.daniel@gmail.com>
7165         PR libgomp/30546
7166         * configure.ac: Add check for makeinfo
7167         * Makefile.am: Redefined target libgomp.info, build libgomp.info only
7168         if an appropiate version of makeinfo is found.
7169         * aclocal.m4: Regenerated.
7170         * configure: Regenerated.
7171         * Makefile.in: Regenerated.
7172         * testsuite/Makefile.in: Regenerated.
7174 2007-01-29  Daniel Franke <franke.daniel@gmail.com>
7176         PR libgomp/30540
7177         * libgomp.texi: More about implementation-dependent settings.
7179 2007-01-26  Tobias Burnus  <burnus@net-b.de>
7181         * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
7183 2007-01-24  Jakub Jelinek  <jakub@redhat.com>
7185         PR middle-end/30494
7186         * testsuite/libgomp.c/pr30494.c: New test.
7188 2007-01-15  Tom Tromey  <tromey@redhat.com>
7190         * configure: Rebuilt.
7191         * configure.ac: Fixed comment.
7193 2007-01-14  Daniel Franke  <franke.daniel@gmail.com>
7195         * libgomp.texi: Document implementation specific default values of
7196         environment variables.
7198 2006-12-21  Daniel Franke  <franke.daniel@gmail.com>
7200         PR libgomp/28209
7201         * libgomp.texi: New file.
7202         * configure.ac: Add --enable-generated-files-in-srcdir option.
7203         * Makefile.am: Add info, dvi, pdf, html targets. On request, copy
7204         files to srcdir.
7205         * Makefile.in: Regenerated.
7206         * config.h.in: Regenerated.
7207         * testsuite/Makefile.in: Regenerated.
7208         * NOTES: Removed.
7210 2006-12-04  Daniel Franke  <franke.daniel@gmail.com>
7212         PR libgomp/29949
7213         * env.c (omp_set_num_threads): Set illegal thread count to 1.
7215 2006-12-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
7217         * configure: Regenerate.
7219 2006-12-04  Jakub Jelinek  <jakub@redhat.com>
7221         PR libgomp/29947
7222         * loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
7223         start if there shouldn't be any loop iterations.
7224         (gomp_loop_ordered_static_start): Remove start == end test.
7225         * testsuite/libgomp.c/pr29947-1.c: New test.
7226         * testsuite/libgomp.c/pr29947-2.c: New test.
7228 2006-12-02  Eric Botcazou  <ebotcazou@libertysurf.fr>
7230         * configure.tgt: Force initial-exec TLS model on Linux only.
7232 2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
7234         * configure: Regenerated.
7236 2006-11-09  Uros Bizjak  <ubizjak@gmail.com>
7238         * env.c (parse_schedule): Reject out of range values.
7239         (parse_unsigned_long): Reject out of range, negative or zero values.
7241 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
7243         PR fortran/29629
7244         * testsuite/libgomp.fortran/pr29629.f90: New test.
7246 2006-10-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
7248         PR libgomp/29494
7249         * configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
7250         * config/posix95: New directory.
7251         * config/posix95/omp-lock.h: New file.
7252         * config/posix95/lock.c: Likewise.
7254 2006-10-14  Geoffrey Keating  <geoffk@apple.com>
7256         * aclocal.m4: Regenerate.
7257         * configure: Regenerate.
7259 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
7261         * testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
7262         '<' to '<='.
7264 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
7266         * acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from
7267         test.
7268         * configure: Regenerate.
7269         * fortran.c  (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.
7271 2006-09-26  Jakub Jelinek  <jakub@redhat.com>
7273         PR middle-end/25261
7274         PR middle-end/28790
7275         * testsuite/libgomp.c/nestedfn-4.c: New test.
7276         * testsuite/libgomp.c/nestedfn-5.c: New test.
7277         * testsuite/libgomp.fortran/nestedfn3.f90: New test.
7279         PR fortran/29097
7280         * testsuite/libgomp.fortran/condinc1.f: New test.
7281         * testsuite/libgomp.fortran/condinc2.f: New test.
7282         * testsuite/libgomp.fortran/condinc3.f90: New test.
7283         * testsuite/libgomp.fortran/condinc4.f90: New test.
7284         * testsuite/libgomp.fortran/condinc1.inc: New file.
7286 2006-09-18  Tom Tromey  <tromey@redhat.com>
7288         * configure: Rebuilt.
7290 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
7292         PR c/28768
7293         PR preprocessor/14634
7294         * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
7295         to AC_DEFINE.
7296         * configure: Regenerate.
7298 2006-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
7300         * testsuite/libgomp.fortran/reduction3.f90: Change
7301         -2147483648 to -huge(i)-1 to avoid overflow.
7302         * testsuite/libgomp.fortran/reduction4.f90: Change
7303         Z'ffffffff' to not(0) to avoid overflow.
7305 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
7307         PR libgomp/25938
7308         * Makefile.am (libsubincludedir): New.
7309         (nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
7310         * Makefile.in: Regenerate.
7312 2006-08-17  Jakub Jelinek  <jakub@redhat.com>
7314         PR libgomp/28725
7315         * env.c: Include ctype.h.
7316         (parse_schedule, parse_unsigned_long, parse_boolean): Allow
7317         leading and/or trailing whitespace and compare strings case
7318         insensitively.
7320 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
7322         PR fortran/28390
7323         * testsuite/libgomp.fortran/pr28390.f: New test.
7325 2006-07-05  Eric Christopher  <echristo@apple.com>
7327         * configure.ac: Depend addition of -pthread on host OS.
7328         * configure: Regenerate.
7330 2006-06-21  Jakub Jelinek  <jakub@redhat.com>
7332         * critical.c (GOMP_critical_name_start): Fix *pptr initialization
7333         when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
7334         defined.
7336 2006-06-20  Jakub Jelinek  <jakub@redhat.com>
7338         PR libgomp/26175
7339         PR libgomp/26477
7340         * configure.ac: If neither --enable-linux-futex nor
7341         --disable-linux-futex is passed, determine the default by checking
7342         for compiling and/or running against NPTL.  With --enable-linux-futex,
7343         check if SYS_gettid and SYS_futex are defined.
7344         * configure: Rebuilt.
7346 2006-06-14  Richard Henderson  <rth@redhat.com>
7348         PR libgomp/28008
7349         * env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
7350         undefined.  Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.
7352 2006-06-09  Richard Henderson  <rth@redhat.com>
7354         * env.c (gomp_nthreads_var): Change to unsigned long.
7355         (gomp_run_sched_chunk): Likewise.
7356         (parse_unsigned_long): Rename from parse_num_threads and generalize.
7357         (initialize_env): Initialize gomp_thread_attr.
7358         * libgomp.h (gomp_nthreads_var): Update decl.
7359         (gomp_run_sched_chunk): Likewise.
7360         (gomp_thread_attr): Declare.
7361         * team.c (gomp_thread_attr): Export.
7362         (initialize_team): Don't initialize it.
7364 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
7366         PR fortran/27916
7367         * testsuite/libgomp.fortran/pr27916-1.f90: New test.
7368         * testsuite/libgomp.fortran/pr27916-2.f90: New test.
7370 2006-06-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
7372         * config/mingw32/time.c: New file.
7373         * configure.tgt: Use it.
7375 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
7377         * Makefile.am: Add install-html target. Add install-html to .PHONY
7378         * Makefile.in: Regenerate.
7380 2006-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7382         PR libgomp/27612
7383         * testsuite/libgomp.c/sections-1.c: Require sync_int_long.
7384         * testsuite/libgomp.c/critical-1.c: Likewise.
7385         * testsuite/libgomp.c/loop-1.c: Likewise.
7386         * testsuite/libgomp.c/loop-2.c: Likewise.
7387         * testsuite/libgomp.c/single-1.c: Likewise.
7388         * testsuite/libgomp.c/ordered-1.c: Likewise.
7389         * testsuite/libgomp.c/ordered-2.c: Likewise.
7391 2006-05-15  Jakub Jelinek  <jakub@redhat.com>
7393         PR middle-end/27416
7394         * libgomp.fortran/pr27416-1.f90: New test.
7396 2006-05-03  Jakub Jelinek  <jakub@redhat.com>
7398         PR fortran/27395
7399         * testsuite/libgomp.fortran/pr27395-1.f90: New test.
7400         * testsuite/libgomp.fortran/pr27395-2.f90: New test.
7402 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
7404         PR c++/26943
7405         * testsuite/libgomp.c/pr26943-1.c: New test.
7406         * testsuite/libgomp.c/pr26943-2.c: New test.
7407         * testsuite/libgomp.c/pr26943-3.c: New test.
7408         * testsuite/libgomp.c/pr26943-4.c: New test.
7409         * testsuite/libgomp.c++/pr27337.C: Remove barrier.
7410         * testsuite/libgomp.c++/pr26943.C: New test.
7412 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
7414         PR middle-end/27337
7415         * testsuite/libgomp.c++/pr27337.C: New test.
7417 2006-04-26  Jakub Jelinek  <jakub@redhat.com>
7419         PR c/26171
7420         * testsuite/libgomp.c/pr26171.c: New test.
7422 2006-04-25  Richard Henderson  <rth@redhat.com>
7424         PR libgomp/25865
7425         * configure.ac: Use GCC_CHECK_TLS.
7426         * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
7427         * Makefile.in, aclocal.m4, configure: Regenerate.
7429 2006-04-10  Matthias Klose  <doko@debian.org>
7431         * testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib
7432         directory names containing underscores.
7434 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
7436         PR c++/26691
7437         * testsuite/libgomp.c++/pr26691.C: New test.
7439 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
7441         * testsuite/libgomp.fortran/retval2.f90: New test.
7443 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
7445         * testsuite/libgomp.c++: New directory.
7447 2006-02-25  Shantonu Sen  <ssen@opendarwin.org>
7449         * config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
7450         * config/posix/sem.c: Implement the above.
7452 2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>
7454         * configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
7455         define HAVE_BROKEN_POSIX_SEMAPHORES.
7456         * configure: Rebuilt.
7457         * config.h.in: Rebuilt.
7459 2006-02-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
7461         PR bootstrap/26161
7462         * configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
7463         for the other pthread check.
7464         * configure: Regenerate.
7465         * config.h.in: Regenerate.
7467 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
7469         PR libgomp/25938
7470         PR libgomp/25984
7471         * Makefile.am (fincludedir): New variable.
7472         (nodist_include_HEADERS): Remove Fortran files.
7473         (nodist_finclude_HEADERS): New variable.
7474         * Makefile.in: Regenerated.
7476 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
7478         * testsuite/libgomp.fortran/vla7.f90: Add -w to options.
7479         Remove tests for returning assumed character length arrays.
7481 2006-02-12  Roger Sayle  <roger@eyesopen.com>
7482             John David Anglin  <dave@hiauly1.hia.nrc.ca>
7484         PR libgomp/25936
7485         * configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
7487 2006-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
7489         * testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
7491 2006-02-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
7493         * testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
7494         part of LD_LIBRARY_PATH manually.
7496 2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>
7498         PR libgomp/25852
7499         * testsuite/lib/libgomp-dg.exp (blddir): Set it in
7500         libgomp_init.
7502 2005-01-25  Paolo Bonzini  <bonzini@gnu.org>
7504         PR libgomp/25884
7505         * Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
7506         * configure.ac (PERL): Don't set.
7507         (gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
7508         (OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
7509         OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
7510         * omp.h.in: Wrap the new configure substitutions with @ characters.
7511         * omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
7512         * aclocal.m4, configure, Makefile.in: Regenerate.
7513         * mkomp_h.pl: Delete.
7515 2005-01-24  Paolo Bonzini  <bonzini@gnu.org>
7517         PR libgomp/25259
7518         * configure.ac: Use GCC_HEADER_STDINT.
7519         * libgomp.h: Include gstdint.h.
7520         * libgomp_f.h.in: Don't include stdint.h or inttypes.h.
7521         * configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.
7523 2006-01-24  Richard Henderson  <rth@redhat.com>
7525         PR libgomp/25942
7526         * configure.ac: Add AM_MAINTAINER_MODE.
7527         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.
7529 2006-01-24  Diego Novillo  <dnovillo@redhat.com>
7531         * Makefile.in: Regenerate.
7532         * testsuite/Makefile.in: Regenerate.
7533         * aclocal.m4: Regenerate.
7535 2006-01-23  Andreas Tobler  <a.tobler@schweiz.ch>
7537         * config/posix/proc.c: Conditional include of sys/loadavg.h for
7538         Solaris.
7539         * configure.ac: Add check for loadavg.h.
7540         (link_gomp): Adjust comment.
7541         * configure: Regenerate.
7542         * config.h.in: Regenerate.
7544 2006-01-21  Steve Ellcey  <sje@cup.hp.com>
7546         PR libgomp/25877
7547         * configure.ac: Remove check for alloca.h.
7548         * configure: Regenerate.
7549         * config.h.in: Regenerate.
7550         * libgomp.h: define gomp_alloca to be __builtin_alloca.
7551         * team.c: Remove use of alloca.h.
7552         Call gomp_alloca instead of alloca.
7554 2006-01-20  Steve Ellcey  <sje@cup.hp.com>
7556         PR libgomp/25877
7557         * team.c: Add include of alloca.h.
7558         * configure.ac: Add check for alloca.h.
7559         * configure: Regenerate.
7560         * config.h.in: Regenerate.
7562 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
7564         PR fortran/25219
7565         * testsuite/libgomp.fortran/pr25219.f90: New test.
7567 2005-12-05  Uros Bizjak  <uros@kss-loka.si>
7569         * testsuite/libgomp.c/pr24455.c, testsuite/libgomp.c/copyin-1.c,
7570         testsuite/libgomp.c/copyin-2.c, testsuite/libgomp.c/copyin-3.c,
7571         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
7572         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
7573         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455.C,
7574         testsuite/libgomp.fortran/threadprivate1.f90,
7575         testsuite/libgomp.fortran/threadprivate2.f90,
7576         testsuite/libgomp.fortran/threadprivate3.f90,
7577         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
7578         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
7579         testsuite/libgomp.fortran/omp_parse3.f90: Change required
7580         effective-target to TLS runtime.
7582         * testsuite/libgomp.fortran/pr25162.f: Require
7583         effective-target TLS runtime.
7585 2005-12-01  Jakub Jelinek  <jakub@redhat.com>
7587         * testsuite/libgomp.fortran/nestedfn2.f90: New test.
7588         * testsuite/libgomp.c/nestedfn-3.c: New test.
7590 2005-11-30  Jakub Jelinek  <jakub@redhat.com>
7592         PR fortran/25162
7593         * testsuite/libgomp.fortran/pr25162.f: New test.
7595 2005-11-28  Jakub Jelinek  <jakub@redhat.com>
7597         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Fall back to
7598         CLOCK_REALTIME if clock_* (CLOCK_MONOTONIC, &ts) call failed.
7600 2005-11-25  Jakub Jelinek  <jakub@redhat.com>
7602         * alloc.c, barrier.c, critical.c, env.c, error.c, fortran.c, iter.c,
7603         libgomp.h, libgomp_f.h.in, libgomp_g.h, loop.c, mkomp_h.pl, omp.h.in,
7604         omp_lib.f90.in, omp_lib.h.in, ordered.c, parallel.c, sections.c,
7605         single.c, team.c, work.c, config/linux/alpha/futex.h,
7606         config/linux/bar.c, config/linux/bar.h, config/linux/ia64/futex.h,
7607         config/linux/lock.c, config/linux/mutex.c, config/linux/mutex.h,
7608         config/linux/powerpc/futex.h, config/linux/s390/futex.h,
7609         config/linux/sem.c, config/linux/sem.h, config/linux/sparc/futex.h,
7610         config/linux/x86/futex.h, config/posix/bar.c, config/posix/bar.h,
7611         config/posix/lock.c, config/posix/mutex.h, config/posix/proc.c,
7612         config/posix/sem.c, config/posix/sem.h, config/posix/time.c: Update
7613         FSF address.
7615 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
7617         * Makefile.am: Move libgomp_f.h from nodist_include_HEADERS
7618         to nodist_noinst_HEADERS.
7619         * Makefile.in: Rebuilt.
7621         * config/posix/omp-lock.h (omp_nest_lock_t): Change into struct,
7622         add integer count field.
7623         * config/posix/lock.c (omp_destroy_nest_lock): Adjust for
7624         omp_nest_lock_t type change.
7625         (omp_init_nest_lock): Likewise.  Initialize count to 0.
7626         (omp_set_nest_lock): Adjust for omp_nest_lock_t type change.
7627         Increment count.
7628         (omp_unset_nest_lock): Adjust for omp_nest_lock_t type change.
7629         Decrement count.
7630         (omp_test_nest_lock): Adjust for omp_nest_lock_t type change.
7631         Increment count if successful and return the new nesting level.
7632         * config/linux/lock.c (omp_test_nest_lock): Return new nesting level.
7633         * omp_lib.f90.in (omp_test_lock): Fix LOCK argument type.
7634         * testsuite/libgomp.c/lib-1.c: New test.
7635         * testsuite/libgomp.fortran/lib1.f90: New test.
7636         * testsuite/libgomp.fortran/lib2.f: New test.
7637         * testsuite/libgomp.fortran/lib3.f: New test.
7639 2005-11-17  Richard Henderson  <rth@redhat.com>
7641         PR 24845
7642         * Makefile.am (nodist_toolexeclib_HEADERS): New.
7643         * configure.ac (link_gomp): New.  Substitute it.
7644         (AC_CONFIG_FILES): Add libgomp.spec.
7645         * libgomp.spec.in: New file.
7646         * Makefile.in, testsuite/Makefile.in, configure: Rebuild.
7647         * testsuite/lib/libgomp-dg.exp: Add -B${blddir}/ to flags.
7649 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
7651         * testsuite/libgomp.fortran/reduction1.f90: Adjust for
7652         reduction(-:var) behaving the same as reduction(+:var).
7653         * testsuite/libgomp.c/reduction-4.c: New test.
7655 2005-11-15  Uros Bizjak  <uros@kss-loka.si>
7657         * testsuite/libgomp.c/pr24455-1.c, testsuite/libgomp.c/pr24455.c,
7658         testsuite/libgomp.c/copyin-1.c, testsuite/libgomp.c/copyin-2.c,
7659         testsuite/libgomp.c/copyin-3.c,
7660         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
7661         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
7662         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455-1.C,
7663         testsuite/libgomp.c++/pr24455.C,
7664         testsuite/libgomp.fortran/threadprivate1.f90,
7665         testsuite/libgomp.fortran/threadprivate2.f90,
7666         testsuite/libgomp.fortran/threadprivate3.f90,
7667         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
7668         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
7669         testsuite/libgomp.fortran/omp_parse3.f90: Require
7670         effective-target TLS.
7672 2005-11-14  Diego Novillo  <dnovillo@redhat.com>
7674         * HEADER: Remove.
7676 2005-11-13  Jakub Jelinek  <jakub@redhat.com>
7678         PR libgomp/24797
7679         * team.c (initialize_team): Pass NULL rather than free as
7680         pthread_key_create destructor.  Initialize thread specific data
7681         pointer in initial thread to a static local variable rather than
7682         malloced memory.
7684 2005-11-11  Uros Bizjak  <uros@kss-loka.si>
7686         * testsuite/lib/libgomp-dg.exp: Locate libgcc.a and append
7687         its location to ld_library_path.
7689 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
7691         * testsuite/libgomp.c/c.exp: Rename from dg.exp.
7693 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
7695         * testsuite/libgomp.c: Rename from libgomp.dg.
7697 2005-11-09  Diego Novillo  <dnovillo@redhat.com>
7699         * testsuite/libgomp.c++/pr24455.C: Add copyin clause for
7700         threadprivate variable 'i'.
7702 2005-11-09  Jakub Jelinek  <jakub@redhat.com>
7704         * config/linux/s390/futex.h: New file.
7705         * configure.tgt: Use it.
7707         * testsuite/libgomp.fortran/omp_parse4.f90: Move n initialization
7708         before the parallel.
7710 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
7712         PR c++/24734
7713         * testsuite/libgomp.c++/master-1.C: New test.
7715 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
7717         * testsuite/libgomp.dg/copyin-3.c: New test.
7719 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
7721         * testsuite/libgomp.fortran/retval1.f90: New test.
7722         * testsuite/libgomp.fortran/vla7.f90: New test.
7724 2005-11-06  Jakub Jelinek  <jakub@redhat.com>
7726         * testsuite/libgomp.fortran/vla2.f90: New test.
7727         * testsuite/libgomp.fortran/vla3.f90: New test.
7728         * testsuite/libgomp.fortran/vla4.f90: New test.
7729         * testsuite/libgomp.fortran/vla5.f90: New test.
7730         * testsuite/libgomp.fortran/vla6.f90: New test.
7732 2005-11-01  Jakub Jelinek  <jakub@redhat.com>
7734         * config/linux/sparc/futex.h: New file.
7735         * configure.tgt: Use it.
7736         * testsuite/lib/libgomp-dg.exp: Use -mcpu=v9 for sparc testing.
7738         * critical.c: Include stdlib.h.
7739         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Avoid warnings about
7740         ignoring return value.
7741         * configure.ac: Don't put -Wc,-pthread into XCFLAGS until after
7742         LIBGOMP_CHECK_SYNC_BUILTINS check.
7743         * configure: Rebuilt.
7745 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
7747         * testsuite/libgomp.fortran/vla1.f90: New test.
7749 2005-10-31  Richard Henderson  <rth@redhat.com>
7751         * testsuite/libgomp.fortran/character2.f90: Fix race condition
7752         setting 's' in different threads.
7754 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
7756         * libgomp.h (attribute_hidden, ialias): Define.
7757         * config/posix/proc.c (omp_get_num_procs): Add ialias.
7758         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Likewise.
7759         * config/posix/lock.c (omp_init_lock, omp_init_nest_lock,
7760         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
7761         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
7762         omp_test_lock, omp_test_nest_lock): Likewise.
7763         * config/linux/lock.c (omp_init_lock, omp_init_nest_lock,
7764         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
7765         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
7766         omp_test_lock, omp_test_nest_lock): Likewise.
7767         * env.c (omp_set_dynamic, omp_set_nested, omp_set_num_threads,
7768         omp_get_dynamic, omp_get_nested): Likewise.
7769         * parallel.c (omp_get_num_threads, omp_get_max_threads,
7770         omp_get_thread_num, omp_in_parallel): Likewise.
7771         * fortran.c (ialias_redirect): Define.
7772         (omp_init_lock, omp_init_nest_lock, omp_destroy_lock,
7773         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock,
7774         omp_unset_lock, omp_unset_nest_lock, omp_test_lock,
7775         omp_test_nest_lock, omp_set_dynamic, omp_set_nested,
7776         omp_set_num_threads, omp_get_dynamic, omp_get_nested,
7777         omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
7778         omp_get_num_threads, omp_get_thread_num, omp_get_wtick,
7779         omp_get_wtime): Add ialias_redirect.
7781 2005-10-30  Jakub Jelinek  <jakub@redhat.com>
7783         * fortran.c: Include stdlib.h.
7785 2005-10-29  Jakub Jelinek  <jakub@redhat.com>
7787         * Makefile.am (env.o, env.lo): Depend on libgomp_f.h.
7788         * Makefile.in: Regenerated.
7790 2005-10-28  Jakub Jelinek  <jakub@redhat.com>
7792         * mkomp_h.pl: Remove all -Wc, option prefixes in $COMPILE.
7793         * libgomp_f.h.in (omp_check_defines): New function.
7794         * env.c: Include libgomp_f.h.
7795         (initialize_env): Call omp_check_defines.
7797         * testsuite/libgomp.dg/copyin-2.c: New test.
7798         * testsuite/libgomp.c++/copyin-2.C: New test.
7799         * testsuite/libgomp.fortran/threadprivate3.f90: New test.
7801         * testsuite/libgomp.fortran/threadprivate2.f90: New test.
7802         * testsuite/libgomp.fortran/sharing2.f90: New test.
7804         * testsuite/libgomp.dg/copyin-1.c: New test.
7805         * testsuite/libgomp.c++/copyin-1.C: New test.
7807 2005-10-26  Jakub Jelinek  <jakub@redhat.com>
7809         * testsuite/libgomp.fortran/crayptr1.f90: New test.
7811         * testsuite/libgomp.fortran/workshare1.f90: New test.
7813         * libgomp.fortran/appendix-a/a.28.5.f90: Change into compile
7814         only test.
7815         * libgomp.fortran/sharing1.f90: New test.
7817 2005-10-24  Jakub Jelinek  <jakub@redhat.com>
7819         PR c++/24502
7820         * testsuite/libgomp.c++/loop-7.C: New test.
7822         * testsuite/libgomp.dg/nestedfn-2.c: New test.
7824         * testsuite/libgomp.dg/nestedfn-1.c: New test.
7825         * testsuite/libgomp.fortran/reduction6.f90: New test.
7826         * testsuite/libgomp.fortran/nestedfn1.f90: New test.
7828 2005-10-23  Richard Henderson  <rth@redhat.com>
7830         * testsuite/libgomp.c++/ctor-1.C: New.
7831         * testsuite/libgomp.c++/ctor-2.C: New.
7832         * testsuite/libgomp.c++/ctor-3.C: New.
7833         * testsuite/libgomp.c++/ctor-4.C: New.
7834         * testsuite/libgomp.c++/ctor-5.C: New.
7835         * testsuite/libgomp.c++/ctor-6.C: New.
7836         * testsuite/libgomp.c++/ctor-7.C: New.
7837         * testsuite/libgomp.c++/ctor-8.C: New.
7838         * testsuite/libgomp.c++/ctor-9.C: New.
7840 2005-10-21  Diego Novillo  <dnovillo@redhat.com>
7842         PR 24455
7843         * testsuite/libgomp.c++/pr24455-1.C: New test.
7844         * testsuite/libgomp.c++/pr24455.C: New test.
7845         * testsuite/libgomp.dg/pr24455-1.c: New test.
7846         * testsuite/libgomp.dg/pr24455.c: New test.
7848 2005-10-20  Richard Henderson  <rth@redhat.com>
7850         * testsuite/libgomp.c++/loop-6.C: New.
7851         * testsuite/libgomp.dg/loop-3.c: New.
7853 2005-10-20  Jakub Jelinek  <jakub@redhat.com>
7855         * testsuite/libgomp.fortran/jacobi.f: Don't make i and j
7856         explicitly private.
7857         * testsuite/libgomp.fortran/omp_parse1.f90 (test_do): Make i
7858         explicitly shared.
7860 2005-10-19  Diego Novillo  <dnovillo@redhat.com>
7862         * testsuite/libgomp.fortran/jacobi.f: New test.
7864 2005-10-19  Richard Henderson  <rth@redhat.com>
7866         * configure.tgt (i?86-linux): Default to with_arch instead of
7867         CFLAGS.  Add -mtune to match target_cpu.
7868         (x86_64-linux): Tune to i686.
7870         * fortran.c (omp_test_nest_lock_): Fix typo.
7872 2005-10-19  Jakub Jelinek  <jakub@redhat.com>
7874         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
7875         gomp_ordered_sync): Do nothing if team->nthreads == 1.
7876         * testsuite/libgomp.dg/ordered-3.c: New test.
7878         * testsuite/libgomp.dg/appendix-a/a.18.1.c: Remove unconditional abort.
7879         Remove volatile keyword.
7881         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Reorder variables
7882         in COMMON block to avoid warnings on 64-bit targets.
7884 2005-10-18  Diego Novillo  <dnovillo@redhat.com>
7886         * testsuite/libgomp.dg/shared-3.c: New test.
7888 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
7890         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: Removed.
7891         * testsuite/libgomp.fortran/reduction5.f90: New test.
7893 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
7895         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Add -ffixed-form to
7896         dg-options.
7897         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.  Enable
7898         flush loop now that __sync_synchronize has proper memory barrier.
7899         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: Fix a typo.
7900         Add -ffixed-form to dg-options.
7902 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
7904         * testsuite/libgomp.fortran/fortran.exp: Also gather tests
7905         from subdirectories.
7906         * testsuite/libgomp.fortran/appendix-a/a.15.1.f90: New test.
7907         * testsuite/libgomp.fortran/appendix-a/a.16.1.f90: New test.
7908         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: New test.
7909         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: New test.
7910         * testsuite/libgomp.fortran/appendix-a/a.2.1.f90: New test.
7911         * testsuite/libgomp.fortran/appendix-a/a.21.1.f90: New test.
7912         * testsuite/libgomp.fortran/appendix-a/a.22.7.f90: New test.
7913         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: New test.
7914         * testsuite/libgomp.fortran/appendix-a/a.26.1.f90: New test.
7915         * testsuite/libgomp.fortran/appendix-a/a.28.1.f90: New test.
7916         * testsuite/libgomp.fortran/appendix-a/a.28.2.f90: New test.
7917         * testsuite/libgomp.fortran/appendix-a/a.28.3.f90: New test.
7918         * testsuite/libgomp.fortran/appendix-a/a.28.4.f90: New test.
7919         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: New test.
7920         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: New test.
7921         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: New test.
7922         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: New test.
7923         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: New test.
7924         * testsuite/libgomp.fortran/appendix-a/a.33.3.f90: New test.
7925         * testsuite/libgomp.fortran/appendix-a/a.38.1.f90: New test.
7926         * testsuite/libgomp.fortran/appendix-a/a.39.1.f90: New test.
7927         * testsuite/libgomp.fortran/appendix-a/a.4.1.f90: New test.
7928         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: New test.
7929         * testsuite/libgomp.fortran/appendix-a/a.5.1.f90: New test.
7930         * testsuite/libgomp.fortran/appendix-a/a10.1.f90: New test.
7932 2005-10-17  Jakub Jelinek  <jakub@redhat.com>
7934         * testsuite/libgomp.dg/dg.exp: Only unset lang_* if
7935         lang_library_path exists.  Use find instead of glob to gather tests.
7936         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: Removed.
7938 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
7940         * testsuite/libgomp.dg/appendix-a/a.15.1.c: New test.
7941         * testsuite/libgomp.dg/appendix-a/a.16.1.c: New test.
7942         * testsuite/libgomp.dg/appendix-a/a.18.1.c: New test.
7943         * testsuite/libgomp.dg/appendix-a/a.19.1.c: New test.
7944         * testsuite/libgomp.dg/appendix-a/a.2.1.c: New test.
7945         * testsuite/libgomp.dg/appendix-a/a.21.1.c: New test.
7946         * testsuite/libgomp.dg/appendix-a/a.26.1.c: New test.
7947         * testsuite/libgomp.dg/appendix-a/a.29.1.c: New test.
7948         * testsuite/libgomp.dg/appendix-a/a.3.1.c: New test.
7949         * testsuite/libgomp.dg/appendix-a/a.39.1.c: New test.
7950         * testsuite/libgomp.dg/appendix-a/a.4.1.c: New test.
7951         * testsuite/libgomp.dg/appendix-a/a.5.1.c: New test.
7952         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: New file.
7954 2005-10-15  Jakub Jelinek  <jakub@redhat.com>
7956         * testsuite/libgomp.dg/vla-1.c: New test.
7958         * testsuite/libgomp.fortran/reference2.f90: New test.
7960         * testsuite/libgomp.fortran/character2.f90: Remove explicit
7961         declaration of omp_get_thread_num.
7962         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.  Add
7963         use omp_lib.
7965         * testsuite/libgomp.fortran/reduction1.f90: New test.
7966         * testsuite/libgomp.fortran/reduction2.f90: New test.
7967         * testsuite/libgomp.fortran/reduction3.f90: New test.
7968         * testsuite/libgomp.fortran/reduction4.f90: New test.
7970 2005-10-13  Richard Henderson  <rth@redhat.com>
7972         * Makefile.am (libgomp_la_SOURCES): Add bar.c.
7973         * Makefile.in: Regenerate.
7974         * barrier.c (GOMP_barrier): Use gomp_barrier_wait.
7975         * libgomp.h: Include bar.h.
7976         (struct gomp_barrier): Remove.
7977         (struct gomp_team): Add barrier.  Replace master_barrier with
7978         master_release.  Replace threads with ordered_release.
7979         (struct gomp_thread): Replace barrier with release.
7980         * ordered.c (gomp_ordered_first): Update for ordered_release change.
7981         (gomp_ordered_last, gomp_ordered_next, gomp_ordered_static_init,
7982         gomp_ordered_static_next, gomp_ordered_sync): Likewise.
7983         * single.c (GOMP_single_copy_start): Use gomp_barrier_wait.
7984         (GOMP_single_copy_end): Likewise.
7985         * team.c (gomp_threads_dock): New.
7986         (gomp_barrier_init, gomp_barrier_destroy): Remove.
7987         (gomp_thread_start): Use gomp_barrier_wait.
7988         (new_team, free_team): Update for gomp_team changes.
7989         (gomp_team_start): Use gomp_barrier_wait and gomp_barrier_reinit.
7990         (gomp_team_end): Use gomp_barrier_wait.
7991         (initialize_team): Update for gomp_thread changes.
7992         * work.c (gomp_work_share_end): Use gomp_barrier_wait_start.
7993         (gomp_work_share_end_nowait): Use atomic ops when available.
7994         * config/linux/bar.c, config/linux/bar.h: New files.
7995         * config/posix/bar.c, config/posix/bar.h: New files.
7997 2005-10-13  Jakub Jelinek  <jakub@redhat.com>
7999         * single.c (GOMP_single_copy_end): Don't segfault if team is NULL.
8000         * testsuite/libgomp.dg/single-2.c: New test.
8002         * testsuite/libgomp.dg/dg.exp (lang_library_path, lang_test_file,
8003         lang_link_flags): Unset, so that they aren't inherited from previously
8004         sourced *.exp.
8006         * testsuite/libgomp.fortran/threadprivate1.f90: New test.
8008 2005-10-12  Richard Henderson  <rth@redhat.com>
8010         * testsuite/lib/libgomp-dg.exp: Set blddir at toplevel.
8011         (libgomp_init): Use lang_test_file, lang_library_path, and
8012         lang_link_flags, set by the subdirectory files.  Add -fopenmp here.
8014         * testsuite/libgomp.fortran/fortran.exp (lang_library_path): New.
8015         (lang_test_file, lang_link_flags): New.
8016         (DEFAULT_FFLAGS, ALWAYS_CFLAGS, multilibs, blddir): Remove.
8018         * testsuite/libgomp.c++/c++.exp, testsuite/libgomp.c++/loop-1.C,
8019         testsuite/libgomp.c++/loop-2.C, testsuite/libgomp.c++/loop-3.C,
8020         testsuite/libgomp.c++/loop-4.C, testsuite/libgomp.c++/nested-1.C,
8021         testsuite/libgomp.c++/parallel-1.C,
8022         testsuite/libgomp.c++/reduction-1.C,
8023         testsuite/libgomp.c++/reduction-2.C,
8024         testsuite/libgomp.c++/reduction-3.C,
8025         testsuite/libgomp.c++/sections-1.C, testsuite/libgomp.c++/shared-1.C,
8026         testsuite/libgomp.c++/shared-2.C, testsuite/libgomp.c++/single-1.C,
8027         testsuite/libgomp.c++/single-2.C, testsuite/libgomp.c++/single-3.C:
8028         New files, largely cribbed from the C testsuite.
8030 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
8032         * testsuite/libgomp.fortran/character1.f90: New test.
8033         * testsuite/libgomp.fortran/character2.f90: New test.
8035         * testsuite/libgomp.dg/nested-1.c: New test.
8036         * testsuite/libgomp.dg/nested-2.c: New test.
8037         * testsuite/libgomp.fortran/do1.f90: New test.
8038         * testsuite/libgomp.fortran/do2.f90: New test.
8040         * testsuite/libgomp.fortran/reference1.f90: New test.
8042 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
8044         * testsuite/libgomp.dg/reduction-1.c: New test.
8045         * testsuite/libgomp.dg/reduction-2.c: New test.
8046         * testsuite/libgomp.dg/reduction-3.c: New test.
8048 2005-10-10  Jakub Jelinek  <jakub@redhat.com>
8050         * testsuite/libgomp.dg/atomic-1.c: New test.
8051         * testsuite/libgomp.dg/atomic-2.c: New test.
8053 2005-10-09  Richard Henderson  <rth@redhat.com>
8055         * critical.c (atomic_lock): New.
8056         (initialize_critical): Initialize it.
8057         (GOMP_atomic_start, GOMP_atomic_end): New.
8058         * libgomp.map: Export them.
8059         * libgomp_g.h: Declare them.
8061         * testsuite/libgomp.dg/atomic-10.c: Move from gcc testsuite.
8063 2005-10-02  Richard Henderson  <rth@redhat.com>
8065         * configure.ac: Move save_CFLAGS hack earlier.  Append -Wall/-Werror
8066         to XCFLAGS instead of CFLAGS.
8068 2005-09-30  Richard Henderson  <rth@redhat.com>
8070         * configure.ac: Determine whether -pthread or -lpthread is needed.
8071         * Makefile.am (libgomp_la_LDFLAGS): Remove explicit -lpthread.
8072         * Makefine.in, configure: Rebuild.
8074 2005-09-28  Richard Henderson  <rth@redhat.com>
8076         * testsuite/libgomp.dg/omp-loop03.c: Fix return code.
8077         * testsuite/libgomp.dg/omp-single-3.c: New test.
8079 2005-09-28  Diego Novillo  <dnovillo@redhat.com>
8081         * testsuite/libgomp.dg/omp-single-2.c: New test.
8082         * testsuite/libgomp.dg/shared-2.c: Fix return code.
8084 2005-09-27  Richard Henderson  <rth@redhat.com>
8086         * testsuite/libgomp.dg/omp-loop03.c: Add initial barrier.
8087         * testsuite/libgomp.dg/omp-parallel-for.c: Specify static schedule.
8089 2005-09-27  Jakub Jelinek  <jakub@redhat.com>
8091         * testsuite/libgomp.dg/omp-loop03.c: New test.
8093 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
8095         * testsuite/libgomp.dg/omp-parallel-for.c: New test.
8097 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
8099         * testsuite/libgomp.dg/omp-single-1.c: New test.
8100         * testsuite/libgomp.dg/shared-1.c: Return 0.
8101         Add prototype for abort.
8102         * testsuite/libgomp.dg/shared-2.c: Likewise.
8104 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
8106         * testsuite/libgomp.fortran/omp_parse3.f90: Fix non-conforming
8107         constructs.
8109 2005-09-26  Diego Novillo  <dnovillo@redhat.com>
8111         * testsuite/libgomp.dg/shared-1.c: New test.
8112         * testsuite/libgomp.dg/shared-2.c: New test.
8114 2005-09-24  Richard Henderson  <rth@redhat.com>
8116         * testsuite/libgomp.dg/omp_workshare3.c: Mark dg-error.
8118 2005-09-24  Richard Henderson  <rth@redhat.com>
8120         * iter.c (gomp_iter_static_next): Round up when computing number
8121         of iterations.  Don't bother distributing a remainder equally.
8123         * testsuite/libgomp.dg/omp-loop01.c (main1): Rename from main.
8124         Don't call srand.  Zero b before testing.
8125         (main): New.
8127 2005-09-24  Jakub Jelinek  <jakub@redhat.com>
8129         * testsuite/libgomp.fortran/omp_atomic1.f90: New test.
8130         * testsuite/libgomp.fortran/omp_atomic2.f90: New test.
8132 2005-09-23  Jakub Jelinek  <jakub@redhat.com>
8134         * testsuite/libgomp.fortran/omp_parse1.f90: Add a test for !$omp do
8135         without !$omp end do, followed immediately by subroutine end.
8137 2005-09-23  Diego Novillo  <dnovillo@redhat.com>
8139         * testsuite/libgomp.dg/omp-parallel-if.c: New test.
8141 2005-09-22  Richard Henderson  <rth@redhat.com>
8143         * critical.c (GOMP_critical_name_start): Change argument to void**.
8144         Reuse the pointer space if the mutex fits.
8145         (GOMP_critical_name_end): Likewise.
8146         (initialize_critical): Don't define if GOMP_MUTEX_INIT_0.
8147         * libgomp_g.h (GOMP_critical_name_start): Update decl.
8148         (GOMP_critical_name_end): Likewise.
8149         * config/linux/mutex.h (GOMP_MUTEX_INIT_0): New.
8150         * config/posix/mutex.h (GOMP_MUTEX_INIT_0): New.
8152 2005-09-20  Richard Henderson  <rth@redhat.com>
8154         * critical.c (GOMP_critical_name_start, GOMP_critical_name_end): New.
8155         (create_lock_lock): New.
8156         (initialize_critical): Initialize it.
8157         * libgomp.map (GOMP_critical_name_start, GOMP_critical_name_end): New.
8158         * libgomp_g.h (GOMP_ordered_start, GOMP_ordered_end): Declare.
8160 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
8162         * testsuite/libgom.dg/omp-loop01.c: Include stdio.h.
8164 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
8166         * testsuite/libgomp.dg/omp-loop01.c: New test.
8167         * testsuite/libgomp.dg/omp-loop02.c: New test.
8169 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
8171         * configure.ac (AC_PROG_FC): Add.
8172         (USE_FORTRAN): New automake conditional.
8173         * configure: Rebuilt.
8174         * Makefile.am (libgomp_la_SOURCES): Add fortran.c.
8175         (nodist_include_HEADERS): Add omp_lib.h, omp_lib.f90 and libgomp_f.h.
8176         If USE_FORTRAN, add also omp_lib.mod and omp_lib_kinds.mod.
8177         Add rules to build them.
8178         * Makefile.in: Rebuilt.
8179         * mkomp_h.pl: Compute and replace also OMP_LOCK_KIND and
8180         OMP_NEST_LOCK_KIND.
8181         * libgomp.map: Add Fortran wrappers.
8182         * libgomp_f.h.in: New file.
8183         * omp_lib.h.in: New file.
8184         * omp_lib.f90.in: New file.
8185         * fortran.c: New file.
8186         * testsuite/lib/libgomp-dg.exp: Load a few more .exp files.
8187         Append libgfortran directory to LD_LIBRARY_PATH if it exists.
8188         Add -Lpath_to_libgfortran and -lgfortran -lgfortranbegin if
8189         libgfortran has been built.
8190         * testsuite/libgomp.fortran/fortran.exp: New file.
8191         * testsuite/libgomp.fortran/omp_cond1.f: New test.
8192         * testsuite/libgomp.fortran/omp_cond2.f: New test.
8193         * testsuite/libgomp.fortran/omp_cond3.F90: New test.
8194         * testsuite/libgomp.fortran/omp_cond4.F90: New test.
8195         * testsuite/libgomp.fortran/omp_hello.f: New test.
8196         * testsuite/libgomp.fortran/omp_orphan.f: New test.
8197         * testsuite/libgomp.fortran/omp_parse1.f90: New test.
8198         * testsuite/libgomp.fortran/omp_parse2.f90: New test.
8199         * testsuite/libgomp.fortran/omp_parse3.f90: New test.
8200         * testsuite/libgomp.fortran/omp_parse4.f90: New test.
8201         * testsuite/libgomp.fortran/omp_reduction.f: New test.
8202         * testsuite/libgomp.fortran/omp_workshare1.f: New test.
8203         * testsuite/libgomp.fortran/omp_workshare2.f: New test.
8205 2005-08-30  Richard Henderson  <rth@redhat.com>
8207         * loop.c (GOMP_loop_static_start): Provide fallback wrapper
8208         function for when aliases are not usable.
8209         (GOMP_loop_dynamic_start, GOMP_loop_guided_start,
8210         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
8211         GOMP_loop_ordered_guided_start, GOMP_loop_static_next,
8212         GOMP_loop_dynamic_next, GOMP_loop_guided_next,
8213         GOMP_loop_ordered_static_next, GOMP_loop_ordered_dynamic_next,
8214         GOMP_loop_ordered_guided_next): Likewise.
8215         * ordered.c (GOMP_ordered_start): Likewise.
8217 2005-08-01  Diego Novillo  <dnovillo@redhat.com>
8219         * testsuite/libgomp.dg/dg.exp: Use -O2 for now.
8220         * testsuite/libgomp.dg/omp_hello.c: Fix return code
8221         * testsuite/libgomp.dg/omp_matvec.c: Likewise.
8222         * testsuite/libgomp.dg/omp_orphan.c: Likewise
8223         * testsuite/libgomp.dg/omp_reduction.c: Likewise
8224         * testsuite/libgomp.dg/omp_workshare1.c: Likewise
8225         * testsuite/libgomp.dg/omp_workshare2.c: Likewise
8226         * testsuite/libgomp.dg/omp_workshare3.c: Likewise
8227         * testsuite/libgomp.dg/omp_workshare4.c: Likewise
8229 2005-07-07  Eric Christopher  <echristo@redhat.com>
8230             Diego Novillo  <dnovillo@redhat.com>
8232         * testsuite/libgomp.dg/dg.exp: Add -fopenmp to DEFAULT_CFLAGS.
8233         * testsuite/libgomp.dg/omp_hello.c: Add standard includes, fix
8234         up code.
8235         * testsuite/libgomp.dg/omp_matvec.c: Ditto.
8236         * testsuite/libgomp.dg/omp_orphan.c: Ditto.
8237         * testsuite/libgomp.dg/omp_reduction.c: Ditto.
8238         * testsuite/libgomp.dg/omp_workshare1.c: Ditto.
8239         * testsuite/libgomp.dg/omp_workshare2.c: Ditto.
8240         * testsuite/libgomp.dg/omp_workshare3.c: Ditto.
8241         * testsuite/libgomp.dg/omp_workshare4.c: Ditto.
8243 2005-06-13  Diego Novillo  <dnovillo@redhat.com>
8245         * TOPLEVEL.patch: Remove.
8247 2005-05-16  Richard Henderson  <rth@redhat.com>
8249         * configure.ac: Test for clock_gettime.
8250         * config.h.in, configure: Rebuild.
8251         * config/posix/time.c: Use recommended TIME_WITH_SYS_TIME pattern.
8252         (omp_get_wtime): Use clock_gettime if available.
8253         (omp_get_wtick): Use clock_getres if available.
8255 2005-05-11  Richard Henderson  <rth@redhat.com>
8257         * config/linux/ia64/futex.h: New file.
8258         * configure.tgt: Use it.
8260         * team.c (gomp_barrier_init, gomp_barrier_destroy): Mark inline.
8262 2005-05-07  Richard Henderson  <rth@redhat.com>
8264         * config/linux/powerpc/futex.h: New file.
8265         * configure.tgt: Use it.
8267         * config/linux/i486/futex.h: Merge ...
8268         * config/linux/x86_64/futex.h: ... into ...
8269         * config/linux/x86/futex.h: ... here.
8270         * configure.tgt: Update to match.
8272 2005-05-06  Richard Henderson  <rth@redhat.com>
8274         * config/linux/alpha/futex.h: Conditionally define SYS_futex.
8275         * config/linux/i486/futex.h: Likewise.
8276         * config/linux/x86_64/futex.h: Likewise.
8278         * config/linux/lock.c: New file.
8279         * config/linux/omp-lock.h: New file.
8281         * critical.c, env.h: Don't include omp.h
8282         * config/posix/lock.c: Include libgomp.h instead of omp.h.
8283         * config/posix/time.c: Likewise.
8284         * config/posix/omp-lock.h: New file.
8285         * libgomp.h: Include omp-lock.h and omp.h.
8286         * Makefile.am (nodist_include_HEADERS): New.
8287         (omp.h): New rule.
8288         * configure.ac (PERL): New.
8289         * mkomp_h.pl: New file.
8290         * omp.h.in: Rename from omp.h; replace omp_lock_t and omp_nest_lock_t
8291         with templates.
8292         * Makefile.in, configure, testsuite/Makefile.in: Rebuild.
8294         * testsuite/lib/libgomp-dg.exp (libgomp_init): Add include into
8295         build directory.  Re-add -march=i486 hack.
8297         * testsuite/lib/libgomp-dg.exp (libgomp_compile_flags): Remove.
8298         (libgomp_link_flags): Remove.
8299         (libgomp_initialized): Remove.
8300         (libgomp_init): Don't protect from reinitialization.  Copy code
8301         from libstdc++ for getting the multilib set correctly.
8303 2005-05-05  Richard Henderson  <rth@redhat.com>
8305         * config/linux/alpha/futex.h: New file.
8306         * configure.tgt (alpha*-*-linux*): Use it.
8308         * config/posix/mutex.c: New file.
8309         * config/posix/sem.c: Use libgomp.h.
8311         * configure.tgt (x86_64-linux): Also test CC for -m32.
8312         * config/linux/x86_64/futex.h (futex_wait): Fix r10 usage.
8314         * testsuite/lib/libgomp-dg.exp (libgomp_link_flags): Add /
8315         after $gccpath.
8317         * Makefile.am (SUBDIRS): New.
8318         (libgomp_la_LDFLAGS): Add -lpthread.
8319         * configure.ac (AM_INIT_AUTOMAKE): Enable dependencies.
8320         * Makefile.in, aclocal.m4, config.h.in, configure: Rebuild.
8322         * libgomp_g.h: New file.
8323         * libgomp.h: Split out all public declarations to libgomp_g.h.
8324         Use pragma GCC visibility instead of ATTRIBUTE_HIDDEN.
8325         * config/linux/mutex.h: Remove ATTRIBUTE_HIDDEN.
8326         * config/linux/sem.h: Likewise.
8327         * config/posix/sem.h: Likewise.
8329         * Makefile.am (AM_LDFLAGS): New.
8330         (libgomp_version_script): Split out from ...
8331         (libgomp_la_LDFLAGS): ... here.
8332         (libgomp_version_info): New.
8333         * acinclude.m4 (LIBGOMP_CHECK_TLS): Use LIBGOMP_ENABLE.
8334         (LIBGOMP_ENABLE): New.
8335         (LIBGOMP_CHECK_LINKER_FEATURES): New.
8336         (LIBGOMP_ENABLE_SYMVERS): New.
8337         * configure.ac (AC_INIT): Version 1.0.
8338         (enable-version-specific-runtime-libs): Use LIBGOMP_ENABLE.
8339         (enable-linux-futex): Likewise.  Rename from enable-futex.
8340         (libtool_VERSION): New.
8341         (LIBGOMP_ENABLE_SYMVERS): Use it.
8342         * configure.tgt: Check with_gnu_ld wrt have_tls optimizations.
8343         * Makefile.in, aclocal.m4, configure: Rebuild.
8345         * config/linux/mutex.c: Include libgomp.h instead of mutex.h.
8346         (gomp_mutex_unlock_slow): Fix typo.
8347         * config/linux/sem.c: Similarly.
8348         (gomp_sem_post_slow): Fix typo.
8349         * config/linux/sem.h (gomp_sem_post_slow): Fix typo.
8350         * config/linux/i486/futex.h: Remove USE_LINUX_SYSENTER code.
8351         [__PIC__] (sys_futex0): Don't use tmp output in asm.
8353         * Makefile.am (AM_CFLAGS): Expand with XCFLAGS.
8354         (libgomp_la_LDFLAGS): Add top_srcdir to path.
8355         * acinclude.m4: Copy libtool.m4 stuff from libgfortran.
8356         * configure.ac: Check for getloadavg.  Substitute XCFLAGS and
8357         XLDFLAGS.  Add XCFLAGS to CFLAGS around LIBGOMP_CHECK_SYNC_BUILTINS.
8358         * configure.tgt: Set XCFLAGS and XLDFLAGS instead of CFLAGS and
8359         LDFLAGS.  Pull enable_futex check to top-level.
8360         * libgomp.h: Fix sem.h and mutex.h includes.  Define ATTRIBUTE_HIDDEN.
8361         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
8363         First attempt at real configury.
8364         * Makefile, config.h: Remove file.
8365         * Makefile.am, Makefile.in: New file.
8366         * acinclude.m4 aclocal.m4: New file.
8367         * configure.ac, configure.tgt, configure: New file.
8369         * config/posix/lock.c: Rename from sys-lock.c.
8370         * config/posix/mutex.h: Rename from sys-mutex.h.
8371         * config/posix/sem.c: Rename from sys-sem.c.
8372         * config/posix/sem.h: Rename from sys-sem.h.
8373         * config/posix/proc.c: Rename from sys-proc.c.
8374         * config/posix/time.c: Rename from sys-proc.c.
8376         * config/linux/mutex.c: New file.
8377         * config/linux/mutex.h: New file.
8378         * config/linux/sem.c: New file.
8379         * config/linux/sem.h: New file.
8380         * config/linux/i486/futex.h: New file.
8381         * config/linux/x86_64/futex.h: New file.
8383 2005-05-04  Richard Henderson  <rth@redhat.com>
8385         * iter.c (gomp_iter_dynamic_next, gomp_iter_guided_next): New.
8386         * libgomp.h: Declare them.
8387         * loop.c (gomp_loop_dynamic_start, gomp_loop_guided_start,
8388         gomp_loop_dynamic_next, gomp_loop_guided_next): Use them.
8390 2005-05-04  Richard Henderson  <rth@redhat.com>
8392         * libgomp-1 code drop
8394 2005-05-04  Richard Henderson  <rth@redhat.com>
8396         * iter.c (gomp_iter_static_next): Return tri-state on 0.
8397         * ordered.c (gomp_ordered_static_next): Remove not_last argument.
8398         * libgomp.h (struct gomp_team_state): Make static_trip unsigned.
8399         (gomp_iter_static_next): Update.
8400         (gomp_ordered_static_next): Update.
8401         * loop.c (gomp_loop_static_start): Update for gomp_iter_static_next.
8402         (gomp_loop_ordered_static_start): Likewise.  Exit early for a
8403         totally empty range.
8404         (gomp_loop_ordered_static_next): Refine test for calling
8405         gomp_ordered_static_next.
8406         * testsuite/ordered-1.c: Add case for more threads than iterations.
8408         * iter.c (gomp_iter_runtime_next_locked): Remove.
8409         * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start,
8410         gomp_loop_guided_start, gomp_loop_ordered_static_start,
8411         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
8412         gomp_loop_static_next, gomp_loop_dynamic_next, gomp_loop_guided_next,
8413         gomp_loop_ordered_static_next, gomp_loop_ordered_dynamic_next,
8414         gomp_loop_ordered_guided_next): Downcase name, make static, add
8415         an external alias with the old name.
8416         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
8417         GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Use a
8418         switch and call one of the above static functions.
8419         * libgomp.h: Update.
8421         * work.c (gomp_work_share_start): Lock the mutex for !first too.
8422         * loop.c (GOMP_loop_static_start, GOMP_loop_dynamic_start,
8423         GOMP_loop_guided_start, GOMP_loop_runtime_start,
8424         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
8425         GOMP_loop_ordered_guided_start): Update to match.
8426         * sections.c (GOMP_sections_start): Likewise.
8427         * single.c (GOMP_single_start, GOMP_single_copy_start): Likewise.
8429         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
8430         gomp_ordered_static_init, gomp_ordered_static_next): Rename s/_loop//.
8431         Use bounds check instead of modulus.
8432         (gomp_ordered_sync): Split out of GOMP_ordered_start.
8433         (gomp_ordered_last): Don't sync with ordered_owner here.
8434         (gomp_ordered_next): Likewise.
8435         (gomp_ordered_static_loop_next): Likewise.
8436         * loop.c, libgomp.h: Update to match.
8438         * libgomp.h (GOMP_barrier): Declare.
8440         * testsuite/barrier-1.c: New file.
8441         * testsuite/critical-1.c: New file.
8442         * testsuite/ordered-2.c: New file.
8443         * testsuite/ordered-1.c: New file.
8444         * testsuite/sections-1.c: New file.
8445         * testsuite/single-1.c: New file.
8446         * testsuite/Makefile (TESTS): Add them.
8448 2005-05-04  Richard Henderson  <rth@redhat.com>
8450         * libgomp.h (struct gomp_work_share): Add ordered_owner.
8451         * loop.c (GOMP_loop_static_start): If not the startup thread,
8452         acquire the mutex to wait for initialization complete.
8453         (GOMP_loop_ordered_static_start): Likewise.
8454         (GOMP_loop_ordered_runtime_start): Likewise.
8455         (GOMP_loop_ordered_static_first): Remove.
8456         (GOMP_loop_ordered_dynamic_first): Remove.
8457         (GOMP_loop_ordered_guided_first): Remove.
8458         (GOMP_loop_ordered_runtime_first): Remove.
8459         * ordered.c (gomp_ordered_loop_first): Post to own release when
8460         we're the first thread.
8461         (gomp_ordered_loop_last): Wait on release if not owner.
8462         (gomp_ordered_loop_next): Likewise.
8463         (gomp_ordered_static_loop_init): New.
8464         (gomp_ordered_static_loop_next): Use ordered_owner.
8465         (GOMP_ordered_start): Likewise.
8466         * work.c (gomp_new_work_share): Initialize ordered_owner.
8468 2005-05-03  Richard Henderson  <rth@redhat.com>
8470         * Makefile (OPT): New.
8471         (CFLAGS): Use it.
8473         * loop.c (GOMP_loop_end, GOMP_loop_end_nowait): New.
8474         * sections.c (GOMP_sections_end, GOMP_sections_end_nowait): New.
8475         * libgomp.h, libgomp.map, NOTES: Update to match.
8477         * team.c (struct gomp_thread_start_data): Remove ts, fn, data.
8478         Add initialized and thr members.
8479         (gomp_thread_start): Pause when initially spawned to wait for
8480         the whole team to be created.
8481         (gomp_team_start): Release team members at the end.
8483         * testsuite/loop-1.c (N): New.  Use it instead of hardcoded 100.
8484         (f_foo_1): Use GOMP_loop_end.
8485         (f_foo_2): Use GOMP_loop_end_nowait.
8487         * testsuite/loop-2.c: New file.
8488         * testsuite/Makefile (TESTS): Add it.
8490 2005-05-03  Richard Henderson  <rth@redhat.com>
8492         * iter.c (gomp_iter_static_next): Fix overflow check typo.
8493         (gomp_iter_dynamic_next_locked): Fix overflow check thinko.
8494         * team.c (new_team): Initialize oldest_live_gen to 1 if no
8495         initial work_share.
8497         * testsuite/Makefile: New file.
8498         * testsuite/loop-1.c: New file.
8500 2005-05-03  Richard Henderson  <rth@redhat.com>
8502         Initial implementation and checkin.
8504 Copyright (C) 2005-2017 Free Software Foundation, Inc.
8506 Copying and distribution of this file, with or without modification,
8507 are permitted in any medium without royalty provided the copyright
8508 notice and this notice are preserved.