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