4686bf50f23d0c9c63db07057fdfbfa5713f3bc8
[platform/upstream/gcc.git] / libgomp / ChangeLog
1 2021-08-23  Thomas Schwinge  <thomas@codesourcery.com>
2             Jakub Jelinek  <jakub@redhat.com>
3
4         * testsuite/libgomp.c/address-space-1.c: New file.
5
6 2021-08-23  Thomas Schwinge  <thomas@codesourcery.com>
7
8         * testsuite/lib/libgomp.exp
9         (check_effective_target_offload_target_intelmic): Remove 'proc'.
10         (check_effective_target_offload_device_intel_mic): New 'proc'.
11         * testsuite/libgomp.c-c++-common/on_device_arch.h
12         (device_arch_intel_mic, on_device_arch_intel_mic): New.
13         * testsuite/libgomp.c-c++-common/target-45.c: Use that for
14         'dg-xfail-run-if'.
15         * testsuite/libgomp.fortran/target10.f90: Likewise.
16
17 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
18
19         * testsuite/libgomp.fortran/taskloop-4-a.f90: New test.
20         * testsuite/libgomp.fortran/taskloop-4.f90: New test.
21         * testsuite/libgomp.fortran/taskloop-5-a.f90: New test.
22         * testsuite/libgomp.fortran/taskloop-5.f90: New test.
23
24 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
25
26         * taskloop.c (GOMP_taskloop): Handle GOMP_TASK_FLAG_STRICT.
27         * testsuite/libgomp.c-c++-common/taskloop-4.c (main): Fix up comment.
28         * testsuite/libgomp.c-c++-common/taskloop-5.c: New test.
29
30 2021-08-22  Thomas Schwinge  <thomas@codesourcery.com>
31
32         * config/nvptx/error.c (fwrite, exit): Override, too.
33         * testsuite/libgomp.c-c++-common/error-1.c: Add a minimum amount
34         of offloading testing.
35         * testsuite/libgomp.fortran/error-1.f90: Likewise.
36
37 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
38
39         * testsuite/libgomp.fortran/error-1.f90: New test.
40
41 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
42
43         * libgomp.map (GOMP_5.1): Add GOMP_error and GOMP_warning.
44         * libgomp_g.h (GOMP_warning, GOMP_error): Declare.
45         * error.c (GOMP_warning, GOMP_error): New functions.
46         * testsuite/libgomp.c-c++-common/error-1.c: New test.
47
48 2021-08-18  Tobias Burnus  <tobias@codesourcery.com>
49
50         * omp_lib.f90.in (omp_alloc, omp_free, omp_target_alloc,
51         omp_target_free. omp_target_is_present, omp_target_memcpy,
52         omp_target_memcpy_rect, omp_target_associate_ptr,
53         omp_target_disassociate_ptr): Add interface.
54         * omp_lib.h.in (omp_alloc, omp_free, omp_target_alloc,
55         omp_target_free. omp_target_is_present, omp_target_memcpy,
56         omp_target_memcpy_rect, omp_target_associate_ptr,
57         omp_target_disassociate_ptr): Add interface.
58         * testsuite/libgomp.fortran/alloc-1.F90: Remove local
59         interface block for omp_alloc + omp_free.
60         * testsuite/libgomp.fortran/alloc-4.f90: Likewise.
61         * testsuite/libgomp.fortran/refcount-1.f90: New test.
62         * testsuite/libgomp.fortran/target-12.f90: New test.
63
64 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
65
66         * testsuite/libgomp.c-c++-common/nothing-1.c: New test.
67
68 2021-08-17  Tobias Burnus  <tobias@codesourcery.com>
69
70         * testsuite/libgomp.fortran/scope-1.f90: New test.
71         * testsuite/libgomp.fortran/task-reduction-16.f90: New test.
72
73 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
74
75         * Makefile.am (libgomp_la_SOURCES): Add scope.c
76         * Makefile.in: Regenerated.
77         * libgomp_g.h (GOMP_scope_start): Declare.
78         * libgomp.map: Add GOMP_scope_start@@GOMP_5.1.
79         * scope.c: New file.
80         * testsuite/libgomp.c-c++-common/scope-1.c: New test.
81         * testsuite/libgomp.c-c++-common/task-reduction-16.c: New test.
82
83 2021-08-16  Thomas Schwinge  <thomas@codesourcery.com>
84
85         * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: Address
86         '?:' issues.
87
88 2021-08-16  Tobias Burnus  <tobias@codesourcery.com>
89
90         * testsuite/libgomp.fortran/masked-1.f90: New test.
91
92 2021-08-13  Thomas Schwinge  <thomas@codesourcery.com>
93
94         * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: Adjust.
95
96 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
97
98         * testsuite/libgomp.c-c++-common/masked-1.c: New test.
99
100 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
101
102         * env.c (parse_bind_var): Accept 'primary' as alias for
103         'master'.
104         (omp_display_env): Add TODO comment to
105         change 'master' to 'primary' in proc_bind for OpenMP 5.1.
106         * libgomp.texi: Change 'master thread' to 'primary thread'
107         in line with OpenMP 5.1.
108         (omp_get_proc_bind): Add omp_proc_bind_primary and note that
109         omp_proc_bind_master is an alias of it.
110         (OMP_PROC_BIND): Mention 'PRIMARY'.
111         * omp.h.in (__GOMP_DEPRECATED_5_1): Define.
112         (omp_proc_bind_primary): Add.
113         (omp_proc_bind_master): Deprecate for OpenMP 5.1.
114         * omp_lib.f90.in (omp_proc_bind_primary): Add.
115         (omp_proc_bind_master): Deprecate for OpenMP 5.1.
116         * omp_lib.h.in (omp_proc_bind_primary): Add.
117         * testsuite/libgomp.c/affinity-1.c: Check that
118         'primary' works and is identical to 'master'.
119
120 2021-08-09  Julian Brown  <julian@codesourcery.com>
121             Kwok Cheung Yeung  <kcy@codesourcery.com>
122             Thomas Schwinge  <thomas@codesourcery.com>
123
124         * plugin/plugin-gcn.c (gcn_exec): Change default number of workers to
125         16.
126         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c
127         [acc_device_radeon]: Update.
128         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c
129         [ACC_DEVICE_TYPE_radeon]: Likewise.
130         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
131         [acc_device_radeon]: Likewise.
132         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c
133         [ACC_DEVICE_TYPE_radeon]: Likewise.
134         * testsuite/libgomp.oacc-fortran/optional-reduction.f90: XFAIL for
135         'openacc_radeon_accel_selected' and '-O0'.
136         * testsuite/libgomp.oacc-fortran/reduction-7.f90: Likewise.
137
138 2021-08-05  Chung-Lin Tang  <cltang@codesourcery.com>
139
140         * icv-device.c (omp_get_device_num): New API function, host side.
141         * fortran.c (omp_get_device_num_): New interface function.
142         * libgomp-plugin.h (GOMP_DEVICE_NUM_VAR): Define macro symbol.
143         * libgomp.map (OMP_5.0.2): New version space with omp_get_device_num,
144         omp_get_device_num_.
145         * libgomp.texi (omp_get_device_num): Add documentation for new API
146         function.
147         * omp.h.in (omp_get_device_num): Add declaration.
148         * omp_lib.f90.in (omp_get_device_num): Likewise.
149         * omp_lib.h.in (omp_get_device_num): Likewise.
150         * target.c (gomp_load_image_to_device): If additional entry for device
151         number exists at end of returned entries from 'load_image_func' hook,
152         copy the assigned device number over to the device variable.
153         * config/gcn/icv-device.c (GOMP_DEVICE_NUM_VAR): Define static global.
154         (omp_get_device_num): New API function, device side.
155         * plugin/plugin-gcn.c ("symcat.h"): Add include.
156         (GOMP_OFFLOAD_load_image): Add addresses of device GOMP_DEVICE_NUM_VAR
157         at end of returned 'target_table' entries.
158         * config/nvptx/icv-device.c (GOMP_DEVICE_NUM_VAR): Define static global.
159         (omp_get_device_num): New API function, device side.
160         * plugin/plugin-nvptx.c ("symcat.h"): Add include.
161         (GOMP_OFFLOAD_load_image): Add addresses of device GOMP_DEVICE_NUM_VAR
162         at end of returned 'target_table' entries.
163         * testsuite/lib/libgomp.exp
164         (check_effective_target_offload_target_intelmic): New function for
165         testing for intelmic offloading.
166         * testsuite/libgomp.c-c++-common/target-45.c: New test.
167         * testsuite/libgomp.fortran/target10.f90: New test.
168
169 2021-07-30  Thomas Schwinge  <thomas@codesourcery.com>
170             Ulrich Drepper  <drepper@redhat.com>
171
172         * fortran.c (omp_display_env_, omp_display_env_8_): Only
173         '#ifndef LIBGOMP_OFFLOADED_ONLY'.
174
175 2021-07-29  Thomas Schwinge  <thomas@codesourcery.com>
176             Julian Brown  <julian@codesourcery.com>
177             Kwok Cheung Yeung  <kcy@codesourcery.com>
178
179         * testsuite/libgomp.oacc-c-c++-common/pr85486-2.c:
180         's%oaccdevlow%oaccloops%g'.
181         * testsuite/libgomp.oacc-c-c++-common/pr85486-3.c: Likewise.
182         * testsuite/libgomp.oacc-c-c++-common/pr85486.c: Likewise.
183         * testsuite/libgomp.oacc-c-c++-common/routine-nohost-1.c:
184         Likewise.
185         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c:
186         Likewise.
187         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c:
188         Likewise.
189         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c:
190         Likewise.
191         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c:
192         Likewise.
193         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c:
194         Likewise.
195         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c:
196         Likewise.
197         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c:
198         Likewise.
199         * testsuite/libgomp.oacc-fortran/routine-nohost-1.f90: Likewise.
200
201 2021-07-29  Aldy Hernandez  <aldyh@redhat.com>
202
203         * testsuite/libgomp.graphite/force-parallel-4.c: Adjust for
204         threader.
205         * testsuite/libgomp.graphite/force-parallel-8.c: Same.
206
207 2021-07-27  Ulrich Drepper  <drepper@gmail.com>
208
209         * env.c (wait_policy, stacksize): New static variables,
210         move out of handle_omp_display_env.
211         (omp_display_env): New function.  The meat of the old
212         handle_omp_display_env function.
213         (handle_omp_display_env): Change to not take parameters
214         and instead use the global variables.  Only perform
215         parsing, defer to omp_display_env for the implementation.
216         (initialize_env): Remove local variables wait_policy and
217         stacksize.  Don't pass parameters to handle_omp_display_env.
218         * fortran.c: Add ialias_redirect for omp_display_env.
219         (omp_display_env_, omp_display_env_8_): New functions.
220         * libgomp.map (OMP_5.1): New version.  Add omp_display_env,
221         omp_display_env_, and omp_display_env_8_.
222         * omp.h.in: Declare omp_display_env.
223         * omp_lib.f90.in: Likewise.
224         * omp_lib.h.in: Likewise.
225
226 2021-07-27  Thomas Schwinge  <thomas@codesourcery.com>
227             Julian Brown  <julian@codesourcery.com>
228
229         * target.c (gomp_coalesce_buf_add): Update comment.
230         (gomp_copy_host2dev, gomp_map_vars_internal): Don't expect to see
231         'aq && cbuf'.
232         (gomp_map_vars_internal): Only 'if (!aq)', do
233         'gomp_coalesce_buf_add'.
234         * testsuite/libgomp.oacc-c-c++-common/async-data-1-2.c: Remove
235         XFAIL.
236
237 2021-07-27  Julian Brown  <julian@codesourcery.com>
238             Thomas Schwinge  <thomas@codesourcery.com>
239
240         * libgomp.h (gomp_copy_host2dev): Update prototype.
241         * oacc-mem.c (memcpy_tofrom_device, update_dev_host): Add new
242         argument to gomp_copy_host2dev (false).
243         * plugin/plugin-gcn.c (struct copy_data): Remove free_src field.
244         (copy_data): Don't free src.
245         (queue_push_copy): Remove free_src handling.
246         (GOMP_OFFLOAD_dev2dev): Update call to queue_push_copy.
247         (GOMP_OFFLOAD_openacc_async_host2dev): Remove source-data
248         snapshotting.
249         (GOMP_OFFLOAD_openacc_async_dev2host): Update call to
250         queue_push_copy.
251         * target.c (goacc_device_copy_async): Add SRCADDR_ORIG parameter.
252         (gomp_copy_host2dev): Add EPHEMERAL parameter.  Snapshot source
253         data when true, and set up deferred freeing of temporary buffer.
254         (gomp_copy_dev2host): Update call to goacc_device_copy_async.
255         (gomp_map_vars_existing, gomp_map_pointer, gomp_attach_pointer)
256         (gomp_detach_pointer, gomp_map_vars_internal, gomp_update): Update
257         calls to gomp_copy_host2dev with appropriate ephemeral argument.
258         * testsuite/libgomp.oacc-c-c++-common/async-data-1-1.c: Remove
259         XFAIL.
260
261 2021-07-27  Thomas Schwinge  <thomas@codesourcery.com>
262             Tom de Vries  <tom@codesourcery.com>
263
264         * testsuite/libgomp.oacc-c-c++-common/async-data-1-1.c: New file.
265         * testsuite/libgomp.oacc-c-c++-common/async-data-1-2.c: Likewise.
266
267 2021-07-27  Thomas Schwinge  <thomas@codesourcery.com>
268
269         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Clarify
270         sequencing of 'async' data copying vs. profiling events.
271         * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c:
272         Likewise.
273
274 2021-07-27  Thomas Schwinge  <thomas@codesourcery.com>
275             Julian Brown  <julian@codesourcery.com>
276
277         * testsuite/libgomp.oacc-c-c++-common/lib-94.c: Fix OpenACC
278         'async'/'wait' issue.
279         * testsuite/libgomp.oacc-c-c++-common/lib-95.c: Likewise.
280         * testsuite/libgomp.oacc-fortran/lib-16-2.f90: Likewise.
281         * testsuite/libgomp.oacc-fortran/lib-16.f90: Likewise.
282
283 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
284             Joseph Myers  <joseph@codesourcery.com>
285             Cesar Philippidis  <cesar@codesourcery.com>
286
287         * testsuite/libgomp.oacc-c-c++-common/routine-nohost-1.c: New
288         file.
289         * testsuite/libgomp.oacc-c-c++-common/routine-nohost-2.c:
290         Likewise.
291         * testsuite/libgomp.oacc-c-c++-common/routine-nohost-2_2.c:
292         Likewise.
293         * testsuite/libgomp.oacc-fortran/routine-nohost-1.f90: Likewise.
294
295 2021-07-20  Thomas Schwinge  <thomas@codesourcery.com>
296
297         PR target/101484
298         * configure.tgt [amdgcn*-*-*] (XCFLAGS): Add
299         '-Wno-error=array-bounds'.
300         * config/gcn/team.c: Remove '-Werror=array-bounds' work-around.
301         * libgomp.h [__AMDGCN__]: Likewise.
302
303 2021-07-19  Thomas Schwinge  <thomas@codesourcery.com>
304
305         PR target/101484
306         * config/gcn/team.c: Apply '-Werror=array-bounds' work-around.
307         * libgomp.h [__AMDGCN__]: Likewise.
308
309 2021-07-13  Jakub Jelinek  <jakub@redhat.com>
310             Florian Weimer  <fweimer@redhat.com>
311
312         * config/linux/sem.h: Don't include limits.h.
313         (SEM_WAIT): Define to -__INT_MAX__ - 1 instead of INT_MIN.
314         * config/linux/affinity.c: Include limits.h.
315
316 2021-07-01  Jakub Jelinek  <jakub@redhat.com>
317
318         PR middle-end/94366
319         * testsuite/libgomp.c-c++-common/pr94366.c: New test.
320
321 2021-06-29  Tobias Burnus  <tobias@codesourcery.com>
322
323         PR other/67300
324         * testsuite/libgomp.c-c++-common/reduction-16.c: Replace
325         -foffload=nvptx-none= by -foffload-options=nvptx-none= to
326         avoid disabling other offload targets.
327         * testsuite/libgomp.c-c++-common/reduction-5.c: Likewise.
328         * testsuite/libgomp.c-c++-common/reduction-6.c: Likewise.
329         * testsuite/libgomp.c/target-44.c: Likewise.
330
331 2021-06-29  Tobias Burnus  <tobias@codesourcery.com>
332
333         * testsuite/libgomp.fortran/defaultmap-8.f90 (bar): Determine whether
334         target has shared memory and disable some scalar pointer/allocatable
335         checks if not as firstprivate does not work.
336
337 2021-06-25  Chung-Lin Tang  <cltang@codesourcery.com>
338
339         PR testsuite/101114
340         * testsuite/libgomp.c-c++-common/struct-elem-5.c:
341         Add "target offload_device_nonshared_as" condition for enabling test.
342
343 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
344
345         * testsuite/libgomp.c-c++-common/target-in-reduction-1.c: New test.
346         * testsuite/libgomp.c-c++-common/target-in-reduction-2.c: New test.
347         * testsuite/libgomp.c++/target-in-reduction-1.C: New test.
348         * testsuite/libgomp.c++/target-in-reduction-2.C: New test.
349
350 2021-06-23  Jakub Jelinek  <jakub@redhat.com>
351
352         PR middle-end/101167
353         * testsuite/libgomp.c-c++-common/task-reduction-15.c: New test.
354
355 2021-06-17  Chung-Lin Tang  <cltang@codesourcery.com>
356
357         * hashtab.h (htab_clear): New function with initialization code
358         factored out from...
359         (htab_create): ...here, adjust to use htab_clear function.
360         * libgomp.h (REFCOUNT_SPECIAL): New symbol to denote range of
361         special refcount values, add comments.
362         (REFCOUNT_INFINITY): Adjust definition to use REFCOUNT_SPECIAL.
363         (REFCOUNT_LINK): Likewise.
364         (REFCOUNT_STRUCTELEM): New special refcount range for structure
365         element siblings.
366         (REFCOUNT_STRUCTELEM_P): Macro for testing for structure element
367         sibling maps.
368         (REFCOUNT_STRUCTELEM_FLAG_FIRST): Flag to indicate first sibling.
369         (REFCOUNT_STRUCTELEM_FLAG_LAST):  Flag to indicate last sibling.
370         (REFCOUNT_STRUCTELEM_FIRST_P): Macro to test _FIRST flag.
371         (REFCOUNT_STRUCTELEM_LAST_P): Macro to test _LAST flag.
372         (struct splay_tree_key_s): Add structelem_refcount and
373         structelem_refcount_ptr fields into a union with dynamic_refcount.
374         Add comments.
375         (gomp_map_vars): Delete declaration.
376         (gomp_map_vars_async): Likewise.
377         (gomp_unmap_vars): Likewise.
378         (gomp_unmap_vars_async): Likewise.
379         (goacc_map_vars): New declaration.
380         (goacc_unmap_vars): Likewise.
381         * oacc-mem.c (acc_map_data): Adjust to use goacc_map_vars.
382         (goacc_enter_datum): Likewise.
383         (goacc_enter_data_internal): Likewise.
384         * oacc-parallel.c (GOACC_parallel_keyed): Adjust to use goacc_map_vars
385         and goacc_unmap_vars.
386         (GOACC_data_start): Adjust to use goacc_map_vars.
387         (GOACC_data_end): Adjust to use goacc_unmap_vars.
388         * target.c (hash_entry_type): New typedef.
389         (htab_alloc): New function hook for hashtab.h.
390         (htab_free): Likewise.
391         (htab_hash): Likewise.
392         (htab_eq): Likewise.
393         (hashtab.h): Add file include.
394         (gomp_increment_refcount): New function.
395         (gomp_decrement_refcount): Likewise.
396         (gomp_map_vars_existing): Add refcount_set parameter, adjust to use
397         gomp_increment_refcount.
398         (gomp_map_fields_existing): Add refcount_set parameter, adjust calls
399         to gomp_map_vars_existing.
400         (gomp_map_vars_internal): Add refcount_set parameter, add local openmp_p
401         variable to guard OpenMP specific paths, adjust calls to
402         gomp_map_vars_existing, add structure element sibling splay_tree_key
403         sequence creation code, adjust Fortran map case to avoid increment
404         under OpenMP.
405         (gomp_map_vars): Adjust to static, add refcount_set parameter, manage
406         local refcount_set if caller passed in NULL, adjust call to
407         gomp_map_vars_internal.
408         (gomp_map_vars_async): Adjust and rename into...
409         (goacc_map_vars): ...this new function, adjust call to
410         gomp_map_vars_internal.
411         (gomp_remove_splay_tree_key): New function with code factored out from
412         gomp_remove_var_internal.
413         (gomp_remove_var_internal): Add code to handle removing multiple
414         splay_tree_key sequence for structure elements, adjust code to use
415         gomp_remove_splay_tree_key for splay-tree key removal.
416         (gomp_unmap_vars_internal): Add refcount_set parameter, adjust to use
417         gomp_decrement_refcount.
418         (gomp_unmap_vars): Adjust to static, add refcount_set parameter, manage
419         local refcount_set if caller passed in NULL, adjust call to
420         gomp_unmap_vars_internal.
421         (gomp_unmap_vars_async): Adjust and rename into...
422         (goacc_unmap_vars): ...this new function, adjust call to
423         gomp_unmap_vars_internal.
424         (GOMP_target): Manage refcount_set and adjust calls to gomp_map_vars and
425         gomp_unmap_vars.
426         (GOMP_target_ext): Likewise.
427         (gomp_target_data_fallback): Adjust call to gomp_map_vars.
428         (GOMP_target_data): Likewise.
429         (GOMP_target_data_ext): Likewise.
430         (GOMP_target_end_data): Adjust call to gomp_unmap_vars.
431         (gomp_exit_data): Add refcount_set parameter, adjust to use
432         gomp_decrement_refcount, adjust to queue splay-tree keys for removal
433         after main loop.
434         (GOMP_target_enter_exit_data): Manage refcount_set and adjust calls to
435         gomp_map_vars and gomp_exit_data.
436         (gomp_target_task_fn): Likewise.
437         * testsuite/libgomp.c-c++-common/refcount-1.c: New testcase.
438         * testsuite/libgomp.c-c++-common/struct-elem-1.c: New testcase.
439         * testsuite/libgomp.c-c++-common/struct-elem-2.c: New testcase.
440         * testsuite/libgomp.c-c++-common/struct-elem-3.c: New testcase.
441         * testsuite/libgomp.c-c++-common/struct-elem-4.c: New testcase.
442         * testsuite/libgomp.c-c++-common/struct-elem-5.c: New testcase.
443
444 2021-06-15  Tobias Burnus  <tobias@codesourcery.com>
445
446         PR fortran/92568
447         * testsuite/libgomp.fortran/defaultmap-8.f90: New test.
448
449 2021-06-10  Andrew Stubbs  <ams@codesourcery.com>
450             Thomas Schwinge  <thomas@codesourcery.com>
451
452         * libgomp.map (GOACC_2.0.2): New symbol version.
453         * libgomp_g.h (GOACC_enter_data, GOACC_exit_data) New prototypes.
454         * oacc-mem.c (GOACC_enter_data, GOACC_exit_data) New functions.
455
456 2021-06-10  Thomas Schwinge  <thomas@codesourcery.com>
457             Andrew Stubbs  <ams@codesourcery.com>
458
459         * oacc-mem.c (goacc_enter_exit_data_internal): New function,
460         extracted from...
461         (GOACC_enter_exit_data): ... here.
462         (GOACC_declare): Use it.
463
464 2021-06-10  Thomas Schwinge  <thomas@codesourcery.com>
465
466         * oacc-parallel.c (GOACC_declare): Move...
467         * oacc-mem.c: ... here.
468         * libgomp_g.h: Adjust.
469
470 2021-06-10  Andrew Stubbs  <ams@codesourcery.com>
471             Thomas Schwinge  <thomas@codesourcery.com>
472
473         * oacc-parallel.c (GOACC_declare): Clean up 'GOMP_MAP_POINTER'
474         handling.
475
476 2021-06-10  Jakub Jelinek  <jakub@redhat.com>
477
478         PR tree-optimization/100981
479         * testsuite/libgomp.fortran/pr100981-2.f90 (cdcdot): Initialize
480         dsdotr and dsdoti to 0.
481
482 2021-06-09  H.J. Lu  <hjl.tools@gmail.com>
483
484         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -march=i486
485         if atomic compare-and-swap is supported on 'int'.
486
487 2021-06-09  Richard Biener  <rguenther@suse.de>
488
489         PR tree-optimization/100981
490         * testsuite/libgomp.fortran/pr100981-2.f90: New testcase.
491
492 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
493
494         * plugin/plugin-gcn.c (gcn_exec): Force 'num_workers (1)'
495         unconditionally.
496         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c:
497         Update.
498         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
499         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise.
500
501 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
502
503         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Enable for all but
504         '-DACC_MEM_SHARED=0'.
505         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
506         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
507         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
508         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
509         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
510         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
511         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
512         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
513         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
514         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
515         * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise.
516         * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise.
517         * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise.
518         * testsuite/libgomp.oacc-fortran/lib-14.f90: Likewise.
519         * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Add
520         'acc_device_radeon' testing.
521         * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise.
522         * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
523         * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
524         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Enable for all.
525         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
526         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
527         * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise.
528         * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise.
529         * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
530         * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
531         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Improve checking
532         for non-'openacc_nvidia_accel_selected'.
533         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
534         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Clarify that "Not
535         all implement this checking".
536         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
537         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
538         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
539         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
540         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
541
542 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
543
544         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Simplify.
545         * testsuite/libgomp.oacc-fortran/parallel-dims-aux.c: Update.
546
547 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
548
549         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Fix
550         for 'acc_device_radeon'.
551
552 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
553
554         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Enhance
555         for non-'acc_device_nvidia'.
556
557 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
558
559         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Add
560         'acc_device_radeon' testing.
561         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
562         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
563         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
564
565 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
566
567         * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Don't
568         require 'openacc_nvidia_accel_selected'.  Fix up for
569         'ACC_DEVICE_TYPE_radeon'.
570
571 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
572
573         * testsuite/libgomp.oacc-c++/declare-1.C: Don't require
574         'openacc_nvidia_accel_selected'.
575         * testsuite/libgomp.oacc-c-c++-common/declare-3.c: Likewise.
576
577 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
578
579         * testsuite/lib/libgomp.exp
580         (check_effective_target_openacc_radeon_accel_selected):
581         Streamline.
582
583 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
584
585         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Revert
586         PR80547 workaround.
587
588 2021-06-08  Thomas Schwinge  <thomas@codesourcery.com>
589
590         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
591         <acc_device_nvidia>: Update comment.
592
593 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
594
595         * testsuite/libgomp.fortran/depend-iterator-2.f90: New test.
596
597 2021-05-27  Jakub Jelinek  <jakub@redhat.com>
598
599         * testsuite/lib/libgomp.exp (check_effective_target_openacc_cuda,
600         check_effective_target_openacc_cublas,
601         check_effective_target_openacc_cudart): New.
602         * testsuite/libgomp.oacc-fortran/host_data-4.f90: Require effective
603         target openacc_cublas.
604         * testsuite/libgomp.oacc-fortran/host_data-2.f90: Likewise.
605         * testsuite/libgomp.oacc-fortran/host_data-3.f: Likewise.
606         * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Require effective
607         target openacc_cuda.
608         * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
609         * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
610         * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
611         * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
612         * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
613         * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
614         * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
615         * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
616         * testsuite/libgomp.oacc-c-c++-common/pr87835.c: Likewise.
617         * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
618         * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
619         * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
620         * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
621         * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
622         * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
623         * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
624         * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: Require effective
625         targets openacc_cublas and openacc_cudart.
626         * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
627         * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
628         * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
629         * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
630         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-nvptx.c:
631         Require effective target openacc_cudart.
632         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Add -DUSE_CUDA_H
633         for effective target openacc_cuda and add && defined USE_CUDA_H to
634         preprocessor conditionals.  Guard -lcuda also on openacc_cuda
635         effective target.
636
637 2021-05-26  Jakub Jelinek  <jakub@redhat.com>
638
639         PR libgomp/100573
640         * config/nvptx/target.c (GOMP_target_ext, GOMP_target_data_ext,
641         GOMP_target_end_data, GOMP_target_update_ext,
642         GOMP_target_enter_exit_data): New dummy entrypoints.
643         * config/gcn/target.c (GOMP_target_ext, GOMP_target_data_ext,
644         GOMP_target_end_data, GOMP_target_update_ext,
645         GOMP_target_enter_exit_data): Likewise.
646         * testsuite/libgomp.c-c++-common/for-3.c (DO_PRAGMA, OMPTEAMS,
647         OMPFROM, OMPTO): Define.
648         (main): Remove #pragma omp target teams around all the tests.
649         * testsuite/libgomp.c-c++-common/target-41.c: New test.
650         * testsuite/libgomp.c-c++-common/target-42.c: New test.
651
652 2021-05-25  Jakub Jelinek  <jakub@redhat.com>
653
654         PR middle-end/99928
655         * testsuite/libgomp.c-c++-common/reduction-17.c: New test.
656
657 2021-05-24  Tobias Burnus  <tobias@codesourcery.com>
658
659         PR fortran/86470
660         * testsuite/libgomp.fortran/class-firstprivate-1.f90: New test.
661         * testsuite/libgomp.fortran/class-firstprivate-2.f90: New test.
662         * testsuite/libgomp.fortran/class-firstprivate-3.f90: New test.
663
664 2021-05-22  Thomas Schwinge  <thomas@codesourcery.com>
665
666         PR testsuite/90115
667         * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: Prune
668         uninteresting/varying diagnostics.
669
670 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
671
672         PR middle-end/90115
673         * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: Update.
674         * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: Likewise.
675
676 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
677
678         PR middle-end/90115
679         * testsuite/libgomp.oacc-fortran/private-atomic-1-vector.f90: New
680         file.
681         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Update.
682         * testsuite/libgomp.oacc-c-c++-common/host_data-7.c: Likewise.
683         * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c:
684         Likewise.
685         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c:
686         Likewise.
687         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c:
688         Likewise.
689         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c:
690         Likewise.
691         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c:
692         Likewise.
693         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c:
694         Likewise.
695         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c:
696         Likewise.
697         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c:
698         Likewise.
699         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c:
700         Likewise.
701         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c:
702         Likewise.
703         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c:
704         Likewise.
705         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c:
706         Likewise.
707         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c:
708         Likewise.
709         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c:
710         Likewise.
711         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c:
712         Likewise.
713         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c:
714         Likewise.
715         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c:
716         Likewise.
717         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c:
718         Likewise.
719         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c:
720         Likewise.
721         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c:
722         Likewise.
723         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c:
724         Likewise.
725         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
726         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
727         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
728         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c: Likewise.
729         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
730         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
731         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
732         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
733         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
734         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
735         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise.
736         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
737         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
738         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
739         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c:
740         Likewise.
741         * testsuite/libgomp.oacc-c-c++-common/private-atomic-1-gang.c:
742         Likewise.
743         * testsuite/libgomp.oacc-c-c++-common/private-atomic-1.c:
744         Likewise.
745         * testsuite/libgomp.oacc-c-c++-common/private-variables.c:
746         Likewise.
747         * testsuite/libgomp.oacc-c-c++-common/routine-4.c: Likewise.
748         * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c:
749         Likewise.
750         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
751         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
752         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
753         * testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise.
754         * testsuite/libgomp.oacc-fortran/host_data-5.F90: Likewise.
755         * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
756         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
757         Likewise.
758         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
759         Likewise.
760         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
761         Likewise.
762         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
763         Likewise.
764         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90:
765         Likewise.
766         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90:
767         Likewise.
768         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90:
769         Likewise.
770         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90:
771         Likewise.
772         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90:
773         Likewise.
774         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90:
775         Likewise.
776         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90:
777         Likewise.
778         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90:
779         Likewise.
780         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90:
781         Likewise.
782         * testsuite/libgomp.oacc-fortran/optional-private.f90: Likewise.
783         * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise.
784         * testsuite/libgomp.oacc-fortran/private-atomic-1-gang.f90:
785         Likewise.
786         * testsuite/libgomp.oacc-fortran/private-atomic-1-worker.f90:
787         Likewise.
788         * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
789         * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: Likewise.
790         * testsuite/libgomp.oacc-fortran/routine-7.f90: Likewise.
791
792 2021-05-21  Julian Brown  <julian@codesourcery.com>
793             Chung-Lin Tang  <cltang@codesourcery.com>
794             Thomas Schwinge  <thomas@codesourcery.com>
795
796         PR middle-end/90115
797         * testsuite/libgomp.oacc-c-c++-common/private-atomic-1-gang.c: New
798         test.
799         * testsuite/libgomp.oacc-fortran/private-atomic-1-gang.f90:
800         Likewise.
801         * testsuite/libgomp.oacc-fortran/private-atomic-1-worker.f90:
802         Likewise.
803
804 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
805
806         * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: Don't skip
807         for nvptx offloading.
808
809 2021-05-21  Tobias Burnus  <tobias@codesourcery.com>
810
811         * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: New.
812
813 2021-05-19  Thomas Schwinge  <thomas@codesourcery.com>
814
815         PR target/83812
816         * testsuite/libgomp.oacc-c-c++-common/private-atomic-1.c: New.
817
818 2021-05-19  Julian Brown  <julian@codesourcery.com>
819
820         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c: New.
821
822 2021-05-18  Thomas Schwinge  <thomas@codesourcery.com>
823
824         * testsuite/lib/libgomp.exp
825         (check_effective_target_offload_target_nvptx): Don't shadow global
826         'offload_targets' variable.
827
828 2021-05-18  Thomas Schwinge  <thomas@codesourcery.com>
829
830         * testsuite/libgomp.c-c++-common/reduction-5.c: Restrict
831         '-latomic' to nvptx offloading compilation.
832         * testsuite/libgomp.c-c++-common/reduction-6.c: Likewise.
833
834 2021-05-18  Thomas Schwinge  <thomas@codesourcery.com>
835
836         * testsuite/libgomp.c/target-44.c: Restrict '-latomic' to nvptx
837         offloading compilation.
838
839 2021-05-17  Kwok Cheung Yeung  <kcy@codesourcery.com>
840
841         * task.c (omp_fulfill_event): Call gomp_team_barrier_set_task_pending
842         if new tasks generated.
843         * testsuite/libgomp.c-c++-common/task-detach-13.c: New.
844
845 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
846
847         * testsuite/libgomp.fortran/parallel-master.f90: New test.
848
849 2021-05-13  Martin Liska  <mliska@suse.cz>
850
851         PR testsuite/100569
852         * testsuite/libgomp.c/omp-nested-3.c: Prune new LTO warning.
853         * testsuite/libgomp.c/pr46032-2.c: Likewise.
854         * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c: Likewise.
855         * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c: Likewise.
856
857 2021-05-12  Tobias Burnus  <tobias@codesourcery.com>
858
859         * testsuite/libgomp.c-c++-common/task-detach-12.c: New test.
860         * testsuite/libgomp.fortran/task-detach-12.f90: New test.
861
862 2021-05-11  Jakub Jelinek  <jakub@redhat.com>
863
864         PR middle-end/100471
865         * taskloop.c (GOMP_taskloop): If GOMP_TASK_FLAG_REDUCTION and not
866         GOMP_TASK_FLAG_NOGROUP, when doing early return clear the task
867         reduction pointer.
868         * testsuite/libgomp.c/task-reduction-4.c: New test.
869
870 2021-05-07  Tobias Burnus  <tobias@codesourcery.com>
871             Tom de Vries  <tdevries@suse.de>
872
873         * testsuite/libgomp.c-c++-common/reduction-5.c: New test, testing
874         complex/floating-point || + && reduction with 'omp target'.
875         * testsuite/libgomp.c-c++-common/reduction-6.c: Likewise.
876
877 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
878
879         * testsuite/libgomp.c-c++-common/reduction-1.c: New test.
880         * testsuite/libgomp.c-c++-common/reduction-2.c: New test.
881         * testsuite/libgomp.c-c++-common/reduction-3.c: New test.
882         * testsuite/libgomp.c-c++-common/reduction-4.c: New file.
883
884 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
885
886         PR testsuite/100397
887         * testsuite/libgomp.fortran/depobj-1.f90 (dep2, dep3): Move var
888         declaration to scope of non-'depend'-guarded assignment to avoid races.
889
890 2021-05-03  Tom de Vries  <tdevries@suse.de>
891
892         PR target/100321
893         * testsuite/libgomp.c/target-44.c: New test.
894
895 2021-04-30  Roman Zhuykov  <zhroma@ispras.ru>
896
897         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-3.c: New test.
898
899 2021-04-29  Tom de Vries  <tdevries@suse.de>
900
901         * testsuite/libgomp.c/pr81778.c: New test.
902
903 2021-04-29  Tom de Vries  <tdevries@suse.de>
904
905         PR target/100232
906         * testsuite/libgomp.c/target-43.c: New file.
907
908 2021-04-28  Jakub Jelinek  <jakub@redhat.com>
909             Tobias Burnus  <tobias@codesourcery.com>
910
911         * configure.ac (OFFLOAD_DEFAULTED): AC_DEFINE if offload-defaulted.
912         * target.c (gomp_load_plugin_for_device): If set and if a plugin
913         can't be dlopened, silently assume it has no devices.
914         * Makefile.in: Regenerate.
915         * config.h.in: Regenerate.
916         * configure: Regenerate.
917
918 2021-04-26  Tobias Burnus  <tobias@codesourcery.com>
919
920         * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f:
921         Use [Ww]arning in dg-bogus as FE diagnostic and default
922         diagnostic differ and the result depends on ENABLE_OFFLOAD.
923         * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
924         * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise.
925         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise.
926
927 2021-04-26  Tobias Burnus  <tobias@codesourcery.com>
928
929         * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f:
930         Correct spelling in dg-bogus to match -Wopenacc-parallelism.
931         * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
932         * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise.
933         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise.
934
935 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
936             Nathan Sidwell  <nathan@codesourcery.com>
937             Tom de Vries  <vries@codesourcery.com>
938             Julian Brown  <julian@codesourcery.com>
939             Kwok Cheung Yeung  <kcy@codesourcery.com>
940
941         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Specify
942         '-Wopenacc-parallelism', and match diagnostics, as appropriate.
943         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
944         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
945         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
946         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
947         * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c:
948         Likewise.
949         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Likewise.
950         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
951         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
952         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c:
953         Likewise.
954         * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Likewise.
955         * testsuite/libgomp.oacc-c-c++-common/private-variables.c:
956         Likewise.
957         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
958         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
959         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
960         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
961         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise.
962         * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c:
963         Likewise.
964         * testsuite/libgomp.oacc-fortran/optional-private.f90: Likewise.
965         * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: Likewise.
966         * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
967         * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise.
968         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise.
969         * testsuite/libgomp.oacc-fortran/pr84028.f90: Likewise.
970         * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
971         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
972         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
973         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
974         * testsuite/libgomp.oacc-fortran/routine-7.f90: Likewise.
975
976 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
977
978         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Don't
979         compile with '-w'.
980         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
981         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c:
982         Likewise.
983         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
984         * testsuite/libgomp.oacc-c-c++-common/reduction-6.c: Likewise.
985         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise.
986         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
987         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
988         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
989         * testsuite/libgomp.oacc-fortran/reduction-7.f90: Likewise.
990
991 2021-04-22  Richard Biener  <rguenther@suse.de>
992
993         * testsuite/libgomp.c-c++-common/reduction-16.c: Use -latomic
994         only on nvptx-none.
995
996 2021-04-21  Tobias Burnus  <tobias@codesourcery.com>
997
998         * testsuite/libgomp.fortran/depobj-1.f90: Use omp_lib's
999         omp_depend_kind instead of defining it as 16.
1000
1001 2021-04-21  Tobias Burnus  <tobias@codesourcery.com>
1002
1003         * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type):
1004         New, based on check_effective_target_offload_target_nvptx.
1005         (check_effective_target_offload_target_nvptx): Call it.
1006         (check_effective_target_offload_target_amdgcn): New.
1007         * testsuite/libgomp.c-c++-common/function-not-offloaded.c:
1008         Require target offload_target_nvptx || offload_target_amdgcn.
1009         * testsuite/libgomp.c-c++-common/variable-not-offloaded.c: Likewise.
1010         * testsuite/libgomp.c/pr86416-1.c: Likewise.
1011         * testsuite/libgomp.c/pr86416-2.c: Likewise.
1012
1013 2021-04-21  Tobias Burnus  <tobias@codesourcery.com>
1014
1015         * testsuite/libgomp.fortran/depobj-1.f90: New test.
1016
1017 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
1018
1019         * testsuite/libgomp.oacc-c-c++-common/declare-vla-kernels-decompose-ice-1.c:
1020         '-fopenacc-kernels=[...]' -> '--param=openacc-kernels=[...]'.
1021         * testsuite/libgomp.oacc-c-c++-common/declare-vla-kernels-decompose.c:
1022         Likewise.
1023         * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c:
1024         Likewise.
1025         * testsuite/libgomp.oacc-fortran/pr94358-1.f90: Likewise.
1026
1027 2021-04-15  Thomas Schwinge  <thomas@codesourcery.com>
1028
1029         PR target/99555
1030         * testsuite/lib/libgomp.exp
1031         (check_effective_target_offload_device_nvptx): New.
1032         * testsuite/libgomp.c/pr99555-1.c <nvptx offload device>: Until
1033         resolved, make sure that we exit quickly, with error status,
1034         XFAILed.
1035         * testsuite/libgomp.c-c++-common/task-detach-6.c: Likewise.
1036         * testsuite/libgomp.fortran/task-detach-6.f90: Likewise.
1037
1038 2021-04-14  Jakub Jelinek  <jakub@redhat.com>
1039
1040         PR testsuite/100071
1041         * testsuite/libgomp.fortran/alloc-1.F90: Call c_f_pointer after last
1042         cp = omp_alloc with cp, p arguments instead of cq, q and call
1043         c_f_pointer after last cq = omp_alloc with cq, q.
1044
1045 2021-04-11  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1046
1047         PR middle-end/98088
1048         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Add check
1049         for loop with GT/GE condition.
1050         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
1051
1052 2021-04-09  Thomas Schwinge  <thomas@codesourcery.com>
1053
1054         PR middle-end/84991
1055         PR middle-end/84992
1056         PR middle-end/90779
1057         * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: New.
1058
1059 2021-04-09  Jakub Jelinek  <jakub@redhat.com>
1060
1061         PR libgomp/99984
1062         * team.c (gomp_thread_start): Call pthread_setspecific for
1063         !(defined HAVE_TLS || defined USE_EMUTLS) only after local_thr
1064         has been initialized to avoid false positive warning.
1065
1066 2021-03-29  Tobias Burnus  <tobias@codesourcery.com>
1067
1068         PR target/99555
1069         * testsuite/lib/on_device_arch.c: Move to ...
1070         * testsuite/libgomp.c-c++-common/on_device_arch.h: ... here.
1071         * testsuite/libgomp.fortran/on_device_arch.c: New file;
1072         #include on_device_arch.h.
1073         * testsuite/libgomp.c-c++-common/task-detach-6.c: #include
1074         on_device_arch.h instead of using dg-additional-source.
1075         * testsuite/libgomp.c/pr99555-1.c: Likewise.
1076         * testsuite/libgomp.fortran/task-detach-6.f90: Update to use
1077         on_device_arch.c without relative paths.
1078
1079 2021-03-25  Thomas Schwinge  <thomas@codesourcery.com>
1080
1081         * plugin/plugin-gcn.c (init_environment_variables): Don't prepend
1082         the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so'.
1083         * plugin/configfrag.ac (HSA_RUNTIME_LIB): Clean up.
1084         * config.h.in: Regenerate.
1085         * configure: Likewise.
1086
1087 2021-03-25  Thomas Schwinge  <thomas@codesourcery.com>
1088
1089         PR target/99555
1090         * testsuite/lib/on_device_arch.c: New file.
1091         * testsuite/libgomp.c/pr99555-1.c: Likewise.
1092         * testsuite/libgomp.c-c++-common/task-detach-6.c: Until resolved,
1093         skip for nvptx offloading, with error status.
1094         * testsuite/libgomp.fortran/task-detach-6.f90: Likewise.
1095
1096 2021-03-25  Thomas Schwinge  <thomas@codesourcery.com>
1097
1098         * testsuite/libgomp.oacc-fortran/derivedtypes-arrays-1.f90:
1099         OpenACC 'serial' construct diagnostic for nvptx offloading.
1100
1101 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
1102
1103         PR c++/99509
1104         * testsuite/libgomp.c-c++-common/declare_target-1.c: New test.
1105
1106 2021-03-12  Tobias Burnus  <tobias@codesourcery.com>
1107
1108         PR fortran/98858
1109         * testsuite/libgomp.fortran/use_device_ptr-3.f90: New test.
1110
1111 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
1112
1113         * configure.ac: Add AC_CHECK_SIZEOF([void *]).
1114         * plugin/configfrag.ac: Check $ac_cv_sizeof_void_p value instead of
1115         checking of -m32 or -mx32 options on the command line.
1116         * config.h.in: Regenerated.
1117         * configure: Regenerated.
1118
1119 2021-02-27  Iain Sandoe  <iain@sandoe.co.uk>
1120
1121         * testsuite/libgomp.c-c++-common/pr96390.c: Require alias
1122         support from the target.
1123
1124 2021-02-25  Kwok Cheung Yeung  <kcy@codesourcery.com>
1125             Jakub Jelinek  <jakub@redhat.com>
1126
1127         PR libgomp/98738
1128         * libgomp.h (enum gomp_task_kind): Add GOMP_TASK_DETACHED.
1129         (struct gomp_task): Replace detach and completion_sem fields with
1130         union containing completion_sem and detach_team.  Add deferred_p
1131         field.
1132         (struct gomp_team): Remove task_detach_queue.
1133         * task.c: Include assert.h.
1134         (gomp_init_task): Initialize deferred_p and completion_sem fields.
1135         Rearrange initialization order of fields.
1136         (task_fulfilled_p): Delete.
1137         (GOMP_task): Use address of task as the event handle.  Remove
1138         initialization of detach field.  Initialize deferred_p field.
1139         Use automatic local for completion_sem.  Initialize detach_team field
1140         for deferred tasks.
1141         (gomp_barrier_handle_tasks): Remove handling of task_detach_queue.
1142         Set kind of suspended detach task to GOMP_TASK_DETACHED and
1143         decrement task_running_count.  Move finish_cancelled block out of
1144         else branch.  Relocate call to gomp_team_barrier_done.
1145         (GOMP_taskwait): Handle tasks with completion events that have not
1146         been fulfilled.
1147         (GOMP_taskgroup_end): Likewise.
1148         (omp_fulfill_event): Use address of task as event handle.  Post to
1149         completion_sem for undeferred tasks.  Clear detach_team if task
1150         has not finished.  For finished tasks, handle post-execution tasks,
1151         call gomp_team_barrier_wake if necessary, and free task.
1152         * team.c (gomp_new_team): Remove initialization of task_detach_queue.
1153         (free_team): Remove free of task_detach_queue.
1154         * testsuite/libgomp.c-c++-common/task-detach-1.c: Fix formatting.
1155         * testsuite/libgomp.c-c++-common/task-detach-2.c: Fix formatting.
1156         * testsuite/libgomp.c-c++-common/task-detach-3.c: Fix formatting.
1157         * testsuite/libgomp.c-c++-common/task-detach-4.c: Fix formatting.
1158         * testsuite/libgomp.c-c++-common/task-detach-5.c: Fix formatting.
1159         Change data-sharing of detach events on enclosing parallel to private.
1160         * testsuite/libgomp.c-c++-common/task-detach-6.c: Likewise.  Remove
1161         taskwait directive.
1162         * testsuite/libgomp.c-c++-common/task-detach-7.c: New.
1163         * testsuite/libgomp.c-c++-common/task-detach-8.c: New.
1164         * testsuite/libgomp.c-c++-common/task-detach-9.c: New.
1165         * testsuite/libgomp.c-c++-common/task-detach-10.c: New.
1166         * testsuite/libgomp.c-c++-common/task-detach-11.c: New.
1167         * testsuite/libgomp.fortran/task-detach-1.f90: Fix formatting.
1168         * testsuite/libgomp.fortran/task-detach-2.f90: Fix formatting.
1169         * testsuite/libgomp.fortran/task-detach-3.f90: Fix formatting.
1170         * testsuite/libgomp.fortran/task-detach-4.f90: Fix formatting.
1171         * testsuite/libgomp.fortran/task-detach-5.f90: Fix formatting.
1172         Change data-sharing of detach events on enclosing parallel to private.
1173         * testsuite/libgomp.fortran/task-detach-6.f90: Likewise.  Remove
1174         taskwait directive.
1175         * testsuite/libgomp.fortran/task-detach-7.f90: New.
1176         * testsuite/libgomp.fortran/task-detach-8.f90: New.
1177         * testsuite/libgomp.fortran/task-detach-9.f90: New.
1178         * testsuite/libgomp.fortran/task-detach-10.f90: New.
1179         * testsuite/libgomp.fortran/task-detach-11.f90: New.
1180
1181 2021-02-22  Tobias Burnus  <tobias@codesourcery.com>
1182
1183         PR fortran/99171
1184         * testsuite/libgomp.fortran/dummy-procs-1.f90: New test.
1185
1186 2021-02-17  Julian Brown  <julian@codesourcery.com>
1187
1188         * testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: Remove
1189         expected errors.
1190
1191 2021-02-17  Julian Brown  <julian@codesourcery.com>
1192
1193         * testsuite/libgomp.oacc-fortran/derivedtypes-arrays-1.f90: New test.
1194         * testsuite/libgomp.oacc-fortran/update-dt-array.f90: Likewise.
1195
1196 2021-02-11  UroÅ¡ Bizjak  <ubizjak@gmail.com>
1197
1198         * config/linux/x86/futex.h (__futex_wait):
1199         Revert output type back to long.
1200         (__futex_wake): Ditto.
1201         (futex_wait): Update for revert.
1202         (futex_wake): Ditto.
1203
1204 2021-02-11  UroÅ¡ Bizjak  <ubizjak@gmail.com>
1205
1206         * config/linux/x86/futex.h (__futex_wait): New static inline
1207         wrapper function.  Correct output type to int and
1208         timeout type to void *.
1209         (__futex_wake): New static inline wrapper function.
1210         Correct output type to int.
1211         (futex_wait): Use __futex_wait.
1212         (futex_wake): Use __futex_wake.
1213
1214 2021-02-10  Julian Brown  <julian@codesourcery.com>
1215
1216         PR fortran/98979
1217         * testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: Add expected
1218         errors.
1219
1220 2021-02-04  Julian Brown  <julian@codesourcery.com>
1221
1222         * testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: New test.
1223
1224 2021-02-03  Andrew Stubbs  <ams@codesourcery.com>
1225
1226         * plugin/plugin-gcn.c (EF_AMDGPU_MACH): Add
1227         EF_AMDGPU_MACH_AMDGCN_GFX908.
1228         (gcn_gfx908_s): New constant string.
1229         (isa_hsa_name): Add gfx908.
1230         (isa_code): Add gfx908.
1231
1232 2021-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>
1233
1234         * libgomp.texi (omp_fulfill_event): New entry.
1235
1236 2021-01-20  Jakub Jelinek  <jakub@redhat.com>
1237
1238         * task.c (GOMP_task): Rename priority argument to priority_arg,
1239         add priority automatic variable and modify that variable.  Instead of
1240         clearing detach argument when GOMP_TASK_FLAG_DETACH bit is not set,
1241         check flags for that bit.
1242
1243 2021-01-19  Tobias Burnus  <tobias@codesourcery.com>
1244
1245         PR fortran/98476
1246         * testsuite/libgomp.fortran/is_device_ptr-1.f90: New test.
1247
1248 2021-01-18  Andreas Schwab  <schwab@suse.de>
1249
1250         * configure.tgt (riscv64*-*-linux*): Add linux to config_path.
1251
1252 2021-01-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1253
1254         * config/rtems/sem.h (gomp_sem_getcount): New function.
1255
1256 2021-01-18  Jakub Jelinek  <jakub@redhat.com>
1257
1258         * config/linux/sem.h (gomp_sem_getcount): New function.
1259         * config/posix/sem.h (gomp_sem_getcount): New function.
1260         * config/posix/sem.c (gomp_sem_getcount): New function.
1261         * config/accel/sem.h (gomp_sem_getcount): New function.
1262         * task.c (task_fulfilled_p): Use gomp_sem_getcount.
1263         (omp_fulfill_event): Likewise.
1264
1265 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
1266
1267         * fortran.c (omp_fulfill_event_): New.
1268         * libgomp.h (struct gomp_task): Add detach and completion_sem fields.
1269         (struct gomp_team): Add task_detach_queue and task_detach_count
1270         fields.
1271         * libgomp.map (OMP_5.0.1): Add omp_fulfill_event and omp_fulfill_event_.
1272         * libgomp_g.h (GOMP_task): Add extra argument.
1273         * omp.h.in (enum omp_event_handle_t): New.
1274         (omp_fulfill_event): New.
1275         * omp_lib.f90.in (omp_event_handle_kind): New.
1276         (omp_fulfill_event): New.
1277         * omp_lib.h.in (omp_event_handle_kind): New.
1278         (omp_fulfill_event): Declare.
1279         * priority_queue.c (priority_tree_find): New.
1280         (priority_list_find): New.
1281         (priority_queue_find): New.
1282         * priority_queue.h (priority_queue_predicate): New.
1283         (priority_queue_find): New.
1284         * task.c (gomp_init_task): Initialize detach field.
1285         (task_fulfilled_p): New.
1286         (GOMP_task): Add detach argument.  Ignore detach argument if
1287         GOMP_TASK_FLAG_DETACH not set in flags.  Initialize completion_sem
1288         field.  Copy address of completion_sem into detach argument and
1289         into the start of the data record.  Wait for detach event if task
1290         not deferred.
1291         (gomp_barrier_handle_tasks): Queue tasks with unfulfilled events.
1292         Remove completed tasks and requeue dependent tasks.
1293         (omp_fulfill_event): New.
1294         * team.c (gomp_new_team): Initialize task_detach_queue and
1295         task_detach_count fields.
1296         (free_team): Free task_detach_queue field.
1297         * testsuite/libgomp.c-c++-common/task-detach-1.c: New testcase.
1298         * testsuite/libgomp.c-c++-common/task-detach-2.c: New testcase.
1299         * testsuite/libgomp.c-c++-common/task-detach-3.c: New testcase.
1300         * testsuite/libgomp.c-c++-common/task-detach-4.c: New testcase.
1301         * testsuite/libgomp.c-c++-common/task-detach-5.c: New testcase.
1302         * testsuite/libgomp.c-c++-common/task-detach-6.c: New testcase.
1303         * testsuite/libgomp.fortran/task-detach-1.f90: New testcase.
1304         * testsuite/libgomp.fortran/task-detach-2.f90: New testcase.
1305         * testsuite/libgomp.fortran/task-detach-3.f90: New testcase.
1306         * testsuite/libgomp.fortran/task-detach-4.f90: New testcase.
1307         * testsuite/libgomp.fortran/task-detach-5.f90: New testcase.
1308         * testsuite/libgomp.fortran/task-detach-6.f90: New testcase.
1309
1310 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
1311
1312         PR target/70454
1313         * configure.tgt: For i?86 and x86_64 determine if -march=i486 needs to
1314         be added through preprocessor check on
1315         __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4.
1316
1317 2021-01-14  Thomas Schwinge  <thomas@codesourcery.com>
1318
1319         PR libgomp/65099
1320         * plugin/configfrag.ac (PLUGIN_NVPTX): Restrict to supported
1321         configurations.
1322         * configure: Regenerate.
1323         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Remove 64-bit
1324         check.
1325
1326 2021-01-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1327
1328         * configure: Re-generate.
1329
1330 2021-01-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1331
1332         * configure: Re-generate.
1333
1334 2021-01-05  Julian Brown  <julian@codesourcery.com>
1335
1336         * plugin/plugin-nvptx.c (SOFTSTACK_CACHE_LIMIT): New define.
1337         (struct ptx_device): Add omp_stacks struct.
1338         (nvptx_open_device): Initialise cached-stacks housekeeping info.
1339         (nvptx_close_device): Free cached stacks block and mutex.
1340         (nvptx_stacks_free): New function.
1341         (nvptx_alloc): Add SUPPRESS_ERRORS parameter.
1342         (GOMP_OFFLOAD_alloc): Add strategies for freeing soft-stacks block.
1343         (nvptx_stacks_alloc): Rename to...
1344         (nvptx_stacks_acquire): This.  Cache stacks block between runs if same
1345         size or smaller is required.
1346         (nvptx_stacks_free): Remove.
1347         (GOMP_OFFLOAD_run): Call nvptx_stacks_acquire and lock stacks block
1348         during kernel execution.
1349
1350 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
1351
1352         * libgomp.texi: Bump @copying's copyright year.
1353
1354 2020-12-28  Gerald Pfeifer  <gerald@pfeifer.com>
1355
1356         * libgomp.texi (Top): Avoid bad "up" link.
1357
1358 2020-12-18  Jakub Jelinek  <jakub@redhat.com>
1359
1360         * testsuite/libgomp.c/task-6.c: New test.
1361
1362 2020-12-09  Andrew Stubbs  <ams@codesourcery.com>
1363
1364         * plugin/plugin-gcn.c: Include hsa_ext_amd.h.
1365         (HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT): Delete redundant definition.
1366
1367 2020-12-08  Tobias Burnus  <tobias@codesourcery.com>
1368
1369         * testsuite/libgomp.fortran/scan-1.f90: New test.
1370
1371 2020-12-05  Iain Sandoe  <iain@sandoe.co.uk>
1372
1373         PR target/97865
1374         * configure: Regenerate.
1375
1376 2020-11-29  John David Anglin  <danglin@gcc.gnu.org>
1377
1378         * configure: Regenerate.
1379
1380 2020-11-25  Thomas Schwinge  <thomas@codesourcery.com>
1381
1382         * testsuite/libgomp.oacc-c++/cache-1.C: New.
1383         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: Update.
1384
1385 2020-11-25  Andrew Stubbs  <ams@codesourcery.com>
1386
1387         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90 (main): Adjust
1388         expected results.
1389
1390 2020-11-24  Andrew Stubbs  <ams@codesourcery.com>
1391
1392         * plugin/plugin-gcn.c: Don't redefine relocations if elf.h has them.
1393         (reserved): Delete unused define.
1394
1395 2020-11-24  Thomas Schwinge  <thomas@codesourcery.com>
1396
1397         * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Avoid
1398         Tcl 8.5-specific behavior.
1399         * testsuite/libgomp.oacc-fortran/pr94358-1.f90: Likewise.
1400
1401 2020-11-18  Kwok Cheung Yeung  <kcy@codesourcery.com>
1402
1403         * env.c (gomp_global_icv): Remove nest_var field.  Add
1404         max_active_levels_var field.
1405         (gomp_max_active_levels_var): Remove.
1406         (parse_boolean): Return true on success.
1407         (handle_omp_display_env): Express OMP_NESTED in terms of
1408         max_active_levels_var.  Change format specifier for
1409         max_active_levels_var.
1410         (initialize_env): Set max_active_levels_var from
1411         OMP_MAX_ACTIVE_LEVELS, OMP_NESTED, OMP_NUM_THREADS and
1412         OMP_PROC_BIND.
1413         * icv.c (omp_set_nested): Express in terms of
1414         max_active_levels_var.
1415         (omp_get_nested): Likewise.
1416         (omp_set_max_active_levels): Use max_active_levels_var field instead
1417         of gomp_max_active_levels_var.
1418         (omp_get_max_active_levels): Likewise.
1419         * libgomp.h (struct gomp_task_icv): Remove nest_var field.  Add
1420         max_active_levels_var field.
1421         (gomp_supported_active_levels): Set to UCHAR_MAX.
1422         (gomp_max_active_levels_var): Delete.
1423         * libgomp.texi (omp_get_nested): Update documentation.
1424         (omp_set_nested): Likewise.
1425         (OMP_MAX_ACTIVE_LEVELS): Likewise.
1426         (OMP_NESTED): Likewise.
1427         (OMP_NUM_THREADS): Likewise.
1428         (OMP_PROC_BIND): Likewise.
1429         * parallel.c (gomp_resolve_num_threads): Replace reference
1430         to nest_var with max_active_levels_var.  Use max_active_levels_var
1431         field instead of gomp_max_active_levels_var.
1432
1433 2020-11-18  Tobias Burnus  <tobias@codesourcery.com>
1434
1435         * testsuite/libgomp.c/usleep.h (fallback_usleep): Renamed from
1436         nvptx_usleep; use also for device={arch(gcn)}.
1437
1438 2020-11-14  Jakub Jelinek  <jakub@redhat.com>
1439
1440         * testsuite/libgomp.c-c++-common/allocate-1.c (struct S): New type.
1441         (foo): Add tests for non-VLA private and firstprivate clauses on
1442         omp task.
1443         (bar): Likewise.  Remove taking of address from private/firstprivate
1444         variables.
1445         * testsuite/libgomp.c++/allocate-1.C (struct S): New type.
1446         (foo): Add p, q, px and s arguments.  Add tests for array reductions
1447         and for non-VLA private and firstprivate clauses on omp task.
1448         (bar): Removed.
1449         (main): Adjust foo caller.  Don't call bar.
1450
1451 2020-11-13  Gergö Barany  <gergo@codesourcery.com>
1452             Thomas Schwinge  <thomas@codesourcery.com>
1453
1454         * testsuite/libgomp.oacc-c-c++-common/declare-vla-kernels-decompose-ice-1.c:
1455         New.
1456         * testsuite/libgomp.oacc-c-c++-common/declare-vla-kernels-decompose.c:
1457         Likewise.
1458         * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c:
1459         Likewise.
1460         * testsuite/libgomp.oacc-c-c++-common/declare-vla.c: Adjust.
1461         * testsuite/libgomp.oacc-fortran/pr94358-1.f90: Likewise.
1462
1463 2020-11-13  Gergö Barany  <gergo@codesourcery.com>
1464             Thomas Schwinge  <thomas@codesourcery.com>
1465
1466         PR fortran/94358
1467         * testsuite/libgomp.oacc-fortran/pr94358-1.f90: New.
1468
1469 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
1470
1471         * testsuite/libgomp.c-c++-common/allocate-1.c (foo): Add tests
1472         for array reductions.
1473         (main): Adjust foo callers.
1474
1475 2020-11-12  Jakub Jelinek  <jakub@redhat.com>
1476
1477         * libgomp.map (GOMP_alloc, GOMP_free): Export at GOMP_5.0.1.
1478         * omp.h.in (omp_alloc): Add malloc and alloc_size attributes.
1479         * libgomp_g.h (GOMP_alloc, GOMP_free): Declare.
1480         * allocator.c (omp_aligned_alloc): New for now static function,
1481         add alignment argument and handle it.
1482         (omp_alloc): Reimplement using omp_aligned_alloc.
1483         (GOMP_alloc, GOMP_free): New functions.
1484         (omp_free): Add ialias.
1485         * testsuite/libgomp.c-c++-common/allocate-1.c: New test.
1486         * testsuite/libgomp.c++/allocate-1.C: New test.
1487
1488 2020-11-12  Thomas Schwinge  <thomas@codesourcery.com>
1489
1490         PR fortran/97782
1491         * testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90: Adjust.
1492
1493 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
1494
1495         * libgomp.h (enum gomp_map_vars_kind): Adjust enum values to be bit-flag
1496         usable.
1497         * oacc-mem.c (acc_map_data): Adjust gomp_map_vars argument flags to
1498         'GOMP_MAP_VARS_OPENACC | GOMP_MAP_VARS_ENTER_DATA'.
1499         (goacc_enter_datum): Likewise for call to gomp_map_vars_async.
1500         (goacc_enter_data_internal): Likewise.
1501         * target.c (gomp_map_vars_internal):
1502         Change checks of GOMP_MAP_VARS_ENTER_DATA to use bit-and (&). Adjust use
1503         of gomp_attach_pointer for OpenMP cases.
1504         (gomp_exit_data): Add handling of GOMP_MAP_DETACH.
1505         (GOMP_target_enter_exit_data): Add handling of GOMP_MAP_ATTACH.
1506         * testsuite/libgomp.c-c++-common/ptr-attach-1.c: New testcase.
1507
1508 2020-11-05  Ulrich Drepper  <drepper@redhat.com>
1509             Kwok Cheung Yeung  <kcy@codesourcery.com>
1510
1511         * Makefile.am (%.mod): Add -cpp and -fopenmp to compile flags.
1512         * Makefile.in: Regenerate.
1513         * fortran.c: Wrap uses of omp_set_nested and omp_get_nested with
1514         pragmas to ignore -Wdeprecated-declarations warnings.
1515         * icv.c: Likewise.
1516         * omp.h.in (__GOMP_DEPRECATED_5_0): Define.
1517         Mark omp_lock_hint_* enum values, omp_lock_hint_t, omp_set_nested,
1518         and omp_get_nested with __GOMP_DEPRECATED_5_0.
1519         * omp_lib.f90.in: Mark omp_get_nested and omp_set_nested as
1520         deprecated.
1521         * testsuite/libgomp.c++/affinity-1.C: Add -Wno-deprecated-declarations
1522         to test options.
1523         * testsuite/libgomp.c/affinity-1.c: Likewise.
1524         * testsuite/libgomp.c/affinity-2.c: Likewise.
1525         * testsuite/libgomp.c/appendix-a/a.15.1.c: Likewise.
1526         * testsuite/libgomp.c/lib-1.c: Likewise.
1527         * testsuite/libgomp.c/nested-1.c: Likewise.
1528         * testsuite/libgomp.c/nested-2.c: Likewise.
1529         * testsuite/libgomp.c/nested-3.c: Likewise.
1530         * testsuite/libgomp.c/pr32362-1.c: Likewise.
1531         * testsuite/libgomp.c/pr32362-2.c: Likewise.
1532         * testsuite/libgomp.c/pr32362-3.c: Likewise.
1533         * testsuite/libgomp.c/pr35549.c: Likewise.
1534         * testsuite/libgomp.c/pr42942.c: Likewise.
1535         * testsuite/libgomp.c/pr61200.c: Likewise.
1536         * testsuite/libgomp.c/sort-1.c: Likewise.
1537         * testsuite/libgomp.c/target-5.c: Likewise.
1538         * testsuite/libgomp.c/target-6.c: Likewise.
1539         * testsuite/libgomp.c/teams-1.c: Likewise.
1540         * testsuite/libgomp.c/thread-limit-1.c: Likewise.
1541         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
1542         * testsuite/libgomp.c/thread-limit-4.c: Likewise.
1543         * testsuite/libgomp.fortran/affinity1.f90: Likewise.
1544         * testsuite/libgomp.fortran/lib1.f90: Likewise.
1545         * testsuite/libgomp.fortran/lib2.f: Likewise.
1546         * testsuite/libgomp.fortran/nested1.f90: Likewise.
1547         * testsuite/libgomp.fortran/teams1.f90: Likewise.
1548
1549 2020-11-02  Thomas Schwinge  <thomas@codesourcery.com>
1550
1551         PR target/85486
1552         * testsuite/libgomp.oacc-c-c++-common/pr85486-2.c: Simplify and enhance.
1553         * testsuite/libgomp.oacc-c-c++-common/pr85486-3.c: Likewise.
1554         * testsuite/libgomp.oacc-c-c++-common/pr85486.c: Likewise.
1555
1556 2020-11-02  Thomas Schwinge  <thomas@codesourcery.com>
1557
1558         PR testsuite/80219
1559         PR testsuite/85303
1560         * testsuite/lib/libgomp.exp (libgomp_init): Set
1561         'gcc_warning_prefix', 'gcc_error_prefix'.
1562
1563 2020-10-30  Jakub Jelinek  <jakub@redhat.com>
1564
1565         * target.c (gomp_map_vars_internal): Use FIELD_TGT_EMPTY macro
1566         even in field_tgt_clear initializer.
1567
1568 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
1569
1570         * testsuite/libgomp.c/target-42.c: New test.
1571
1572 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
1573             Tom de Vries  <tdevries@suse.de>
1574
1575         PR testsuite/81690
1576         * testsuite/libgomp.c/usleep.h: New file.
1577         * testsuite/libgomp.c/target-32.c: Include usleep.h.
1578         (main): Use tgt_usleep instead of usleep.
1579         * testsuite/libgomp.c/thread-limit-2.c: Include usleep.h.
1580         (main): Use tgt_usleep instead of usleep.
1581
1582 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
1583
1584         PR lto/96680
1585         * testsuite/libgomp.c/declare-variant-1.c: New test.
1586
1587 2020-10-22  Jakub Jelinek  <jakub@redhat.com>
1588
1589         * testsuite/libgomp.c/target-41.c: New test.
1590
1591 2020-10-22  Jakub Jelinek  <jakub@redhat.com>
1592
1593         * icv.c (omp_get_initial_device): Remove including corresponding
1594         ialias.
1595         * icv-device.c (omp_get_initial_device): New function.  Return
1596         gomp_get_num_devices ().  Add ialias.
1597         * target.c (resolve_device): Don't fail with
1598         OMP_TARGET_OFFLOAD=mandatory if device_id is equal to
1599         gomp_get_num_devices ().
1600         (omp_target_alloc, omp_target_free, omp_target_is_present,
1601         omp_target_memcpy, omp_target_memcpy_rect, omp_target_associate_ptr,
1602         omp_target_disassociate_ptr, omp_pause_resource): Use
1603         gomp_get_num_devices () instead of GOMP_DEVICE_HOST_FALLBACK on the
1604         first use in the functions, in uses dominated by the
1605         gomp_get_num_devices call use num_devices_openmp instead.
1606         * libgomp.texi (omp_get_initial_device): Document.
1607         * config/gcn/icv-device.c (omp_get_initial_device): New function.
1608         Add ialias.
1609         * config/nvptx/icv-device.c (omp_get_initial_device): Likewise.
1610         * testsuite/libgomp.c/target-40.c: New test.
1611
1612 2020-10-21  Jakub Jelinek  <jakub@redhat.com>
1613
1614         * env.c (parse_target_offload): Change new_offload var type to int,
1615         preinitialize to -1, remove found var and test new_offload != -1
1616         instead of found.
1617
1618 2020-10-20  Jakub Jelinek  <jakub@redhat.com>
1619
1620         * target.c (gomp_target_init): Inside of the function, use automatic
1621         variables corresponding to num_devices, num_devices_openmp and devices
1622         global variables and update the globals only at the end of the
1623         function.
1624
1625 2020-10-20  Kwok Cheung Yeung  <kcy@codesourcery.com>
1626
1627         * env.c (gomp_target_offload_var): New.
1628         (parse_target_offload): New.
1629         (handle_omp_display_env): Print value of OMP_TARGET_OFFLOAD.
1630         (initialize_env): Parse OMP_TARGET_OFFLOAD.
1631         * libgomp.h (gomp_target_offload_t): New.
1632         (gomp_target_offload_var): New.
1633         * libgomp.texi (OMP_TARGET_OFFLOAD): New section.
1634         * target.c (resolve_device): Generate error if device not found and
1635         offloading is mandatory.
1636         (gomp_target_fallback): Generate error if offloading is mandatory.
1637         (GOMP_target): Add argument in call to gomp_target_fallback.
1638         (GOMP_target_ext): Likewise.
1639         (gomp_target_data_fallback): Generate error if offloading is mandatory.
1640         (GOMP_target_data): Add argument in call to gomp_target_data_fallback.
1641         (GOMP_target_data_ext): Likewise.
1642         (gomp_target_task_fn): Add argument in call to gomp_target_fallback.
1643         (gomp_target_init): Return early if offloading is disabled.
1644
1645 2020-10-15  Kwok Cheung Yeung  <kcy@codesourcery.com>
1646
1647         * libgomp.texi (omp_get_max_active_levels): Modify description.
1648         (omp_get_supported_active_levels): Make descriptions consistent.
1649
1650 2020-10-14  Jakub Jelinek  <jakub@redhat.com>
1651
1652         * libgomp.texi (omp_get_supported_active_levels): Fix a typo.
1653
1654 2020-10-13  Kwok Cheung Yeung  <kcy@codesourcery.com>
1655
1656         * env.c (gomp_max_active_levels_var): Initialize to
1657         gomp_supported_active_levels.
1658         (initialize_env): Limit gomp_max_active_levels_var to be at most
1659         equal to gomp_supported_active_levels.
1660         * fortran.c (omp_get_supported_active_levels): Add ialias_redirect.
1661         (omp_get_supported_active_levels_): New.
1662         * icv.c (omp_set_max_active_levels): Limit gomp_max_active_levels_var
1663         to at most equal to gomp_supported_active_levels.
1664         (omp_get_supported_active_levels): New.
1665         * libgomp.h (gomp_supported_active_levels): New.
1666         * libgomp.map (OMP_5.0.1): Add omp_get_supported_active_levels and
1667         omp_get_supported_active_levels_.
1668         * libgomp.texi (omp_get_supported_active_levels): New.
1669         (omp_set_max_active_levels): Update.  Add reference to
1670         omp_get_supported_active_levels.
1671         * omp.h.in (omp_get_supported_active_levels): New.
1672         * omp_lib.f90.in (omp_get_supported_active_levels): New.
1673         * omp_lib.h.in (omp_get_supported_active_levels): New.
1674         * testsuite/libgomp.c/lib-2.c (main): Check omp_get_max_active_levels
1675         against omp_get_supported_active_levels.
1676         * testsuite/libgomp.fortran/lib4.f90 (lib4): Likewise.
1677
1678 2020-10-11  Clement Chigot  <clement.chigot@atos.net>
1679
1680         * config/t-aix: Delete and recreate libgomp before creating
1681         FAT library.
1682
1683 2020-10-08  Tom de Vries  <tdevries@suse.de>
1684
1685         PR libgomp/81802
1686         * plugin/plugin-nvptx.c (GOMP_OFFLOAD_run): Report launch
1687         dimensions.
1688
1689 2020-10-06  Tom de Vries  <tdevries@suse.de>
1690
1691         * testsuite/libgomp.oacc-fortran/declare-5.f90: Add xfail for PR92790.
1692
1693 2020-10-06  Tom de Vries  <tdevries@suse.de>
1694
1695         PR middle-end/90861
1696         * testsuite/libgomp.oacc-c-c++-common/declare-vla.c: Remove xfail.
1697
1698 2020-10-05  Tom de Vries  <tdevries@suse.de>
1699
1700         PR fortran/95654
1701         * testsuite/libgomp.fortran/pr95654.f90: New test.
1702
1703 2020-10-02  Tobias Burnus  <tobias@codesourcery.com>
1704
1705         * Makefile.in: Regenerate with automake 1.15.1.
1706         * aclocal.m4: Likewise.
1707         * configure: Likewise.
1708         * testsuite/Makefile.in: Likewise.
1709
1710 2020-09-30  Andrew Stubbs  <ams@codesourcery.com>
1711
1712         * parallel.c (gomp_resolve_num_threads): Ignore nest_var on nvptx
1713         and amdgcn targets.
1714
1715 2020-09-30  Tobias Burnus  <tobias@codesourcery.com>
1716
1717         * testsuite/libgomp.fortran/declare-target-3.f90: New test.
1718
1719 2020-09-29  Andrew Stubbs  <ams@codesourcery.com>
1720
1721         * config/gcn/bar.c (gomp_barrier_wait_end): Skip the barrier if the
1722         total number of threads is one.
1723         (gomp_team_barrier_wake): Likewise.
1724         (gomp_team_barrier_wait_end): Likewise.
1725         (gomp_team_barrier_wait_cancel_end): Likewise.
1726         * config/nvptx/bar.c (gomp_barrier_wait_end): Likewise.
1727         (gomp_team_barrier_wake): Likewise.
1728         (gomp_team_barrier_wait_end): Likewise.
1729         (gomp_team_barrier_wait_cancel_end): Likewise.
1730         * testsuite/libgomp.c-c++-common/nested-parallel-unbalanced.c: New test.
1731
1732 2020-09-28  Tobias Burnus  <tobias@codesourcery.com>
1733
1734         PR middle-end/96390
1735         * testsuite/libgomp.c++/pr96390.C: New test.
1736         * testsuite/libgomp.c-c++-common/pr96390.c: New test.
1737
1738 2020-09-27  Clement Chigot  <clement.chigot@atos.net>
1739
1740         * config/t-aix: Use $(AR) without -X32_64.
1741
1742 2020-09-25  Jakub Jelinek  <jakub@redhat.com>
1743
1744         * testsuite/libgomp.c/loop-25.c: New test.
1745
1746 2020-09-22  Tobias Burnus  <tobias@codesourcery.com>
1747
1748         PR fortran/95654
1749         * testsuite/libgomp.fortran/pr66199-5.f90: Make stop codes unique.
1750
1751 2020-09-22  Tom de Vries  <tdevries@suse.de>
1752
1753         * plugin/plugin-nvptx.c (link_ptx): Print elog if cuLinkComplete call
1754         fails.
1755
1756 2020-09-16  Nathan Sidwell  <nathan@acm.org>
1757
1758         * testsuite/libgomp.c++/udr-3.C: Add missing ctor.
1759
1760 2020-09-15  Tobias Burnus  <tobias@codesourcery.com>
1761
1762         PR fortran/96668
1763         * target.c (gomp_map_vars_internal): Initialize has_nullptr.
1764
1765 2020-09-15  Tobias Burnus  <tobias@codesourcery.com>
1766
1767         PR fortran/96668
1768         * libgomp.h (struct target_var_desc): Add has_null_ptr_assoc member.
1769         * target.c (gomp_map_vars_existing): Add always_to_flag flag.
1770         (gomp_map_vars_existing): Update call to it.
1771         (gomp_map_fields_existing): Likewise
1772         (gomp_map_vars_internal): Update PSET handling such that if a nullptr is
1773         now allocated or if GOMP_MAP_POINTER is used PSET is updated and pointer
1774         remapped.
1775         (GOMP_target_enter_exit_data): Hanlde GOMP_MAP_ALWAYS_POINTER like
1776         GOMP_MAP_POINTER.
1777         * testsuite/libgomp.fortran/map-alloc-ptr-1.f90: New test.
1778         * testsuite/libgomp.fortran/map-alloc-ptr-2.f90: New test.
1779
1780 2020-09-14  Tom de Vries  <tdevries@suse.de>
1781
1782         * config/nvptx/atomic.c: New file.  Add
1783         __sync_val_compare_and_swap_16.
1784         * testsuite/libgomp.c-c++-common/reduction-16.c: Add -latomic for
1785         target offload_target_nvptx.
1786
1787 2020-09-08  Julian Brown  <julian@codesourcery.com>
1788
1789         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-2.c: Remove
1790         iteration-ordering assumptions.
1791
1792 2020-09-08  Julian Brown  <julian@codesourcery.com>
1793
1794         * testsuite/libgomp.oacc-fortran/collapse-1.f90: Fix race condition.
1795         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
1796
1797 2020-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
1798
1799         * plugin/plugin-nvptx.c (nvptx_free):
1800         Change "GOMP_PLUGIN_acc_thread () == NULL" test into check of
1801         CUDA_ERROR_NOT_PERMITTED status for cuMemGetAddressRange. Adjust
1802         comments.
1803
1804 2020-08-20  Tobias Burnus  <tobias@codesourcery.com>
1805
1806         * testsuite/libgomp.fortran/lastprivate-conditional-10.f90: New test.
1807
1808 2020-08-13  Kwok Cheung Yeung  <kcy@codesourcery.com>
1809
1810         * testsuite/libgomp.c-c++-common/reduction-16.c: New.
1811
1812 2020-08-13  Jakub Jelinek  <jakub@redhat.com>
1813
1814         * testsuite/libgomp.c/loop-22.c (main): Add some further tests.
1815         * testsuite/libgomp.c/loop-23.c (main): Likewise.
1816         * testsuite/libgomp.c/loop-24.c: New test.
1817
1818 2020-08-08  Jakub Jelinek  <jakub@redhat.com>
1819             Tobias Burnus  <tobias@codesourcery.com>
1820
1821         PR fortran/93553
1822         * testsuite/libgomp.fortran/pr93553.f90: New test.
1823
1824 2020-08-05  Jakub Jelinek  <jakub@redhat.com>
1825
1826         * testsuite/libgomp.c/loop-22.c: New test.
1827         * testsuite/libgomp.c/loop-23.c: New test.
1828
1829 2020-08-05  Jakub Jelinek  <jakub@redhat.com>
1830
1831         PR middle-end/96459
1832         * testsuite/libgomp.c/teams-3.c: New test.
1833         * testsuite/libgomp.c-c++-common/for-2.h (OMPTEAMS): Define to nothing
1834         if not defined yet.
1835         (N(test)): Use it before all N(f*) calls.
1836         * testsuite/libgomp.c-c++-common/for-14.c (DO_PRAGMA, OMPTEAMS): Define.
1837         (main): Don't call all test_* functions from within
1838         #pragma omp teams reduction(|:err), call them directly.
1839
1840 2020-08-04  Tom de Vries  <tdevries@suse.de>
1841
1842         PR target/96428
1843         * testsuite/libgomp.oacc-fortran/pr96628-part1.f90: New test.
1844         * testsuite/libgomp.oacc-fortran/pr96628-part2.f90: New test.
1845
1846 2020-08-03  Julian Brown  <julian@codesourcery.com>
1847             Thomas Schwinge  <thomas@codesourcery.com>
1848
1849         * testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90: Don't run for
1850         shared-memory devices.  Extend with further checking.
1851
1852 2020-08-03  Martin Jambor  <mjambor@suse.cz>
1853
1854         * plugin/Makefrag.am: Remove configuration of HSA plugin.
1855         * aclocal.m4: Regenerated.
1856         * Makefile.in: Regenerated.
1857         * config.h.in: Regenerated.
1858         * configure: Regenerated.
1859         * plugin/configfrag.ac: Likewise.
1860         * plugin/hsa_ext_finalize.h: Removed.
1861         * plugin/plugin-hsa.c: Likewise.
1862         * testsuite/Makefile.in: Regenerated.
1863         * testsuite/lib/libgomp.exp
1864         (offload_target_to_openacc_device_type): Remove hsa case.
1865         (check_effective_target_hsa_offloading_selected_nocache): Removed
1866         (check_effective_target_hsa_offloading_selected): Likewise.
1867         (libgomp_init): Do not add -Wno-hsa to additional_flags.
1868         * testsuite/libgomp.hsa.c/alloca-1.c: Removed test.
1869         * testsuite/libgomp.hsa.c/bitfield-1.c: Likewise.
1870         * testsuite/libgomp.hsa.c/bits-insns.c: Likewise.
1871         * testsuite/libgomp.hsa.c/builtins-1.c: Likewise.
1872         * testsuite/libgomp.hsa.c/c.exp: Likewise.
1873         * testsuite/libgomp.hsa.c/complex-1.c: Likewise.
1874         * testsuite/libgomp.hsa.c/complex-align-2.c: Likewise.
1875         * testsuite/libgomp.hsa.c/formal-actual-args-1.c: Likewise.
1876         * testsuite/libgomp.hsa.c/function-call-1.c: Likewise.
1877         * testsuite/libgomp.hsa.c/get-level-1.c: Likewise.
1878         * testsuite/libgomp.hsa.c/gridify-1.c: Likewise.
1879         * testsuite/libgomp.hsa.c/gridify-2.c: Likewise.
1880         * testsuite/libgomp.hsa.c/gridify-3.c: Likewise.
1881         * testsuite/libgomp.hsa.c/gridify-4.c: Likewise.
1882         * testsuite/libgomp.hsa.c/memory-operations-1.c: Likewise.
1883         * testsuite/libgomp.hsa.c/pr69568.c: Likewise.
1884         * testsuite/libgomp.hsa.c/pr82416.c: Likewise.
1885         * testsuite/libgomp.hsa.c/rotate-1.c: Likewise.
1886         * testsuite/libgomp.hsa.c/staticvar.c: Likewise.
1887         * testsuite/libgomp.hsa.c/switch-1.c: Likewise.
1888         * testsuite/libgomp.hsa.c/switch-branch-1.c: Likewise.
1889         * testsuite/libgomp.hsa.c/switch-sbr-2.c: Likewise.
1890         * testsuite/libgomp.hsa.c/tiling-1.c: Likewise.
1891         * testsuite/libgomp.hsa.c/tiling-2.c: Likewise.
1892
1893 2020-07-27  Julian Brown  <julian@codesourcery.com>
1894             Thomas Schwinge  <thomas@codesourcery.com>
1895
1896         * libgomp.h (struct target_var_desc): Rename do_detach field to
1897         is_attach.
1898         * oacc-mem.c (goacc_exit_datum_1): Add assert.  Don't set finalize for
1899         GOMP_MAP_FORCE_DETACH. Update checking to use is_attach field.
1900         (goacc_enter_data_internal): Don't affect reference counts
1901         for attach mappings.
1902         (goacc_exit_data_internal): Don't affect reference counts for detach
1903         mappings.
1904         * target.c (gomp_map_vars_existing): Don't affect reference counts for
1905         attach mappings.
1906         (gomp_map_vars_internal): Set renamed is_attach flag unconditionally to
1907         mark attach mappings.
1908         (gomp_unmap_vars_internal): Use is_attach flag to prevent affecting
1909         reference count for attach mappings.
1910         * testsuite/libgomp.oacc-c-c++-common/mdc-refcount-1.c: New test.
1911         * testsuite/libgomp.oacc-c-c++-common/mdc-refcount-2.c: New test.
1912         * testsuite/libgomp.oacc-c-c++-common/mdc-refcount-2.c: New test.
1913         * testsuite/libgomp.oacc-fortran/deep-copy-6-no_finalize.F90: Mark
1914         test as shouldfail.
1915         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: Adjust to fail
1916         gracefully in no-finalize mode.
1917         * testsuite/libgomp.oacc-c-c++-common/mdc-refcount-3.c: New file.
1918
1919 2020-07-24  Thomas Schwinge  <thomas@codesourcery.com>
1920
1921         * testsuite/libgomp.oacc-c++/c++.exp: Unset 'offload_target' after
1922         use.
1923         * testsuite/libgomp.oacc-c/c.exp: Likewise.
1924         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
1925
1926 2020-07-23  Julian Brown  <julian@codesourcery.com>
1927             Thomas Schwinge  <thomas@codesourcery.com>
1928
1929         * target.c (gomp_unmap_vars_internal): Remove unnecessary forcing of
1930         finalization for detach operation.
1931         * testsuite/libgomp.oacc-c-c++-common/structured-detach-underflow.c:
1932         New test.
1933
1934 2020-07-23  Tobias Burnus  <tobias@codesourcery.com>
1935
1936         * configure.ac: Add OMP_DEPEND_KIND and OMP_INT128_SIZE.
1937         * libgomp_f.h.in (omp_check_defines): Check whether
1938         sizeof of determined Fortran kind and C typedef match.
1939         * omp_lib.f90.in: Add omp_depened_kind.
1940         * omp_lib.h.in: Likewise; fix omp_alloctrait_key_kind.
1941         * configure: Regenerate.
1942         * Makefile.in: Regenerate.
1943         * testsuite/Makefile.in: Regenerate.
1944
1945 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
1946
1947         * testsuite/libgomp.c-c++-common/critical-hint-1.c: New; moved from
1948         gcc/testsuite/c-c++-common/gomp/.
1949         * testsuite/libgomp.c-c++-common/critical-hint-2.c: Likewise.
1950         * testsuite/libgomp.fortran/critical-hint-1.f90: New; moved
1951         from gcc/testsuite/gfortran.dg/gomp/.
1952         * testsuite/libgomp.fortran/critical-hint-2.f90: Likewise.
1953
1954 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
1955
1956         * omp_lib.f90.in: Add omp_sync_hint_* and omp_sync_hint_kind.
1957         * omp_lib.h.in: Likewise.
1958
1959 2020-07-18  H.J. Lu  <hjl.tools@gmail.com>
1960
1961         PR target/95620
1962         * testsuite/libgomp.c/pr95620.c: New test.
1963
1964 2020-07-16  Julian Brown  <julian@codesourcery.com>
1965             Thomas Schwinge  <thomas@codesourcery.com>
1966
1967         * testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90: New test.
1968         * testsuite/libgomp.oacc-fortran/attach-descriptor-2.f90: New test.
1969
1970 2020-07-15  Tobias Burnus  <tobias@codesourcery.com>
1971
1972         * testsuite/libgomp.fortran/alloc-1.F90: Use c_size_t to
1973         avoid conversion on 32bit systems from 32bit to 64bit due
1974         to -fdefault-integer-8.
1975
1976 2020-07-15  Tobias Burnus  <tobias@codesourcery.com>
1977
1978         * testsuite/libgomp.fortran/struct-elem-map-1.f90: Remove unused
1979         variables; add character(kind=4) tests; update TODO comment.
1980
1981 2020-07-15  Tobias Burnus  <tobias@codesourcery.com>
1982
1983         * allocator.c: Add ialias for omp_init_allocator and
1984         omp_destroy_allocator.
1985         * configure.ac: Set INTPTR_T_KIND.
1986         * configure: Regenerate.
1987         * Makefile.in: Regenerate.
1988         * testsuite/Makefile.in: Regenerate.
1989         * fortran.c (omp_init_allocator_, omp_destroy_allocator_,
1990         omp_set_default_allocator_, omp_get_default_allocator_): New
1991         functions and ialias_redirect.
1992         * icv.c: Add ialias for omp_set_default_allocator and
1993         omp_get_default_allocator.
1994         * libgomp.map (OMP_5.0.1): Add omp_init_allocator_,
1995         omp_destroy_allocator_, omp_set_default_allocator_ and
1996         omp_get_default_allocator_.
1997         * omp_lib.f90.in: Add allocator traits parameters, declare
1998         allocator routines and add related kind parameters.
1999         * omp_lib.h.in: Likewise.
2000         * testsuite/libgomp.c-c++-common/alloc-2.c: Fix sizeof.
2001         * testsuite/libgomp.fortran/alloc-1.F90: New test.
2002         * testsuite/libgomp.fortran/alloc-2.F90: New test.
2003         * testsuite/libgomp.fortran/alloc-3.F: New test.
2004         * testsuite/libgomp.fortran/alloc-4.f90: New test.
2005         * testsuite/libgomp.fortran/alloc-5.f90: New test.
2006
2007 2020-07-14  Tom de Vries  <tom@codesourcery.com>
2008             Cesar Philippidis  <cesar@codesourcery.com>
2009             Thomas Schwinge  <thomas@codesourcery.com>
2010             Kwok Cheung Yeung  <kcy@codesourcery.com>
2011
2012         * oacc-init.c (acc_init_state_lock, acc_init_state, acc_init_thread):
2013         New variable.
2014         (acc_init_1): Set acc_init_thread to pthread_self ().  Set
2015         acc_init_state to initializing at the start, and to initialized at the
2016         end.
2017         (self_initializing_p): New function.
2018         (acc_get_device_type): Return acc_device_none if called by thread that
2019         is currently executing acc_init_1.
2020         * libgomp.texi (acc_get_device_type): Update documentation.
2021         (Implementation Status and Implementation-Defined Behavior): Likewise.
2022         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-2.c: New.
2023
2024 2020-07-14  David Edelsohn  <dje.gcc@gmail.com>
2025
2026         * config/t-aix: Set BITS from compiler cpp macro.
2027
2028 2020-07-14  Tobias Burnus  <tobias@codesourcery.com>
2029
2030         * testsuite/libgomp.fortran/struct-elem-map-1.f90: New test.
2031
2032 2020-07-14  Tobias Burnus  <tobias@codesourcery.com>
2033
2034         PR fortran/67311
2035         * testsuite/libgomp.fortran/target-map-1.f90: New test.
2036
2037 2020-07-14  Jakub Jelinek  <jakub@redhat.com>
2038
2039         * testsuite/libgomp.c/loop-21.c: New test.
2040
2041 2020-07-13  Julian Brown  <julian@codesourcery.com>
2042             Thomas Schwinge  <thomas@codesourcery.com>
2043
2044         * testsuite/libgomp.oacc-fortran/dynamic-pointer-1.f90: New test.
2045
2046 2020-07-10  Julian Brown  <julian@codesourcery.com>
2047             Thomas Schwinge  <thomas@codesourcery.com>
2048
2049         * libgomp.h (struct splay_tree_key_s): Change virtual_refcount to
2050         dynamic_refcount.
2051         (struct gomp_device_descr): Remove GOMP_MAP_VARS_OPENACC_ENTER_DATA.
2052         * oacc-mem.c (acc_map_data): Substitute virtual_refcount for
2053         dynamic_refcount.
2054         (acc_unmap_data): Update comment.
2055         (goacc_map_var_existing, goacc_enter_datum): Adjust for
2056         dynamic_refcount semantics.
2057         (goacc_exit_datum_1, goacc_exit_datum): Re-add some error checking.
2058         Adjust for dynamic_refcount semantics.
2059         (goacc_enter_data_internal): Implement "present" case of dynamic
2060         memory-map handling here.  Update "non-present" case for
2061         dynamic_refcount semantics.
2062         (goacc_exit_data_internal): Use goacc_exit_datum_1.
2063         * target.c (gomp_map_vars_internal): Remove
2064         GOMP_MAP_VARS_OPENACC_ENTER_DATA handling.  Update for dynamic_refcount
2065         handling.
2066         (gomp_unmap_vars_internal): Remove virtual_refcount handling.
2067         (gomp_load_image_to_device): Substitute dynamic_refcount for
2068         virtual_refcount.
2069         * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: Remove XFAILs.
2070         * testsuite/libgomp.oacc-c-c++-common/refcounting-1.c: New test.
2071         * testsuite/libgomp.oacc-c-c++-common/refcounting-2.c: New test.
2072         * testsuite/libgomp.oacc-c-c++-common/struct-3-1-1.c: New test.
2073         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: Remove XFAILs and
2074         trace output.
2075         * testsuite/libgomp.oacc-fortran/deep-copy-6-no_finalize.F90: Remove
2076         trace output.
2077         * testsuite/libgomp.oacc-fortran/dynamic-incr-structural-1.f90: New
2078         test.
2079         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4.c:
2080         Remove stale comment.
2081         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-1.f90: Remove XFAILs.
2082         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-2.F90: Likewise.
2083         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-1.f90: Likewise.
2084         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-2.f90: Likewise.
2085         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-1.f90: Likewise.
2086         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-1.f90: Adjust XFAIL.
2087
2088 2020-07-10  Julian Brown  <julian@codesourcery.com>
2089             Thomas Schwinge  <thomas@codesourcery.com>
2090
2091         * oacc-mem.c (goacc_map_var_existing): New function.
2092         (goacc_enter_datum): Use above function.
2093         (goacc_exit_datum_1): New function.
2094         (goacc_exit_datum): Use above function.
2095
2096 2020-07-09  Julian Brown  <julian@codesourcery.com>
2097             Thomas Schwinge  <thomas@codesourcery.com>
2098
2099         PR middle-end/95270
2100         * testsuite/libgomp.oacc-c-c++-common/pr95270-1.c: New test.
2101         * testsuite/libgomp.oacc-c-c++-common/pr95270-2.c: New test.
2102
2103 2020-07-09  Julian Brown  <julian@codesourcery.com>
2104
2105         * oacc-mem.c (find_group_last): Group data-movement clauses
2106         (GOMP_MAP_TO_PSET, GOMP_MAP_TO, etc.) together with a subsequent
2107         GOMP_MAP_ATTACH.  Allow standalone GOMP_MAP_ATTACH also.
2108
2109 2020-07-09  Jakub Jelinek  <jakub@redhat.com>
2110
2111         * testsuite/libgomp.c/loop-19.c: New test.
2112         * testsuite/libgomp.c/loop-20.c: New test.
2113
2114 2020-07-09  Jakub Jelinek  <jakub@redhat.com>
2115
2116         * omp.h.in (omp_alloctrait_value_t): Change omp_atv_default from
2117         2 to -1.  Add omp_atv_serialized and define omp_atv_sequential using
2118         it.  Remove __omp_alloctrait_value_max__.
2119         * allocator.c (omp_init_allocator): Handle omp_atv_default for
2120         omp_atk_alignment and omp_atk_pool_size.
2121
2122 2020-07-03  Thomas Schwinge  <thomas@codesourcery.com>
2123
2124         * oacc-mem.c (goacc_exit_data_internal): Revert always-copyfrom
2125         behavior for 'GOMP_MAP_FORCE_FROM'.
2126         * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: Adjust XFAIL.
2127
2128 2020-07-03  Thomas Schwinge  <thomas@codesourcery.com>
2129
2130         * oacc-mem.c (goacc_exit_data_internal): Remove
2131         'GOMP_MAP_ALWAYS_FROM' handling.
2132
2133 2020-06-30  Thomas Schwinge  <thomas@codesourcery.com>
2134
2135         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Replace fragile
2136         'scan-assembler' with 'scan-offload-rtl'.
2137         * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Likewise.
2138         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Likewise.
2139         * testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: Likewise.
2140         * testsuite/libgomp.oacc-c-c++-common/pr85381.c: Likewise.
2141
2142 2020-06-30  Thomas Schwinge  <thomas@codesourcery.com>
2143
2144         * target.c (gomp_map_vars_existing): Assert 'kind !=
2145         GOMP_MAP_ATTACH'.
2146         (gomp_map_vars_internal): Clean up.
2147
2148 2020-06-27  Jakub Jelinek  <jakub@redhat.com>
2149
2150         * testsuite/libgomp.c/loop-17.c: New test.
2151         * testsuite/libgomp.c/loop-18.c: New test.
2152
2153 2020-06-26  Marek Polacek  <polacek@redhat.com>
2154
2155         * testsuite/libgomp.c++/atomic-3.C: Use -std=gnu++14.
2156
2157 2020-06-23  Alexandre Oliva  <oliva@adacore.com>
2158
2159         * testsuite/lib/libgomp.exp: Load gcc lib scanoffload.exp.
2160         * testsuite/lib/libgomp-dg.exp: Drop now-obsolete -save-temps.
2161
2162 2020-06-22  David Edelsohn  <dje.gcc@gmail.com>
2163
2164         * Makefile.am: Use -include.
2165         * Makefile.in: Regenerate.
2166
2167 2020-06-21  David Edelsohn  <dje.gcc@gmail.com>
2168
2169         * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
2170         * Makefile.in: Regenerate
2171         * configure.ac (tmake_file): Substitute.
2172         * configure: Regenerate.
2173         * configure.tgt (powerpc-ibm-aix*): Define tmake_file.
2174         * config/t-aix: New file.
2175
2176 2020-06-17  Thomas Schwinge  <thomas@codesourcery.com>
2177
2178         PR lto/94848
2179         * testsuite/libgomp.fortran/use_device_ptr-optional-3.f90: Add
2180         'dg-do run'.
2181
2182 2020-06-17  Andrew Stubbs  <ams@codesourcery.com>
2183
2184         * plugin/plugin-gcn.c (init_environment_variables): Use ".so.1"
2185         variant for HSA_RUNTIME_LIB name.
2186         (find_executable_symbol_1): Delete.
2187         (find_executable_symbol): Delete.
2188         (init_kernel_properties): Add ".kd" suffix to symbol names.
2189         (find_load_offset): Delete.
2190         (create_and_finalize_hsa_program): Remove relocation handling.
2191
2192 2020-06-16  Tobias Burnus  <tobias@codesourcery.com>
2193
2194         * testsuite/libgomp.oacc-fortran/routine-10.f90: New test.
2195
2196 2020-06-08  Tobias Burnus  <tobias@codesourcery.com>
2197
2198         PR lto/94848
2199         PR middle-end/95551
2200         * testsuite/libgomp.fortran/target-var.f90: New test.
2201
2202 2020-06-05  Thomas Schwinge  <thomas@codesourcery.com>
2203             Julian Brown  <julian@codesourcery.com>
2204
2205         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>: Explain
2206         special handling.
2207
2208 2020-06-05  Thomas Schwinge  <thomas@codesourcery.com>
2209             Julian Brown  <julian@codesourcery.com>
2210
2211         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>:
2212         Simplify.
2213
2214 2020-06-05  Julian Brown  <julian@codesourcery.com>
2215
2216         * testsuite/libgomp.oacc-c-c++-common/struct-copyout-1.c: New test.
2217         * testsuite/libgomp.oacc-c-c++-common/struct-copyout-2.c: New test.
2218
2219 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2220
2221         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>:
2222         Evaluate 'copyfrom' individually for each entry.
2223         * testsuite/libgomp.oacc-c-c++-common/struct-1.c: Update.
2224
2225 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2226
2227         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>:
2228         Evaluate 'finalize' individually for each entry.
2229         * testsuite/libgomp.oacc-c-c++-common/struct-1.c: New file.
2230         * testsuite/libgomp.oacc-c-c++-common/struct-refcount-1.c: Remove
2231         file.
2232
2233 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2234
2235         * testsuite/libgomp.oacc-c-c++-common/deep-copy-7.c: Fix 'sizeof'
2236         usage.
2237         * testsuite/libgomp.oacc-c-c++-common/deep-copy-8.c: Likewise.
2238
2239 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2240             Julian Brown  <julian@codesourcery.com>
2241
2242         * oacc-mem.c (goacc_exit_datum): Repair 'is_tgt_unmapped'
2243         checking.
2244         (acc_unmap_data, goacc_exit_data_internal): Restore
2245         'is_tgt_unmapped' checking.
2246         * testsuite/libgomp.oacc-c-c++-common/struct-refcount-1.c: New
2247         file.
2248         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: Adjust.
2249         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-1.f90: Likewise.
2250         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-1.f90: Likewise.
2251         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-2.f90: Likewise.
2252         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-1.f90: Likewise.
2253         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-1.f90: Likewise.
2254
2255 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2256             Julian Brown  <julian@codesourcery.com>
2257
2258         * oacc-mem.c (acc_unmap_data): Don't open-code 'gomp_remove_var'.
2259
2260 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2261
2262         PR libgomp/92854
2263         * oacc-mem.c (acc_unmap_data): Remove 'tgt' reference counting.
2264
2265 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2266
2267         PR libgomp/92854
2268         * testsuite/libgomp.oacc-c-c++-common/pr92854-1.c: Extend some
2269         more.
2270
2271 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2272             Julian Brown  <julian@codesourcery.com>
2273
2274         * oacc-mem.c (goacc_enter_datum): Use 'tgt' returned from
2275         'gomp_map_vars'.
2276          (acc_map_data): Clean up accordingly.
2277
2278 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2279
2280         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: XFAIL behavior
2281         of over-eager 'finalize' clause.
2282         * testsuite/libgomp.oacc-fortran/deep-copy-6-no_finalize.F90: New
2283         file.
2284         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-1.f90: Likewise.
2285         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-2.F90: Likewise.
2286         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-1.f90: Likewise.
2287         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-2.f90: Likewise.
2288         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-1.f90: Likewise.
2289         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-2.f90: Likewise.
2290         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-1.f90: Likewise.
2291         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-2.f90: Likewise.
2292
2293 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2294
2295         * oacc-mem.c (goacc_exit_data_internal): Unlock on error path.
2296
2297 2020-06-04  Julian Brown  <julian@codesourcery.com>
2298
2299         * oacc-mem.c (acc_attach_async): Add missing gomp_mutex_unlock on
2300         error path.
2301         (goacc_detach_internal): Likewise.
2302
2303 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
2304
2305         * testsuite/libgomp.oacc-fortran/error_stop-1.f: Initialize before
2306         the checkpoint.
2307         * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
2308         * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
2309         * testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
2310         * testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
2311         * testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.
2312
2313 2020-06-02  Jakub Jelinek  <jakub@redhat.com>
2314
2315         * allocator.c (omp_free): Fix up build if HAVE_SYNC_BUILTINS is not
2316         defined.
2317
2318 2020-05-30  Jakub Jelinek  <jakub@redhat.com>
2319
2320         * testsuite/libgomp.c-c++-common/alloc-4.c: New test.
2321
2322 2020-05-30  Jakub Jelinek  <jakub@redhat.com>
2323
2324         * allocator.c (omp_alloc): For size == 0, return NULL early.
2325
2326 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
2327
2328         PR bootstrap/95413
2329         * configure: Regenerated.
2330
2331 2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
2332
2333         PR libfortran/95191
2334         * testsuite/libgomp.fortran/async_io_9.f90: New test.
2335
2336 2020-05-19  Jakub Jelinek  <jakub@redhat.com>
2337
2338         * omp.h.in (omp_uintptr_t): New typedef.
2339         (__GOMP_UINTPTR_T_ENUM): Define.
2340         (omp_memspace_handle_t, omp_allocator_handle_t, omp_alloctrait_key_t,
2341         omp_alloctrait_value_t, omp_alloctrait_t): New typedefs.
2342         (__GOMP_DEFAULT_NULL_ALLOCATOR): Define.
2343         (omp_init_allocator, omp_destroy_allocator, omp_set_default_allocator,
2344         omp_get_default_allocator, omp_alloc, omp_free): Declare.
2345         * libgomp.h (struct gomp_team_state): Add def_allocator field.
2346         (gomp_def_allocator): Declare.
2347         * libgomp.map (OMP_5.0.1): Export omp_set_default_allocator,
2348         omp_get_default_allocator, omp_init_allocator, omp_destroy_allocator,
2349         omp_alloc and omp_free.
2350         * team.c (gomp_team_start): Copy over ts.def_allocator.
2351         * env.c (gomp_def_allocator): New variable.
2352         (parse_wait_policy): Adjust function comment.
2353         (parse_allocator): New function.
2354         (handle_omp_display_env): Print OMP_ALLOCATOR.
2355         (initialize_env): Call parse_allocator.
2356         * Makefile.am (libgomp_la_SOURCES): Add allocator.c.
2357         * allocator.c: New file.
2358         * icv.c (omp_set_default_allocator, omp_get_default_allocator): New
2359         functions.
2360         * testsuite/libgomp.c-c++-common/alloc-1.c: New test.
2361         * testsuite/libgomp.c-c++-common/alloc-2.c: New test.
2362         * testsuite/libgomp.c-c++-common/alloc-3.c: New test.
2363         * Makefile.in: Regenerated.
2364
2365 2020-05-15  H.J. Lu  <hongjiu.lu@intel.com>
2366
2367         PR bootstrap/95147
2368         * configure: Regenerated.
2369
2370 2020-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
2371
2372         PR libfortran/95119
2373         * testsuite/libgomp.fortran/close_errors_1.f90: New test.
2374
2375 2020-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2376
2377         * configure: Regenerated.
2378
2379 2020-05-14  Jakub Jelinek  <jakub@redhat.com>
2380
2381         * testsuite/libgomp.c-c++-common/target-40.c: New test.
2382
2383 2020-05-13  Tobias Burnus  <tobias@codesourcery.com>
2384
2385         PR fortran/94690
2386         * testsuite/libgomp.fortran/pr66199-3.f90: New.
2387         * testsuite/libgomp.fortran/pr66199-4.f90: New.
2388         * testsuite/libgomp.fortran/pr66199-5.f90: New.
2389         * testsuite/libgomp.fortran/pr66199-6.f90: New.
2390         * testsuite/libgomp.fortran/pr66199-7.f90: New.
2391         * testsuite/libgomp.fortran/pr66199-8.f90: New.
2392         * testsuite/libgomp.fortran/pr66199-9.f90: New.
2393
2394 2020-05-12  Jakub Jelinek  <jakub@redhat.com>
2395
2396         * testsuite/libgomp.c/target-39.c: New test.
2397
2398 2020-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2399
2400         * config/accel/openacc.f90 (acc_device_current): Set to '-1'.
2401         * openacc.f90 (acc_device_current): Likewise.
2402         * openacc.h (acc_device_current): Likewise.
2403         * openacc_lib.h (acc_device_current): Likewise.
2404
2405         PR target/94282
2406         * testsuite/libgomp.c-c++-common/function-not-offloaded.c: Remove
2407         'dg-allow-blank-lines-in-output'.
2408
2409         * oacc-init.c (get_openacc_name): Handle 'gcn'.
2410         * testsuite/lib/libgomp.exp
2411         (offload_target_to_openacc_device_type) [amdgcn*]: Return
2412         'radeon'.  Adjust all users.
2413         (check_effective_target_openacc_amdgcn_accel_present): Rename
2414         to...
2415         (check_effective_target_openacc_radeon_accel_present): ... this.
2416         Adjust all users.
2417         (check_effective_target_openacc_amdgcn_accel_selected): Rename to...
2418         (check_effective_target_openacc_radeon_accel_selected): ... this.
2419         Adjust all users.
2420
2421         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Add
2422         'dg-do run'.
2423
2424 2020-04-23  Andrew Stubbs  <ams@codesourcery.com>
2425
2426         PR other/94629
2427
2428         * plugin/plugin-gcn.c (init_hsa_context): Check return value from
2429         hsa_iterate_agents.
2430         (GOMP_OFFLOAD_init_device): Check return values from both calls to
2431         hsa_agent_iterate_regions.
2432
2433 2020-04-20  Thomas Schwinge  <thomas@codesourcery.com>
2434
2435         PR middle-end/94635
2436         * testsuite/libgomp.fortran/target-enter-data-2.F90: Add 'dg-do
2437         run'.
2438
2439 2020-04-20  Tobias Burnus  <tobias@codesourcery.com>
2440
2441         PR middle-end/94120
2442         * testsuite/libgomp.oacc-c++/declare-pr94120.C: Fix 'declare copy(out)'
2443         test case.
2444
2445 2020-04-17  Tobias Burnus  <tobias@codesourcery.com>
2446
2447         PR middle-end/94635
2448         * testsuite/libgomp.fortran/target-enter-data-2.F90: New.
2449
2450 2020-04-13  Thomas Schwinge  <thomas@codesourcery.com>
2451
2452         PR libgomp/92843
2453         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
2454         Rename to...
2455         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1-lib.c:
2456         ... this.
2457         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
2458         Rename to...
2459         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1.c:
2460         ... this.
2461         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
2462         Rename to...
2463         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2-lib.c:
2464         ... this.
2465         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
2466         Rename to...
2467         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2.c:
2468         ... this.
2469         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
2470         Rename to...
2471         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3-lib.c:
2472         ... this.
2473         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
2474         Rename to...
2475         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3.c:
2476         ... this.
2477         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
2478         Rename to...
2479         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4-lib.c:
2480         ... this.
2481         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
2482         Rename to...
2483         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4.c:
2484         ... this.
2485         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
2486         Rename to...
2487         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5-lib.c:
2488         ... this.
2489         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
2490         Rename to...
2491         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5.c:
2492         ... this.
2493         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
2494         Rename to...
2495         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6-lib.c:
2496         ... this.
2497         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
2498         Rename to...
2499         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6.c:
2500         ... this.
2501         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
2502         Rename to...
2503         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7-lib.c:
2504         ... this.
2505         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
2506         Rename to...
2507         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7.c:
2508         ... this.
2509         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
2510         Rename to...
2511         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8-lib.c:
2512         ... this.
2513         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c::
2514         Rename to...
2515         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8.c:
2516         ... this.
2517
2518 2020-04-10  Julian Brown  <julian@codesourcery.com>
2519             Thomas Schwinge  <thomas@codesourcery.com>
2520
2521         PR libgomp/92843
2522         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
2523         New file.
2524         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
2525         Likewise.
2526         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
2527         Likewise.
2528         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
2529         Likewise.
2530         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
2531         Likewise.
2532         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
2533         Likewise.
2534         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
2535         Likewise.
2536         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
2537         Likewise.
2538         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
2539         Likewise.
2540         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
2541         Likewise.
2542         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
2543         Likewise.
2544         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
2545         Likewise.
2546         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
2547         Likewise.
2548         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
2549         Likewise.
2550         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
2551         Likewise.
2552         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c:
2553         Likewise.
2554
2555 2020-04-10  Thomas Schwinge  <thomas@codesourcery.com>
2556
2557         * testsuite/libgomp.fortran/target-enter-data-1.f90: Add 'dg-do
2558         run'.
2559
2560 2020-04-08  Tobias Burnus  <tobias@codesourcery.com>
2561
2562         PR middle-end/94120
2563         * libgomp.oacc-c++/declare-pr94120.C: New.
2564
2565 2020-04-06  Maciej W. Rozycki  <macro@wdc.com>
2566
2567         * configure.ac: Add testsuite/libgomp-site-extra.exp to output
2568         files.
2569         * configure: Regenerate.
2570         * testsuite/libgomp-site-extra.exp.in: New file.
2571         * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): Remove
2572         variable.
2573         * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New
2574         variable.
2575         * testsuite/Makefile.in: Regenerate.
2576
2577 2020-04-03  Thomas Schwinge  <thomas@codesourcery.com>
2578
2579         PR tree-optimization/89713
2580         PR c/94392
2581         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Again expect
2582         'bar.sync'.
2583         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Likewise.
2584
2585 2020-03-31  Tobias Burnus  <tobias@codesourcery.com>
2586
2587         * target.c (GOMP_target_enter_exit_data): Handle PSET/MAP_POINTER.
2588         * testsuite/libgomp.fortran/target-enter-data-1.f90: New.
2589
2590 2020-03-24  Tobias Burnus  <tobias@codesourcery.com>
2591
2592         PR libgomp/81689
2593         * testsuite/libgomp.c/target-link-1.c: Remove xfail.
2594
2595 2020-03-20  Tobias Burnus  <tobias@codesourcery.com>
2596
2597         PR libgomp/94251
2598         * target.c (gomp_load_image_to_device): Fix link
2599         variable handling.
2600
2601 2020-03-19  Jakub Jelinek  <jakub@redhat.com>
2602
2603         PR c++/93931
2604         * testsuite/libgomp.c++/pr93931.C: New test.
2605
2606 2020-03-19  Tobias Burnus  <tobias@codesourcery.com>
2607
2608         * testsuite/libgomp.c-c++-common/function-not-offloaded.c: Add
2609         dg-allow-blank-lines-in-output.
2610
2611 2020-03-18  Julian Brown <julian@codesourcery.com>
2612             Tobias Burnus  <tobias@codesourcery.com>
2613
2614         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Really make
2615         it work concurrently.
2616
2617 2020-03-18  Tobias Burnus  <tobias@codesourcery.com>
2618
2619         * testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C: Add
2620         #define DO_LONG_DOUBLE; set to 1, except for nvidia + gcn.
2621         * libgomp.oacc-c-c++-common/firstprivate-mappings-1.c: Likewise.
2622
2623 2020-03-14  Jakub Jelinek  <jakub@redhat.com>
2624
2625         PR middle-end/93566
2626         * testsuite/libgomp.c/pr93566.c: New test.
2627
2628 2020-02-21  Frederik Harwath  <frederik@codesourcery.com>
2629
2630         * testsuite/libgomp.oacc-fortran/acc_get_property.f90: Adapt to
2631         changes from 2020-02-19, i.e. use integer(c_size_t) instead of
2632         integer(acc_device_property) for the type of the return value of
2633         acc_get_property.
2634
2635 2020-02-19  Tobias Burnus  <tobias@codesourcery.com>
2636
2637         * .gitattributes: New; whitespace handling for Fortran's openacc_lib.h.
2638         * config/accel/openacc.f90 (openacc_kinds): Add acc_device_current.
2639         (openacc_internal, acc_on_device_h): Fix argument name; minor cleanup.
2640         * libgomp.texi (Enabling OpenACC): No longer mark as experimental.
2641         (acc_set_device_num): Fix Fortran argument name, use same name for C.
2642         (acc_get_property): Update Fortran interface to post-OpenACC 3.0
2643         corrections; add note about the previous interface and named constant.
2644         (OpenACC library and environment variables): Fix two typos.
2645         * openacc.f90: Use for all procedures the argument names from the spec
2646         as for â€¦_h they are user visible.
2647         (openacc_kinds): Rename acc_device_property to
2648         acc_device_property_kinds and change value to int32 ; and update users.
2649         Re-add acc_device_property for for backward compatibility.
2650         (acc_get_property_string_h): Clean up as acc_device_property_kind
2651         changed.
2652         (acc_get_property_h): Likewise and return c_size_t instead of
2653         acc_device_property.
2654         (openacc): Also export acc_device_property_kinds.
2655         (acc_async_test_h, acc_async_test_all_h, acc_on_device_h,
2656         acc_is_present_32_h, acc_is_present_64_h): Simplify logical-return-value
2657         handling; check against /= 0 instead of == 1 to match C.
2658         * openacc_lib.h: Use for all procedures the argument names from the spec
2659         as for â€¦_h they are user visible. Place !GCC$ into the first column to
2660         be active also for fixed-form souce form.
2661         (acc_device_current, acc_device_property_kind, acc_device_property,
2662         acc_property_memory, acc_property_free_memory, acc_property_name,
2663         acc_property_vendor, acc_property_driver): New named constants.
2664         (acc_get_property, acc_get_property_string): New generic interface.
2665
2666 2020-02-13  Frederik Harwath  <frederik@codesourcery.com>
2667
2668         PR libgomp/93481
2669         * plugin/plugin-nvptx.c: Remove GOMP_OFFLOAD_async_run stub.
2670         * target.c (gomp_load_plugin_for_device): Make "async_run" loading
2671         optional.
2672         (gomp_target_task_fn): Assert "devicep->async_run_func".
2673         (clear_unsupported_flags): New function to remove unsupported flags
2674         (right now only GOMP_TARGET_FLAG_NOWAIT) that can be be ignored.
2675         (GOMP_target_ext): Apply clear_unsupported_flags to flags.
2676         * testsuite/libgomp.c/target-33.c:
2677         Remove xfail for offload_target_nvptx.
2678         * testsuite/libgomp.c/target-34.c: Likewise.
2679
2680 2020-02-10  Frederik Harwath  <frederik@codesourcery.com>
2681
2682         * testsuite/libgomp.c/target-33.c: Add xfail for execution on
2683         offload_target_nvptx, cf. https://gcc.gnu.org/PR81688.
2684         * testsuite/libgomp.c/target-34.c: Likewise.
2685         * testsuite/libgomp.c/target-link-1.c: Add xfail for
2686         offload_target_nvptx, cf. https://gcc.gnu.org/PR81689.
2687
2688 2020-02-09  Jakub Jelinek  <jakub@redhat.com>
2689
2690         * testsuite/libgomp.c/target-38.c: New test.
2691
2692 2020-02-06  Jakub Jelinek  <jakub@redhat.com>
2693
2694         PR libgomp/93515
2695         * testsuite/libgomp.c-c++-common/pr93515.c: New test.
2696
2697 2020-02-05  Tobias Burnus  <tobias@codesourcery.com>
2698
2699         * testsuite/lib/libgomp.exp
2700         (check_effective_target_offload_target_nvptx): Pass flags as 'options'
2701         and not as 'source' argument to libgomp_target_compile.
2702
2703 2020-02-03  Andrew Stubbs  <ams@codesourcery.com>
2704
2705         * plugin/plugin-gcn.c (EF_AMDGPU_MACH_AMDGCN_GFX801): Remove.
2706         (gcn_gfx801_s): Remove.
2707         (isa_hsa_name): Remove gfx801.
2708         (isa_gcc_name): Remove gfx801/carizzo.
2709         (isa_code): Remove gfx801.
2710
2711 2020-02-03  Julian Brown  <julian@codesourcery.com>
2712             Tobias Burnus  <tobias@codesourcery.com>
2713
2714         * libgomp.texi (OpenACC Runtime Library Routines): Document *_async
2715         and *_finalize variants; document acc_attach and acc_detach; update
2716         references from OpenACC 2.0 to 2.6.
2717         * openacc.f90 (openacc_version): Update to 201711.
2718         * openacc_lib.h (openacc_version): Update to 201711.
2719         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update expected
2720         openacc_version to 201711.
2721         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
2722
2723 2020-01-31  Kwok Cheung Yeung  <kcy@codesourcery.com>
2724
2725         * plugin/plugin-gcn.c (struct hsa_kernel_description): Add sgpr_count
2726         and vgpr_count fields.
2727         (struct kernel_info): Add a field for a hsa_kernel_description.
2728         (run_kernel): Reduce the number of threads/workers if the requested
2729         number would require too many VGPRs.
2730         (init_basic_kernel_info): Initialize description field with
2731         the hsa_kernel_description entry for the kernel.
2732
2733 2020-01-29  Tobias Burnus  <tobias@codesourcery.com>
2734
2735         PR bootstrap/93409
2736         * plugin/configfrag.ac (enable_offload_targets): Skip
2737         HSA and GCN plugin besides -m32 also for -mx32.
2738         * configure: Regenerate.
2739
2740 2020-01-29  Frederik Harwath  <frederik@codesourcery.com>
2741
2742         * oacc-init.c (name_of_acc_device_t): Handle acc_device_radeon.
2743
2744 2020-01-29  Frederik Harwath  <frederik@codesourcery.com>
2745
2746         * plugin-gcn.c (struct agent_info): Add fields "name" and
2747         "vendor_name" ...
2748         (GOMP_OFFLOAD_init_device): ... and init from here.
2749         (struct hsa_context_info): Add field "driver_version_s" ...
2750         (init_hsa_contest): ... and init from here.
2751         (GOMP_OFFLOAD_openacc_get_property): Replace stub with a proper
2752         implementation.
2753         * testsuite/libgomp.oacc-c-c++-common/acc_get_property.c:
2754         Enable test execution for amdgcn and host offloading targets.
2755         * testsuite/libgomp.oacc-fortran/acc_get_property.f90: Likewise.
2756         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c
2757         (expect_device_properties): Split function into ...
2758         (expect_device_string_properties): ... this new function ...
2759         (expect_device_memory): ... and this new function.
2760         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-gcn.c:
2761         Add test.
2762
2763 2020-01-28  Julian Brown  <julian@codesourcery.com>
2764
2765         * testsuite/libgomp.oacc-fortran/deep-copy-2.f90: Remove test from here.
2766         * testsuite/libgomp.oacc-fortran/deep-copy-3.f90: Don't use mixed
2767         component/non-component variable refs in a single directive.
2768         * testsuite/libgomp.oacc-fortran/classtypes-1.f95: Likewise.
2769
2770 2020-01-24  Maciej W. Rozycki  <macro@wdc.com>
2771
2772         * configure.ac: Handle `--with-toolexeclibdir='.
2773         * Makefile.in: Regenerate.
2774         * aclocal.m4: Regenerate.
2775         * configure: Regenerate.
2776         * testsuite/Makefile.in: Regenerate.
2777
2778 2020-01-24  Frederik Harwath  <frederik@codesourcery.com>
2779
2780         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c
2781         (expect_device_properties): Remove "expected_free_mem" argument,
2782         change "expected_total_mem" argument type to size_t;
2783         change types of acc_get_property results to size_t,
2784         adapt format strings.
2785         * testsuite/libgomp.oacc-c-c++-common/acc_get_property.c:
2786         Use %zu instead of %zd to print size_t values.
2787         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-2.c: Adapt and
2788         rename to ...
2789         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-nvptx.c: ... this.
2790         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-3.c: Adapt and
2791         rename to ...
2792         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-host.c: ... this.
2793
2794 2020-01-23  Andrew Stubbs  <ams@codesourcery.com>
2795
2796         * plugin/plugin-gcn.c (parse_target_attributes): Use correct mask for
2797         the device id.
2798
2799 2020-01-20  Andrew Stubbs  <ams@codesourcery.com>
2800
2801         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Skip test on gcn.
2802         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (main):
2803         Adjust test dimensions for amdgcn.
2804         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c (main): Adjust
2805         gang/worker/vector expectations dynamically.
2806         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c
2807         (main): Likewise.
2808         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c (main): Likewise.
2809         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c (main): Likewise.
2810         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c (main): Likewise.
2811         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c (main): Likewise.
2812         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c (main): Likewise.
2813         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c (main): Likewise.
2814         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c (main): Likewise.
2815         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c (main): Likewise.
2816         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
2817         (acc_gang): Recognise acc_device_radeon.
2818         (acc_worker): Likewise.
2819         (acc_vector): Likewise.
2820         (main): Set expectations for amdgcn.
2821         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c
2822         (main): Adjust gang/worker/vector expectations dynamically.
2823         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c (main): Likewise.
2824         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c (main): Likewise.
2825         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c (main): Likewise.
2826         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Set expectations
2827         for amdgcn.
2828
2829 2020-01-17  Andrew Stubbs  <ams@codesourcery.com>
2830
2831         * config/accel/openacc.f90 (openacc_kinds): Rename acc_device_gcn to
2832         acc_device_radeon.
2833         (openacc): Likewise.
2834         * openacc.f90 (openacc_kinds): Likewise.
2835         (openacc): Likewise.
2836         * openacc.h (acc_device_t): Likewise.
2837         * openacc_lib.h: Likewise.
2838         * testsuite/lib/libgomp.exp
2839         (check_effective_target_openacc_amdgcn_accel_present): Likewise.
2840         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c
2841         (cb_compute_construct_end): Likewise.
2842         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c
2843         (cb_enqueue_launch_start): Likewise.
2844         * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c
2845         (cb_enter_data_end): Likewise.
2846         (cb_exit_data_start): Likewise.
2847         (cb_exit_data_end): Likewise.
2848         (cb_compute_construct_end): Likewise.
2849         (cb_enqueue_launch_start): Likewise.
2850         (cb_enqueue_launch_end): Likewise.
2851         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c
2852         (main): Likewise.
2853
2854 2020-01-10  Thomas Schwinge  <thomas@codesourcery.com>
2855
2856         * libgomp-plugin.h (enum goacc_property): New.  Adjust all users
2857         to use this instead of 'enum gomp_device_property'.
2858         (GOMP_OFFLOAD_get_property): Rename to...
2859         (GOMP_OFFLOAD_openacc_get_property): ... this.  Adjust all users.
2860         * libgomp.h (struct gomp_device_descr): Move
2861         'GOMP_OFFLOAD_openacc_get_property'...
2862         (struct acc_dispatch_t): ... here.  Adjust all users.
2863         * plugin/plugin-hsa.c (GOMP_OFFLOAD_get_property): Remove.
2864
2865         * target.c (gomp_map_vars_internal)
2866         <GOMP_MAP_USE_DEVICE_PTR_IF_PRESENT>: Clean up/elaborate code
2867         paths.
2868
2869 2020-01-10  Jakub Jelinek  <jakub@redhat.com>
2870
2871         PR libgomp/93219
2872         * libgomp.h (gomp_print_string): Change return type from void to int.
2873         * affinity-fmt.c (gomp_print_string): Likewise.  Return true if
2874         not all characters have been written.
2875
2876 2020-01-08  Tobias Burnus  <tobias@codesourcery.com>
2877
2878         * libgomp.texi: Fix typos, use https.
2879
2880 2020-01-03  Tobias Burnus  <tobias@codesourcery.com>
2881
2882         * testsuite/libgomp.fortran/optional-map.f90: Add test for
2883         unallocated/disassociated actual arguments to nonallocatable/nonpointer
2884         dummy arguments; those are/shall be regarded as absent arguments.
2885         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto.
2886         * testsuite/libgomp.fortran/use_device_ptr-optional-3.f90: New.
2887
2888 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
2889
2890         Update copyright years.
2891
2892         * libgomp.texi: Bump @copying's copyright year.
2893
2894 2019-12-31  Ayush Mittal  <ayush.m@samsung.com>
2895
2896         PR libgomp/93065
2897         * oacc-init.c (goacc_runtime_deinitialize): New function.
2898
2899 2019-12-28  Jakub Jelinek  <jakub@redhat.com>
2900
2901         PR bootstrap/93074
2902         * plugin/cuda/cuda.h (cuDeviceGetName, cuDriverGetVersion): Declare.
2903         (cuDeviceTotalMem, cuMemGetInfo): Likewise.  Define to *_v2.
2904
2905 2019-12-22  Maciej W. Rozycki  <macro@codesourcery.com>
2906             Frederik Harwath  <frederik@codesourcery.com>
2907             Thomas Schwinge  <tschwinge@codesourcery.com>
2908
2909         * libgomp.h (gomp_device_descr): Add `get_property_func' member.
2910         * libgomp-plugin.h (gomp_device_property_value): New union.
2911         (gomp_device_property_value): New prototype.
2912         * openacc.h (acc_device_t): Add `acc_device_current' enumeration
2913         constant.
2914         (acc_device_property_t): New enum.
2915         (acc_get_property, acc_get_property_string): New prototypes.
2916         * oacc-init.c (acc_get_device_type): Also assert that result
2917         is not `acc_device_current'.
2918         (get_property_any, acc_get_property, acc_get_property_string):
2919         New functions.
2920         * openacc.f90 (openacc_kinds): Add `acc_device_current' and
2921         `acc_property_memory', `acc_property_free_memory',
2922         `acc_property_name', `acc_property_vendor' and
2923         `acc_property_driver' constants.  Add `acc_device_property' data
2924         type.
2925         (openacc_internal): Add `acc_get_property' and
2926         `acc_get_property_string' interfaces.  Add `acc_get_property_h',
2927         `acc_get_property_string_h', `acc_get_property_l' and
2928         `acc_get_property_string_l'.
2929         * oacc-host.c (host_get_property): New function.
2930         (host_dispatch): Wire it.
2931         * target.c (gomp_load_plugin_for_device): Handle `get_property'.
2932         * libgomp.map (OACC_2.6): Add `acc_get_property', `acc_get_property_h_',
2933         `acc_get_property_string' and `acc_get_property_string_h_' symbols.
2934         * libgomp.texi (OpenACC Runtime Library Routines): Add
2935         `acc_get_property'.
2936         (acc_get_property): New node.
2937         * plugin/plugin-gcn.c (GOMP_OFFLOAD_get_property): New
2938         function (stub).
2939         * plugin/plugin-hsa.c (GOMP_OFFLOAD_get_property): New function.
2940         * plugin/plugin-nvptx.c (CUDA_CALLS): Add `cuDeviceGetName',
2941         `cuDeviceTotalMem', `cuDriverGetVersion' and `cuMemGetInfo'
2942         calls.
2943         (GOMP_OFFLOAD_get_property): New function.
2944         (struct ptx_device): Add new field "name".
2945         (cuda_driver_version_s): Add new static variable ...
2946         (nvptx_init): ... and init from here.
2947
2948         * testsuite/libgomp.oacc-c-c++-common/acc_get_property.c: New test.
2949         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-2.c: New test.
2950         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-3.c: New test.
2951         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c: New file
2952         with test helper functions.
2953
2954         * testsuite/libgomp.oacc-fortran/acc_get_property.f90: New test.
2955
2956 2019-12-22  Maciej W. Rozycki  <macro@wdc.com>
2957
2958         * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): New
2959         variable.
2960
2961 2019-12-21  Thomas Schwinge  <thomas@codesourcery.com>
2962
2963         * target.c (gomp_map_vars_internal): Restore 'omp declare target
2964         link' handling.
2965
2966 2019-12-19  Julian Brown  <julian@codesourcery.com>
2967
2968         * testsuite/libgomp.oacc-fortran/class-ptr-param.f95: New test.
2969         * testsuite/libgomp.oacc-fortran/classtypes-1.f95: New test.
2970         * testsuite/libgomp.oacc-fortran/classtypes-2.f95: New test.
2971
2972 2019-12-19  Julian Brown  <julian@codesourcery.com>
2973             Cesar Philippidis  <cesar@codesourcery.com>
2974
2975         * testsuite/libgomp.oacc-fortran/deep-copy-1.f90: New test.
2976         * testsuite/libgomp.oacc-fortran/deep-copy-2.f90: New test.
2977         * testsuite/libgomp.oacc-fortran/deep-copy-3.f90: New test.
2978         * testsuite/libgomp.oacc-fortran/deep-copy-4.f90: New test.
2979         * testsuite/libgomp.oacc-fortran/deep-copy-5.f90: New test.
2980         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: New test.
2981         * testsuite/libgomp.oacc-fortran/deep-copy-7.f90: New test.
2982         * testsuite/libgomp.oacc-fortran/deep-copy-8.f90: New test.
2983         * testsuite/libgomp.oacc-fortran/derived-type-1.f90: New test.
2984         * testsuite/libgomp.oacc-fortran/derivedtype-1.f95: New test.
2985         * testsuite/libgomp.oacc-fortran/derivedtype-2.f95: New test.
2986         * testsuite/libgomp.oacc-fortran/multidim-slice.f95: New test.
2987         * testsuite/libgomp.oacc-fortran/update-2.f90: New test.
2988
2989 2019-12-19  Julian Brown  <julian@codesourcery.com>
2990
2991         * testsuite/libgomp.oacc-c-c++-common/deep-copy-1.c: New test.
2992         * testsuite/libgomp.oacc-c-c++-common/deep-copy-2.c: New test.
2993         * testsuite/libgomp.oacc-c-c++-common/deep-copy-4.c: New test.
2994         * testsuite/libgomp.oacc-c-c++-common/deep-copy-6.c: New test.
2995         * testsuite/libgomp.oacc-c-c++-common/deep-copy-7.c: New test.
2996         * testsuite/libgomp.oacc-c-c++-common/deep-copy-8.c: New test.
2997         * testsuite/libgomp.oacc-c-c++-common/deep-copy-9.c: New test.
2998         * testsuite/libgomp.oacc-c-c++-common/deep-copy-10.c: New test.
2999         * testsuite/libgomp.oacc-c-c++-common/deep-copy-11.c: New test.
3000         * testsuite/libgomp.oacc-c-c++-common/deep-copy-14.c: New test.
3001         * testsuite/libgomp.oacc-c++/deep-copy-12.C: New test.
3002         * testsuite/libgomp.oacc-c++/deep-copy-13.C: New test.
3003
3004 2019-12-19  Julian Brown  <julian@codesourcery.com>
3005
3006         * libgomp.h (struct target_var_desc): Add do_detach flag.
3007         * oacc-init.c (acc_shutdown_1): Free aux block if present.
3008         * oacc-mem.c (find_group_last): Add SIZES parameter. Support
3009         struct components.  Tidy up and add some new checks.
3010         (goacc_enter_data_internal): Update call to find_group_last.
3011         (goacc_exit_data_internal): Support detach operations and
3012         GOMP_MAP_STRUCT.
3013         (GOACC_enter_exit_data): Handle initial GOMP_MAP_STRUCT or
3014         GOMP_MAP_FORCE_PRESENT in finalization detection code.  Handle
3015         attach/detach in enter/exit data detection code.
3016         * target.c (gomp_map_vars_existing): Initialise do_detach field of
3017         tgt_var_desc.
3018         (gomp_map_vars_internal): Support attach.
3019         (gomp_unmap_vars_internal): Support detach.
3020
3021 2019-12-19  Julian Brown  <julian@codesourcery.com>
3022             Thomas Schwinge  <thomas@codesourcery.com>
3023
3024         * libgomp.h (struct splay_tree_aux): Add attach_count field.
3025         (gomp_attach_pointer, gomp_detach_pointer): Add prototypes.
3026         * libgomp.map (OACC_2.6): New section. Add acc_attach,
3027         acc_attach_async, acc_detach, acc_detach_async, acc_detach_finalize,
3028         acc_detach_finalize_async.
3029         * oacc-mem.c (acc_attach_async, acc_attach, goacc_detach_internal,
3030         acc_detach, acc_detach_async, acc_detach_finalize,
3031         acc_detach_finalize_async): New functions.
3032         * openacc.h (acc_attach, acc_attach_async, acc_detach,
3033         (acc_detach_async, acc_detach_finalize, acc_detach_finalize_async): Add
3034         prototypes.
3035         * target.c (gomp_attach_pointer, gomp_detach_pointer): New functions.
3036         (gomp_remove_var_internal): Free attachment counts if present.
3037         * testsuite/libgomp.oacc-c-c++-common/deep-copy-3.c: New test.
3038         * testsuite/libgomp.oacc-c-c++-common/deep-copy-5.c: New test.
3039
3040 2019-12-19  Julian Brown  <julian@codesourcery.com>
3041             Cesar Philippidis  <cesar@codesourcery.com>
3042
3043         * libgomp.h (gomp_map_val): Add prototype.
3044         * oacc-parallel.c (GOACC_parallel_keyed): Use gomp_map_val instead of
3045         open-coding device-address calculation.
3046         * target.c (gomp_map_val): Make global. Use OFFSET_POINTER in
3047         non-present case.
3048
3049 2019-12-19  Julian Brown  <julian@codesourcery.com>
3050
3051         * libgomp.h (struct splay_tree_key_s): Substitute dynamic_refcount
3052         field for virtual_refcount.
3053         (enum gomp_map_vars_kind): Add GOMP_MAP_VARS_OPENACC_ENTER_DATA.
3054         (gomp_free_memmap): Remove prototype.
3055         * oacc-init.c (acc_shutdown_1): Iteratively call gomp_remove_var
3056         instead of calling gomp_free_memmap.
3057         * oacc-mem.c (acc_map_data): Use virtual_refcount instead of
3058         dynamic_refcount.
3059         (acc_unmap_data): Open code instead of forcing target_mem_desc's
3060         to_free field to NULL then calling gomp_unmap_vars.  Handle
3061         REFCOUNT_INFINITY on target blocks.
3062         (goacc_enter_data): Rename to...
3063         (goacc_enter_datum): ...this.  Remove MAPNUM parameter and special
3064         handling for mapping groups.  Use virtual_refcount instead of
3065         dynamic_refcount.  Use GOMP_MAP_VARS_OPENACC_ENTER_DATA for
3066         map_map_vars_async call.  Re-do lookup for target pointer return value.
3067         (acc_create, acc_create_async, acc_copyin, acc_copyin_async): Call
3068         renamed goacc_enter_datum function.
3069         (goacc_exit_data): Rename to...
3070         (goacc_exit_datum): ...this.  Update for virtual_refcount semantics.
3071         (acc_delete, acc_delete_async, acc_delete_finalize,
3072         acc_delete_finalize_async, acc_copyout, acc_copyout_async,
3073         acc_copyout_finalize, acc_copyout_finalize_async): Call renamed
3074         goacc_exit_datum function.
3075         (gomp_acc_remove_pointer, find_pointer): Remove functions.
3076         (find_group_last, goacc_enter_data_internal, goacc_exit_data_internal):
3077         New functions.
3078         (GOACC_enter_exit_data): Use goacc_enter_data_internal and
3079         goacc_exit_data_internal helper functions.
3080         * target.c (gomp_map_vars_internal): Handle
3081         GOMP_MAP_VARS_OPENACC_ENTER_DATA.  Update for virtual_refcount
3082         semantics.
3083         (gomp_unmap_vars_internal): Update for virtual_refcount semantics.
3084         (gomp_load_image_to_device, omp_target_associate_ptr): Zero-initialise
3085         virtual_refcount field instead of dynamic_refcount.
3086         (gomp_free_memmap): Remove function.
3087         * testsuite/libgomp.oacc-c-c++-common/unmap-infinity-1.c: New test.
3088         * testsuite/libgomp.c-c++-common/unmap-infinity-2.c: New test.
3089         * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: Add XFAIL.
3090
3091 2019-12-19  Julian Brown  <julian@codesourcery.com>
3092             Thomas Schwinge  <thomas@codesourcery.com>
3093
3094         * libgomp.h (struct splay_tree_aux): New.
3095         (struct splay_tree_key_s): Replace link_key field with aux pointer.
3096         * target.c (gomp_map_vars_internal): Adjust for link_key being moved
3097         to aux struct.
3098         (gomp_remove_var_internal): Free aux block if present.
3099         (gomp_load_image_to_device): Zero-initialise aux field instead of
3100         link_key field.
3101         (omp_target_associate_pointer): Zero-initialise aux field.
3102
3103 2019-12-18  Jakub Jelinek  <jakub@redhat.com>
3104
3105         PR middle-end/86416
3106         * testsuite/libgomp.c/pr86416-1.c (main): Use L suffixes rather than
3107         q or none.
3108         * testsuite/libgomp.c/pr86416-2.c (main): Use Q suffixes rather than
3109         L or none.
3110
3111 2019-12-19  Julian Brown  <julian@codesourcery.com>
3112             Maciej W. Rozycki  <macro@codesourcery.com>
3113             Tobias Burnus  <tobias@codesourcery.com>
3114             Thomas Schwinge  <thomas@codesourcery.com>
3115
3116         * target.c (gomp_map_vars_async): Support GOMP_MAP_NO_ALLOC.
3117         * testsuite/libgomp.oacc-c-c++-common/no_create-1.c: New test.
3118         * testsuite/libgomp.oacc-c-c++-common/no_create-2.c: New test.
3119         * testsuite/libgomp.oacc-c-c++-common/no_create-3.c: New test.
3120         * testsuite/libgomp.oacc-c-c++-common/no_create-4.c: New test.
3121         * testsuite/libgomp.oacc-c-c++-common/no_create-5.c: New test.
3122         * testsuite/libgomp.oacc-fortran/no_create-1.f90: New test.
3123         * testsuite/libgomp.oacc-fortran/no_create-2.f90: New test.
3124         * testsuite/libgomp.oacc-fortran/no_create-3.F90: New test.
3125
3126 2019-12-18  Thomas Schwinge  <thomas@codesourcery.com>
3127
3128         * oacc-mem.c (goacc_enter_data): Refactor, so that it can be
3129         called...
3130         (goacc_insert_pointer): ... from here, "present" case.
3131         (goacc_insert_pointer): Inline function into...
3132         (GOACC_enter_exit_data): ... here, and simplify.
3133
3134         * oacc-mem.c (goacc_enter_data): Refactor, so that it can be
3135         called...
3136         (goacc_insert_pointer): ... from here, "not present" case.
3137
3138         * oacc-mem.c (goacc_remove_pointer): Refactor interface.  Adjust
3139         all users.
3140
3141         * oacc-mem.c (GOACC_enter_exit_data): Refactor code to call
3142         'goacc_enter_data', 'goacc_exit_data'.
3143
3144         * oacc-mem.c (delete_copyout): Refactor into...
3145         (goacc_exit_data): ... this.  Adjust all users.
3146
3147         * oacc-mem.c (present_create_copy): Refactor into...
3148         (goacc_enter_data): ... this.  Adjust all users.
3149
3150         * target.c (gomp_unmap_vars_internal): Add a safeguard to
3151         'gomp_remove_var'.
3152
3153         * target.c (gomp_to_device_kind_p): Handle 'GOMP_MAP_FORCE_FROM'
3154         like 'GOMP_MAP_FROM'.
3155
3156         PR libgomp/92726
3157         PR libgomp/92970
3158         PR libgomp/92984
3159         * oacc-mem.c (delete_copyout): No-op behavior if 'lookup_host'
3160         fails.
3161         (GOACC_enter_exit_data): Simplify accordingly.
3162         * testsuite/libgomp.oacc-c-c++-common/pr92970-1.c: New file,
3163         subsuming...
3164         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: ... this file...
3165         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: ..., and this
3166         file.
3167         * testsuite/libgomp.oacc-c-c++-common/pr92984-1.c: New file,
3168         subsuming...
3169         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: ... this file...
3170         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: ..., and this
3171         file.
3172         * testsuite/libgomp.oacc-c-c++-common/pr92726-1.c: New file,
3173         subsuming...
3174         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: ... this file.
3175
3176         * oacc-mem.c (GOACC_enter_exit_data): Simplify 'exit data'
3177         'finalize' handling.
3178
3179         PR libgomp/92848
3180         * oacc-mem.c (acc_map_data, present_create_copy)
3181         (goacc_insert_pointer): Use 'GOMP_MAP_VARS_ENTER_DATA'.
3182         (acc_unmap_data, delete_copyout, goacc_remove_pointer): Adjust.
3183         * testsuite/libgomp.oacc-c-c++-common/lib-50.c: Remove.
3184         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-d-a.c: New file
3185         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-d-p.c: Likewise.
3186         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-r-a.c: Likewise.
3187         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-r-p.c: Likewise.
3188         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-r-p.c:
3189         Remove "XFAIL"s.
3190
3191         * target.c (gomp_unmap_tgt): Make it 'static'.
3192         * libgomp.h (gomp_unmap_tgt): Remove.
3193
3194 2019-12-18  Tobias Burnus  <tobias@codesourcery.com>
3195
3196         PR middle-end/86416
3197         * testsuite/libgomp.c/pr86416-1.c: New.
3198         * testsuite/libgomp.c/pr86416-2.c: New.
3199
3200 2019-12-17  Tobias Burnus  <tobias@codesourcery.com>
3201
3202         * config/accel/openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark
3203         all symbols as public except for the 'use â€¦, only' imported symbol,
3204         which is private.
3205         (module openacc): Default to 'PRIVATE' to exclude openacc_internal; mark
3206         all symbols from module openacc_kinds as PUBLIC
3207         * openacc.f90: Add comment with crossref to that file and openmp_lib.h;
3208         fix comment typo.
3209         * openacc_lib.h (acc_device_gcn): Add this PARAMETER.
3210
3211 2019-12-13  Julian Brown  <julian@codesourcery.com>
3212
3213         PR libgomp/92881
3214
3215         * libgomp.h (gomp_remove_var_async): Add prototype.
3216         * oacc-mem.c (delete_copyout): Call gomp_remove_var_async instead of
3217         gomp_remove_var.
3218         * target.c (gomp_unref_tgt): Change return type to bool, indicating
3219         whether target_mem_desc was unmapped.
3220         (gomp_unref_tgt_void): New.
3221         (gomp_remove_var): Reimplement in terms of...
3222         (gomp_remove_var_internal): ...this new helper function.
3223         (gomp_remove_var_async): New, implemented using above helper function.
3224         (gomp_unmap_vars_internal): Use gomp_unref_tgt_void instead of
3225         gomp_unref_tgt.
3226
3227 2019-12-13  Andrew Stubbs  <ams@codesourcery.com>
3228
3229         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Handle gcn.
3230         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise.
3231         * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise.
3232         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: Likewise.
3233         * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c:
3234         Likewise.
3235         * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Disable on GCN.
3236         * testsuite/libgomp.oacc-c-c++-common/tile-1.c: Likewise.
3237
3238 2019-12-13  Tobias Burnus  <tobias@codesourcery.com>
3239
3240         * openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark all symbols
3241         as public except for the 'use â€¦, only' imported symbol, which is
3242         private.
3243         (module openacc): Default to 'PRIVATE' to exclude openacc_internal; mark
3244         all symbols from module openacc_kinds as PUBLIC; add missing PUBLIC
3245         attributes for acc_copyout_finalize and acc_delete_finalize.
3246
3247 2019-12-11  Jakub Jelinek  <jakub@redhat.com>
3248
3249         PR fortran/92899
3250         * testsuite/libgomp.fortran/atomic1.f90: New test.
3251
3252 2019-12-11  Thomas Schwinge  <thomas@codesourcery.com>
3253
3254         PR libgomp/92843
3255         * oacc-mem.c (present_create_copy, delete_copyout): Fix dynamic
3256         reference counting for structured 'REFCOUNT_INFINITY'.  Add some
3257         assertions.
3258         (goacc_insert_pointer, goacc_remove_pointer): Adjust accordingly.
3259         * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: New file.
3260         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Fix OpenACC.
3261         * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
3262         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
3263
3264         * oacc-parallel.c (find_pointer, GOACC_enter_exit_data): Move...
3265         * oacc-mem.c: ... here.
3266         (gomp_acc_insert_pointer, gomp_acc_remove_pointer): Rename to
3267         'goacc_insert_pointer', 'goacc_remove_pointer', and make 'static'.
3268         * libgomp.h (gomp_acc_insert_pointer, gomp_acc_remove_pointer):
3269         Remove.
3270         * libgomp_g.h: Update.
3271
3272         * oacc-parallel.c (GOACC_wait, goacc_wait): Move...
3273         * oacc-async.c: ... here.
3274         * oacc-int.h (goacc_wait): Declare.
3275         * libgomp_g.h: Update
3276
3277         PR libgomp/92854
3278         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-device_already-1.c:
3279         New file.
3280         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-device_already-2.c:
3281         Likewise.
3282         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-device_already-3.c:
3283         Likewise.
3284         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-host_already-1.c:
3285         Likewise.
3286         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-host_already-2.c:
3287         Likewise.
3288         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-host_already-3.c:
3289         Likewise.
3290
3291 2019-12-11  Thomas Schwinge  <thomas@codesourcery.com>
3292             Julian Brown  <julian@codesourcery.com>
3293
3294         * target.c (gomp_load_image_to_device, omp_target_associate_ptr):
3295         Initialize 'dynamic_refcount' whenever we initialize 'refcount'.
3296
3297 2019-12-11  Tobias Burnus  <tobias@codesourcery.com>
3298
3299         * omp_lib.h.in: Fix spelling of function declaration
3300         omp_get_cancell(l)ation.
3301         * libgomp.texi (acc_is_present, acc_async_test, acc_async_test_all):
3302         Fix typos.
3303         * env.c: Fix comment typos.
3304         * oacc-host.c: Likewise.
3305         * ordered.c: Likewise.
3306         * task.c: Likewise.
3307         * team.c: Likewise.
3308         * config/gcn/task.c: Likewise.
3309         * config/gcn/team.c: Likewise.
3310         * config/nvptx/task.c: Likewise.
3311         * config/nvptx/team.c: Likewise.
3312         * plugin/plugin-gcn.c: Likewise.
3313         * testsuite/libgomp.fortran/jacobi.f: Likewise.
3314         * testsuite/libgomp.hsa.c/tiling-2.c: Likewise.
3315         * testsuite/libgomp.oacc-c-c++-common/enter_exit-lib.c: Likewise.
3316
3317 2019-12-11  Tobias Burnus  <tobias@codesourcery.com>
3318
3319         * testsuite/libgomp.oacc-fortran/optional-cache.f95: Add 'dg-do run'.
3320         * testsuite/libgomp.oacc-fortran/optional-reduction.f90: Remove
3321         unnecessary 'dg-additional-options "-w"'.
3322
3323 2019-12-09  Thomas Schwinge  <thomas@codesourcery.com>
3324             Julian Brown  <julian@codesourcery.com>
3325
3326         PR libgomp/92116
3327         PR libgomp/92877
3328
3329         * oacc-mem.c (lookup_dev): Reimplement.  Adjust all users.
3330         * libgomp.h (struct acc_dispatch_t): Remove 'data_environ' member.
3331         Adjust all users.
3332         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4-2.c:
3333         Remove XFAIL.
3334         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4.c:
3335         Likewise.
3336         * testsuite/libgomp.oacc-c-c++-common/pr92877-1.c: New file.
3337
3338 2019-12-09  Thomas Schwinge  <thomas@codesourcery.com>
3339
3340         PR libgomp/92503
3341         * oacc-mem.c (acc_free): Error out instead of 'acc_unmap_data'.
3342         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-1.c: New
3343         file.
3344         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-2.c:
3345         Likewise.
3346         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-3-2.c:
3347         Likewise.
3348         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-3.c:
3349         Likewise.
3350         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4-2.c:
3351         Likewise.
3352         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4.c:
3353         Likewise.
3354         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Adjust.
3355         * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
3356         * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
3357         * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
3358         * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
3359         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
3360         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
3361         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
3362         * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
3363         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
3364
3365         PR libgomp/92840
3366         * oacc-mem.c (acc_map_data): Clarify reference counting behavior.
3367         (acc_unmap_data): Add error case for 'REFCOUNT_INFINITY'.
3368         * testsuite/libgomp.oacc-c-c++-common/acc_unmap_data-pr92840-1.c:
3369         New file.
3370         * testsuite/libgomp.oacc-c-c++-common/acc_unmap_data-pr92840-2.c:
3371         Likewise.
3372         * testsuite/libgomp.oacc-c-c++-common/acc_unmap_data-pr92840-3.c:
3373         Likewise.
3374         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Adjust.
3375         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Adjust.
3376
3377         PR libgomp/92511
3378         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-1.c: Remove
3379         this file...
3380         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-2.c: ..., and
3381         this file...
3382         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: ..., and this
3383         file...
3384         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: ..., and this
3385         file...
3386         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-r-p.c:
3387         ... with their content moved into, and extended in this new file.
3388         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-d-a.c:
3389         New file.
3390         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-d-p.c:
3391         Likewise.
3392         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-r-a.c:
3393         Likewise.
3394         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-2.c:
3395         Likewise.
3396
3397         * testsuite/libgomp.oacc-c-c++-common/map-data-1.c: New file.
3398
3399         PR libgomp/92854
3400         * testsuite/libgomp.oacc-c-c++-common/pr92854-1.c: New file.
3401
3402         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: New file.
3403
3404         * target.c (gomp_exit_data): Use 'gomp_remove_var'.
3405
3406 2019-12-09  Tobias Burnus  <tobias@codesourcery.com>
3407
3408         * testsuite/libgomp.fortran/use_device_addr-3.f90: Make 'stop' codes
3409         unique.
3410         * testsuite/libgomp.fortran/use_device_addr-4.f90: Ditto.
3411         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto.
3412         * testsuite/libgomp.oacc-fortran/declare-5.f90: Ditto.
3413         * testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90:
3414         Ditto.
3415         * testsuite/libgomp.oacc-fortran/optional-firstprivate.f90: Ditto.
3416         * testsuite/libgomp.oacc-fortran/optional-update-host.f90: Ditto.
3417
3418 2019-12-06  Kwok Cheung Yeung  <kcy@codesourcery.com>
3419
3420         * config/accel/proc.c (omp_get_num_procs): Apply ialias macro.
3421
3422 2019-12-06  Tobias Burnus  <tobias@codesourcery.com>
3423             Kwok Cheung Yeung <kcy@codesourcery.com>
3424
3425         * oacc-mem.c (update_dev_host, gomp_acc_insert_pointer): Just return
3426         if input it a NULL pointer.
3427         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Remove; dependent on
3428         diagnostic of NULL pointer.
3429         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Ditto.
3430         * testsuite/libgomp.fortran/optional-map.f90: New.
3431         * testsuite/libgomp.fortran/use_device_addr-1.f90
3432         (test_dummy_opt_callee_1_absent): New.
3433         (test_dummy_opt_call_1): Call it.
3434         * testsuite/libgomp.fortran/use_device_addr-2.f90: Likewise.
3435         * testsuite/libgomp.fortran/use_device_addr-3.f90: Likewise.
3436         * testsuite/libgomp.fortran/use_device_addr-4.f90: Likewise.
3437         * testsuite/libgomp.oacc-fortran/optional-cache.f95: New.
3438         * testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90: New.
3439         * testsuite/libgomp.oacc-fortran/optional-data-copyin.f90: New.
3440         * testsuite/libgomp.oacc-fortran/optional-data-copyout.f90: New.
3441         * testsuite/libgomp.oacc-fortran/optional-data-enter-exit.f90: New.
3442         * testsuite/libgomp.oacc-fortran/optional-declare.f90: New.
3443         * testsuite/libgomp.oacc-fortran/optional-firstprivate.f90: New.
3444         * testsuite/libgomp.oacc-fortran/optional-host_data.f90: New.
3445         * testsuite/libgomp.oacc-fortran/optional-nested-calls.f90: New.
3446         * testsuite/libgomp.oacc-fortran/optional-private.f90: New.
3447         * testsuite/libgomp.oacc-fortran/optional-reduction.f90: New.
3448         * testsuite/libgomp.oacc-fortran/optional-update-device.f90: New.
3449         * testsuite/libgomp.oacc-fortran/optional-update-host.f90: New.
3450
3451 2019-12-05  Tobias Burnus  <tobias@codesourcery.com>
3452
3453         * testsuite/libgomp.oacc-fortran/error_stop-1.f: Also don't
3454         expect dg-output of 'Error termination.' for GCN.
3455         * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
3456         * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
3457
3458 2019-12-04  Jakub Jelinek  <jakub@redhat.com>
3459
3460         PR fortran/92756
3461         * testsuite/libgomp.fortran/teams1.f90: New test.
3462         * testsuite/libgomp.fortran/teams2.f90: New test.
3463
3464 2019-12-03  Frederik Harwath  <frederik@codesourcery.com>
3465
3466         * oacc-init.c (acc_known_device_type): Add function.
3467         (unknown_device_type_error): Add function.
3468         (name_of_acc_device_t): Change to call unknown_device_type_error
3469         on unknown type.
3470         (resolve_device): Use acc_known_device_type.
3471         (acc_init): Fail if acc_device_t argument is not valid.
3472         (acc_shutdown): Likewise.
3473         (acc_get_num_devices): Likewise.
3474         (acc_set_device_type): Likewise.
3475         (acc_get_device_num): Likewise.
3476         (acc_set_device_num): Likewise.
3477         (acc_on_device): Add comment that argument validity is not checked.
3478
3479 2019-12-03  Andrew Stubbs  <ams@codesourcery.com>
3480
3481         * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type):
3482         Recognize amdgcn.
3483         (check_effective_target_openacc_amdgcn_accel_present): New proc.
3484         (check_effective_target_openacc_amdgcn_accel_selected): New proc.
3485         * testsuite/libgomp.oacc-c++/c++.exp: Add support for amdgcn.
3486         * testsuite/libgomp.oacc-c/c.exp: Likewise.
3487         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
3488
3489 2019-12-03  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3490
3491         PR libgomp/91938
3492         * configure.tgt: Avoid IE tls on *-*-musl*.
3493
3494 2019-11-29  Tobias Burnus  <tobias@codesourcery.com>
3495
3496         * testsuite/libgomp.oacc-fortran/declare-5.f90: Extend by
3497         adding a common-block test case.
3498
3499 2019-11-29  Jakub Jelinek  <jakub@redhat.com>
3500
3501         PR c++/60228
3502         * testsuite/libgomp.c++/udr-20.C: New test.
3503         * testsuite/libgomp.c++/udr-21.C: New test.
3504
3505 2019-11-27  Thomas Schwinge  <thomas@codesourcery.com>
3506
3507         * testsuite/lib/libgomp.exp
3508         (check_effective_target_offload_target_nvptx): New proc.
3509         * testsuite/libgomp.fortran/target-print-1.f90: Use it with
3510         'dg-skip-if'.
3511         * testsuite/libgomp.oacc-fortran/print-1.f90: Likewise.
3512         * testsuite/libgomp.fortran/target-print-1-nvptx.f90: New file.
3513         * testsuite/libgomp.oacc-fortran/print-1-nvptx.f90: Likewise.
3514
3515 2019-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3516
3517         * testsuite/libgomp.c/pr39591-1.c: Rename err to e.
3518         * testsuite/libgomp.c/pr39591-2.c: Likewise.
3519         * testsuite/libgomp.c/pr39591-3.c: Likewise.
3520         * testsuite/libgomp.c/private-1.c: Likewise.
3521         * testsuite/libgomp.c/task-1.c: Likewise.
3522         * testsuite/libgomp.c/task-5.c: Renamed err to serr.
3523
3524 2019-11-20  Julian Brown  <julian@codesourcery.com>
3525
3526         * plugin/plugin-gcn.c (wait_for_queue_nonfull): Don't lock/unlock
3527         aq->mutex here.
3528         (queue_push_launch): Lock aq->mutex before calling
3529         wait_for_queue_nonfull.
3530         (queue_push_callback): Likewise.
3531         (queue_push_asyncwait): Likewise.
3532         (queue_push_placeholder): Likewise.
3533
3534 2019-11-20  Julian Brown  <julian@codesourcery.com>
3535
3536         * plugin/plugin-gcn.c (hsa_memory_copy_wrapper): New.
3537         (copy_data, GOMP_OFFLOAD_host2dev): Use above function.
3538         (GOMP_OFFLOAD_dev2host, GOMP_OFFLOAD_dev2dev): Check hsa_memory_copy
3539         return code.
3540
3541 2019-11-20  Julian Brown  <julian@codesourcery.com>
3542
3543         PR libgomp/92511
3544
3545         * oacc-mem.c (present_create_copy): Fix device pointer return value in
3546         case of "present" subarray.  Use tgt->tgt_start instead of tgt->to_free
3547         in non-present/create case.
3548         (delete_copyout): Change error condition to fail only on copies outside
3549         of mapped block.  Adjust error message accordingly.
3550         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-1.c: New test.
3551         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-2.c: New test.
3552         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Adjust expected error
3553         message.
3554         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
3555         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Allow test to pass now.
3556         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
3557
3558 2019-11-20  Maciej W. Rozycki  <macro@wdc.com>
3559
3560         * testsuite/lib/libgomp.exp (libgomp_init): Add flags to find
3561         libatomic in build-tree testing.
3562
3563 2019-11-18  Maciej W. Rozycki  <macro@wdc.com>
3564
3565         * testsuite/Makefile.in: Regenerate.
3566
3567 2019-11-15  Andrew Stubbs  <ams@codesourcery.com>
3568
3569         * testsuite/libgomp.c/target-print-1.c: New file.
3570         * testsuite/libgomp.fortran/target-print-1.f90: New file.
3571         * testsuite/libgomp.oacc-c/print-1.c: New file.
3572         * testsuite/libgomp.oacc-fortran/print-1.f90: New file.
3573
3574 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
3575             Kwok Cheung Yeung  <kcy@codesourcery.com>
3576             Julian Brown  <julian@codesourcery.com>
3577             Tom de Vries  <tom@codesourcery.com>
3578
3579         * plugin/Makefrag.am: Add amdgcn plugin support.
3580         * plugin/configfrag.ac: Likewise.
3581         * plugin/plugin-gcn.c: New file.
3582         * configure: Regenerate.
3583         * Makefile.in: Regenerate.
3584         * testsuite/Makefile.in: Regenerate.
3585
3586 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
3587
3588         * config/gcn/team.c (gomp_gcn_enter_kernel): Set up the team arena
3589         and use team_malloc variants.
3590         (gomp_gcn_exit_kernel): Use team_free.
3591         * libgomp.h (TEAM_ARENA_SIZE): Define.
3592         (TEAM_ARENA_START): Define.
3593         (TEAM_ARENA_FREE): Define.
3594         (TEAM_ARENA_END): Define.
3595         (team_malloc): New function.
3596         (team_malloc_cleared): New function.
3597         (team_free): New function.
3598         * team.c (gomp_new_team): Initialize and use team_malloc.
3599         (free_team): Use team_free.
3600         (gomp_free_thread): Use team_free.
3601         (gomp_pause_host): Use team_free.
3602         * work.c (gomp_init_work_share): Use team_malloc.
3603         (gomp_fini_work_share): Use team_free.
3604
3605 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
3606             Kwok Cheung Yeung  <kcy@codesourcery.com>
3607             Julian Brown  <julian@codesourcery.com>
3608             Tom de Vries  <tom@codesourcery.com>
3609
3610         * Makefile.am (libgomp_la_SOURCES): Add oacc-target.c.
3611         * Makefile.in: Regenerate.
3612         * config.h.in (PLUGIN_GCN): Add new undef.
3613         * config/accel/openacc.f90 (acc_device_gcn): New parameter.
3614         * config/gcn/affinity-fmt.c: New file.
3615         * config/gcn/bar.c: New file.
3616         * config/gcn/bar.h: New file.
3617         * config/gcn/doacross.h: New file.
3618         * config/gcn/icv-device.c: New file.
3619         * config/gcn/oacc-target.c: New file.
3620         * config/gcn/simple-bar.h: New file.
3621         * config/gcn/target.c: New file.
3622         * config/gcn/task.c: New file.
3623         * config/gcn/team.c: New file.
3624         * config/gcn/time.c: New file.
3625         * configure.ac: Add amdgcn*-*-*.
3626         * configure: Regenerate.
3627         * configure.tgt: Add amdgcn*-*-*.
3628         * libgomp-plugin.h (offload_target_type): Add OFFLOAD_TARGET_TYPE_GCN.
3629         * libgomp.h (gcn_thrs): Add amdgcn variant.
3630         (set_gcn_thrs): Likewise.
3631         (gomp_thread): Likewise.
3632         * oacc-int.h (goacc_thread): Likewise.
3633         * oacc-target.c: New file.
3634         * openacc.f90 (acc_device_gcn): New parameter.
3635         * openacc.h (acc_device_t): Add acc_device_gcn.
3636         * team.c (gomp_free_pool_helper): Add amdgcn support.
3637
3638 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
3639             Julian Brown  <julian@codesourcery.com>
3640
3641         * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_construct): Add int
3642         parameter.
3643         * oacc-async.c (lookup_goacc_asyncqueue): Pass device number to the
3644         queue constructor.
3645         * oacc-host.c (host_openacc_async_construct): Add device parameter.
3646         * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add
3647         device parameter.
3648
3649 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
3650
3651         * configure.tgt (nvptx*-*-*): Add "accel" directory.
3652         * config/nvptx/libgomp-plugin.c: Move ...
3653         * config/accel/libgomp-plugin.c: ... to here.
3654         * config/nvptx/lock.c: Move ...
3655         * config/accel/lock.c: ... to here.
3656         * config/nvptx/mutex.c: Move ...
3657         * config/accel/mutex.c: ... to here.
3658         * config/nvptx/mutex.h: Move ...
3659         * config/accel/mutex.h: ... to here.
3660         * config/nvptx/oacc-async.c: Move ...
3661         * config/accel/oacc-async.c: ... to here.
3662         * config/nvptx/oacc-cuda.c: Move ...
3663         * config/accel/oacc-cuda.c: ... to here.
3664         * config/nvptx/oacc-host.c: Move ...
3665         * config/accel/oacc-host.c: ... to here.
3666         * config/nvptx/oacc-init.c: Move ...
3667         * config/accel/oacc-init.c: ... to here.
3668         * config/nvptx/oacc-mem.c: Move ...
3669         * config/accel/oacc-mem.c: ... to here.
3670         * config/nvptx/oacc-plugin.c: Move ...
3671         * config/accel/oacc-plugin.c: ... to here.
3672         * config/nvptx/omp-lock.h: Move ...
3673         * config/accel/omp-lock.h: ... to here.
3674         * config/nvptx/openacc.f90: Move ...
3675         * config/accel/openacc.f90: ... to here.
3676         * config/nvptx/pool.h: Move ...
3677         * config/accel/pool.h: ... to here.
3678         * config/nvptx/proc.c: Move ...
3679         * config/accel/proc.c: ... to here.
3680         * config/nvptx/ptrlock.c: Move ...
3681         * config/accel/ptrlock.c: ... to here.
3682         * config/nvptx/ptrlock.h: Move ...
3683         * config/accel/ptrlock.h: ... to here.
3684         * config/nvptx/sem.c: Move ...
3685         * config/accel/sem.c: ... to here.
3686         * config/nvptx/sem.h: Move ...
3687         * config/accel/sem.h: ... to here.
3688         * config/nvptx/thread-stacksize.h: Move ...
3689         * config/accel/thread-stacksize.h: ... to here.
3690
3691 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
3692             Tobias Burnus  <tobias@codesourcery.com>
3693             Frederik Harwath  <frederik@codesourcery.com>
3694             Thomas Schwinge  <thomas@codesourcery.com>
3695
3696         libgomp/
3697         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: New test.
3698         * testsuite/libgomp.oacc-fortran/parallel-dims-aux.c: New test.
3699         * testsuite/libgomp.oacc-fortran/parallel-dims.f89: New test.
3700
3701 2019-11-11  Tobias Burnus  <tobias@codesourcery.com>
3702             Kwok Cheung Yeung  <kcy@codesourcery.com>
3703
3704         * testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: Extend.
3705         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: New.
3706
3707 2019-11-11  Thomas Schwinge  <thomas@codesourcery.com>
3708
3709         * testsuite/libgomp.fortran/target9.f90: Specify 'dg-do run'.
3710
3711         * testsuite/libgomp.fortran/use_device_addr-3.f90: Specify 'dg-do
3712         run'.
3713         * testsuite/libgomp.fortran/use_device_addr-4.f90: Likewise.
3714         * testsuite/libgomp.fortran/use_device_ptr-1.f90: Likewise.
3715
3716 2019-11-06  Thomas Schwinge  <thomas@codesourcery.com>
3717
3718         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c:
3719         Add expected warnings about missing reduction clauses.
3720         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c:
3721         Likewise.
3722         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c:
3723         Likewise.
3724         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c:
3725         Likewise.
3726
3727 2019-11-04  Tobias Burnus  <tobias@codesourcery.com>
3728
3729         * testsuite/libgomp.fortran/pr66199-1.f90: Remove
3730         'dg-do run' (implies torture test) as 'dg-options "O2"' is used.
3731         * testsuite/libgomp.fortran/pr66199-2.f90: Ditto.
3732         * testsuite/libgomp.fortran/taskloop2.f90: Ditto.
3733         * testsuite/libgomp.fortran/taskloop3.f90: Ditto.
3734         * testsuite/libgomp.fortran/taskloop4.f90: Ditto.
3735
3736 2019-11-04  Tobias Burnus  <tobias@codesourcery.com>
3737
3738         PR fortran/92305
3739         * testsuite/libgomp.fortran/allocatable2.f90: Use
3740         unique numbers with 'stop'.
3741         * testsuite/libgomp.fortran/use_device_addr-1.f90: Ditto.
3742         * testsuite/libgomp.fortran/use_device_addr-2.f90: Ditto.
3743         * testsuite/libgomp.fortran/use_device_ptr-1.f90: Ditto.
3744         * testsuite/libgomp.oacc-fortran/lib-15.f90: Ditto.
3745         * testsuite/libgomp.oacc-fortran/pset-1.f90: Ditto.
3746
3747 2019-11-01  Tobias Burnus  <tobias@codesourcery.com>
3748
3749         * testsuite/libgomp.fortran/use_device_addr-1.f90 (test_nullptr_1,
3750         test_dummy_opt_nullptr_callee_1): Add present but unallocated test.
3751         * testsuite/libgomp.fortran/use_device_addr-2.f90: Likewise.
3752         * testsuite/libgomp.fortran/use_device_addr-3.f90: New.
3753         * testsuite/libgomp.fortran/use_device_addr-4.f90: New.
3754         * testsuite/testsuite/libgomp.fortran/use_device_ptr-1.f90: New.
3755
3756 2019-10-30  Tobias Burnus  <tobias@codesourcery.com>
3757
3758         * testsuite/libgomp.fortran/target9.f90: New.
3759
3760 2019-10-30  Tobias Burnus  <tobias@codesourcery.com>
3761
3762         * testsuite/libgomp.fortran/aligned1.f03: Replace 'STOP' by 'stop'.
3763         * testsuite/libgomp.fortran/alloc-comp-1.f90: Ditto.
3764         * testsuite/libgomp.fortran/alloc-comp-2.f90: Ditto.
3765         * testsuite/libgomp.fortran/alloc-comp-3.f90: Ditto.
3766         * testsuite/libgomp.fortran/allocatable1.f90: Ditto.
3767         * testsuite/libgomp.fortran/allocatable10.f90: Ditto.
3768         * testsuite/libgomp.fortran/allocatable11.f90: Ditto.
3769         * testsuite/libgomp.fortran/allocatable12.f90: Ditto.
3770         * testsuite/libgomp.fortran/allocatable2.f90: Ditto.
3771         * testsuite/libgomp.fortran/allocatable3.f90: Ditto.
3772         * testsuite/libgomp.fortran/allocatable4.f90: Ditto.
3773         * testsuite/libgomp.fortran/allocatable5.f90: Ditto.
3774         * testsuite/libgomp.fortran/allocatable6.f90: Ditto.
3775         * testsuite/libgomp.fortran/allocatable7.f90: Ditto.
3776         * testsuite/libgomp.fortran/allocatable8.f90: Ditto.
3777         * testsuite/libgomp.fortran/allocatable9.f90: Ditto.
3778         * testsuite/libgomp.fortran/associate1.f90: Ditto.
3779         * testsuite/libgomp.fortran/associate2.f90: Ditto.
3780         * testsuite/libgomp.fortran/associate3.f90: Ditto.
3781         * testsuite/libgomp.fortran/async_io_4.f90: Ditto.
3782         * testsuite/libgomp.fortran/async_io_5.f90: Ditto.
3783         * testsuite/libgomp.fortran/async_io_6.f90: Ditto.
3784         * testsuite/libgomp.fortran/async_io_7.f90: Ditto.
3785         * testsuite/libgomp.fortran/cancel-do-1.f90: Ditto.
3786         * testsuite/libgomp.fortran/cancel-do-2.f90: Ditto.
3787         * testsuite/libgomp.fortran/cancel-parallel-1.f90: Ditto.
3788         * testsuite/libgomp.fortran/cancel-sections-1.f90: Ditto.
3789         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: Ditto.
3790         * testsuite/libgomp.fortran/character1.f90: Ditto.
3791         * testsuite/libgomp.fortran/character2.f90: Ditto.
3792         * testsuite/libgomp.fortran/collapse1.f90: Ditto.
3793         * testsuite/libgomp.fortran/collapse2.f90: Ditto.
3794         * testsuite/libgomp.fortran/collapse3.f90: Ditto.
3795         * testsuite/libgomp.fortran/collapse4.f90: Ditto.
3796         * testsuite/libgomp.fortran/crayptr1.f90: Ditto.
3797         * testsuite/libgomp.fortran/crayptr2.f90: Ditto.
3798         * testsuite/libgomp.fortran/crayptr3.f90: Ditto.
3799         * testsuite/libgomp.fortran/declare-simd-1.f90: Ditto.
3800         * testsuite/libgomp.fortran/declare-simd-3.f90: Ditto.
3801         * testsuite/libgomp.fortran/declare-target-2.f90: Ditto.
3802         * testsuite/libgomp.fortran/depend-1.f90: Ditto.
3803         * testsuite/libgomp.fortran/depend-2.f90: Ditto.
3804         * testsuite/libgomp.fortran/depend-3.f90: Ditto.
3805         * testsuite/libgomp.fortran/do1.f90: Ditto.
3806         * testsuite/libgomp.fortran/do2.f90: Ditto.
3807         * testsuite/libgomp.fortran/do_concurrent_5.f90: Ditto.
3808         * testsuite/libgomp.fortran/doacross1.f90: Ditto.
3809         * testsuite/libgomp.fortran/doacross2.f90: Ditto.
3810         * testsuite/libgomp.fortran/doacross3.f90: Ditto.
3811         * testsuite/libgomp.fortran/examples-4/array_sections-3.f90: Ditto.
3812         * testsuite/libgomp.fortran/examples-4/array_sections-4.f90: Ditto.
3813         * testsuite/libgomp.fortran/examples-4/async_target-1.f90: Ditto.
3814         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: Ditto.
3815         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Ditto.
3816         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Ditto.
3817         * testsuite/libgomp.fortran/examples-4/declare_target-3.f90: Ditto.
3818         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90: Ditto.
3819         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90: Ditto.
3820         * testsuite/libgomp.fortran/examples-4/device-1.f90: Ditto.
3821         * testsuite/libgomp.fortran/examples-4/device-2.f90: Ditto.
3822         * testsuite/libgomp.fortran/examples-4/device-3.f90: Ditto.
3823         * testsuite/libgomp.fortran/examples-4/simd-1.f90: Ditto.
3824         * testsuite/libgomp.fortran/examples-4/simd-2.f90: Ditto.
3825         * testsuite/libgomp.fortran/examples-4/simd-3.f90: Ditto.
3826         * testsuite/libgomp.fortran/examples-4/simd-4.f90: Ditto.
3827         * testsuite/libgomp.fortran/examples-4/simd-5.f90: Ditto.
3828         * testsuite/libgomp.fortran/examples-4/simd-6.f90: Ditto.
3829         * testsuite/libgomp.fortran/examples-4/simd-7.f90: Ditto.
3830         * testsuite/libgomp.fortran/examples-4/simd-8.f90: Ditto.
3831         * testsuite/libgomp.fortran/examples-4/target-1.f90: Ditto.
3832         * testsuite/libgomp.fortran/examples-4/target-2.f90: Ditto.
3833         * testsuite/libgomp.fortran/examples-4/target-3.f90: Ditto.
3834         * testsuite/libgomp.fortran/examples-4/target-4.f90: Ditto.
3835         * testsuite/libgomp.fortran/examples-4/target-5.f90: Ditto.
3836         * testsuite/libgomp.fortran/examples-4/target_data-1.f90: Ditto.
3837         * testsuite/libgomp.fortran/examples-4/target_data-2.f90: Ditto.
3838         * testsuite/libgomp.fortran/examples-4/target_data-3.f90: Ditto.
3839         * testsuite/libgomp.fortran/examples-4/target_data-4.f90: Ditto.
3840         * testsuite/libgomp.fortran/examples-4/target_data-5.f90: Ditto.
3841         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: Ditto.
3842         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: Ditto.
3843         * testsuite/libgomp.fortran/examples-4/target_update-1.f90: Ditto.
3844         * testsuite/libgomp.fortran/examples-4/target_update-2.f90: Ditto.
3845         * testsuite/libgomp.fortran/examples-4/task_dep-1.f90: Ditto.
3846         * testsuite/libgomp.fortran/examples-4/task_dep-2.f90: Ditto.
3847         * testsuite/libgomp.fortran/examples-4/task_dep-3.f90: Ditto.
3848         * testsuite/libgomp.fortran/examples-4/task_dep-4.f90: Ditto.
3849         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: Ditto.
3850         * testsuite/libgomp.fortran/examples-4/teams-2.f90: Ditto.
3851         * testsuite/libgomp.fortran/examples-4/teams-3.f90: Ditto.
3852         * testsuite/libgomp.fortran/examples-4/teams-4.f90: Ditto.
3853         * testsuite/libgomp.fortran/examples-4/teams-5.f90: Ditto.
3854         * testsuite/libgomp.fortran/examples-4/teams-6.f90: Ditto.
3855         * testsuite/libgomp.fortran/lastprivate1.f90: Ditto.
3856         * testsuite/libgomp.fortran/lastprivate2.f90: Ditto.
3857         * testsuite/libgomp.fortran/lib1.f90: Ditto.
3858         * testsuite/libgomp.fortran/lib4.f90: Ditto.
3859         * testsuite/libgomp.fortran/lock-1.f90: Ditto.
3860         * testsuite/libgomp.fortran/lock-2.f90: Ditto.
3861         * testsuite/libgomp.fortran/nested1.f90: Ditto.
3862         * testsuite/libgomp.fortran/nestedfn1.f90: Ditto.
3863         * testsuite/libgomp.fortran/nestedfn2.f90: Ditto.
3864         * testsuite/libgomp.fortran/nestedfn3.f90: Ditto.
3865         * testsuite/libgomp.fortran/nestedfn4.f90: Ditto.
3866         * testsuite/libgomp.fortran/nestedfn5.f90: Ditto.
3867         * testsuite/libgomp.fortran/omp_atomic1.f90: Ditto.
3868         * testsuite/libgomp.fortran/omp_atomic2.f90: Ditto.
3869         * testsuite/libgomp.fortran/omp_atomic3.f90: Ditto.
3870         * testsuite/libgomp.fortran/omp_atomic4.f90: Ditto.
3871         * testsuite/libgomp.fortran/omp_atomic5.f90: Ditto.
3872         * testsuite/libgomp.fortran/omp_cond1.f: Ditto.
3873         * testsuite/libgomp.fortran/omp_cond2.f: Ditto.
3874         * testsuite/libgomp.fortran/omp_cond3.F90: Ditto.
3875         * testsuite/libgomp.fortran/omp_cond4.F90: Ditto.
3876         * testsuite/libgomp.fortran/omp_parse1.f90: Ditto.
3877         * testsuite/libgomp.fortran/omp_parse2.f90: Ditto.
3878         * testsuite/libgomp.fortran/omp_parse3.f90: Ditto.
3879         * testsuite/libgomp.fortran/omp_parse4.f90: Ditto.
3880         * testsuite/libgomp.fortran/openmp_version-1.f: Ditto.
3881         * testsuite/libgomp.fortran/openmp_version-2.f90: Ditto.
3882         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: Ditto.
3883         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: Ditto.
3884         * testsuite/libgomp.fortran/pointer1.f90: Ditto.
3885         * testsuite/libgomp.fortran/pointer2.f90: Ditto.
3886         * testsuite/libgomp.fortran/pr25219.f90: Ditto.
3887         * testsuite/libgomp.fortran/pr27395-1.f90: Ditto.
3888         * testsuite/libgomp.fortran/pr27395-2.f90: Ditto.
3889         * testsuite/libgomp.fortran/pr27416-1.f90: Ditto.
3890         * testsuite/libgomp.fortran/pr27916-1.f90: Ditto.
3891         * testsuite/libgomp.fortran/pr27916-2.f90: Ditto.
3892         * testsuite/libgomp.fortran/pr28390.f: Ditto.
3893         * testsuite/libgomp.fortran/pr29629.f90: Ditto.
3894         * testsuite/libgomp.fortran/pr32550.f90: Ditto.
3895         * testsuite/libgomp.fortran/pr33880.f90: Ditto.
3896         * testsuite/libgomp.fortran/pr34020.f90: Ditto.
3897         * testsuite/libgomp.fortran/pr35130.f90: Ditto.
3898         * testsuite/libgomp.fortran/pr42162.f90: Ditto.
3899         * testsuite/libgomp.fortran/pr46753.f90: Ditto.
3900         * testsuite/libgomp.fortran/pr48894.f90: Ditto.
3901         * testsuite/libgomp.fortran/pr49792-1.f90: Ditto.
3902         * testsuite/libgomp.fortran/pr49792-2.f90: Ditto.
3903         * testsuite/libgomp.fortran/pr63938-1.f90: Ditto.
3904         * testsuite/libgomp.fortran/pr63938-2.f90: Ditto.
3905         * testsuite/libgomp.fortran/pr65597.f90: Ditto.
3906         * testsuite/libgomp.fortran/pr66199-1.f90: Ditto.
3907         * testsuite/libgomp.fortran/pr71014.f90: Ditto.
3908         * testsuite/libgomp.fortran/pr81304.f90: Ditto.
3909         * testsuite/libgomp.fortran/pr81841.f90: Ditto.
3910         * testsuite/libgomp.fortran/pr84418-1.f90: Ditto.
3911         * testsuite/libgomp.fortran/pr84418-2.f90: Ditto.
3912         * testsuite/libgomp.fortran/procptr1.f90: Ditto.
3913         * testsuite/libgomp.fortran/recursion1.f90: Ditto.
3914         * testsuite/libgomp.fortran/reduction1.f90: Ditto.
3915         * testsuite/libgomp.fortran/reduction2.f90: Ditto.
3916         * testsuite/libgomp.fortran/reduction3.f90: Ditto.
3917         * testsuite/libgomp.fortran/reduction4.f90: Ditto.
3918         * testsuite/libgomp.fortran/reduction5.f90: Ditto.
3919         * testsuite/libgomp.fortran/reduction6.f90: Ditto.
3920         * testsuite/libgomp.fortran/reference1.f90: Ditto.
3921         * testsuite/libgomp.fortran/reference2.f90: Ditto.
3922         * testsuite/libgomp.fortran/retval1.f90: Ditto.
3923         * testsuite/libgomp.fortran/retval2.f90: Ditto.
3924         * testsuite/libgomp.fortran/sharing1.f90: Ditto.
3925         * testsuite/libgomp.fortran/sharing2.f90: Ditto.
3926         * testsuite/libgomp.fortran/simd1.f90: Ditto.
3927         * testsuite/libgomp.fortran/simd2.f90: Ditto.
3928         * testsuite/libgomp.fortran/simd3.f90: Ditto.
3929         * testsuite/libgomp.fortran/simd4.f90: Ditto.
3930         * testsuite/libgomp.fortran/simd5.f90: Ditto.
3931         * testsuite/libgomp.fortran/simd6.f90: Ditto.
3932         * testsuite/libgomp.fortran/simd7.f90: Ditto.
3933         * testsuite/libgomp.fortran/stack.f90: Ditto.
3934         * testsuite/libgomp.fortran/strassen.f90: Ditto.
3935         * testsuite/libgomp.fortran/tabs1.f90: Ditto.
3936         * testsuite/libgomp.fortran/tabs2.f: Ditto.
3937         * testsuite/libgomp.fortran/target1.f90: Ditto.
3938         * testsuite/libgomp.fortran/target2.f90: Ditto.
3939         * testsuite/libgomp.fortran/target3.f90: Ditto.
3940         * testsuite/libgomp.fortran/target4.f90: Ditto.
3941         * testsuite/libgomp.fortran/target5.f90: Ditto.
3942         * testsuite/libgomp.fortran/target6.f90: Ditto.
3943         * testsuite/libgomp.fortran/target7.f90: Ditto.
3944         * testsuite/libgomp.fortran/target8.f90: Ditto.
3945         * testsuite/libgomp.fortran/task1.f90: Ditto.
3946         * testsuite/libgomp.fortran/task2.f90: Ditto.
3947         * testsuite/libgomp.fortran/task3.f90: Ditto.
3948         * testsuite/libgomp.fortran/task4.f90: Ditto.
3949         * testsuite/libgomp.fortran/taskgroup1.f90: Ditto.
3950         * testsuite/libgomp.fortran/taskloop1.f90: Ditto.
3951         * testsuite/libgomp.fortran/taskloop2.f90: Ditto.
3952         * testsuite/libgomp.fortran/taskloop3.f90: Ditto.
3953         * testsuite/libgomp.fortran/taskloop4.f90: Ditto.
3954         * testsuite/libgomp.fortran/threadprivate1.f90: Ditto.
3955         * testsuite/libgomp.fortran/threadprivate2.f90: Ditto.
3956         * testsuite/libgomp.fortran/threadprivate3.f90: Ditto.
3957         * testsuite/libgomp.fortran/threadprivate4.f90: Ditto.
3958         * testsuite/libgomp.fortran/udr1.f90: Ditto.
3959         * testsuite/libgomp.fortran/udr10.f90: Ditto.
3960         * testsuite/libgomp.fortran/udr11.f90: Ditto.
3961         * testsuite/libgomp.fortran/udr12.f90: Ditto.
3962         * testsuite/libgomp.fortran/udr13.f90: Ditto.
3963         * testsuite/libgomp.fortran/udr14.f90: Ditto.
3964         * testsuite/libgomp.fortran/udr15.f90: Ditto.
3965         * testsuite/libgomp.fortran/udr2.f90: Ditto.
3966         * testsuite/libgomp.fortran/udr3.f90: Ditto.
3967         * testsuite/libgomp.fortran/udr4.f90: Ditto.
3968         * testsuite/libgomp.fortran/udr5.f90: Ditto.
3969         * testsuite/libgomp.fortran/udr6.f90: Ditto.
3970         * testsuite/libgomp.fortran/udr7.f90: Ditto.
3971         * testsuite/libgomp.fortran/udr8.f90: Ditto.
3972         * testsuite/libgomp.fortran/udr9.f90: Ditto.
3973         * testsuite/libgomp.fortran/vla1.f90: Ditto.
3974         * testsuite/libgomp.fortran/vla2.f90: Ditto.
3975         * testsuite/libgomp.fortran/vla3.f90: Ditto.
3976         * testsuite/libgomp.fortran/vla4.f90: Ditto.
3977         * testsuite/libgomp.fortran/vla5.f90: Ditto.
3978         * testsuite/libgomp.fortran/vla6.f90: Ditto.
3979         * testsuite/libgomp.fortran/vla7.f90: Ditto.
3980         * testsuite/libgomp.fortran/vla8.f90: Ditto.
3981         * testsuite/libgomp.fortran/workshare1.f90: Ditto.
3982         * testsuite/libgomp.fortran/workshare2.f90: Ditto.
3983
3984 2019-10-30  Tobias Burnus  <tobias@codesourcery.com>
3985
3986         * testsuite/libgomp.fortran/target-simd.f90: Use stop not abort.
3987         * testsuite/libgomp.fortran/use_device_ptr-optional-1.f90:
3988         Ditto; add 'dg-do run' for torture testing.
3989         * testsuite/libgomp.fortran/lastprivate1.f90:  Add 'dg-do run'.
3990         * testsuite/libgomp.fortran/lastprivate2.f90: Ditto.
3991         * testsuite/libgomp.fortran/nestedfn4.f90: Ditto.
3992         * testsuite/libgomp.fortran/pr25219.f90: Ditto.
3993         * testsuite/libgomp.fortran/pr28390.f: Ditto.
3994         * testsuite/libgomp.fortran/pr35130.f90: Ditto.
3995         * testsuite/libgomp.fortran/pr90779.f90: Ditto.
3996         * testsuite/libgomp.fortran/task2.f90: Ditto.
3997         * testsuite/libgomp.fortran/taskgroup1.f90: Ditto.
3998         * testsuite/libgomp.fortran/taskloop1.f90: Ditto.
3999         * testsuite/libgomp.fortran/use_device_addr-1.f90: Ditto.
4000         * testsuite/libgomp.fortran/use_device_addr-2.f90: Ditto.
4001         * testsuite/libgomp.fortran/workshare1.f90: Ditto.
4002         * testsuite/libgomp.fortran/workshare2.f90: Ditto.
4003
4004 2019-10-28  Tobias Burnus  <tobias@codesourcery.com>
4005
4006         * testsuite/libgomp.oacc-fortran/abort-1.f90: Add 'dg-do run'.
4007         * testsuite/libgomp.oacc-fortran/abort-2.f90: Ditto.
4008         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Ditto.
4009         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f90: Ditto.
4010         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f90: Ditto.
4011         * testsuite/libgomp.oacc-fortran/lib-1.f90: Ditto.
4012         * testsuite/libgomp.oacc-fortran/common-block-1.f90:
4013         Use 'stop' not abort().
4014         * testsuite/libgomp.oacc-fortran/common-block-2.f90: Ditto.
4015         * testsuite/libgomp.oacc-fortran/common-block-3.f90: Ditto.
4016         * testsuite/libgomp.oacc-fortran/data-1.f90: Ditto.
4017         * testsuite/libgomp.oacc-fortran/data-2.f90: Ditto.
4018         * testsuite/libgomp.oacc-fortran/data-5.f90: Ditto.
4019         * testsuite/libgomp.oacc-fortran/dummy-array.f90: Ditto.
4020         * testsuite/libgomp.oacc-fortran/gemm-2.f90: Ditto.
4021         * testsuite/libgomp.oacc-fortran/gemm.f90: Ditto.
4022         * testsuite/libgomp.oacc-fortran/host_data-2.f90: Ditto.
4023         * testsuite/libgomp.oacc-fortran/host_data-3.f90: Ditto.
4024         * testsuite/libgomp.oacc-fortran/host_data-4.f90: Ditto.
4025         * testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Ditto.
4026         * testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Ditto.
4027         * testsuite/libgomp.oacc-fortran/kernels-independent.f90: Ditto.
4028         * testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Ditto.
4029         * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Ditto.
4030         * testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95:
4031         Ditto.
4032         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
4033         Ditto.
4034         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
4035         Ditto.
4036         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
4037         Ditto.
4038         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
4039         Ditto.
4040         * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-1.f90:
4041         Ditto.
4042         * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-2.f90:
4043         Ditto.
4044         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-1.f90:
4045         Ditto.
4046         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-2.f90:
4047         Ditto.
4048         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-3.f90:
4049         Ditto.
4050         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-4.f90:
4051         Ditto.
4052         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-5.f90:
4053         Ditto.
4054         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-6.f90:
4055         Ditto.
4056         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-7.f90:
4057         Ditto.
4058         * testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90: Ditto.
4059         * testsuite/libgomp.oacc-fortran/lib-12.f90: Ditto.
4060         * testsuite/libgomp.oacc-fortran/lib-13.f90: Ditto.
4061         * testsuite/libgomp.oacc-fortran/lib-14.f90: Ditto.
4062         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90:
4063         Likewise and also add 'dg-do run'.
4064         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90:
4065         Ditto.
4066
4067 2019-10-25  Cesar Philippidis <cesar@codesourcery.com>
4068             Tobias Burnus  <tobias@codesourcery.com>
4069
4070         * testsuite/libgomp.oacc-fortran/common-block-1.f90: New test.
4071         * testsuite/libgomp.oacc-fortran/common-block-2.f90: New test.
4072         * testsuite/libgomp.oacc-fortran/common-block-3.f90: New test.
4073
4074 2019-10-14  Jakub Jelinek  <jakub@redhat.com>
4075
4076         PR libgomp/92081
4077         * testsuite/libgomp.fortran/target-simd.f90: Iterate from 1 rather
4078         than 0.
4079
4080 2019-10-11  Tobias Burnus  <tobias@codesourcery.com>
4081
4082         * testsuite/libgomp.fortran/use_device_addr-1.f90: New.
4083         * testsuite/libgomp.fortran/use_device_addr-2.f90: New.
4084
4085 2019-10-09  Thomas Schwinge  <thomas@codesourcery.com>
4086
4087         PR middle-end/92036
4088         * testsuite/libgomp.oacc-c-c++-common/data-firstprivate-1.c: New
4089         file.
4090
4091 2019-10-09  Tobias Burnus  <tobias@codesourcery.com>
4092
4093         PR testsuite/91884
4094         * testsuite/libgomp.fortran/fortran.exp: Conditionally
4095         add -lquadmath.
4096         * testsuite/libgomp.oacc-fortran/fortran.exp: Ditto.
4097
4098 2019-10-09  Jakub Jelinek  <jakub@redhat.com>
4099
4100         PR libgomp/92028
4101         * target.c (gomp_map_vars_internal): Readd the previous
4102         GOMP_MAP_USE_DEVICE_PTR handling code in the first loop,
4103         though do that just in the !not_found_cnt case.
4104
4105 2019-10-08  Tobias Burnus  <tobias@codesourcery.com>
4106
4107         * gfortran.dg/gomp/target-simd.f90: New.
4108
4109 2019-10-02  Julian Brown  <julian@codesourcery.com>
4110             Cesar Philippidis  <cesar@codesourcery.com>
4111
4112         * libgomp.h (OFFSET_INLINED, OFFSET_POINTER, OFFSET_STRUCT): Define.
4113         * target.c (FIELD_TGT_EMPTY): Define.
4114         (gomp_map_val): Use OFFSET_* macros instead of magic constants.  Write
4115         as switch instead of list of ifs.
4116         (gomp_map_vars_internal): Use OFFSET_* and FIELD_TGT_EMPTY macros.
4117
4118 2019-10-02  Andreas Tobler  <andreast@gcc.gnu.org>
4119
4120         * testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h
4121         include. Replace alloca () with __builtin_alloca ().
4122         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise.
4123
4124 2019-10-01  Jakub Jelinek  <jakub@redhat.com>
4125
4126         * configure.ac: Remove GCC_HEADER_STDINT(gstdint.h).
4127         * libgomp.h: Include <stdint.h> instead of "gstdint.h".
4128         * oacc-parallel.c: Don't include "libgomp_g.h".
4129         * plugin/plugin-hsa.c: Include <stdint.h> instead of "gstdint.h".
4130         * plugin/plugin-nvptx.c: Don't include "gstdint.h".
4131         * aclocal.m4: Regenerated.
4132         * config.h.in: Regenerated.
4133         * configure: Regenerated.
4134         * Makefile.in: Regenerated.
4135
4136 2019-09-30  Kwok Cheung Yeung  <kcy@codesourcery.com>
4137
4138         * libgomp_g.h: Include stdint.h instead of gstdint.h.
4139
4140 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
4141
4142         * configure: Regenerate.
4143
4144 2019-09-13  Tobias Burnus  <tobias@codesourcery.com>
4145
4146         * plugin/plugin-hsa.c (hsa_warn, hsa_fatal, hsa_error): Ensure
4147         string is initialized.
4148
4149 2019-09-06  Florian Weimer  <fweimer@redhat.com>
4150
4151         * configure: Regenerate.
4152
4153 2019-09-03  Chung-Lin Tang  <cltang@codesourcery.com>
4154
4155         PR other/79543
4156         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version
4157         scanning to conform to the GNU Coding Standards.
4158         * configure: Regenerate.
4159
4160 2019-08-28  Jakub Jelinek  <jakub@redhat.com>
4161
4162         PR libgomp/91530
4163         * testsuite/libgomp.c/scan-21.c: New test.
4164         * testsuite/libgomp.c/scan-22.c: New test.
4165
4166 2019-08-27  Jakub Jelinek  <jakub@redhat.com>
4167
4168         PR libgomp/91530
4169         * testsuite/libgomp.c/scan-11.c: Add -msse2 option for sse2_runtime
4170         targets.
4171         * testsuite/libgomp.c/scan-12.c: Likewise.
4172         * testsuite/libgomp.c/scan-13.c: Likewise.
4173         * testsuite/libgomp.c/scan-14.c: Likewise.
4174         * testsuite/libgomp.c/scan-15.c: Likewise.
4175         * testsuite/libgomp.c/scan-16.c: Likewise.
4176         * testsuite/libgomp.c/scan-17.c: Likewise.
4177         * testsuite/libgomp.c/scan-18.c: Likewise.
4178         * testsuite/libgomp.c/scan-19.c: Likewise.
4179         * testsuite/libgomp.c/scan-20.c: Likewise.
4180         * testsuite/libgomp.c++/scan-9.C: Likewise.
4181         * testsuite/libgomp.c++/scan-10.C: Likewise.
4182         * testsuite/libgomp.c++/scan-11.C: Likewise.
4183         * testsuite/libgomp.c++/scan-12.C: Likewise.
4184         * testsuite/libgomp.c++/scan-14.C: Likewise.
4185         * testsuite/libgomp.c++/scan-15.C: Likewise.
4186         * testsuite/libgomp.c++/scan-13.C: Likewise.  Use sse2_runtime
4187         instead of i?86-*-* x86_64-*-* as target for scan-tree-dump-times.
4188         * testsuite/libgomp.c++/scan-16.C: Likewise.
4189
4190 2019-08-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
4191
4192         PR fortran/91473
4193         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add
4194         -std=legacy so invalid code in the test case is accepted.
4195
4196 2019-08-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
4197
4198         PR fortran/91422
4199         * testsuite/libgomp.oacc-fortran/routine-7.f90: Correct array
4200         dimension.
4201
4202 2019-08-08  Jakub Jelinek  <jakub@redhat.com>
4203
4204         * target.c (gomp_map_vars_internal): For GOMP_MAP_USE_DEVICE_PTR
4205         perform the lookup in the first loop only if !not_found_cnt, otherwise
4206         perform lookups for it in the second loop guarded with
4207         if (not_found_cnt || has_firstprivate).
4208         * testsuite/libgomp.c/target-37.c: New test.
4209         * testsuite/libgomp.c++/target-22.C: New test.
4210
4211 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
4212
4213         * testsuite/libgomp.c/target-18.c (struct S): New type.
4214         (foo): Use use_device_addr clause instead of use_device_ptr clause
4215         where required by OpenMP 5.0, add further tests for both use_device_ptr
4216         and use_device_addr clauses.
4217         * testsuite/libgomp.c++/target-9.C (struct S): New type.
4218         (foo): Use use_device_addr clause instead of use_device_ptr clause
4219         where required by OpenMP 5.0, add further tests for both use_device_ptr
4220         and use_device_addr clauses.  Add t and u arguments.
4221         (main): Adjust caller.
4222
4223 2019-08-06  Jakub Jelinek  <jakub@redhat.com>
4224
4225         * testsuite/libgomp.c++/loop-13.C: New test.
4226         * testsuite/libgomp.c++/loop-14.C: New test.
4227         * testsuite/libgomp.c++/loop-15.C: New test.
4228
4229 2019-07-31  Jakub Jelinek  <jakub@redhat.com>
4230
4231         PR middle-end/91301
4232         * testsuite/libgomp.c++/for-27.C: New test.
4233
4234 2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
4235
4236         * testsuite/libgomp.fortran/reduction4.f90: Update BOZ usage.
4237         * testsuite/libgomp.fortran/reduction5.f90: Ditto.
4238
4239 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
4240
4241         * testsuite/libgomp.c-c++-common/loop-1.c: New test.
4242
4243 2019-07-08  Jakub Jelinek  <jakub@redhat.com>
4244
4245         * testsuite/libgomp.c++/scan-13.C: Replace xfail with target x86.
4246         * testsuite/libgomp.c++/scan-16.C: Likewise.
4247
4248 2019-07-06  Jakub Jelinek  <jakub@redhat.com>
4249
4250         * testsuite/libgomp.c/scan-19.c: New test.
4251         * testsuite/libgomp.c/scan-20.c: New test.
4252
4253         * testsuite/libgomp.c/scan-11.c: New test.
4254         * testsuite/libgomp.c/scan-12.c: New test.
4255         * testsuite/libgomp.c/scan-13.c: New test.
4256         * testsuite/libgomp.c/scan-14.c: New test.
4257         * testsuite/libgomp.c/scan-15.c: New test.
4258         * testsuite/libgomp.c/scan-16.c: New test.
4259         * testsuite/libgomp.c/scan-17.c: New test.
4260         * testsuite/libgomp.c/scan-18.c: New test.
4261         * testsuite/libgomp.c++/scan-9.C: New test.
4262         * testsuite/libgomp.c++/scan-10.C: New test.
4263         * testsuite/libgomp.c++/scan-11.C: New test.
4264         * testsuite/libgomp.c++/scan-12.C: New test.
4265         * testsuite/libgomp.c++/scan-13.C: New test.
4266         * testsuite/libgomp.c++/scan-14.C: New test.
4267         * testsuite/libgomp.c++/scan-15.C: New test.
4268         * testsuite/libgomp.c++/scan-16.C: New test.
4269
4270 2019-07-04  Jakub Jelinek  <jakub@redhat.com>
4271
4272         * testsuite/libgomp.c/scan-9.c: New test.
4273         * testsuite/libgomp.c/scan-10.c: New test.
4274
4275 2019-07-03  Jakub Jelinek  <jakub@redhat.com>
4276
4277         * testsuite/libgomp.c++/scan-1.C: New test.
4278         * testsuite/libgomp.c++/scan-2.C: New test.
4279         * testsuite/libgomp.c++/scan-3.C: New test.
4280         * testsuite/libgomp.c++/scan-4.C: New test.
4281         * testsuite/libgomp.c++/scan-5.C: New test.
4282         * testsuite/libgomp.c++/scan-6.C: New test.
4283         * testsuite/libgomp.c++/scan-7.C: New test.
4284         * testsuite/libgomp.c++/scan-8.C: New test.
4285         * testsuite/libgomp.c/scan-1.c: New test.
4286         * testsuite/libgomp.c/scan-2.c: New test.
4287         * testsuite/libgomp.c/scan-3.c: New test.
4288         * testsuite/libgomp.c/scan-4.c: New test.
4289         * testsuite/libgomp.c/scan-5.c: New test.
4290         * testsuite/libgomp.c/scan-6.c: New test.
4291         * testsuite/libgomp.c/scan-7.c: New test.
4292         * testsuite/libgomp.c/scan-8.c: New test.
4293
4294 2019-06-18  Thomas Schwinge  <thomas@codesourcery.com>
4295
4296         * testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C: New file.
4297         * testsuite/libgomp.oacc-c-c++-common/firstprivate-mappings-1.c:
4298         Likewise.
4299
4300         * testsuite/libgomp.fortran/allocatable3.f90: Add missing results
4301         check.
4302
4303 2019-06-18  Cesar Philippidis  <cesar@codesourcery.com>
4304
4305         * testsuite/libgomp.oacc-fortran/allocatable-array-1.f90: New
4306         file.
4307
4308 2019-06-18  Thomas Schwinge  <thomas@codesourcery.com>
4309
4310         PR fortran/90743
4311         * oacc-parallel.c (GOACC_parallel_keyed): Handle NULL mapping
4312         case.
4313         * testsuite/libgomp.fortran/target-allocatable-1-1.f90: New file.
4314         * testsuite/libgomp.fortran/target-allocatable-1-2.f90: Likewise.
4315         * testsuite/libgomp.oacc-fortran/allocatable-1-1.f90: Likewise.
4316         * testsuite/libgomp.oacc-fortran/allocatable-1-2.f90: Likewise.
4317
4318         PR testsuite/90861
4319         * testsuite/libgomp.oacc-c-c++-common/declare-vla.c: Update.
4320
4321         PR middle-end/90862
4322         * testsuite/libgomp.oacc-c-c++-common/declare-1.c: Update.
4323
4324 2019-06-16  Tom de Vries  <tdevries@suse.de>
4325
4326         PR tree-optimization/89376
4327         * testsuite/libgomp.oacc-c-c++-common/pr89376.c: New test.
4328
4329 2019-06-15  Tom de Vries  <tdevries@suse.de>
4330
4331         PR tree-optimization/89713
4332         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Expect no bar.sync.
4333         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Same.
4334
4335 2019-06-15  Jakub Jelinek  <jakub@redhat.com>
4336
4337         PR middle-end/90779
4338         * testsuite/libgomp.c/pr90779.c: New test.
4339         * testsuite/libgomp.fortran/pr90779.f90: New test.
4340
4341 2019-06-15  Tom de Vries  <tdevries@suse.de>
4342
4343         PR tree-optimization/90009
4344         * testsuite/libgomp.oacc-c-c++-common/pr90009.c: New test.
4345
4346 2019-06-13  Feng Xue  <fxue@os.amperecomputing.com>
4347
4348         PR tree-optimization/89713
4349         * testsuite/libgomp.oacc-c-c++-common/pr84955-1.c: New test.
4350
4351 2019-06-11  Jakub Jelinek  <jakub@redhat.com>
4352
4353         PR target/90811
4354         * testsuite/libgomp.c/pr90811.c: New test.
4355
4356 2019-06-05  Jakub Jelinek  <jakub@redhat.com>
4357
4358         * testsuite/libgomp.c++/lastprivate-conditional-1.C: New test.
4359         * testsuite/libgomp.c++/lastprivate-conditional-2.C: New test.
4360
4361 2019-06-04  Jakub Jelinek  <jakub@redhat.com>
4362
4363         * testsuite/libgomp.c-c++-common/lastprivate-conditional-7.c: New test.
4364         * testsuite/libgomp.c-c++-common/lastprivate-conditional-8.c: New test.
4365         * testsuite/libgomp.c-c++-common/lastprivate-conditional-9.c: New test.
4366         * testsuite/libgomp.c-c++-common/lastprivate-conditional-10.c: New test.
4367
4368 2019-05-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4369
4370         * configure.ac: Call AX_COUNT_CPUS.
4371         Substitute CPU_COUNT.
4372         * testsuite/Makefile.am (check-am): Use CPU_COUNT as processor
4373         count fallback.
4374         * aclocal.m4: Regenerate.
4375         * configure: Regenerate.
4376         * Makefile.in, testsuite/Makefile.in: Regenerate.
4377
4378 2019-05-29  Jakub Jelinek  <jakub@redhat.com>
4379
4380         * testsuite/libgomp.c-c++-common/lastprivate_conditional_4.c: Rename
4381         to ...
4382         * testsuite/libgomp.c-c++-common/lastprivate-conditional-4.c: ... this.
4383         * testsuite/libgomp.c-c++-common/lastprivate-conditional-5.c: New test.
4384         * testsuite/libgomp.c-c++-common/lastprivate-conditional-6.c: New test.
4385
4386 2019-05-27  Jakub Jelinek  <jakub@redhat.com>
4387
4388         * testsuite/libgomp.c-c++-common/lastprivate_conditional_4.c: New test.
4389
4390         * testsuite/libgomp.c-c++-common/lastprivate-conditional-3.c: New test.
4391
4392         PR libgomp/90641
4393         * work.c (gomp_init_work_share): Instead of aligning final ordered
4394         value to multiples of long long alignment, align to that the
4395         first part (ordered team ids) and if inline_ordered_team_ids
4396         is not on a long long alignment boundary within the structure,
4397         use __alignof__ (long long) - 1 pad size always.
4398         * loop.c (GOMP_loop_start): Fix *mem computation if
4399         inline_ordered_team_ids is not aligned on long long alignment boundary
4400         within the structure.
4401         * loop-ull.c (GOMP_loop_ull_start): Likewise.
4402         * sections.c (GOMP_sections2_start): Likewise.
4403
4404 2019-05-24  Jakub Jelinek  <jakub@redhat.com>
4405
4406         * testsuite/libgomp.c-c++-common/lastprivate-conditional-1.c: New test.
4407         * testsuite/libgomp.c-c++-common/lastprivate-conditional-2.c: New test.
4408
4409         PR libgomp/90585
4410         * plugin/plugin-hsa.c: Include gstdint.h.  Include inttypes.h only if
4411         HAVE_INTTYPES_H is defined.
4412         (print_uint64_t): New typedef.
4413         (PRIu64): Define if HAVE_INTTYPES_H is not defined.
4414         (print_kernel_dispatch, run_kernel): Use PRIu64 macro instead of
4415         "lu", cast uint64_t HSA_DEBUG and fprintf arguments to print_uint64_t.
4416         (release_kernel_dispatch): Likewise.  Cast shadow->debug to uintptr_t
4417         before casting to void *.
4418         * plugin/plugin-nvptx.c: Include gstdint.h instead of stdint.h.
4419         * oacc-mem.c: Don't include config.h nor stdint.h.
4420         * target.c: Don't include config.h.
4421         * oacc-cuda.c: Likewise.
4422         * oacc-host.c: Don't include stdint.h.
4423
4424 2019-05-20  Jakub Jelinek  <jakub@redhat.com>
4425
4426         PR libgomp/90527
4427         * alloc.c (_GNU_SOURCE): Define.
4428
4429 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
4430
4431         * acc_prof.h: New file.
4432         * oacc-profiling.c: Likewise.
4433         * Makefile.am (nodist_libsubinclude_HEADERS, libgomp_la_SOURCES):
4434         Add these, respectively.
4435         * Makefile.in: Regenerate.
4436         * env.c (initialize_env): Call goacc_profiling_initialize.
4437         * oacc-plugin.c (GOMP_PLUGIN_goacc_thread)
4438         (GOMP_PLUGIN_goacc_profiling_dispatch): New functions.
4439         * oacc-plugin.h (GOMP_PLUGIN_goacc_thread)
4440         (GOMP_PLUGIN_goacc_profiling_dispatch): Declare.
4441         * libgomp.map (OACC_2.5.1): Add acc_prof_lookup,
4442         acc_prof_register, acc_prof_unregister, and acc_register_library.
4443         (GOMP_PLUGIN_1.3): Add GOMP_PLUGIN_goacc_profiling_dispatch, and
4444         GOMP_PLUGIN_goacc_thread.
4445         * oacc-int.h (struct goacc_thread): Add prof_info, api_info,
4446         prof_callbacks_enabled members.
4447         (goacc_prof_enabled, goacc_profiling_initialize)
4448         (_goacc_profiling_dispatch_p, _goacc_profiling_setup_p)
4449         (goacc_profiling_dispatch): Declare.
4450         (GOACC_PROF_ENABLED, GOACC_PROFILING_DISPATCH_P)
4451         (GOACC_PROFILING_SETUP_P): Define.
4452         * oacc-async.c (acc_async_test, acc_async_test_all, acc_wait)
4453         (acc_wait_async, acc_wait_all, acc_wait_all_async): Update for
4454         OpenACC Profiling Interface.
4455         * oacc-cuda.c (acc_get_current_cuda_device)
4456         (acc_get_current_cuda_context, acc_get_cuda_stream)
4457         (acc_set_cuda_stream): Likewise.
4458         * oacc-init.c (acc_init_1, goacc_attach_host_thread_to_device)
4459         (acc_init, acc_set_device_type, acc_get_device_type)
4460         (acc_get_device_num, goacc_lazy_initialize): Likewise.
4461         * oacc-mem.c (acc_malloc, acc_free, memcpy_tofrom_device)
4462         (acc_deviceptr, acc_hostptr, acc_is_present, acc_map_data)
4463         (acc_unmap_data, present_create_copy, delete_copyout)
4464         (update_dev_host): Likewise.
4465         * oacc-parallel.c (GOACC_parallel_keyed, GOACC_data_start)
4466         (GOACC_data_end, GOACC_enter_exit_data, GOACC_update, GOACC_wait):
4467         Likewise.
4468         * plugin/plugin-nvptx.c (nvptx_exec, nvptx_alloc, nvptx_free)
4469         (GOMP_OFFLOAD_openacc_exec, GOMP_OFFLOAD_openacc_async_exec):
4470         Likewise.
4471         * libgomp.texi: Update.
4472         * testsuite/libgomp.oacc-c-c++-common/acc_prof-dispatch-1.c: New
4473         file.
4474         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Likewise.
4475         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c:
4476         Likewise.
4477         * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c:
4478         Likewise.
4479         * testsuite/libgomp.oacc-c-c++-common/acc_prof-valid_bytes-1.c:
4480         Likewise.
4481         * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c:
4482         Likewise.
4483
4484 2019-05-13  Chung-Lin Tang <cltang@codesourcery.com>
4485
4486         * libgomp-plugin.h (struct goacc_asyncqueue): Declare.
4487         (struct goacc_asyncqueue_list): Likewise.
4488         (goacc_aq): Likewise.
4489         (goacc_aq_list): Likewise.
4490         (GOMP_OFFLOAD_openacc_register_async_cleanup): Remove.
4491         (GOMP_OFFLOAD_openacc_async_test): Remove.
4492         (GOMP_OFFLOAD_openacc_async_test_all): Remove.
4493         (GOMP_OFFLOAD_openacc_async_wait): Remove.
4494         (GOMP_OFFLOAD_openacc_async_wait_async): Remove.
4495         (GOMP_OFFLOAD_openacc_async_wait_all): Remove.
4496         (GOMP_OFFLOAD_openacc_async_wait_all_async): Remove.
4497         (GOMP_OFFLOAD_openacc_async_set_async): Remove.
4498         (GOMP_OFFLOAD_openacc_exec): Adjust declaration.
4499         (GOMP_OFFLOAD_openacc_cuda_get_stream): Likewise.
4500         (GOMP_OFFLOAD_openacc_cuda_set_stream): Likewise.
4501         (GOMP_OFFLOAD_openacc_async_exec): Declare.
4502         (GOMP_OFFLOAD_openacc_async_construct): Declare.
4503         (GOMP_OFFLOAD_openacc_async_destruct): Declare.
4504         (GOMP_OFFLOAD_openacc_async_test): Declare.
4505         (GOMP_OFFLOAD_openacc_async_synchronize): Declare.
4506         (GOMP_OFFLOAD_openacc_async_serialize): Declare.
4507         (GOMP_OFFLOAD_openacc_async_queue_callback): Declare.
4508         (GOMP_OFFLOAD_openacc_async_host2dev): Declare.
4509         (GOMP_OFFLOAD_openacc_async_dev2host): Declare.
4510
4511         * libgomp.h (struct acc_dispatch_t): Define 'async' sub-struct.
4512         (gomp_acc_insert_pointer): Adjust declaration.
4513         (gomp_copy_host2dev): New declaration.
4514         (gomp_copy_dev2host): Likewise.
4515         (gomp_map_vars_async): Likewise.
4516         (gomp_unmap_tgt): Likewise.
4517         (gomp_unmap_vars_async): Likewise.
4518         (gomp_fini_device): Likewise.
4519
4520         * oacc-async.c (get_goacc_thread): New function.
4521         (get_goacc_thread_device): New function.
4522         (lookup_goacc_asyncqueue): New function.
4523         (get_goacc_asyncqueue): New function.
4524         (acc_async_test): Adjust code to use new async design.
4525         (acc_async_test_all): Likewise.
4526         (acc_wait): Likewise.
4527         (acc_wait_async): Likewise.
4528         (acc_wait_all): Likewise.
4529         (acc_wait_all_async): Likewise.
4530         (goacc_async_free): New function.
4531         (goacc_init_asyncqueues): Likewise.
4532         (goacc_fini_asyncqueues): Likewise.
4533         * oacc-cuda.c (acc_get_cuda_stream): Adjust code to use new async
4534         design.
4535         (acc_set_cuda_stream): Likewise.
4536         * oacc-host.c (host_openacc_exec): Adjust parameters, remove 'async'.
4537         (host_openacc_register_async_cleanup): Remove.
4538         (host_openacc_async_exec): New function.
4539         (host_openacc_async_test): Adjust parameters.
4540         (host_openacc_async_test_all): Remove.
4541         (host_openacc_async_wait): Remove.
4542         (host_openacc_async_wait_async): Remove.
4543         (host_openacc_async_wait_all): Remove.
4544         (host_openacc_async_wait_all_async): Remove.
4545         (host_openacc_async_set_async): Remove.
4546         (host_openacc_async_synchronize): New function.
4547         (host_openacc_async_serialize): New function.
4548         (host_openacc_async_host2dev): New function.
4549         (host_openacc_async_dev2host): New function.
4550         (host_openacc_async_queue_callback): New function.
4551         (host_openacc_async_construct): New function.
4552         (host_openacc_async_destruct): New function.
4553         (struct gomp_device_descr host_dispatch): Remove initialization of old
4554         interface, add initialization of new async sub-struct.
4555         * oacc-init.c (acc_shutdown_1): Adjust to use gomp_fini_device.
4556         (goacc_attach_host_thread_to_device): Remove old async code usage.
4557         * oacc-int.h (goacc_init_asyncqueues): New declaration.
4558         (goacc_fini_asyncqueues): Likewise.
4559         (goacc_async_copyout_unmap_vars): Likewise.
4560         (goacc_async_free): Likewise.
4561         (get_goacc_asyncqueue): Likewise.
4562         (lookup_goacc_asyncqueue): Likewise.
4563         * oacc-mem.c (memcpy_tofrom_device): Adjust code to use new async
4564         design.
4565         (present_create_copy): Adjust code to use new async design.
4566         (delete_copyout): Likewise.
4567         (update_dev_host): Likewise.
4568         (gomp_acc_insert_pointer): Add async parameter, adjust code to use new
4569         async design.
4570         (gomp_acc_remove_pointer): Adjust code to use new async design.
4571         * oacc-parallel.c (GOACC_parallel_keyed): Adjust code to use new async
4572         design.
4573         (GOACC_enter_exit_data): Likewise.
4574         (goacc_wait): Likewise.
4575         (GOACC_update): Likewise.
4576         * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Change to assert fail
4577         when called, warn as obsolete in comment.
4578         * target.c (goacc_device_copy_async): New function.
4579         (gomp_copy_host2dev): Remove 'static', add goacc_asyncqueue parameter,
4580         add goacc_device_copy_async case.
4581         (gomp_copy_dev2host): Likewise.
4582         (gomp_map_vars_existing): Add goacc_asyncqueue parameter, adjust code.
4583         (gomp_map_pointer): Likewise.
4584         (gomp_map_fields_existing): Likewise.
4585         (gomp_map_vars_internal): New always_inline function, renamed from
4586         gomp_map_vars.
4587         (gomp_map_vars): Implement by calling gomp_map_vars_internal.
4588         (gomp_map_vars_async): Implement by calling gomp_map_vars_internal,
4589         passing goacc_asyncqueue argument.
4590         (gomp_unmap_tgt): Remove static, add attribute_hidden.
4591         (gomp_unref_tgt): New function.
4592         (gomp_unmap_vars_internal): New always_inline function, renamed from
4593         gomp_unmap_vars.
4594         (gomp_unmap_vars): Implement by calling gomp_unmap_vars_internal.
4595         (gomp_unmap_vars_async): Implement by calling
4596         gomp_unmap_vars_internal, passing goacc_asyncqueue argument.
4597         (gomp_fini_device): New function.
4598         (gomp_exit_data): Adjust gomp_copy_dev2host call.
4599         (gomp_load_plugin_for_device): Remove old interface, adjust to load
4600         new async interface.
4601         (gomp_target_fini): Adjust code to call gomp_fini_device.
4602
4603         * plugin/plugin-nvptx.c (struct cuda_map): Remove.
4604         (struct ptx_stream): Remove.
4605         (struct nvptx_thread): Remove current_stream field.
4606         (cuda_map_create): Remove.
4607         (cuda_map_destroy): Remove.
4608         (map_init): Remove.
4609         (map_fini): Remove.
4610         (map_pop): Remove.
4611         (map_push): Remove.
4612         (struct goacc_asyncqueue): Define.
4613         (struct nvptx_callback): Define.
4614         (struct ptx_free_block): Define.
4615         (struct ptx_device): Remove null_stream, active_streams, async_streams,
4616         stream_lock, and next fields.
4617         (enum ptx_event_type): Remove.
4618         (struct ptx_event): Remove.
4619         (ptx_event_lock): Remove.
4620         (ptx_events): Remove.
4621         (init_streams_for_device): Remove.
4622         (fini_streams_for_device): Remove.
4623         (select_stream_for_async): Remove.
4624         (nvptx_init): Remove ptx_events and ptx_event_lock references.
4625         (nvptx_attach_host_thread_to_device): Remove CUDA_ERROR_NOT_PERMITTED
4626         case.
4627         (nvptx_open_device): Add free_blocks initialization, remove
4628         init_streams_for_device call.
4629         (nvptx_close_device): Remove fini_streams_for_device call, add
4630         free_blocks destruct code.
4631         (event_gc): Remove.
4632         (event_add): Remove.
4633         (nvptx_exec): Adjust parameters and code.
4634         (nvptx_free): Likewise.
4635         (nvptx_host2dev): Remove.
4636         (nvptx_dev2host): Remove.
4637         (nvptx_set_async): Remove.
4638         (nvptx_async_test): Remove.
4639         (nvptx_async_test_all): Remove.
4640         (nvptx_wait): Remove.
4641         (nvptx_wait_async): Remove.
4642         (nvptx_wait_all): Remove.
4643         (nvptx_wait_all_async): Remove.
4644         (nvptx_get_cuda_stream): Remove.
4645         (nvptx_set_cuda_stream): Remove.
4646         (GOMP_OFFLOAD_alloc): Adjust code.
4647         (GOMP_OFFLOAD_free): Likewise.
4648         (GOMP_OFFLOAD_openacc_register_async_cleanup): Remove.
4649         (GOMP_OFFLOAD_openacc_exec): Adjust parameters and code.
4650         (GOMP_OFFLOAD_openacc_async_test_all): Remove.
4651         (GOMP_OFFLOAD_openacc_async_wait): Remove.
4652         (GOMP_OFFLOAD_openacc_async_wait_async): Remove.
4653         (GOMP_OFFLOAD_openacc_async_wait_all): Remove.
4654         (GOMP_OFFLOAD_openacc_async_wait_all_async): Remove.
4655         (GOMP_OFFLOAD_openacc_async_set_async): Remove.
4656         (cuda_free_argmem): New function.
4657         (GOMP_OFFLOAD_openacc_async_exec): New plugin hook function.
4658         (GOMP_OFFLOAD_openacc_create_thread_data): Adjust code.
4659         (GOMP_OFFLOAD_openacc_cuda_get_stream): Adjust code.
4660         (GOMP_OFFLOAD_openacc_cuda_set_stream): Adjust code.
4661         (GOMP_OFFLOAD_openacc_async_construct): New plugin hook function.
4662         (GOMP_OFFLOAD_openacc_async_destruct): New plugin hook function.
4663         (GOMP_OFFLOAD_openacc_async_test): Remove and re-implement.
4664         (GOMP_OFFLOAD_openacc_async_synchronize): New plugin hook function.
4665         (GOMP_OFFLOAD_openacc_async_serialize): New plugin hook function.
4666         (GOMP_OFFLOAD_openacc_async_queue_callback): New plugin hook function.
4667         (cuda_callback_wrapper): New function.
4668         (cuda_memcpy_sanity_check): New function.
4669         (GOMP_OFFLOAD_host2dev): Remove and re-implement.
4670         (GOMP_OFFLOAD_dev2host): Remove and re-implement.
4671         (GOMP_OFFLOAD_openacc_async_host2dev): New plugin hook function.
4672         (GOMP_OFFLOAD_openacc_async_dev2host): New plugin hook function.
4673
4674 2019-05-07  Thomas Schwinge  <thomas@codesourcery.com>
4675
4676         PR target/87835
4677         * testsuite/libgomp.oacc-c-c++-common/pr87835.c: Update.
4678
4679 2019-05-06  Thomas Schwinge  <thomas@codesourcery.com>
4680
4681         * oacc-parallel.c: Add comments to legacy entry points (GCC 5).
4682
4683 2019-03-27  Kevin Buettner  <kevinb@redhat.com>
4684
4685         * team.c (gomp_team_start): Initialize pool->threads[0].
4686
4687 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
4688
4689         * testsuite/libgomp.oacc-c++/c++.exp: Specify
4690         "-foffload=$offload_target".
4691         * testsuite/libgomp.oacc-c/c.exp: Likewise.
4692         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
4693         * testsuite/lib/libgomp.exp
4694         (check_effective_target_openacc_nvidia_accel_configured): Remove,
4695         as (conceptually) merged into
4696         check_effective_target_openacc_nvidia_accel_selected.  Adjust all
4697         users.
4698
4699         * plugin/configfrag.ac: Populate and AC_SUBST offload_targets.
4700         * testsuite/libgomp-test-support.exp.in: Adjust.
4701         * testsuite/lib/libgomp.exp: Likewise.  Don't populate
4702         openacc_device_types_s.
4703         (offload_target_to_openacc_device_type): New proc.
4704         * testsuite/libgomp.oacc-c++/c++.exp: Adjust.
4705         * testsuite/libgomp.oacc-c/c.exp: Likewise.
4706         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
4707         * Makefile.in: Regenerate.
4708         * configure: Likewise.
4709         * testsuite/Makefile.in: Likewise.
4710
4711         * plugin/configfrag.ac: Populate and AC_SUBST offload_plugins
4712         instead of offload_targets, and AC_DEFINE_UNQUOTED OFFLOAD_PLUGINS
4713         instead of OFFLOAD_TARGETS.
4714         * target.c (gomp_target_init): Adjust.
4715         * testsuite/libgomp-test-support.exp.in: Likewise.
4716         * testsuite/lib/libgomp.exp: Likewise.  Populate
4717         openacc_device_types_s instead of offload_targets_s_openacc.
4718         (check_effective_target_openacc_nvidia_accel_selected)
4719         (check_effective_target_openacc_host_selected): Adjust.
4720         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
4721         * testsuite/libgomp.oacc-c/c.exp: Likewise.
4722         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
4723         * Makefile.in: Regenerate.
4724         * config.h.in: Likewise.
4725         * configure: Likewise.
4726         * testsuite/Makefile.in: Likewise.
4727
4728         * testsuite/lib/libgomp.exp: Error out for unknown offload target.
4729         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.  Report if
4730         "offloading: supported, but hardware not accessible".
4731         * testsuite/libgomp.oacc-c/c.exp: Likewise.
4732         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
4733
4734 2019-02-19  Chung-Lin Tang <cltang@codesourcery.com>
4735
4736         PR c/87924
4737         * oacc-parallel.c (GOACC_parallel_keyed): Remove condition on call to
4738         goacc_wait().
4739         (goacc_wait): Handle ACC_ASYNC_NOVAL case, remove goacc_thread() call
4740         and related adjustment.
4741
4742 2019-01-30  Jakub Jelinek  <jakub@redhat.com>
4743
4744         PR c++/88988
4745         * testsuite/libgomp.c++/pr88988.C: New test.
4746
4747 2019-01-28  Jakub Jelinek  <jakub@redhat.com>
4748
4749         PR middle-end/89002
4750         * testsuite/libgomp.c/pr89002.c: New test.
4751
4752 2019-01-28  Richard Biener  <rguenther@suse.de>
4753
4754         PR testsuite/89064
4755         PR tree-optimization/86865
4756         * testsuite/libgomp.graphite/force-parallel-5.c: XFAIL.
4757
4758 2019-01-24  Tom de Vries  <tdevries@suse.de>
4759
4760         * plugin/plugin-nvptx.c (GOMP_OFFLOAD_fini_device): Free ptx_devices
4761         once instantiated_devices drops to 0.
4762
4763 2019-01-23  Tom de Vries  <tdevries@suse.de>
4764
4765         PR target/PR88946
4766         * plugin/plugin-nvptx.c (cuda_map_destroy): Use CUDA_CALL_NOCHECK for
4767         cuMemFree.
4768         (nvptx_exec): Don't call map_push if mapnum == 0.
4769         * testsuite/libgomp.oacc-c-c++-common/pr88946.c: New test.
4770
4771 2019-01-23  Tom de Vries  <tdevries@suse.de>
4772
4773         PR target/88941
4774         PR target/88939
4775         * plugin/plugin-nvptx.c (cuda_map_destroy): Handle map->active case.
4776         (map_fini): Remove "assert (!s->map->active)".
4777         * testsuite/libgomp.oacc-c-c++-common/pr88941.c: New test.
4778
4779 2019-01-23  Tom de Vries  <tdevries@suse.de>
4780
4781         PR target/87835
4782         * plugin/plugin-nvptx.c (map_push): Fix adding of allocated element.
4783         * testsuite/libgomp.oacc-c-c++-common/pr87835.c: New test.
4784
4785 2019-01-15  Tom de Vries  <tdevries@suse.de>
4786
4787         PR target/80547
4788         * testsuite/libgomp.oacc-c-c++-common/gang-reduction-var-assignment.c:
4789         New test.
4790
4791 2019-01-12  Tom de Vries  <tdevries@suse.de>
4792
4793         * testsuite/libgomp.oacc-c-c++-common/pr85486-2.c: New test.
4794         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c: New test.
4795         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c: New test.
4796         * testsuite/libgomp.oacc-fortran/gemm-2.f90: New test.
4797
4798 2019-01-12  Tom de Vries  <tdevries@suse.de>
4799
4800         * plugin/plugin-nvptx.c (nvptx_exec): Update error message.
4801
4802 2019-01-12  Tom de Vries  <tdevries@suse.de>
4803
4804         * testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c: New test.
4805         * testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c: New test.
4806         * testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c: New test.
4807
4808 2019-01-12  Tom de Vries  <tdevries@suse.de>
4809
4810         PR target/85486
4811         * testsuite/libgomp.oacc-c-c++-common/pr85486-3.c: New test.
4812         * testsuite/libgomp.oacc-c-c++-common/pr85486.c: New test.
4813
4814 2019-01-12  Tom de Vries  <tdevries@suse.de>
4815
4816         PR target/85381
4817         * testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: New test.
4818         * testsuite/libgomp.oacc-c-c++-common/pr85381.c: New test.
4819
4820 2019-01-12  Tom de Vries  <tdevries@suse.de>
4821
4822         * testsuite/libgomp.oacc-c-c++-common/vred2d-128.c: New test.
4823         * testsuite/libgomp.oacc-fortran/gemm.f90: New test.
4824         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-10.c: New test.
4825
4826 2019-01-12  Tom de Vries  <tdevries@suse.de>
4827
4828         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c: New test.
4829         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c: New test.
4830         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c: New test.
4831
4832 2019-01-12  Tom de Vries  <tdevries@suse.de>
4833
4834         * plugin/plugin-nvptx.c (nvptx_exec): Update insufficient hardware
4835         resources diagnostic.
4836
4837 2019-01-12  Tom de Vries  <tdevries@suse.de>
4838
4839         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: Expect
4840         vector length to be 128.
4841         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Expect vector
4842         length 2097152 to be reduced to 1024 instead of 32.
4843
4844 2019-01-11  Thomas Schwinge  <thomas@codesourcery.com>
4845             James Norris  <jnorris@codesourcery.com>
4846
4847         * libgomp.texi: Better distinguish OpenACC and OpenMP "Runtime
4848         Library Routines", and "Environment Variables".
4849
4850 2019-01-11  Tom de Vries  <tdevries@suse.de>
4851
4852         * plugin/plugin-nvptx.c (nvptx_exec): Prevent vector_length 64 and
4853         num_workers 16.
4854
4855 2019-01-11  Tom de Vries  <tdevries@suse.de>
4856
4857         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Remove
4858         -foffload=-w.
4859         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Same.
4860         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Same.
4861         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Same.
4862         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Same.
4863
4864 2019-01-11  Tom de Vries  <tdevries@suse.de>
4865
4866         * testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c: New
4867         test.
4868
4869 2019-01-10  Nathan Sidwell  <nathan@acm.org>
4870             Julian Brown  <julian@codesourcery.com>
4871
4872         PR lto/71959
4873         * testsuite/libgomp.oacc-c++/pr71959-aux.cc: New.
4874         * testsuite/libgomp.oacc-c++/pr71959.C: New.
4875
4876 2019-01-09  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4877
4878         * config/rtems/bar.c: Include "../linux/bar.c" and delete copy
4879         and paste code.
4880
4881 2019-01-09  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4882
4883         * config/rtems/affinity-fmt.c: New file.  Include affinity-fmt.c,
4884         undefining HAVE_GETPID and HAVE_GETHOSTNAME, and mapping fwrite to
4885         write.
4886
4887 2019-01-09  Tom de Vries  <tdevries@suse.de>
4888
4889         PR target/88756
4890         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (ng, nw, vl): Use
4891         #define instead of "const int".
4892         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c (ng, nw, vl): Same.
4893         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c (ng, nw, vl): Same.
4894         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c (ng, nw, vl): Same.
4895         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c (ng, nw, vl): Same.
4896
4897 2019-01-09  Tom de Vries  <tdevries@suse.de>
4898
4899         * plugin/plugin-nvptx.c (nvptx_exec): Make sure to launch with at least
4900         one worker.
4901
4902 2019-01-07  Tom de Vries  <tdevries@suse.de>
4903
4904         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c: Fix
4905         GOMP_OPENACC_DIM argument.
4906
4907 2019-01-03  Tom de Vries  <tdevries@suse.de>
4908
4909         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: New test.
4910         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c: New test.
4911
4912 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
4913
4914         Update copyright years.
4915
4916 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
4917
4918         * libgomp.texi: Bump @copying's copyright year.
4919
4920 2018-12-28  Thomas Schwinge  <thomas@codesourcery.com>
4921
4922         * oacc-parallel.c (GOACC_parallel_keyed, GOACC_parallel)
4923         (GOACC_data_start, GOACC_enter_exit_data, GOACC_update)
4924         (GOACC_declare): Redefine the "device" argument to "flags".
4925
4926 2018-12-28  Thomas Schwinge  <thomas@codesourcery.com>
4927             Cesar Philippidis  <cesar@codesourcery.com>
4928
4929         * target.c (struct gomp_coalesce_chunk): New structure.
4930         (struct gomp_coalesce_buf): Update the chunks member to use that
4931         type.  Adjust all users.
4932
4933 2018-12-19  Tom de Vries  <tdevries@suse.de>
4934
4935         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: New test.
4936         * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: New test.
4937         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: New test.
4938
4939 2018-12-19  Tom de Vries  <tdevries@suse.de>
4940
4941         * testsuite/lib/libgomp.exp: Add load_lib of scanoffloadrtl.exp.
4942         * testsuite/libgomp.oacc-c-c++-common/nvptx-merged-loop.c: Move from
4943         gcc/testsuite/gcc.dg/goacc.
4944         * testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c: Same.
4945
4946 2018-12-14  Thomas Schwinge  <thomas@codesourcery.com>
4947             Chung-Lin Tang  <cltang@codesourcery.com>
4948
4949         * oacc-mem.c (acc_present_or_create): Remove definition and change
4950         to alias of acc_create.
4951         (acc_present_or_copyin): Remove definition and change to alias of
4952         acc_copyin.
4953         * oacc-parallel.c (GOACC_enter_exit_data): Call acc_create instead
4954         of acc_present_or_create.
4955         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Remove.
4956         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
4957         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
4958         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
4959         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
4960         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
4961         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
4962         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
4963         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
4964         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
4965         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
4966         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
4967         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
4968         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
4969         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
4970         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
4971
4972 2018-12-14  Thomas Schwinge  <thomas@codesourcery.com>
4973
4974         PR libgomp/88495
4975         * plugin/plugin-nvptx.c (nvptx_wait_async): Don't refuse
4976         "identical parameters".
4977         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: Update.
4978         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Remove.
4979
4980         PR libgomp/88484
4981         * oacc-parallel.c (GOACC_wait): Correct handling for "async >= 0".
4982         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: New file.
4983
4984         PR libgomp/88407
4985         * plugin/plugin-nvptx.c (nvptx_async_test, nvptx_wait)
4986         (nvptx_wait_async): Unseen async-argument is a no-op.
4987         * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Update.
4988         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Likewise.
4989         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
4990         * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
4991         * testsuite/libgomp.oacc-fortran/lib-12.f90: Likewise.
4992         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Merge into...
4993         * testsuite/libgomp.oacc-c-c++-common/lib-69.c: ... this.  Update.
4994         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Merge into...
4995         * testsuite/libgomp.oacc-c-c++-common/lib-74.c: ... this.  Update
4996
4997         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Revise.
4998         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
4999
5000 2018-12-14  Chung-Lin Tang  <cltang@codesourcery.com>
5001
5002         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Adjust.
5003         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
5004         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
5005
5006 2018-12-14  Thomas Schwinge  <thomas@codesourcery.com>
5007
5008         PR libgomp/88370
5009         * libgomp.texi (acc_get_current_cuda_context, acc_get_cuda_stream)
5010         (acc_set_cuda_stream): Clarify.
5011         * oacc-cuda.c (acc_get_cuda_stream, acc_set_cuda_stream): Use
5012         "async_valid_p".
5013         * plugin/plugin-nvptx.c (nvptx_set_cuda_stream): Refuse "async ==
5014         acc_async_sync".
5015         * testsuite/libgomp.oacc-c-c++-common/acc_set_cuda_stream-1.c: New file.
5016         * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Likewise.
5017         * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Update.
5018         * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
5019
5020 2018-12-14  Tom de Vries  <tdevries@suse.de>
5021
5022         * testsuite/libgomp.c-c++-common/function-not-offloaded-aux.c: New test.
5023         * testsuite/libgomp.c-c++-common/function-not-offloaded.c: New test.
5024         * testsuite/libgomp.c-c++-common/variable-not-offloaded.c: New test.
5025         * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: New test.
5026         * testsuite/libgomp.oacc-c-c++-common/variable-not-offloaded.c: New test.
5027
5028 2018-12-13  Tom de Vries  <tdevries@suse.de>
5029
5030         * affinity-fmt.c (gomp_print_string): New function, factored out of ...
5031         (omp_display_affinity, gomp_display_affinity_thread): ... here, and ...
5032         * fortran.c (omp_display_affinity_): ... here.
5033         * libgomp.h (gomp_print_string): Declare.
5034         * config/nvptx/affinity-fmt.c: New file.  Include affinity-fmt.c,
5035         undefining HAVE_GETPID and HAVE_GETHOSTNAME, and mapping fwrite to
5036         write.
5037
5038 2018-12-13  Jakub Jelinek  <jakub@redhat.com>
5039
5040         PR libgomp/88460
5041         * testsuite/libgomp.c++/for-24.C (results): Include it in
5042         omp declare target region.
5043         (main): Use map (always, tofrom: results) instead of
5044         map (tofrom: results).
5045
5046 2018-12-12  Jakub Jelinek  <jakub@redhat.com>
5047
5048         PR fortran/88463
5049         * testsuite/libgomp.fortran/pr88463-1.f90: New test.
5050         * testsuite/libgomp.fortran/pr88463-2.f90: New test.
5051
5052         * testsuite/libgomp.c-c++-common/for-16.c: New test.
5053
5054 2018-12-12  Andreas Schwab  <schwab@suse.de>
5055
5056         * config/linux/ia64/futex.h (sys_futex0): Don't mark r12 as
5057         clobbered.
5058
5059 2018-12-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
5060
5061         PR fortran/88411
5062         * testsuite/libgomp.fortran/async_io_8.f90: New test.
5063
5064 2018-12-09  Thomas Schwinge  <thomas@codesourcery.com>
5065             Jakub Jelinek  <jakub@redhat.com>
5066
5067         * target.c (gomp_map_vars): Call gomp_copy_host2dev instead of
5068         devicep->host2dev_func.
5069
5070 2018-12-08  Jakub Jelinek  <jakub@redhat.com>
5071
5072         PR libgomp/87995
5073         * testsuite/libgomp.c-c++-common/cancel-taskgroup-3.c: Require
5074         tls_runtime effective target.
5075         (t): New threadprivate variable.
5076         (main): Set t in threads which execute iterations of the worksharing
5077         loop.  Propagate that to the task after the loop and don't abort
5078         if the current taskgroup hasn't been cancelled.
5079
5080 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
5081
5082         * testsuite/libgomp.c/task-reduction-3.c: New test.
5083
5084         * testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c: New test.
5085
5086 2018-11-30  Cesar Philippidis  <cesar@codesourcery.com>
5087
5088         PR libgomp/88288
5089         * oacc-parallel.c (GOACC_parallel_keyed): Add offset to devaddrs.
5090         * testsuite/libgomp.oacc-c-c++-common/pr88288.c: New test.
5091
5092 2018-11-30  Thomas Schwinge  <thomas@codesourcery.com>
5093
5094         * testsuite/libgomp.oacc-fortran/lib-16-2.f90: New file.
5095
5096 2018-10-19  Richard Biener  <rguenther@suse.de>
5097
5098         PR tree-optimization/88182
5099         * testsuite/libgomp.c++/pr88182.C: Move to g++.dg/gomp.
5100
5101 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
5102
5103         * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Drop dejagnu.
5104         (RUNTEST): Don't define.
5105         (RUNTESTDEFAULTFLAGS): Add.
5106         (check-DEJAGNU, site.exp, distclean-DEJAGNU): New goals.
5107         (distclean-am): Depend on distclean-DEJAGNU.
5108         (check-am): If -j% option is present in MFLAGS and if
5109         `getconf _NPROCESSORS_ONLN` is more than 8, export OMP_NUM_THREADS=8.
5110         (.PHONY): Add check-DEJAGNU and distclean-DEJAGNU.
5111         * testsuite/Makefile.in: Regenerated.
5112
5113 2018-11-26  Richard Biener  <rguenther@suse.de>
5114
5115         PR tree-optimization/88182
5116         * testsuite/libgomp.c++/pr88182.C: New testcase.
5117
5118 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
5119
5120         PR bootstrap/88106
5121         * config/mingw32/affinity-fmt.c: New file.
5122
5123 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
5124
5125         * affinity-fmt.c: Include inttypes.h if HAVE_INTTYPES_H.
5126         (gomp_display_affinity): Use __builtin_choose_expr to handle
5127         properly handle argument having integral, or pointer or some other
5128         type.  If inttypes.h is available and PRIx64 is defined, use PRIx64
5129         with uint64_t type instead of %llx and unsigned long long.
5130
5131         * testsuite/libgomp.c-c++-common/task-reduction-13.c: New test.
5132         * testsuite/libgomp.c-c++-common/task-reduction-14.c: New test.
5133
5134 2018-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5135
5136         * affinity.c: Include <string.h>, <stdio.h>.
5137         (gomp_display_affinity_place): Remove cpusetp.
5138         * teams.c: Include <limits.h>.
5139
5140 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
5141
5142         * testsuite/libgomp.c-c++-common/task-reduction-8.c (bar): Add
5143         in_reduction clause for s[0].
5144
5145         * affinity.c (gomp_display_affinity_place): New function.
5146         * affinity-fmt.c: New file.
5147         * alloc.c (gomp_aligned_alloc, gomp_aligned_free): New functions.
5148         * config/linux/affinity.c (gomp_display_affinity_place): New function.
5149         * config/nvptx/icv-device.c (omp_get_num_teams, omp_get_team_num):
5150         Move these functions to ...
5151         * config/nvptx/teams.c: ... here.  New file.
5152         * config/nvptx/target.c (omp_pause_resource, omp_pause_resource_all):
5153         New functions.
5154         * config/nvptx/team.c (gomp_team_start, gomp_pause_host): New
5155         functions.
5156         * configure.ac: Check for aligned_alloc, posix_memalign, memalign
5157         and _aligned_malloc.
5158         (HAVE_UNAME, HAVE_GETHOSTNAME, HAVE_GETPID): Add new tests.
5159         * configure.tgt: Add -DUSING_INITIAL_EXEC_TLS to XCFLAGS for Linux.
5160         * env.c (gomp_display_affinity_var, gomp_affinity_format_var,
5161         gomp_affinity_format_len): New variables.
5162         (parse_schedule): Parse monotonic and nonmonotonic modifiers in
5163         OMP_SCHEDULE variable.  Set GFS_MONOTONIC for monotonic schedules.
5164         (handle_omp_display_env): Display monotonic/nonmonotonic schedule
5165         modifiers.  Display (non-default) chunk sizes.  Print
5166         OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT.
5167         (initialize_env): Don't call pthread_attr_setdetachstate.  Handle
5168         OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT env vars.
5169         * fortran.c: Include stdio.h and string.h.
5170         (omp_pause_resource, omp_pause_resource_all): Add ialias_redirect.
5171         (omp_get_schedule_, omp_get_schedule_8_): Mask off GFS_MONOTONIC bit.
5172         (omp_set_affinity_format_, omp_get_affinity_format_,
5173         omp_display_affinity_, omp_capture_affinity_, omp_pause_resource_,
5174         omp_pause_resource_all_): New functions.
5175         * icv.c (omp_set_schedule): Mask off omp_sched_monotonic bit in
5176         switch.
5177         * icv-device.c (omp_get_num_teams, omp_get_team_num): Move these
5178         functions to ...
5179         * teams.c: ... here.  New file.
5180         * libgomp_g.h: Include gstdint.h.
5181         (GOMP_loop_nonmonotonic_runtime_start,
5182         GOMP_loop_maybe_nonmonotonic_runtime_start, GOMP_loop_start,
5183         GOMP_loop_ordered_start, GOMP_loop_nonmonotonic_runtime_next,
5184         GOMP_loop_maybe_nonmonotonic_runtime_next, GOMP_loop_doacross_start,
5185         GOMP_parallel_loop_nonmonotonic_runtime,
5186         GOMP_parallel_loop_maybe_nonmonotonic_runtime,
5187         GOMP_loop_ull_nonmonotonic_runtime_start,
5188         GOMP_loop_ull_maybe_nonmonotonic_runtime_start, GOMP_loop_ull_start,
5189         GOMP_loop_ull_ordered_start, GOMP_loop_ull_nonmonotonic_runtime_next,
5190         GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
5191         GOMP_loop_ull_doacross_start, GOMP_parallel_reductions,
5192         GOMP_taskwait_depend, GOMP_taskgroup_reduction_register,
5193         GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
5194         GOMP_workshare_task_reduction_unregister, GOMP_sections2_start,
5195         GOMP_teams_reg): Declare.
5196         * libgomp.h (GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC): Define unless
5197         gomp_aligned_alloc uses fallback implementation.
5198         (gomp_aligned_alloc, gomp_aligned_free): Declare.
5199         (enum gomp_schedule_type): Add GFS_MONOTONIC.
5200         (struct gomp_doacross_work_share): Add extra field.
5201         (struct gomp_work_share): Add task_reductions field.
5202         (struct gomp_taskgroup): Add workshare and reductions fields.
5203         (GOMP_NEEDS_THREAD_HANDLE): Define if needed.
5204         (gomp_thread_handle): New typedef.
5205         (gomp_display_affinity_place, gomp_set_affinity_format,
5206         gomp_display_string, gomp_display_affinity,
5207         gomp_display_affinity_thread): Declare.
5208         (gomp_doacross_init, gomp_doacross_ull_init): Add size_t argument.
5209         (gomp_parallel_reduction_register, gomp_workshare_taskgroup_start,
5210         gomp_workshare_task_reduction_register): Declare.
5211         (gomp_team_start): Add taskgroup argument.
5212         (gomp_pause_host): Declare.
5213         (gomp_init_work_share, gomp_work_share_start): Change bool argument
5214         to size_t.
5215         (gomp_thread_self, gomp_thread_to_pthread_t): New inline functions.
5216         * libgomp.map (GOMP_5.0): Export GOMP_loop_start,
5217         GOMP_loop_ordered_start, GOMP_loop_doacross_start,
5218         GOMP_loop_ull_start, GOMP_loop_ull_ordered_start,
5219         GOMP_loop_ull_doacross_start,
5220         GOMP_workshare_task_reduction_unregister, GOMP_sections2_start,
5221         GOMP_loop_maybe_nonmonotonic_runtime_next,
5222         GOMP_loop_maybe_nonmonotonic_runtime_start,
5223         GOMP_loop_nonmonotonic_runtime_next,
5224         GOMP_loop_nonmonotonic_runtime_start,
5225         GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
5226         GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
5227         GOMP_loop_ull_nonmonotonic_runtime_next,
5228         GOMP_loop_ull_nonmonotonic_runtime_start,
5229         GOMP_parallel_loop_maybe_nonmonotonic_runtime,
5230         GOMP_parallel_loop_nonmonotonic_runtime, GOMP_parallel_reductions,
5231         GOMP_taskgroup_reduction_register,
5232         GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
5233         GOMP_teams_reg and GOMP_taskwait_depend.
5234         (OMP_5.0): Export omp_pause_resource{,_all}{,_},
5235         omp_{capture,display}_affinity{,_}, and
5236         omp_[gs]et_affinity_format{,_}.
5237         * loop.c: Include string.h.
5238         (GOMP_loop_runtime_next): Add ialias.
5239         (GOMP_taskgroup_reduction_register): Add ialias_redirect.
5240         (gomp_loop_static_start, gomp_loop_dynamic_start,
5241         gomp_loop_guided_start, gomp_loop_ordered_static_start,
5242         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
5243         gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start,
5244         gomp_loop_doacross_guided_start): Adjust gomp_work_share_start
5245         or gomp_doacross_init callers.
5246         (gomp_adjust_sched, GOMP_loop_start, GOMP_loop_ordered_start,
5247         GOMP_loop_doacross_start): New functions.
5248         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
5249         GOMP_loop_doacross_runtime_start, GOMP_parallel_loop_runtime_start):
5250         Mask off GFS_MONOTONIC bit.
5251         (GOMP_loop_maybe_nonmonotonic_runtime_next,
5252         GOMP_loop_maybe_nonmonotonic_runtime_start,
5253         GOMP_loop_nonmonotonic_runtime_next,
5254         GOMP_loop_nonmonotonic_runtime_start,
5255         GOMP_parallel_loop_maybe_nonmonotonic_runtime,
5256         GOMP_parallel_loop_nonmonotonic_runtime): New aliases or wrapper
5257         functions.
5258         (gomp_parallel_loop_start): Pass NULL as taskgroup to
5259         gomp_team_start.
5260         * loop_ull.c: Include string.h.
5261         (GOMP_loop_ull_runtime_next): Add ialias.
5262         (GOMP_taskgroup_reduction_register): Add ialias_redirect.
5263         (gomp_loop_ull_static_start, gomp_loop_ull_dynamic_start,
5264         gomp_loop_ull_guided_start, gomp_loop_ull_ordered_static_start,
5265         gomp_loop_ull_ordered_dynamic_start,
5266         gomp_loop_ull_ordered_guided_start,
5267         gomp_loop_ull_doacross_static_start,
5268         gomp_loop_ull_doacross_dynamic_start,
5269         gomp_loop_ull_doacross_guided_start): Adjust gomp_work_share_start
5270         and gomp_doacross_ull_init callers.
5271         (gomp_adjust_sched, GOMP_loop_ull_start, GOMP_loop_ull_ordered_start,
5272         GOMP_loop_ull_doacross_start): New functions.
5273         (GOMP_loop_ull_runtime_start,
5274         GOMP_loop_ull_ordered_runtime_start,
5275         GOMP_loop_ull_doacross_runtime_start): Mask off GFS_MONOTONIC bit.
5276         (GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
5277         GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
5278         GOMP_loop_ull_nonmonotonic_runtime_next,
5279         GOMP_loop_ull_nonmonotonic_runtime_start): Likewise.
5280         * Makefile.am (libgomp_la_SOURCES): Add teams.c and affinity-fmt.c.
5281         * omp.h.in (enum omp_sched_t): Add omp_sched_monotonic.
5282         (omp_pause_resource_t, omp_depend_t): New typedefs.
5283         (enum omp_lock_hint_t): Renamed to ...
5284         (enum omp_sync_hint_t): ... this.  Define omp_sync_hint_*
5285         enumerators using numbers and omp_lock_hint_* as their aliases.
5286         (omp_lock_hint_t): New typedef.  Rename to ...
5287         (omp_sync_hint_t): ... this.
5288         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint): Use
5289         omp_sync_hint_t instead of omp_lock_hint_t.
5290         (omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
5291         omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
5292         Declare.
5293         (omp_target_is_present, omp_target_disassociate_ptr):
5294         Change first argument from void * to const void *.
5295         (omp_target_memcpy, omp_target_memcpy_rect): Change second argument
5296         from void * to const void *.
5297         (omp_target_associate_ptr): Change first and second arguments from
5298         void * to const void *.
5299         * omp_lib.f90.in (omp_pause_resource_kind, omp_pause_soft,
5300         omp_pause_hard): New parameters.
5301         (omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
5302         omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
5303         New interfaces.
5304         * omp_lib.h.in (omp_pause_resource_kind, omp_pause_soft,
5305         omp_pause_hard): New parameters.
5306         (omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
5307         omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
5308         New externals.
5309         * ordered.c (gomp_doacross_init, gomp_doacross_ull_init): Add
5310         EXTRA argument.  If not needed to prepare array, if extra is 0,
5311         clear ws->doacross, otherwise allocate just doacross structure and
5312         extra payload.  If array is needed, allocate also extra payload.
5313         (GOMP_doacross_post, GOMP_doacross_wait, GOMP_doacross_ull_post,
5314         GOMP_doacross_ull_wait): Handle doacross->array == NULL like
5315         doacross == NULL.
5316         * parallel.c (GOMP_parallel_start): Pass NULL as taskgroup to
5317         gomp_team_start.
5318         (GOMP_parallel): Likewise.  Formatting fix.
5319         (GOMP_parallel_reductions): New function.
5320         (GOMP_cancellation_point): If taskgroup has workshare
5321         flag set, check cancelled of prev taskgroup if any.
5322         (GOMP_cancel): If taskgroup has workshare flag set, set cancelled
5323         on prev taskgroup if any.
5324         * sections.c: Include string.h.
5325         (GOMP_taskgroup_reduction_register): Add ialias_redirect.
5326         (GOMP_sections_start): Adjust gomp_work_share_start caller.
5327         (GOMP_sections2_start): New function.
5328         (GOMP_parallel_sections_start, GOMP_parallel_sections):
5329         Pass NULL as taskgroup to gomp_team_start.
5330         * single.c (GOMP_single_start, GOMP_single_copy_start): Adjust
5331         gomp_work_share_start callers.
5332         * target.c (GOMP_target_update_ext, GOMP_target_enter_exit_data):
5333         If taskgroup has workshare flag set, check cancelled on prev
5334         taskgroup if any.  Guard all cancellation tests with
5335         gomp_cancel_var test.
5336         (omp_target_is_present, omp_target_disassociate_ptr):
5337         Change ptr argument from void * to const void *.
5338         (omp_target_memcpy): Change src argument from void * to const void *.
5339         (omp_target_memcpy_rect): Likewise.
5340         (omp_target_memcpy_rect_worker): Likewise.  Use const char * casts
5341         instead of char * where needed.
5342         (omp_target_associate_ptr): Change host_ptr and device_ptr arguments
5343         from void * to const void *.
5344         (omp_pause_resource, omp_pause_resource_all): New functions.
5345         * task.c (gomp_task_handle_depend): Handle new depend array format
5346         in addition to the old.  Handle mutexinoutset kinds the same as
5347         inout for now, handle unspecified kinds.
5348         (gomp_create_target_task): If taskgroup has workshare flag set, check
5349         cancelled on prev taskgroup if any.  Guard all cancellation tests with
5350         gomp_cancel_var test.  Handle new depend array format count in
5351         addition to the old.
5352         (GOMP_task): Likewise.  Adjust function comment.
5353         (gomp_task_run_pre): If taskgroup has workshare flag set, check
5354         cancelled on prev taskgroup if any.  Guard all cancellation tests with
5355         gomp_cancel_var test.
5356         (GOMP_taskwait_depend): New function.
5357         (gomp_task_maybe_wait_for_dependencies): Handle new depend array
5358         format in addition to the old.  Handle mutexinoutset kinds the same as
5359         inout for now, handle unspecified kinds.  Fix a function comment typo.
5360         (gomp_taskgroup_init): New function.
5361         (GOMP_taskgroup_start): Use it.
5362         (gomp_reduction_register, gomp_create_artificial_team,
5363         GOMP_taskgroup_reduction_register,
5364         GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
5365         gomp_parallel_reduction_register,
5366         gomp_workshare_task_reduction_register,
5367         gomp_workshare_taskgroup_start,
5368         GOMP_workshare_task_reduction_unregister): New functions.
5369         * taskloop.c (GOMP_taskloop): If taskgroup has workshare flag set,
5370         check cancelled on prev taskgroup if any.  Guard all cancellation
5371         tests with gomp_cancel_var test.  Handle GOMP_TASK_FLAG_REDUCTION flag
5372         by calling GOMP_taskgroup_reduction_register.
5373         * team.c (gomp_thread_attr): Remove comment.
5374         (struct gomp_thread_start_data): Add handle field.
5375         (gomp_thread_start): Call pthread_detach.
5376         (gomp_new_team): Adjust gomp_init_work_share caller.
5377         (gomp_free_pool_helper): Call pthread_detach.
5378         (gomp_team_start): Add taskgroup argument, initialize implicit
5379         tasks' taskgroup field to that.  Don't call
5380         pthread_attr_setdetachstate.  Handle OMP_DISPLAY_AFFINITY env var.
5381         (gomp_team_end): Determine nesting by thr->ts.level != 0
5382         rather than thr->ts.team != NULL.
5383         (gomp_pause_pool_helper, gomp_pause_host): New functions.
5384         * work.c (alloc_work_share): Use gomp_aligned_alloc instead of
5385         gomp_malloc if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined.
5386         (gomp_init_work_share): Change ORDERED argument from bool to size_t,
5387         if more than 1 allocate also extra payload at the end of array.  Never
5388         keep ordered_team_ids NULL, set it to inline_ordered_team_ids instead.
5389         (gomp_work_share_start): Change ORDERED argument from bool to size_t,
5390         return true instead of ws.
5391         * Makefile.in: Regenerated.
5392         * configure: Regenerated.
5393         * config.h.in: Regenerated.
5394         * testsuite/libgomp.c/cancel-for-2.c (foo): Use cancel modifier
5395         in some cases.
5396         * testsuite/libgomp.c-c++-common/cancel-parallel-1.c: New test.
5397         * testsuite/libgomp.c-c++-common/cancel-taskgroup-3.c: New test.
5398         * testsuite/libgomp.c-c++-common/depend-iterator-1.c: New test.
5399         * testsuite/libgomp.c-c++-common/depend-iterator-2.c: New test.
5400         * testsuite/libgomp.c-c++-common/depend-mutexinout-1.c: New test.
5401         * testsuite/libgomp.c-c++-common/depend-mutexinout-2.c: New test.
5402         * testsuite/libgomp.c-c++-common/depobj-1.c: New test.
5403         * testsuite/libgomp.c-c++-common/display-affinity-1.c: New test.
5404         * testsuite/libgomp.c-c++-common/for-10.c: New test.
5405         * testsuite/libgomp.c-c++-common/for-11.c: New test.
5406         * testsuite/libgomp.c-c++-common/for-12.c: New test.
5407         * testsuite/libgomp.c-c++-common/for-13.c: New test.
5408         * testsuite/libgomp.c-c++-common/for-14.c: New test.
5409         * testsuite/libgomp.c-c++-common/for-15.c: New test.
5410         * testsuite/libgomp.c-c++-common/for-2.h: If CONDNE macro is defined,
5411         define a different N(test), don't define N(f0) to N(f14), but instead
5412         define N(f20) to N(f34) using != comparisons.
5413         * testsuite/libgomp.c-c++-common/for-7.c: New test.
5414         * testsuite/libgomp.c-c++-common/for-8.c: New test.
5415         * testsuite/libgomp.c-c++-common/for-9.c: New test.
5416         * testsuite/libgomp.c-c++-common/master-combined-1.c: New test.
5417         * testsuite/libgomp.c-c++-common/pause-1.c: New test.
5418         * testsuite/libgomp.c-c++-common/pause-2.c: New test.
5419         * testsuite/libgomp.c-c++-common/pr66199-10.c: New test.
5420         * testsuite/libgomp.c-c++-common/pr66199-11.c: New test.
5421         * testsuite/libgomp.c-c++-common/pr66199-12.c: New test.
5422         * testsuite/libgomp.c-c++-common/pr66199-13.c: New test.
5423         * testsuite/libgomp.c-c++-common/pr66199-14.c: New test.
5424         * testsuite/libgomp.c-c++-common/simd-1.c: New test.
5425         * testsuite/libgomp.c-c++-common/taskloop-reduction-1.c: New test.
5426         * testsuite/libgomp.c-c++-common/taskloop-reduction-2.c: New test.
5427         * testsuite/libgomp.c-c++-common/taskloop-reduction-3.c: New test.
5428         * testsuite/libgomp.c-c++-common/taskloop-reduction-4.c: New test.
5429         * testsuite/libgomp.c-c++-common/task-reduction-11.c: New test.
5430         * testsuite/libgomp.c-c++-common/task-reduction-12.c: New test.
5431         * testsuite/libgomp.c-c++-common/task-reduction-1.c: New test.
5432         * testsuite/libgomp.c-c++-common/task-reduction-2.c: New test.
5433         * testsuite/libgomp.c-c++-common/task-reduction-3.c: New test.
5434         * testsuite/libgomp.c-c++-common/task-reduction-4.c: New test.
5435         * testsuite/libgomp.c-c++-common/task-reduction-5.c: New test.
5436         * testsuite/libgomp.c-c++-common/task-reduction-6.c: New test.
5437         * testsuite/libgomp.c-c++-common/task-reduction-7.c: New test.
5438         * testsuite/libgomp.c-c++-common/task-reduction-8.c: New test.
5439         * testsuite/libgomp.c-c++-common/task-reduction-9.c: New test.
5440         * testsuite/libgomp.c-c++-common/taskwait-depend-1.c: New test.
5441         * testsuite/libgomp.c++/depend-1.C: New test.
5442         * testsuite/libgomp.c++/depend-iterator-1.C: New test.
5443         * testsuite/libgomp.c++/depobj-1.C: New test.
5444         * testsuite/libgomp.c++/for-16.C: New test.
5445         * testsuite/libgomp.c++/for-21.C: New test.
5446         * testsuite/libgomp.c++/for-22.C: New test.
5447         * testsuite/libgomp.c++/for-23.C: New test.
5448         * testsuite/libgomp.c++/for-24.C: New test.
5449         * testsuite/libgomp.c++/for-25.C: New test.
5450         * testsuite/libgomp.c++/for-26.C: New test.
5451         * testsuite/libgomp.c++/taskloop-reduction-1.C: New test.
5452         * testsuite/libgomp.c++/taskloop-reduction-2.C: New test.
5453         * testsuite/libgomp.c++/taskloop-reduction-3.C: New test.
5454         * testsuite/libgomp.c++/taskloop-reduction-4.C: New test.
5455         * testsuite/libgomp.c++/task-reduction-10.C: New test.
5456         * testsuite/libgomp.c++/task-reduction-11.C: New test.
5457         * testsuite/libgomp.c++/task-reduction-12.C: New test.
5458         * testsuite/libgomp.c++/task-reduction-13.C: New test.
5459         * testsuite/libgomp.c++/task-reduction-14.C: New test.
5460         * testsuite/libgomp.c++/task-reduction-15.C: New test.
5461         * testsuite/libgomp.c++/task-reduction-16.C: New test.
5462         * testsuite/libgomp.c++/task-reduction-17.C: New test.
5463         * testsuite/libgomp.c++/task-reduction-18.C: New test.
5464         * testsuite/libgomp.c++/task-reduction-19.C: New test.
5465         * testsuite/libgomp.c/task-reduction-1.c: New test.
5466         * testsuite/libgomp.c++/task-reduction-1.C: New test.
5467         * testsuite/libgomp.c/task-reduction-2.c: New test.
5468         * testsuite/libgomp.c++/task-reduction-2.C: New test.
5469         * testsuite/libgomp.c++/task-reduction-3.C: New test.
5470         * testsuite/libgomp.c++/task-reduction-4.C: New test.
5471         * testsuite/libgomp.c++/task-reduction-5.C: New test.
5472         * testsuite/libgomp.c++/task-reduction-6.C: New test.
5473         * testsuite/libgomp.c++/task-reduction-7.C: New test.
5474         * testsuite/libgomp.c++/task-reduction-8.C: New test.
5475         * testsuite/libgomp.c++/task-reduction-9.C: New test.
5476         * testsuite/libgomp.c/teams-1.c: New test.
5477         * testsuite/libgomp.c/teams-2.c: New test.
5478         * testsuite/libgomp.c/thread-limit-4.c: New test.
5479         * testsuite/libgomp.c/thread-limit-5.c: New test.
5480         * testsuite/libgomp.fortran/display-affinity-1.f90: New test.
5481
5482 2018-11-06  Chung-Lin Tang <cltang@codesourcery.com>
5483
5484         * oacc-mem.c (memcpy_tofrom_device): New function, combined from
5485         acc_memcpy_to/from_device functions, now with async parameter.
5486         (acc_memcpy_to_device): Modify to use memcpy_tofrom_device.
5487         (acc_memcpy_from_device): Likewise.
5488         (acc_memcpy_to_device_async): New API function.
5489         (acc_memcpy_from_device_async): Likewise.
5490         (present_create_copy): Add async parameter and async setting/unsetting.
5491         (acc_create): Adjust present_create_copy call.
5492         (acc_copyin): Likewise.
5493         (acc_present_or_create): Likewise.
5494         (acc_present_or_copyin): Likewise.
5495         (acc_create_async): New API function.
5496         (acc_copyin_async): New API function.
5497         (delete_copyout): Add async parameter and async setting/unsetting.
5498         (acc_delete): Adjust delete_copyout call.
5499         (acc_copyout): Likewise.
5500         (acc_delete_async): New API function.
5501         (acc_copyout_async): Likewise.
5502         (update_dev_host): Add async parameter and async setting/unsetting.
5503         (acc_update_device): Adjust update_dev_host call.
5504         (acc_update_self): Likewise.
5505         (acc_update_device_async): New API function.
5506         (acc_update_self_async): Likewise.
5507         * openacc.h (acc_copyin_async): Declare new API function.
5508         (acc_create_async): Likewise.
5509         (acc_copyout_async): Likewise.
5510         (acc_delete_async): Likewise.
5511         (acc_update_device_async): Likewise.
5512         (acc_update_self_async): Likewise.
5513         (acc_memcpy_to_device_async): Likewise.
5514         (acc_memcpy_from_device_async): Likewise.
5515         * openacc_lib.h (acc_copyin_async_32_h): New subroutine.
5516         (acc_copyin_async_64_h): New subroutine.
5517         (acc_copyin_async_array_h): New subroutine.
5518         (acc_create_async_32_h): New subroutine.
5519         (acc_create_async_64_h): New subroutine.
5520         (acc_create_async_array_h): New subroutine.
5521         (acc_copyout_async_32_h): New subroutine.
5522         (acc_copyout_async_64_h): New subroutine.
5523         (acc_copyout_async_array_h): New subroutine.
5524         (acc_delete_async_32_h): New subroutine.
5525         (acc_delete_async_64_h): New subroutine.
5526         (acc_delete_async_array_h): New subroutine.
5527         (acc_update_device_async_32_h): New subroutine.
5528         (acc_update_device_async_64_h): New subroutine.
5529         (acc_update_device_async_array_h): New subroutine.
5530         (acc_update_self_async_32_h): New subroutine.
5531         (acc_update_self_async_64_h): New subroutine.
5532         (acc_update_self_async_array_h): New subroutine.
5533         * openacc.f90 (acc_copyin_async_32_h): New subroutine.
5534         (acc_copyin_async_64_h): New subroutine.
5535         (acc_copyin_async_array_h): New subroutine.
5536         (acc_create_async_32_h): New subroutine.
5537         (acc_create_async_64_h): New subroutine.
5538         (acc_create_async_array_h): New subroutine.
5539         (acc_copyout_async_32_h): New subroutine.
5540         (acc_copyout_async_64_h): New subroutine.
5541         (acc_copyout_async_array_h): New subroutine.
5542         (acc_delete_async_32_h): New subroutine.
5543         (acc_delete_async_64_h): New subroutine.
5544         (acc_delete_async_array_h): New subroutine.
5545         (acc_update_device_async_32_h): New subroutine.
5546         (acc_update_device_async_64_h): New subroutine.
5547         (acc_update_device_async_array_h): New subroutine.
5548         (acc_update_self_async_32_h): New subroutine.
5549         (acc_update_self_async_64_h): New subroutine.
5550         (acc_update_self_async_array_h): New subroutine.
5551         * libgomp.map (OACC_2.5): Add acc_copyin_async*, acc_copyout_async*,
5552         acc_copyout_finalize_async*, acc_create_async*, acc_delete_async*,
5553         acc_delete_finalize_async*, acc_memcpy_from_device_async*,
5554         acc_memcpy_to_device_async*, acc_update_device_async*, and
5555         acc_update_self_async* entries.
5556         * testsuite/libgomp.oacc-c-c++-common/lib-94.c: New test.
5557         * testsuite/libgomp.oacc-c-c++-common/lib-95.c: New test.
5558         * testsuite/libgomp.oacc-fortran/lib-16.f90: New test.
5559
5560 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
5561
5562         PR bootstrap/82856
5563         * Makefile.am: Include multilib.am
5564         (AUTOMAKE_OPTIONS): Add info-in-builddir.
5565         (CLEANFILES): Remove libgomp.info.
5566         * configure.ac: Remove AC_PREREQ.
5567         * testsuite/Makefile.am (RUNTEST): Remove quotes.
5568         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
5569         Regenerate.
5570
5571 2018-10-29  Joseph Myers  <joseph@codesourcery.com>
5572             Julian Brown  <julian@codesourcery.com>
5573
5574         * testsuite/libgomp.oacc-c++/this.C: New.
5575
5576 2018-09-18  Cesar Philippidis  <cesar@codesourcery.com>
5577
5578         * plugin/plugin-nvptx.c (struct cuda_map): New.
5579         (struct ptx_stream): Replace d, h, h_begin, h_end, h_next, h_prev,
5580         h_tail with (cuda_map *) map.
5581         (cuda_map_create): New function.
5582         (cuda_map_destroy): New function.
5583         (map_init): Update to use a linked list of cuda_map objects.
5584         (map_fini): Likewise.
5585         (map_pop): Likewise.
5586         (map_push): Likewise.  Return CUdeviceptr instead of void.
5587         (init_streams_for_device): Remove stales references to ptx_stream
5588         members.
5589         (select_stream_for_async): Likewise.
5590         (nvptx_exec): Update call to map_init.
5591
5592 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
5593             Julian Brown  <julian@codesourcery.com>
5594
5595         PR middle-end/86336
5596         * testsuite/libgomp.oacc-c++/non-scalar-data.C: Remove XFAIL.
5597
5598 2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
5599         Thomas Koenig <tkoenig@gcc.gnu.org>
5600
5601         PR fortran/25829
5602         * testsuite/libgomp.fortran/async_io_1.f90: New test.
5603         * testsuite/libgomp.fortran/async_io_2.f90: New test.
5604         * testsuite/libgomp.fortran/async_io_3.f90: New test.
5605         * testsuite/libgomp.fortran/async_io_4.f90: New test.
5606         * testsuite/libgomp.fortran/async_io_5.f90: New test.
5607         * testsuite/libgomp.fortran/async_io_6.f90: New test.
5608         * testsuite/libgomp.fortran/async_io_7.f90: New test.
5609
5610 2018-08-13  Cesar Philippidis  <cesar@codesourcery.com>
5611             Tom de Vries  <tdevries@suse.de>
5612
5613         PR target/85590
5614         * plugin/cuda/cuda.h (CUoccupancyB2DSize): New typedef.
5615         (cuOccupancyMaxPotentialBlockSize): Declare.
5616         * plugin/cuda-lib.def (cuOccupancyMaxPotentialBlockSize): New
5617         CUDA_ONE_CALL_MAYBE_NULL.
5618         * plugin/plugin-nvptx.c (CUDA_VERSION < 6050): Define
5619         CUoccupancyB2DSize and declare
5620         cuOccupancyMaxPotentialBlockSize.
5621         (nvptx_exec): Use cuOccupancyMaxPotentialBlockSize to set the
5622         default num_gangs and num_workers when the driver supports it.
5623
5624 2018-08-08  Tom de Vries  <tdevries@suse.de>
5625
5626         * plugin/cuda-lib.def (cuLinkAddData_v2, cuLinkCreate_v2): Declare using
5627         CUDA_ONE_CALL_MAYBE_NULL.
5628         * plugin/plugin-nvptx.c (cuLinkAddData, cuLinkCreate): Undef and declare.
5629         (cuLinkAddData_v2, cuLinkCreate_v2): Declare.
5630         (link_ptx): Fall back to cuLinkAddData/cuLinkCreate if the _v2 versions
5631         are not found.
5632
5633 2018-08-08  Tom de Vries  <tdevries@suse.de>
5634
5635         * plugin/cuda-lib.def (cuGetErrorString): Use CUDA_ONE_CALL_MAYBE_NULL.
5636         * plugin/plugin-nvptx.c (cuda_error): Handle if cuGetErrorString is not
5637         present.
5638
5639 2018-08-08  Tom de Vries  <tdevries@suse.de>
5640
5641         * plugin/plugin-nvptx.c
5642         (CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR): Define.
5643         (nvptx_open_device): Use
5644         CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR.
5645
5646 2018-08-08  Tom de Vries  <tdevries@suse.de>
5647
5648         * plugin/plugin-nvptx.c (cuda_error): Move declaration of cuGetErrorString ...
5649         (cuGetErrorString): ... here.  Guard with CUDA_VERSION < 6000.
5650
5651 2018-08-07  Tom de Vries  <tdevries@suse.de>
5652
5653         * plugin/plugin-nvptx.c (DO_PRAGMA): Define.
5654         (struct cuda_lib_s): Add def/undef of CUDA_ONE_CALL_MAYBE_NULL.
5655         (init_cuda_lib): Add new param to CUDA_ONE_CALL_1.  Add arg to
5656         corresponding call in CUDA_ONE_CALL.  Add def/undef of
5657         CUDA_ONE_CALL_MAYBE_NULL.
5658         (CUDA_CALL_EXISTS): Define.
5659
5660 2018-08-07  Tom de Vries  <tdevries@suse.de>
5661
5662         * plugin/plugin-nvptx.c (struct cuda_lib_s, init_cuda_lib): Put
5663         CUDA_ONE_CALL defines right before the cuda-lib.def include, and the
5664         corresponding undefs right after.
5665
5666 2018-08-04  Tom de Vries  <tdevries@suse.de>
5667
5668         * plugin/configfrag.ac: For --without-cuda-driver, set
5669         CUDA_DRIVER_INCLUDE and CUDA_DRIVER_LIB to no.  Handle
5670         CUDA_DRIVER_INCLUDE == no and CUDA_DRIVER_LIB == no.
5671         * configure: Regenerate.
5672
5673 2018-08-02  Tom de Vries  <tdevries@suse.de>
5674
5675         PR target/86660
5676         * testsuite/libgomp.oacc-c++/routine-1-auto.C: Remove -fno-exceptions.
5677         * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Same.
5678         * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
5679         Same.
5680         * testsuite/libgomp.oacc-c++/routine-1-template.C: Same.
5681         * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: Same.
5682         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Same.
5683
5684 2018-08-01  Cesar Philippidis  <cesar@codesourcery.com>
5685             Thomas Schwinge <thomas@codesourcery.com>
5686
5687         * config/nvptx/oacc-parallel.c: Truncate.
5688
5689 2018-08-01  Cesar Philippidis  <cesar@codesourcery.com>
5690             James Norris <jnorris@codesourcery.com>
5691
5692         * plugin/plugin-nvptx.c (struct map): Removed.
5693         (map_init, map_pop): Remove use of struct map.
5694         (map_push): Likewise and change argument list.
5695         * testsuite/libgomp.oacc-c-c++-common/mapping-1.c: New
5696
5697 2018-08-01  Tom de Vries  <tdevries@suse.de>
5698
5699         * plugin/cuda-lib.def: New file.  Factor out of ...
5700         * plugin/plugin-nvptx.c (CUDA_CALLS): ... here.
5701         (struct cuda_lib_s, init_cuda_lib): Include cuda-lib.def instead of
5702         using CUDA_CALLS.
5703
5704 2018-07-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5705
5706         Revert 'AsyncI/O patch committed'.
5707         2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
5708                 Thomas Koenig <tkoenig@gcc.gnu.org>
5709
5710         PR fortran/25829
5711         * testsuite/libgomp.fortran/async_io_1.f90: New test.
5712         * testsuite/libgomp.fortran/async_io_2.f90: New test.
5713         * testsuite/libgomp.fortran/async_io_3.f90: New test.
5714         * testsuite/libgomp.fortran/async_io_4.f90: New test.
5715         * testsuite/libgomp.fortran/async_io_5.f90: New test.
5716         * testsuite/libgomp.fortran/async_io_6.f90: New test.
5717         * testsuite/libgomp.fortran/async_io_7.f90: New test.
5718
5719 2018-07-30  Tom de Vries  <tdevries@suse.de>
5720
5721         * plugin/plugin-nvptx.c (MIN, MAX): Redefine.
5722         (nvptx_exec): Ensure worker and vector default dims don't exceed
5723         targ_fn->max_threads_per_block.
5724
5725 2018-07-30  Tom de Vries  <tdevries@suse.de>
5726
5727         * plugin/plugin-nvptx.c (struct ptx_device): Add default_dims field.
5728         (nvptx_open_device): Init default_dims for device.
5729         (nvptx_exec): Use default_dims from device.
5730
5731 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
5732
5733         PR testsuite/86660
5734         * testsuite/libgomp.c++/for-15.C (results): Include it in
5735         omp declare target region.
5736         (main): Use map (always, tofrom: results) instead of
5737         map (tofrom: results).
5738
5739         PR middle-end/86660
5740         * testsuite/libgomp.c/pr86660.c: New test.
5741
5742 2018-07-26  Cesar Philippidis  <cesar@codesourcery.com>
5743             Tom de Vries  <tdevries@suse.de>
5744
5745         * plugin/plugin-nvptx.c (nvptx_exec): Error if the hardware doesn't have
5746         sufficient resources to launch a kernel, and give a hint on how to fix
5747         it.
5748
5749 2018-07-26  Cesar Philippidis  <cesar@codesourcery.com>
5750             Tom de Vries  <tdevries@suse.de>
5751
5752         * plugin/plugin-nvptx.c (struct ptx_device): Add warp_size,
5753         max_threads_per_block and max_threads_per_multiprocessor fields.
5754         (nvptx_open_device): Initialize new fields.
5755         (nvptx_exec): Use num_sms, and new fields.
5756
5757 2018-07-26  Tom de Vries  <tdevries@suse.de>
5758
5759         * testsuite/libgomp.oacc-fortran/lib-12.f90: Move acc_async_test calls
5760         to correct locations.  Remove xfail.
5761
5762 2018-07-26  Tom de Vries  <tdevries@suse.de>
5763
5764         * testsuite/libgomp.oacc-fortran/lib-13.f90: Replace acc_wait_all with
5765         acc_wait.  Move acc_async_test calls to correct locations.  Remove
5766         xfail.
5767
5768 2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
5769         Thomas Koenig <tkoenig@gcc.gnu.org>
5770
5771         PR fortran/25829
5772         * testsuite/libgomp.fortran/async_io_1.f90: New test.
5773         * testsuite/libgomp.fortran/async_io_2.f90: New test.
5774         * testsuite/libgomp.fortran/async_io_3.f90: New test.
5775         * testsuite/libgomp.fortran/async_io_4.f90: New test.
5776         * testsuite/libgomp.fortran/async_io_5.f90: New test.
5777         * testsuite/libgomp.fortran/async_io_6.f90: New test.
5778         * testsuite/libgomp.fortran/async_io_7.f90: New test.
5779
5780 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5781
5782         PR middle-end/86542
5783         * testsuite/libgomp.c++/pr86542.C: New test.
5784
5785         PR middle-end/86539
5786         * testsuite/libgomp.c++/pr86539.C: New test.
5787
5788 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
5789
5790         PR c++/86443
5791         * testsuite/libgomp.c++/for-15.C (a): Remove unused variable.
5792         (results): Make sure the variable is not inside declare target region.
5793         (qux): Remove unused function.
5794
5795 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
5796
5797         PR c++/86443
5798         * testsuite/libgomp.c++/for-15.C: New test.
5799
5800 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5801
5802         PR c++/86291
5803         * testsuite/libgomp.c++/pr86291.C: New test.
5804
5805 2018-06-24  Gerald Pfeifer  <gerald@pfeifer.com>
5806
5807         * libgomp.texi (Top): Move www.openmp.org to https.
5808         (Enabling OpenMP): Ditto.
5809         (omp_get_active_level): Ditto.
5810         (omp_get_ancestor_thread_num): Ditto.
5811         (omp_get_cancellation): Ditto.
5812         (omp_get_default_device): Ditto.
5813         (omp_get_dynamic): Ditto.
5814         (omp_get_level): Ditto.
5815         (omp_get_max_active_levels): Ditto.
5816         (omp_get_max_task_priority): Ditto.
5817         (omp_get_max_threads): Ditto.
5818         (omp_get_nested): Ditto.
5819         (omp_get_num_devices): Ditto.
5820         (omp_get_num_procs): Ditto.
5821         (omp_get_num_teams): Ditto.
5822         (omp_get_num_threads): Ditto.
5823         (omp_get_proc_bind): Ditto.
5824         (omp_get_schedule): Ditto.
5825         (omp_get_team_num): Ditto.
5826         (omp_get_team_size): Ditto.
5827         (omp_get_thread_limit): Ditto.
5828         (omp_get_thread_num): Ditto.
5829         (omp_in_parallel): Ditto.
5830         (omp_in_final): Ditto.
5831         (omp_is_initial_device): Ditto.
5832         (omp_set_default_device): Ditto.
5833         (omp_set_dynamic): Ditto.
5834         (omp_set_max_active_levels): Ditto.
5835         (omp_set_nested): Ditto.
5836         (omp_set_num_threads): Ditto.
5837         (omp_set_schedule): Ditto.
5838         (omp_init_lock): Ditto.
5839         (omp_set_lock): Ditto.
5840         (omp_test_lock): Ditto.
5841         (omp_unset_lock): Ditto.
5842         (omp_destroy_lock): Ditto.
5843         (omp_init_nest_lock): Ditto.
5844         (omp_set_nest_lock): Ditto.
5845         (omp_test_nest_lock): Ditto.
5846         (omp_unset_nest_lock): Ditto.
5847         (omp_destroy_nest_lock): Ditto.
5848         (omp_get_wtick): Ditto.
5849         (omp_get_wtime): Ditto.
5850         (OMP_CANCELLATION): Ditto.
5851         (OMP_DISPLAY_ENV): Ditto.
5852         (OMP_DEFAULT_DEVICE): Ditto.
5853         (OMP_DYNAMIC): Ditto.
5854         (OMP_MAX_ACTIVE_LEVELS): Ditto.
5855         (OMP_MAX_TASK_PRIORITY): Ditto.
5856         (OMP_NESTED): Ditto.
5857         (OMP_NUM_THREADS): Ditto.
5858         (OMP_PROC_BIND): Ditto.
5859         (OMP_PLACES): Ditto.
5860         (OMP_STACKSIZE): Ditto.
5861         (OMP_SCHEDULE): Ditto.
5862         (OMP_THREAD_LIMIT): Ditto.
5863         (OMP_WAIT_POLICY): Ditto.
5864
5865 2018-06-22  Cesar Philippidis  <cesar@codesourcery.com>
5866             James Norris  <jnorris@codesourcery.com>
5867             Julian Brown  <julian@codesourcery.com>
5868             Thomas Schwinge  <thomas@codesourcery.com>
5869             Tom de Vries  <tom@codesourcery.com>
5870
5871         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Don't force "-O2".
5872         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Update.
5873         * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: Likewise.
5874         * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: Likewise.
5875         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
5876         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
5877         * testsuite/libgomp.oacc-c++/non-scalar-data.C: New file.
5878         * testsuite/libgomp.oacc-c-c++-common/declare-3.c: Likewise.
5879         * testsuite/libgomp.oacc-c-c++-common/enter-data.c: Likewise.
5880         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-2.c:
5881         Likewise.
5882         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit-2.c:
5883         Likewise.
5884         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit.c:
5885         Likewise.
5886         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-update.c:
5887         Likewise.
5888         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data.c:
5889         Likewise.
5890         * testsuite/libgomp.oacc-c-c++-common/kernels-parallel-loop-data-enter-exit.c:
5891         Likewise.
5892         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c:
5893         Likewise.
5894         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c:
5895         Likewise.
5896         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c:
5897         Likewise.
5898         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c:
5899         Likewise.
5900         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c:
5901         Likewise.
5902         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c:
5903         Likewise.
5904         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c:
5905         Likewise.
5906         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c:
5907         Likewise.
5908         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c:
5909         Likewise.
5910         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c:
5911         Likewise.
5912         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c:
5913         Likewise.
5914         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c:
5915         Likewise.
5916         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c:
5917         Likewise.
5918         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c:
5919         Likewise.
5920         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c:
5921         Likewise.
5922         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c:
5923         Likewise.
5924         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c:
5925         Likewise.
5926         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c:
5927         Likewise.
5928         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c:
5929         Likewise.
5930         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c:
5931         Likewise.
5932         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction-1.c:
5933         Likewise.
5934         * testsuite/libgomp.oacc-c-c++-common/parallel-loop-1.c: Likewise.
5935         * testsuite/libgomp.oacc-c-c++-common/parallel-loop-1.h: Likewise.
5936         * testsuite/libgomp.oacc-c-c++-common/parallel-loop-2.h: Likewise.
5937         * testsuite/libgomp.oacc-fortran/cublas-fixed.h: Likewise.
5938         * testsuite/libgomp.oacc-fortran/dummy-array.f90: Likewise.
5939         * testsuite/libgomp.oacc-fortran/host_data-2.f90: Likewise.
5940         * testsuite/libgomp.oacc-fortran/host_data-3.f: Likewise.
5941         * testsuite/libgomp.oacc-fortran/host_data-4.f90: Likewise.
5942         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90:
5943         Likewise.
5944         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90:
5945         Likewise.
5946         * testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Likewise.
5947         * testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Likewise.
5948         * testsuite/libgomp.oacc-fortran/kernels-independent.f90:
5949         Likewise.
5950         * testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Likewise.
5951         * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Likewise.
5952         * testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95:
5953         Likewise.
5954         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
5955         Likewise.
5956         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
5957         Likewise.
5958         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
5959         Likewise.
5960         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
5961         Likewise.
5962         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90:
5963         Likewise.
5964         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90:
5965         Likewise.
5966         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90:
5967         Likewise.
5968         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90:
5969         Likewise.
5970         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90:
5971         Likewise.
5972         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90:
5973         Likewise.
5974         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90:
5975         Likewise.
5976         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90:
5977         Likewise.
5978         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90:
5979         Likewise.
5980         * testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90:
5981         Likewise.
5982         * testsuite/libgomp.oacc-fortran/lib-12.f90: Likewise.
5983         * testsuite/libgomp.oacc-fortran/lib-13.f90: Likewise.
5984         * testsuite/libgomp.oacc-fortran/lib-14.f90: Likewise.
5985         * testsuite/libgomp.oacc-fortran/lib-15.f90: Likewise.
5986         * testsuite/libgomp.oacc-fortran/parallel-loop-1.f90: Likewise.
5987         * testsuite/libgomp.oacc-fortran/reference-reductions.f90: Likewise.
5988         * testsuite/libgomp.oacc-fortran/vector-routine.f90: Likewise.
5989
5990 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5991             Thomas Schwinge <thomas@codesourcery.com>
5992             Cesar Philippidis  <cesar@codesourcery.com>
5993
5994         * libgomp.h (struct splay_tree_key_s): Add dynamic_refcount member.
5995         (gomp_acc_remove_pointer): Update declaration.
5996         (gomp_acc_declare_allocate): Declare.
5997         (gomp_remove_var): Declare.
5998         * libgomp.map (OACC_2.5): Define.
5999         * oacc-mem.c (acc_map_data): Update refcount.
6000         (acc_unmap_data): Likewise.
6001         (present_create_copy): Likewise.
6002         (acc_create): Add FLAG_PRESENT when calling present_create_copy.
6003         (acc_copyin): Likewise.
6004         (FLAG_FINALIZE): Define.
6005         (delete_copyout): Update dynamic refcounts, add support for FINALIZE.
6006         (acc_delete_finalize): New function.
6007         (acc_delete_finalize_async): New function.
6008         (acc_copyout_finalize): New function.
6009         (acc_copyout_finalize_async): New function.
6010         (gomp_acc_insert_pointer): Update refcounts.
6011         (gomp_acc_remove_pointer): Return if data is not present on the
6012         accelerator.
6013         * oacc-parallel.c (find_pset): Rename to find_pointer.
6014         (find_pointer): Add support for GOMP_MAP_POINTER.
6015         (handle_ftn_pointers): New function.
6016         (GOACC_parallel_keyed): Update refcounts of variables.
6017         (GOACC_enter_exit_data): Add support for finalized data mappings.
6018         Add support for GOMP_MAP_{TO,ALLOC,RELESE,FROM}. Update handling
6019         of fortran arrays.
6020         (GOACC_update): Add support for GOMP_MAP_{ALWAYS_POINTER,TO,FROM}.
6021         (GOACC_declare): Add support for GOMP_MAP_RELEASE, remove support
6022         for GOMP_MAP_FORCE_FROM.
6023         * openacc.f90 (module openacc_internal): Add
6024         acc_copyout_finalize_{32_h,64_h,array_h,_l}, and
6025         acc_delete_finalize_{32_h,64_h,array_h,_l}. Add interfaces for
6026         acc_copyout_finalize and acc_delete_finalize.
6027         (acc_copyout_finalize_32_h): New subroutine.
6028         (acc_copyout_finalize_64_h): New subroutine.
6029         (acc_copyout_finalize_array_h): New subroutine.
6030         (acc_delete_finalize_32_h): New subroutine.
6031         (acc_delete_finalize_64_h): New subroutine.
6032         (acc_delete_finalize_array_h): New subroutine.
6033         * openacc.h (acc_copyout_finalize): Declare.
6034         (acc_copyout_finalize_async): Declare.
6035         (acc_delete_finalize): Declare.
6036         (acc_delete_finalize_async): Declare.
6037         * openacc_lib.h (acc_copyout_finalize): New interface.
6038         (acc_delete_finalize): New interface.
6039         * target.c (gomp_map_vars): Update dynamic_refcount.
6040         (gomp_remove_var): New function.
6041         (gomp_unmap_vars): Use it.
6042         (gomp_unload_image_from_device): Likewise.
6043         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Update test
6044         case to utilize OpenACC 2.5 data clause semantics.
6045         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
6046         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
6047         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
6048         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
6049         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
6050         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
6051         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
6052         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
6053         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
6054         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
6055         * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
6056         * testsuite/libgomp.oacc-fortran/data-5.f90: New test.
6057         * testsuite/libgomp.oacc-fortran/data-already-1.f: Update test case to
6058         utilize OpenACC 2.5 data clause semantics.
6059         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
6060         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
6061         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
6062         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
6063         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
6064         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
6065         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
6066         * testsuite/libgomp.oacc-fortran/lib-32-1.f: Likewise.
6067         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
6068
6069 2018-05-21  Janus Weil  <janus@gcc.gnu.org>
6070
6071         PR fortran/85841
6072         PR testsuite/85865
6073         * testsuite/libgomp.fortran/collapse2.f90: Add option "-std=legacy".
6074         * testsuite/libgomp.fortran/omp_atomic2.f90: Ditto.
6075         * testsuite/libgomp.fortran/omp_parse1.f90: Ditto.
6076         * testsuite/libgomp.fortran/omp_parse3.f90: Ditto.
6077         * testsuite/libgomp.fortran/task2.f90: Ditto.
6078         * testsuite/libgomp.fortran/vla1.f90: Ditto.
6079         * testsuite/libgomp.fortran/vla2.f90: Ditto.
6080         * testsuite/libgomp.fortran/vla3.f90: Ditto.
6081         * testsuite/libgomp.fortran/vla4.f90: Ditto.
6082         * testsuite/libgomp.fortran/vla5.f90: Ditto.
6083         * testsuite/libgomp.fortran/vla6.f90: Ditto.
6084         * testsuite/libgomp.fortran/vla8.f90: Ditto.
6085         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Ditto.
6086         * testsuite/libgomp.oacc-fortran/nested-function-1.f90: Ditto.
6087
6088 2018-05-18  Cesar Philippidis  <cesar@codesourcery.com>
6089
6090         PR c++/85782
6091         * testsuite/libgomp.oacc-c-c++-common/pr85782.c: New test.
6092
6093 2018-05-09  Tom de Vries  <tom@codesourcery.com>
6094
6095         PR libgomp/82901
6096         * oacc-parallel.c (GOACC_declare): Use GOMP_ASYNC_SYNC as async argument
6097         to GOACC_enter_exit_data.
6098
6099 2018-05-09  Tom de Vries  <tom@codesourcery.com>
6100
6101         PR libgomp/83792
6102         * oacc-int.h (async_valid_stream_id_p, async_valid_p)
6103         (async_synchronous_p): New function.
6104         * oacc-async.c (acc_async_test, acc_wait, acc_wait_all_async): Use
6105         async_valid_p.
6106         * oacc-cuda.c (acc_get_cuda_stream, acc_set_cuda_stream): Use
6107         async_valid_stream_id_p.
6108         * oacc-mem.c (gomp_acc_remove_pointer): Use async_synchronous_p.
6109         * oacc-parallel.c (GOACC_parallel_keyed): Same.
6110
6111 2018-05-07  Tom de Vries  <tom@codesourcery.com>
6112
6113         PR testsuite/85677
6114         * testsuite/lib/libgomp.exp (libgomp_init): Move inclusion of top-level
6115         include directory in ALWAYS_CFLAGS out of $blddir != "" condition.
6116
6117 2018-05-03  Tom de Vries  <tom@codesourcery.com>
6118
6119         PR testsuite/85106
6120         * testsuite/lib/libgomp-dg.exp (libgomp-dg-test): Add save-temps to
6121         extra_tool_flags if it contains an -foffload=-fdump-* flag.
6122         * testsuite/lib/libgomp.exp: Include scanoffloadtree.exp.
6123         * testsuite/libgomp.oacc-c/vec.c: Use scan-offload-tree-dump.
6124
6125 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6126
6127         PR libgomp/85411
6128         * plugin/plugin-nvptx.c (nvptx_exec): Move parsing of
6129         GOMP_OPENACC_DIM ...
6130         * env.c (parse_gomp_openacc_dim): ... here.  New function.
6131         (initialize_env): Call parse_gomp_openacc_dim.
6132         (goacc_default_dims): Define.
6133         * libgomp.h (goacc_default_dims): Declare.
6134         * oacc-plugin.c (GOMP_PLUGIN_acc_default_dim): New function.
6135         * oacc-plugin.h (GOMP_PLUGIN_acc_default_dim): Declare.
6136         * libgomp.map: New version "GOMP_PLUGIN_1.2". Add
6137         GOMP_PLUGIN_acc_default_dim.
6138         * testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c: New test.
6139         * testsuite/libgomp.oacc-c-c++-common/loop-default.h: New test.
6140
6141 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6142
6143         PR testsuite/83791
6144         * testsuite/libgomp.c++/udr-9.C: Update.
6145         * testsuite/libgomp.c++/atomic-16.C: Remove.
6146         * testsuite/libgomp.c++/cancel-taskgroup-2.C: Remove.
6147         * testsuite/libgomp.c++/loop-13.C: Remove.
6148         * testsuite/libgomp.c++/loop-14.C: Remove.
6149         * testsuite/libgomp.c++/loop-15.C: Remove.
6150         * testsuite/libgomp.c++/monotonic-1.C: Remove.
6151         * testsuite/libgomp.c++/monotonic-2.C: Remove.
6152         * testsuite/libgomp.c++/nonmonotonic-1.C: Remove.
6153         * testsuite/libgomp.c++/nonmonotonic-2.C: Remove.
6154         * testsuite/libgomp.c++/ordered-1.C: Remove.
6155         * testsuite/libgomp.c++/pr45784.C: Remove.
6156         * testsuite/libgomp.c++/pr64824.C: Remove.
6157         * testsuite/libgomp.c++/pr64868.C: Remove.
6158         * testsuite/libgomp.c++/pr66199-1.C: Remove.
6159         * testsuite/libgomp.c++/pr66199-2.C: Remove.
6160         * testsuite/libgomp.c++/pr66199-3.C: Remove.
6161         * testsuite/libgomp.c++/pr66199-4.C: Remove.
6162         * testsuite/libgomp.c++/pr66199-5.C: Remove.
6163         * testsuite/libgomp.c++/pr66199-6.C: Remove.
6164         * testsuite/libgomp.c++/pr66199-7.C: Remove.
6165         * testsuite/libgomp.c++/pr66199-8.C: Remove.
6166         * testsuite/libgomp.c++/pr66199-9.C: Remove.
6167         * testsuite/libgomp.c++/pr69389.C: Remove.
6168         * testsuite/libgomp.c++/simd10.C: Remove.
6169         * testsuite/libgomp.c++/simd11.C: Remove.
6170         * testsuite/libgomp.c++/simd12.C: Remove.
6171         * testsuite/libgomp.c++/simd13.C: Remove.
6172         * testsuite/libgomp.c++/target-1.C: Remove.
6173         * testsuite/libgomp.c++/target-3.C: Remove.
6174         * testsuite/libgomp.c++/target-4.C: Remove.
6175         * testsuite/libgomp.c++/target-5.C: Remove.
6176         * testsuite/libgomp.c++/taskgroup-1.C: Remove.
6177         * testsuite/libgomp.c++/taskloop-1.C: Remove.
6178         * testsuite/libgomp.c++/taskloop-2.C: Remove.
6179         * testsuite/libgomp.c++/taskloop-3.C: Remove.
6180         * testsuite/libgomp.c++/taskloop-4.C: Remove.
6181         * testsuite/libgomp.c++/udr-9.C: Remove.
6182         * testsuite/libgomp.c++/for-10.C: Remove.
6183         * testsuite/libgomp.c++/for-11.C: Remove.
6184         * testsuite/libgomp.c++/for-12.C: Remove.
6185         * testsuite/libgomp.c++/for-13.C: Remove.
6186         * testsuite/libgomp.c++/for-14.C: Remove.
6187         * testsuite/libgomp.c++/for-9.C: Remove.
6188         * testsuite/libgomp.c/atomic-18.c: Move ...
6189         * testsuite/libgomp.c-c++-common/atomic-18.c: ... here.
6190         * testsuite/libgomp.c/cancel-taskgroup-2.c: Move ...
6191         * testsuite/libgomp.c-c++-common/cancel-taskgroup-2.c: here.
6192         * testsuite/libgomp.c/loop-13.c: Move ...
6193         * testsuite/libgomp.c-c++-common/loop-13.c: ... here.
6194         * testsuite/libgomp.c/loop-14.c: Move ...
6195         * testsuite/libgomp.c-c++-common/loop-14.c: ... here.
6196         * testsuite/libgomp.c/loop-15.c: Remove.
6197         * testsuite/libgomp.c-c++-common/loop-15.c: New test.
6198         * testsuite/libgomp.c/monotonic-1.c: Move ...
6199         * testsuite/libgomp.c-c++-common/monotonic-1.c: ... here.
6200         * testsuite/libgomp.c/monotonic-2.c: Move ...
6201         * testsuite/libgomp.c-c++-common/monotonic-2.c: ... here.
6202         * testsuite/libgomp.c/nonmonotonic-1.c: Move ...
6203         * testsuite/libgomp.c-c++-common/nonmonotonic-1.c: ... here.
6204         * testsuite/libgomp.c/nonmonotonic-2.c: Move ...
6205         * testsuite/libgomp.c-c++-common/nonmonotonic-2.c: ... here.
6206         * testsuite/libgomp.c/ordered-4.c: Move ...
6207         * testsuite/libgomp.c-c++-common/ordered-4.c: ... here.
6208         * testsuite/libgomp.c/pr45784.c: Move ...
6209         * testsuite/libgomp.c-c++-common/pr45784.c: ... here.
6210         * testsuite/libgomp.c/pr64824.c: Move ...
6211         * testsuite/libgomp.c-c++-common/pr64824.c: ... here.
6212         * testsuite/libgomp.c/pr64868.c: Move ...
6213         * testsuite/libgomp.c-c++-common/pr64868.c: ... here.
6214         * testsuite/libgomp.c/pr66199-1.c: Move ...
6215         * testsuite/libgomp.c-c++-common/pr66199-1.c: ... here.
6216         * testsuite/libgomp.c/pr66199-2.c: Move ...
6217         * testsuite/libgomp.c-c++-common/pr66199-2.c: ... here.
6218         * testsuite/libgomp.c/pr66199-3.c: Move ...
6219         * testsuite/libgomp.c-c++-common/pr66199-3.c: ... here.
6220         * testsuite/libgomp.c/pr66199-4.c: Move ...
6221         * testsuite/libgomp.c-c++-common/pr66199-4.c: ... here.
6222         * testsuite/libgomp.c/pr66199-5.c: Move ...
6223         * testsuite/libgomp.c-c++-common/pr66199-5.c: ... here.
6224         * testsuite/libgomp.c/pr66199-6.c: Move ...
6225         * testsuite/libgomp.c-c++-common/pr66199-6.c: ... here.
6226         * testsuite/libgomp.c/pr66199-7.c: Move ...
6227         * testsuite/libgomp.c-c++-common/pr66199-7.c: ... here.
6228         * testsuite/libgomp.c/pr66199-8.c: Move ...
6229         * testsuite/libgomp.c-c++-common/pr66199-8.c: ... here.
6230         * testsuite/libgomp.c/pr66199-9.c: Move ...
6231         * testsuite/libgomp.c-c++-common/pr66199-9.c: ... here.
6232         * testsuite/libgomp.c/pr69389.c: Move ...
6233         * testsuite/libgomp.c-c++-common/pr69389.c: ... here.
6234         * testsuite/libgomp.c/simd-14.c: Move ...
6235         * testsuite/libgomp.c-c++-common/simd-14.c: ... here.
6236         * testsuite/libgomp.c/simd-15.c: Move ...
6237         * testsuite/libgomp.c-c++-common/simd-15.c: ... here.
6238         * testsuite/libgomp.c/simd-16.c: Move ...
6239         * testsuite/libgomp.c-c++-common/simd-16.c: ... here.
6240         * testsuite/libgomp.c/simd-17.c: Move ...
6241         * testsuite/libgomp.c-c++-common/simd-17.c: ... here.
6242         * testsuite/libgomp.c/target-1.c: Move ...
6243         * testsuite/libgomp.c-c++-common/target-1.c: ... here.
6244         * testsuite/libgomp.c/target-10.c: Move ...
6245         * testsuite/libgomp.c-c++-common/target-10.c: ... here.
6246         * testsuite/libgomp.c/target-13.c: Move ...
6247         * testsuite/libgomp.c-c++-common/target-13.c: ... here.
6248         * testsuite/libgomp.c/target-2.c: Move ...
6249         * testsuite/libgomp.c-c++-common/target-2.c: ... here.
6250         * testsuite/libgomp.c/taskgroup-1.c: Move ...
6251         * testsuite/libgomp.c-c++-common/taskgroup-1.c: ... here.
6252         * testsuite/libgomp.c/taskloop-1.c: Move ...
6253         * testsuite/libgomp.c-c++-common/taskloop-1.c: ... here.
6254         * testsuite/libgomp.c/taskloop-2.c: Move ...
6255         * testsuite/libgomp.c-c++-common/taskloop-2.c: ... here.
6256         * testsuite/libgomp.c/taskloop-3.c: Move ...
6257         * testsuite/libgomp.c-c++-common/taskloop-3.c: ... here.
6258         * testsuite/libgomp.c/taskloop-4.c: Move ...
6259         * testsuite/libgomp.c-c++-common/taskloop-4.c: ... here.
6260         * testsuite/libgomp.c/udr-1.c: Move ...
6261         * testsuite/libgomp.c-c++-common/udr-1.c: ... here.
6262         * testsuite/libgomp.c/for-1.c: Move ...
6263         * testsuite/libgomp.c-c++-common/for-1.c: ... here.
6264         * testsuite/libgomp.c/for-1.h: Move ...
6265         * testsuite/libgomp.c-c++-common/for-1.h: ... here.
6266         * testsuite/libgomp.c/for-2.c: Move ...
6267         * testsuite/libgomp.c-c++-common/for-2.c: ... here.
6268         * testsuite/libgomp.c/for-2.h: Move ...
6269         * testsuite/libgomp.c-c++-common/for-2.h: ... here.
6270         * testsuite/libgomp.c/for-3.c: Move ...
6271         * testsuite/libgomp.c-c++-common/for-3.c: ... here.
6272         * testsuite/libgomp.c/for-4.c: Move ...
6273         * testsuite/libgomp.c-c++-common/for-4.c: ... here.
6274         * testsuite/libgomp.c/for-5.c: Move ...
6275         * testsuite/libgomp.c-c++-common/for-5.c: ... here.
6276         * testsuite/libgomp.c/for-6.c: Move ...
6277         * testsuite/libgomp.c-c++-common/for-6.c: ... here.
6278
6279 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6280
6281         PR libgomp/82428
6282         * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Use
6283         __builtin_goacc_parlevel_{id,size}.
6284         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Same.
6285         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Same.
6286         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Same.
6287         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Same.
6288         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Same.
6289         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Same.
6290         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Same.
6291         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Same.
6292         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Same.
6293         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Same.
6294         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Same.
6295         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Same.
6296         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Same.
6297         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Same.
6298         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Same.
6299         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Same.
6300         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Same.
6301         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Same.
6302         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Same.
6303         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Same.
6304         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Same.
6305         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Same.
6306         * testsuite/libgomp.oacc-c-c++-common/tile-1.c: Same.
6307
6308 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6309
6310         PR testsuite/85106
6311         * testsuite/lib/libgomp.exp: Include scanltranstree.exp.
6312
6313 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6314
6315         PR testsuite/85106
6316         * testsuite/lib/libgomp.exp: Include scanwpaipa.exp.
6317
6318 2018-04-29  Julian Brown  <julian@codesourcery.com>
6319             Tom de Vries  <tom@codesourcery.com>
6320
6321         PR testsuite/85527
6322         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-1.c: Allow
6323         arbitrary order for iterations of atomic subtract check.
6324
6325 2018-04-28  Tom de Vries  <tom@codesourcery.com>
6326
6327         PR testsuite/85527
6328         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90 (main): Store
6329         atomic capture results obtained in parallel loop to an array, instead of
6330         to a scalar.
6331
6332 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6333
6334         PR libgomp/84020
6335         * plugin/cuda/cuda.h (CUjit_option): Add CU_JIT_OPTIMIZATION_LEVEL.
6336         * plugin/plugin-nvptx.c (_GNU_SOURCE): Define.
6337         (process_GOMP_NVPTX_JIT): New function.
6338         (link_ptx): Use process_GOMP_NVPTX_JIT.
6339
6340 2018-04-26  Richard Biener <rguenther@suse.de>
6341             Tom de Vries  <tom@codesourcery.com>
6342
6343         PR lto/85422
6344         * testsuite/libgomp.oacc-c-c++-common/pr85422.c: New test.
6345
6346 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6347
6348         PR target/85519
6349         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Reduce
6350         recursion depth from 25 to 23.
6351         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same.
6352
6353 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6354
6355         * configure: Regenerated.
6356
6357 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6358             Tom de Vries  <tom@codesourcery.com>
6359
6360         PR target/85445
6361         * testsuite/libgomp.oacc-c++/ref-1.C: New.
6362
6363 2018-04-19  Thomas Schwinge  <thomas@codesourcery.com>
6364
6365         PR libgomp/85463
6366         * testsuite/libgomp.oacc-fortran/error_stop-1.f: New file.
6367         * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
6368         * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
6369         * testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
6370         * testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
6371         * testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.
6372
6373         PR libfortran/85166
6374         * testsuite/libgomp.oacc-fortran/abort-1.f90: Switch back to "call
6375         abort".
6376         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
6377
6378 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6379
6380         * configure: Regenerated.
6381
6382 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
6383
6384         PR jit/85384
6385         * configure: Regenerate.
6386
6387 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
6388             Tom de Vries  <tom@codesourcery.com>
6389
6390         PR middle-end/84955
6391         * testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test.
6392         * testsuite/libgomp.oacc-fortran/pr84955.f90: New test.
6393
6394 2018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
6395
6396         PR fortran/83064
6397         PR testsuite/85346
6398         * testsuite/libgomp.fortran/do_concurrent_5.f90: Move modified
6399         test from gfortran.dg to here.
6400
6401 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
6402
6403         * testsuite/libgomp.oacc-c-c++-common/pr84955.c: Revert 259346.
6404         * testsuite/libgomp.oacc-fortran/pr84955.f90: Likewise.
6405
6406 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
6407
6408         PR middle-end/84955
6409         * testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test.
6410         * testsuite/libgomp.oacc-fortran/pr84955.f90: New test.
6411
6412 2018-04-05  Tom de Vries  <tom@codesourcery.com>
6413
6414         PR target/85204
6415         * testsuite/libgomp.oacc-c-c++-common/broadcast-1.c: New test.
6416
6417 2018-03-26  Tom de Vries  <tom@codesourcery.com>
6418
6419         PR tree-optimization/85063
6420         * testsuite/libgomp.c/switch-conversion-2.c: New test.
6421         * testsuite/libgomp.c/switch-conversion.c: New test.
6422         * testsuite/libgomp.oacc-c-c++-common/switch-conversion-2.c: New test.
6423         * testsuite/libgomp.oacc-c-c++-common/switch-conversion.c: New test.
6424
6425 2018-03-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
6426
6427         PR fortran/84381
6428         * testsuite/libgomp.fortran/aligned1.f03: Replace non-standard
6429         call abort by STOP n.
6430         * testsuite/libgomp.fortran/alloc-comp-1.f90: Likewise.
6431         * testsuite/libgomp.fortran/alloc-comp-2.f90: Likewise.
6432         * testsuite/libgomp.fortran/alloc-comp-3.f90: Likewise.
6433         * testsuite/libgomp.fortran/allocatable1.f90: Likewise.
6434         * testsuite/libgomp.fortran/allocatable10.f90: Likewise.
6435         * testsuite/libgomp.fortran/allocatable11.f90: Likewise.
6436         * testsuite/libgomp.fortran/allocatable12.f90: Likewise.
6437         * testsuite/libgomp.fortran/allocatable2.f90: Likewise.
6438         * testsuite/libgomp.fortran/allocatable3.f90: Likewise.
6439         * testsuite/libgomp.fortran/allocatable4.f90: Likewise.
6440         * testsuite/libgomp.fortran/allocatable5.f90: Likewise.
6441         * testsuite/libgomp.fortran/allocatable6.f90: Likewise.
6442         * testsuite/libgomp.fortran/allocatable7.f90: Likewise.
6443         * testsuite/libgomp.fortran/allocatable8.f90: Likewise.
6444         * testsuite/libgomp.fortran/allocatable9.f90: Likewise.
6445         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.
6446         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Likewise.
6447         * testsuite/libgomp.fortran/associate1.f90: Likewise.
6448         * testsuite/libgomp.fortran/associate2.f90: Likewise.
6449         * testsuite/libgomp.fortran/associate3.f90: Likewise.
6450         * testsuite/libgomp.fortran/cancel-do-1.f90: Likewise.
6451         * testsuite/libgomp.fortran/cancel-do-2.f90: Likewise.
6452         * testsuite/libgomp.fortran/cancel-parallel-1.f90: Likewise.
6453         * testsuite/libgomp.fortran/cancel-sections-1.f90: Likewise.
6454         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: Likewise.
6455         * testsuite/libgomp.fortran/character1.f90: Likewise.
6456         * testsuite/libgomp.fortran/character2.f90: Likewise.
6457         * testsuite/libgomp.fortran/collapse1.f90: Likewise.
6458         * testsuite/libgomp.fortran/collapse2.f90: Likewise.
6459         * testsuite/libgomp.fortran/collapse3.f90: Likewise.
6460         * testsuite/libgomp.fortran/collapse4.f90: Likewise.
6461         * testsuite/libgomp.fortran/crayptr1.f90: Likewise.
6462         * testsuite/libgomp.fortran/crayptr2.f90: Likewise.
6463         * testsuite/libgomp.fortran/crayptr3.f90: Likewise.
6464         * testsuite/libgomp.fortran/declare-simd-1.f90: Likewise.
6465         * testsuite/libgomp.fortran/declare-simd-3.f90: Likewise.
6466         * testsuite/libgomp.fortran/declare-target-2.f90: Likewise.
6467         * testsuite/libgomp.fortran/depend-1.f90: Likewise.
6468         * testsuite/libgomp.fortran/depend-2.f90: Likewise.
6469         * testsuite/libgomp.fortran/depend-3.f90: Likewise.
6470         * testsuite/libgomp.fortran/do1.f90: Likewise.
6471         * testsuite/libgomp.fortran/do2.f90: Likewise.
6472         * testsuite/libgomp.fortran/doacross1.f90: Likewise.
6473         * testsuite/libgomp.fortran/doacross2.f90: Likewise.
6474         * testsuite/libgomp.fortran/doacross3.f90: Likewise.
6475         * testsuite/libgomp.fortran/examples-4/array_sections-3.f90: Likewise.
6476         * testsuite/libgomp.fortran/examples-4/array_sections-4.f90: Likewise.
6477         * testsuite/libgomp.fortran/examples-4/async_target-1.f90: Likewise.
6478         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: Likewise.
6479         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Likewise.
6480         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Likewise.
6481         * testsuite/libgomp.fortran/examples-4/declare_target-3.f90: Likewise.
6482         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90: Likewise.
6483         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90: Likewise.
6484         * testsuite/libgomp.fortran/examples-4/device-1.f90: Likewise.
6485         * testsuite/libgomp.fortran/examples-4/device-2.f90: Likewise.
6486         * testsuite/libgomp.fortran/examples-4/device-3.f90: Likewise.
6487         * testsuite/libgomp.fortran/examples-4/simd-1.f90: Likewise.
6488         * testsuite/libgomp.fortran/examples-4/simd-2.f90: Likewise.
6489         * testsuite/libgomp.fortran/examples-4/simd-3.f90: Likewise.
6490         * testsuite/libgomp.fortran/examples-4/simd-4.f90: Likewise.
6491         * testsuite/libgomp.fortran/examples-4/simd-5.f90: Likewise.
6492         * testsuite/libgomp.fortran/examples-4/simd-6.f90: Likewise.
6493         * testsuite/libgomp.fortran/examples-4/simd-7.f90: Likewise.
6494         * testsuite/libgomp.fortran/examples-4/simd-8.f90: Likewise.
6495         * testsuite/libgomp.fortran/examples-4/target-1.f90: Likewise.
6496         * testsuite/libgomp.fortran/examples-4/target-2.f90: Likewise.
6497         * testsuite/libgomp.fortran/examples-4/target-3.f90: Likewise.
6498         * testsuite/libgomp.fortran/examples-4/target-4.f90: Likewise.
6499         * testsuite/libgomp.fortran/examples-4/target-5.f90: Likewise.
6500         * testsuite/libgomp.fortran/examples-4/target_data-1.f90: Likewise.
6501         * testsuite/libgomp.fortran/examples-4/target_data-2.f90: Likewise.
6502         * testsuite/libgomp.fortran/examples-4/target_data-3.f90: Likewise.
6503         * testsuite/libgomp.fortran/examples-4/target_data-4.f90: Likewise.
6504         * testsuite/libgomp.fortran/examples-4/target_data-5.f90: Likewise.
6505         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: Likewise.
6506         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: Likewise.
6507         * testsuite/libgomp.fortran/examples-4/target_update-1.f90: Likewise.
6508         * testsuite/libgomp.fortran/examples-4/target_update-2.f90: Likewise.
6509         * testsuite/libgomp.fortran/examples-4/task_dep-1.f90: Likewise.
6510         * testsuite/libgomp.fortran/examples-4/task_dep-2.f90: Likewise.
6511         * testsuite/libgomp.fortran/examples-4/task_dep-3.f90: Likewise.
6512         * testsuite/libgomp.fortran/examples-4/task_dep-4.f90: Likewise.
6513         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: Likewise.
6514         * testsuite/libgomp.fortran/examples-4/teams-2.f90: Likewise.
6515         * testsuite/libgomp.fortran/examples-4/teams-3.f90: Likewise.
6516         * testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise.
6517         * testsuite/libgomp.fortran/examples-4/teams-5.f90: Likewise.
6518         * testsuite/libgomp.fortran/examples-4/teams-6.f90: Likewise.
6519         * testsuite/libgomp.fortran/lastprivate1.f90: Likewise.
6520         * testsuite/libgomp.fortran/lastprivate2.f90: Likewise.
6521         * testsuite/libgomp.fortran/lib1.f90: Likewise.
6522         * testsuite/libgomp.fortran/lib2.f: Likewise.
6523         * testsuite/libgomp.fortran/lib3.f: Likewise.
6524         * testsuite/libgomp.fortran/lib4.f90: Likewise.
6525         * testsuite/libgomp.fortran/lock-1.f90: Likewise.
6526         * testsuite/libgomp.fortran/lock-2.f90: Likewise.
6527         * testsuite/libgomp.fortran/nested1.f90: Likewise.
6528         * testsuite/libgomp.fortran/nestedfn1.f90: Likewise.
6529         * testsuite/libgomp.fortran/nestedfn2.f90: Likewise.
6530         * testsuite/libgomp.fortran/nestedfn3.f90: Likewise.
6531         * testsuite/libgomp.fortran/nestedfn4.f90: Likewise.
6532         * testsuite/libgomp.fortran/nestedfn5.f90: Likewise.
6533         * testsuite/libgomp.fortran/omp_atomic1.f90: Likewise.
6534         * testsuite/libgomp.fortran/omp_atomic2.f90: Likewise.
6535         * testsuite/libgomp.fortran/omp_atomic3.f90: Likewise.
6536         * testsuite/libgomp.fortran/omp_atomic4.f90: Likewise.
6537         * testsuite/libgomp.fortran/omp_atomic5.f90: Likewise.
6538         * testsuite/libgomp.fortran/omp_cond1.f: Likewise.
6539         * testsuite/libgomp.fortran/omp_cond2.f: Likewise.
6540         * testsuite/libgomp.fortran/omp_cond3.F90: Likewise.
6541         * testsuite/libgomp.fortran/omp_cond4.F90: Likewise.
6542         * testsuite/libgomp.fortran/omp_parse1.f90: Likewise.
6543         * testsuite/libgomp.fortran/omp_parse2.f90: Likewise.
6544         * testsuite/libgomp.fortran/omp_parse3.f90: Likewise.
6545         * testsuite/libgomp.fortran/omp_parse4.f90: Likewise.
6546         * testsuite/libgomp.fortran/openmp_version-1.f: Likewise.
6547         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
6548         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: Likewise.
6549         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: Likewise.
6550         * testsuite/libgomp.fortran/pointer1.f90: Likewise.
6551         * testsuite/libgomp.fortran/pointer2.f90: Likewise.
6552         * testsuite/libgomp.fortran/pr25162.f: Likewise.
6553         * testsuite/libgomp.fortran/pr25219.f90: Likewise.
6554         * testsuite/libgomp.fortran/pr27395-1.f90: Likewise.
6555         * testsuite/libgomp.fortran/pr27395-2.f90: Likewise.
6556         * testsuite/libgomp.fortran/pr27416-1.f90: Likewise.
6557         * testsuite/libgomp.fortran/pr27916-1.f90: Likewise.
6558         * testsuite/libgomp.fortran/pr27916-2.f90: Likewise.
6559         * testsuite/libgomp.fortran/pr28390.f: Likewise.
6560         * testsuite/libgomp.fortran/pr29629.f90: Likewise.
6561         * testsuite/libgomp.fortran/pr32550.f90: Likewise.
6562         * testsuite/libgomp.fortran/pr33880.f90: Likewise.
6563         * testsuite/libgomp.fortran/pr34020.f90: Likewise.
6564         * testsuite/libgomp.fortran/pr35130.f90: Likewise.
6565         * testsuite/libgomp.fortran/pr42162.f90: Likewise.
6566         * testsuite/libgomp.fortran/pr46753.f90: Likewise.
6567         * testsuite/libgomp.fortran/pr48894.f90: Likewise.
6568         * testsuite/libgomp.fortran/pr49792-1.f90: Likewise.
6569         * testsuite/libgomp.fortran/pr49792-2.f90: Likewise.
6570         * testsuite/libgomp.fortran/pr63938-1.f90: Likewise.
6571         * testsuite/libgomp.fortran/pr63938-2.f90: Likewise.
6572         * testsuite/libgomp.fortran/pr65597.f90: Likewise.
6573         * testsuite/libgomp.fortran/pr66199-1.f90: Likewise.
6574         * testsuite/libgomp.fortran/pr71014.f90: Likewise.
6575         * testsuite/libgomp.fortran/pr81304.f90: Likewise.
6576         * testsuite/libgomp.fortran/pr81841.f90: Likewise.
6577         * testsuite/libgomp.fortran/pr84418-1.f90: Likewise.
6578         * testsuite/libgomp.fortran/pr84418-2.f90: Likewise.
6579         * testsuite/libgomp.fortran/procptr1.f90: Likewise.
6580         * testsuite/libgomp.fortran/recursion1.f90: Likewise.
6581         * testsuite/libgomp.fortran/reduction1.f90: Likewise.
6582         * testsuite/libgomp.fortran/reduction2.f90: Likewise.
6583         * testsuite/libgomp.fortran/reduction3.f90: Likewise.
6584         * testsuite/libgomp.fortran/reduction4.f90: Likewise.
6585         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
6586         * testsuite/libgomp.fortran/reduction6.f90: Likewise.
6587         * testsuite/libgomp.fortran/reference1.f90: Likewise.
6588         * testsuite/libgomp.fortran/reference2.f90: Likewise.
6589         * testsuite/libgomp.fortran/retval1.f90: Likewise.
6590         * testsuite/libgomp.fortran/retval2.f90: Likewise.
6591         * testsuite/libgomp.fortran/sharing1.f90: Likewise.
6592         * testsuite/libgomp.fortran/sharing2.f90: Likewise.
6593         * testsuite/libgomp.fortran/simd1.f90: Likewise.
6594         * testsuite/libgomp.fortran/simd2.f90: Likewise.
6595         * testsuite/libgomp.fortran/simd3.f90: Likewise.
6596         * testsuite/libgomp.fortran/simd4.f90: Likewise.
6597         * testsuite/libgomp.fortran/simd5.f90: Likewise.
6598         * testsuite/libgomp.fortran/simd6.f90: Likewise.
6599         * testsuite/libgomp.fortran/simd7.f90: Likewise.
6600         * testsuite/libgomp.fortran/stack.f90: Likewise.
6601         * testsuite/libgomp.fortran/strassen.f90: Likewise.
6602         * testsuite/libgomp.fortran/tabs1.f90: Likewise.
6603         * testsuite/libgomp.fortran/tabs2.f: Likewise.
6604         * testsuite/libgomp.fortran/target1.f90: Likewise.
6605         * testsuite/libgomp.fortran/target2.f90: Likewise.
6606         * testsuite/libgomp.fortran/target3.f90: Likewise.
6607         * testsuite/libgomp.fortran/target4.f90: Likewise.
6608         * testsuite/libgomp.fortran/target5.f90: Likewise.
6609         * testsuite/libgomp.fortran/target6.f90: Likewise.
6610         * testsuite/libgomp.fortran/target7.f90: Likewise.
6611         * testsuite/libgomp.fortran/target8.f90: Likewise.
6612         * testsuite/libgomp.fortran/task1.f90: Likewise.
6613         * testsuite/libgomp.fortran/task2.f90: Likewise.
6614         * testsuite/libgomp.fortran/task3.f90: Likewise.
6615         * testsuite/libgomp.fortran/task4.f90: Likewise.
6616         * testsuite/libgomp.fortran/taskgroup1.f90: Likewise.
6617         * testsuite/libgomp.fortran/taskloop1.f90: Likewise.
6618         * testsuite/libgomp.fortran/taskloop2.f90: Likewise.
6619         * testsuite/libgomp.fortran/taskloop3.f90: Likewise.
6620         * testsuite/libgomp.fortran/taskloop4.f90: Likewise.
6621         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
6622         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
6623         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
6624         * testsuite/libgomp.fortran/threadprivate4.f90: Likewise.
6625         * testsuite/libgomp.fortran/udr1.f90: Likewise.
6626         * testsuite/libgomp.fortran/udr10.f90: Likewise.
6627         * testsuite/libgomp.fortran/udr11.f90: Likewise.
6628         * testsuite/libgomp.fortran/udr12.f90: Likewise.
6629         * testsuite/libgomp.fortran/udr13.f90: Likewise.
6630         * testsuite/libgomp.fortran/udr14.f90: Likewise.
6631         * testsuite/libgomp.fortran/udr15.f90: Likewise.
6632         * testsuite/libgomp.fortran/udr2.f90: Likewise.
6633         * testsuite/libgomp.fortran/udr3.f90: Likewise.
6634         * testsuite/libgomp.fortran/udr4.f90: Likewise.
6635         * testsuite/libgomp.fortran/udr5.f90: Likewise.
6636         * testsuite/libgomp.fortran/udr6.f90: Likewise.
6637         * testsuite/libgomp.fortran/udr7.f90: Likewise.
6638         * testsuite/libgomp.fortran/udr8.f90: Likewise.
6639         * testsuite/libgomp.fortran/udr9.f90: Likewise.
6640         * testsuite/libgomp.fortran/vla1.f90: Likewise.
6641         * testsuite/libgomp.fortran/vla2.f90: Likewise.
6642         * testsuite/libgomp.fortran/vla3.f90: Likewise.
6643         * testsuite/libgomp.fortran/vla4.f90: Likewise.
6644         * testsuite/libgomp.fortran/vla5.f90: Likewise.
6645         * testsuite/libgomp.fortran/vla6.f90: Likewise.
6646         * testsuite/libgomp.fortran/vla7.f90: Likewise.
6647         * testsuite/libgomp.fortran/vla8.f90: Likewise.
6648         * testsuite/libgomp.fortran/workshare1.f90: Likewise.
6649         * testsuite/libgomp.fortran/workshare2.f90: Likewise.
6650         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
6651         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
6652         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
6653         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
6654         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
6655         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
6656         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
6657         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
6658         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Likewise.
6659         * testsuite/libgomp.oacc-fortran/atomic_rw-1.f90: Likewise.
6660         * testsuite/libgomp.oacc-fortran/atomic_update-1.f90: Likewise.
6661         * testsuite/libgomp.oacc-fortran/c2.pl: Likewise.
6662         * testsuite/libgomp.oacc-fortran/clauses-1.f90: Likewise.
6663         * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
6664         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
6665         * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
6666         * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
6667         * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
6668         * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
6669         * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
6670         * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
6671         * testsuite/libgomp.oacc-fortran/combined-directives-1.f90: Likewise.
6672         * testsuite/libgomp.oacc-fortran/combined-reduction.f90: Likewise.
6673         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
6674         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
6675         * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
6676         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
6677         * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
6678         * testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise.
6679         * testsuite/libgomp.oacc-fortran/declare-2.f90: Likewise.
6680         * testsuite/libgomp.oacc-fortran/declare-3.f90: Likewise.
6681         * testsuite/libgomp.oacc-fortran/declare-4.f90: Likewise.
6682         * testsuite/libgomp.oacc-fortran/declare-5.f90: Likewise.
6683         * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
6684         * testsuite/libgomp.oacc-fortran/firstprivate-1.f90: Likewise.
6685         * testsuite/libgomp.oacc-fortran/gang-static-1.f90: Likewise.
6686         * testsuite/libgomp.oacc-fortran/host_data-1.f90: Likewise.
6687         * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
6688         * testsuite/libgomp.oacc-fortran/implicit-firstprivate-ref.f90: Likewise.
6689         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Likewise.
6690         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95: Likewise.
6691         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95: Likewise.
6692         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95: Likewise.
6693         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95: Likewise.
6694         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Likewise.
6695         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Likewise.
6696         * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
6697         * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
6698         * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
6699         * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
6700         * testsuite/libgomp.oacc-fortran/lib-32-1.f: Likewise.
6701         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
6702         * testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
6703         * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
6704         * testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
6705         * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
6706         * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
6707         * testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
6708         * testsuite/libgomp.oacc-fortran/nested-function-1.f90: Likewise.
6709         * testsuite/libgomp.oacc-fortran/nested-function-2.f90: Likewise.
6710         * testsuite/libgomp.oacc-fortran/nested-function-3.f90: Likewise.
6711         * testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Likewise.
6712         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
6713         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
6714         * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: Likewise.
6715         * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
6716         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise.
6717         * testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
6718         * testsuite/libgomp.oacc-fortran/pr70643.f90: Likewise.
6719         * testsuite/libgomp.oacc-fortran/pr81352.f90: Likewise.
6720         * testsuite/libgomp.oacc-fortran/pr83920.f90: Likewise.
6721         * testsuite/libgomp.oacc-fortran/pr84028.f90: Likewise.
6722         * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
6723         * testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
6724         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
6725         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
6726         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
6727         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
6728         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
6729         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
6730         * testsuite/libgomp.oacc-fortran/reduction-7.f90: Likewise.
6731         * testsuite/libgomp.oacc-fortran/reduction-8.f90: Likewise.
6732         * testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
6733         * testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
6734         * testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
6735         * testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
6736         * testsuite/libgomp.oacc-fortran/routine-5.f90: Likewise.
6737         * testsuite/libgomp.oacc-fortran/routine-7.f90: Likewise.
6738         * testsuite/libgomp.oacc-fortran/routine-9.f90: Likewise.
6739         * testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
6740         * testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
6741         * testsuite/libgomp.oacc-fortran/update-1.f90: Likewise.
6742
6743 2018-03-20  Richard Biener  <rguenther@suse.de>
6744
6745         * testsuite/libgomp.graphite/force-parallel-4.c: XFAIL one
6746         parallelizable loop.
6747
6748 2018-02-19  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6749
6750         PR target/84148
6751         * configure: Regenerate.
6752
6753 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
6754
6755         PR fortran/84418
6756         * libgomp.fortran/pr84418-1.f90: New test.
6757         * libgomp.fortran/pr84418-2.f90: New test.
6758
6759 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
6760
6761         PR fortran/84313
6762         * testsuite/libgomp.fortran/threadprivate4.f90: Add
6763         -std=f2003 -fall-intrinsics into dg-additional-options.
6764
6765 2018-02-08  Martin Jambor  <mjambor@suse.cz>
6766
6767         * testsuite/libgomp.hsa.c/pr82416.c: Make the function with target
6768         clonable.
6769
6770 2018-02-08  Martin Jambor  <mjambor@suse.cz>
6771
6772         * testsuite/libgomp.hsa.c/staticvar.c: New test.
6773
6774 2018-02-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6775
6776         * testsuite/libgomp.oacc-c-c++-common/pr84217.c (abort)
6777         [__cplusplus]: Declare extern "C".
6778
6779 2018-02-07  Tom de Vries  <tom@codesourcery.com>
6780
6781         PR libgomp/84217
6782         * testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test.
6783
6784 2018-01-29  Christoph Spiel  <cspiel@freenet.de>
6785             Jakub Jelinek  <jakub@redhat.com>
6786
6787         PR libgomp/84096
6788         * omp.h.in (omp_init_nest_lock_with_hint): Use omp_nest_lock_t
6789         instead of omp_lock_t.
6790
6791 2018-01-25  Tom de Vries  <tom@codesourcery.com>
6792
6793         PR target/84028
6794         * testsuite/libgomp.oacc-fortran/pr84028.f90: New test.
6795
6796 2018-01-24  Tom de Vries  <tom@codesourcery.com>
6797
6798         PR target/83589
6799         * testsuite/libgomp.oacc-c-c++-common/pr83589.c: New test.
6800
6801 2018-01-24  Tom de Vries  <tom@codesourcery.com>
6802
6803         PR target/81352
6804         * testsuite/libgomp.oacc-fortran/pr81352.f90: New test.
6805
6806 2018-01-19  Tom de Vries  <tom@codesourcery.com>
6807             Cesar Philippidis  <cesar@codesourcery.com>
6808
6809         PR target/83920
6810         * testsuite/libgomp.oacc-c-c++-common/pr83920.c: New test.
6811         * testsuite/libgomp.oacc-fortran/pr83920.f90: New test.
6812
6813 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
6814
6815         Update copyright years.
6816
6817         * libgomp.texi: Bump @copying's copyright year.
6818
6819 2017-12-30  Tom de Vries  <tom@codesourcery.com>
6820
6821         PR libgomp/83046
6822         * testsuite/libgomp.oacc-c-c++-common/pr83046.c: New test.
6823         * testsuite/libgomp.c-c++-common/pr83046.c: New test.
6824
6825 2017-12-27  Tom de Vries  <tom@codesourcery.com>
6826
6827         PR c++/83046
6828         * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c (test_static)
6829         (test_nonstatic): Fix return type to workaround PR83046.
6830
6831 2017-12-05  Jakub Jelinek  <jakub@redhat.com>
6832
6833         PR testsuite/83281
6834         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c (main): Use
6835         j suffix instead of i.
6836         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c (main):
6837         Likewise.
6838
6839 2017-12-01  Cesar Philippidis  <cesar@codesourcery.com>
6840
6841         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Add missing
6842         call to acc_wait (1).
6843
6844 2017-11-24  Jakub Jelinek  <jakub@redhat.com>
6845
6846         PR fortran/81304
6847         * testsuite/libgomp.fortran/pr81304.f90: New test.
6848
6849 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
6850
6851         PR fortran/81841
6852         * libgomp.fortran/pr81841.f90: New test.
6853
6854 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
6855
6856         PR libgomp/83106
6857         * target.c (gomp_target_init): Compute lengths just once and
6858         use them in both malloc size and subsequent copying.
6859
6860 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6861
6862         * configure.ac: Set CET_FLAGS, update XCFLAGS and FCFLAGS.
6863         * acinclude.m4: Add cet.m4.
6864         * configure: Regenerate.
6865         * Makefile.in: Likewise.
6866         * testsuite/Makefile.in: Likewise.
6867
6868 2017-11-15  Tom de Vries  <tom@codesourcery.com>
6869
6870         * testsuite/libgomp.oacc-c-c++-common/f-asyncwait-1.c: New test, copied
6871         from asyncwait-1.f90.  Rewrite into C.  Rewrite from float to int.
6872         * testsuite/libgomp.oacc-c-c++-common/f-asyncwait-2.c: New test, copied
6873         from asyncwait-2.f90.  Rewrite into C.  Rewrite from float to int.
6874         * testsuite/libgomp.oacc-c-c++-common/f-asyncwait-3.c: New test, copied
6875         from asyncwait-3.f90.  Rewrite into C.  Rewrite from float to int.
6876
6877 2017-11-14  Tom de Vries  <tom@codesourcery.com>
6878
6879         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Allow to run for
6880         non-nvidia devices.
6881
6882 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
6883
6884         PR c++/82835
6885         * testsuite/libgomp.c++/pr82835.C: New test.
6886
6887 2017-11-06  Martin Liska  <mliska@suse.cz>
6888
6889         * testsuite/libgomp.c++/loop-2.C: Return a value
6890         for functions with non-void return type, or change type to void,
6891         or add -Wno-return-type for test.
6892         * testsuite/libgomp.c++/loop-4.C: Likewise.
6893         * testsuite/libgomp.c++/parallel-1.C: Likewise.
6894         * testsuite/libgomp.c++/shared-1.C: Likewise.
6895         * testsuite/libgomp.c++/single-1.C: Likewise.
6896         * testsuite/libgomp.c++/single-2.C: Likewise.
6897
6898 2017-10-31  Tom de Vries  <tom@codesourcery.com>
6899
6900         * plugin/plugin-hsa.c (HSA_LOG): Remove semicolon after
6901         "do {} while (false)".
6902         (init_single_kernel, GOMP_OFFLOAD_async_run): Add missing semicolon
6903         after HSA_DEBUG call.
6904
6905 2017-10-28  Jakub Jelinek  <jakub@redhat.com>
6906
6907         * target.c (struct gomp_coalesce_buf): New type.
6908         (MAX_COALESCE_BUF_SIZE, MAX_COALESCE_BUF_GAP): Define.
6909         (gomp_coalesce_buf_add, gomp_to_device_kind_p): New functions.
6910         (gomp_copy_host2dev): Add CBUF argument, if copying into
6911         the cached ranges, memcpy into buffer instead of copying
6912         into device.
6913         (gomp_map_vars_existing, gomp_map_pointer, gomp_map_fields_existing):
6914         Add CBUF argument, pass it through to other calls.
6915         (gomp_map_vars): Aggregate copies from host to device if small enough
6916         and with small enough gaps in between into memcpy into a buffer and
6917         fewer host to device copies from the buffer.
6918         (gomp_update): Adjust gomp_copy_host2dev caller.
6919
6920 2017-10-17  Thomas Schwinge  <thomas@codesourcery.com>
6921
6922         * testsuite/libgomp.oacc-fortran/declare-1.f90: Restore "dg-do
6923         run" directive.
6924         * testsuite/libgomp.oacc-fortran/declare-2.f90: Likewise.
6925         * testsuite/libgomp.oacc-fortran/declare-3.f90: Likewise.
6926         * testsuite/libgomp.oacc-fortran/declare-4.f90: Likewise.
6927         * testsuite/libgomp.oacc-fortran/declare-5.f90: Likewise.
6928
6929 2017-10-16  Tom de Vries  <tom@codesourcery.com>
6930
6931         * testsuite/libgomp.oacc-c-c++-common/declare-1.c: Don't require
6932         openacc_nvidia_accel_selected.
6933         * testsuite/libgomp.oacc-c-c++-common/declare-2.c: Same.
6934         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Same.
6935         * testsuite/libgomp.oacc-fortran/declare-2.f90: Same.
6936         * testsuite/libgomp.oacc-fortran/declare-4.f90: Same
6937         * testsuite/libgomp.oacc-fortran/declare-5.f90: Same.
6938         * testsuite/libgomp.oacc-c-c++-common/declare-5.c: Don't require
6939         openacc_nvidia_accel_selected. Skip for shared memory device.
6940         * testsuite/libgomp.oacc-fortran/declare-1.f90: Same.
6941         * testsuite/libgomp.oacc-fortran/declare-3.f90: Same.
6942
6943 2017-10-09  Martin Jambor  <mjambor@suse.cz>
6944
6945         PR hsa/82416
6946         * testsuite/libgomp.hsa.c/pr82416.c: New test.
6947
6948 2017-10-07  Tom de Vries  <tom@codesourcery.com>
6949
6950         * testsuite/libgomp.oacc-fortran/firstprivate-1.f90 (firstprivate):
6951         Remove acc_device_nvidia references.
6952         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90 (reduction):
6953         Same.
6954
6955 2017-10-05  Tom de Vries  <tom@codesourcery.com>
6956
6957         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c (main): Remove
6958         vector_length(32) clause from acc parallel directive.
6959         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c (main): Same.
6960
6961 2017-10-04  Tom de Vries  <tom@codesourcery.com>
6962
6963         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c
6964         (main): Reduce sum of arr elements.  Assert that hres is exactly
6965         representable in 32-bit floating point.
6966         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c
6967         (main): Reduce sum of arr elements.  Assert that hres and hmres are
6968         exactly representable in 32-bit floating point.
6969         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c (gwv_np_4): Same.
6970
6971 2017-09-28  Tom de Vries  <tom@codesourcery.com>
6972
6973         * testsuite/libgomp.c++/for-12.C: Remove superfluous -fopenmp option
6974         setting.
6975         * testsuite/libgomp.c++/pr69393.C: Same.
6976         * testsuite/libgomp.c++/taskloop-1.C: Same.
6977         * testsuite/libgomp.c++/taskloop-3.C: Same.
6978         * testsuite/libgomp.c++/taskloop-4.C: Same.
6979         * testsuite/libgomp.c/for-4.c: Same.
6980         * testsuite/libgomp.c/pr66199-3.c: Same.
6981         * testsuite/libgomp.c/pr66199-4.c: Same.
6982         * testsuite/libgomp.c/pr66199-6.c: Same.
6983         * testsuite/libgomp.c/taskloop-1.c: Same.
6984         * testsuite/libgomp.c/taskloop-3.c: Same.
6985         * testsuite/libgomp.c/taskloop-4.c: Same.
6986         * testsuite/libgomp.fortran/aligned1.f03: Same.
6987         * testsuite/libgomp.fortran/condinc1.f: Same.
6988         * testsuite/libgomp.fortran/condinc3.f90: Same.
6989         * testsuite/libgomp.fortran/crayptr1.f90: Same.
6990         * testsuite/libgomp.fortran/crayptr2.f90: Same.
6991         * testsuite/libgomp.fortran/crayptr3.f90: Same.
6992         * testsuite/libgomp.fortran/omp_cond1.f: Same.
6993         * testsuite/libgomp.fortran/omp_cond3.F90: Same.
6994         * testsuite/libgomp.fortran/pr66199-1.f90: Same.
6995         * testsuite/libgomp.fortran/pr66199-2.f90: Same.
6996         * testsuite/libgomp.fortran/recursion1.f90: Same.
6997         * testsuite/libgomp.fortran/target2.f90: Same.
6998         * testsuite/libgomp.fortran/target5.f90: Same.
6999         * testsuite/libgomp.fortran/task3.f90: Same.
7000
7001 2017-09-28  Tom de Vries  <tom@codesourcery.com>
7002
7003         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c (main): Remove
7004         vector_length(32) clause from acc parallel directive.
7005         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c (main): Same.
7006
7007 2017-09-27  Tom de Vries  <tom@codesourcery.com>
7008
7009         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c (main):
7010         Remove acc_device_nvidia references.
7011
7012 2017-09-16  Tom de Vries  <tom@codesourcery.com>
7013
7014         PR c/81875
7015         * testsuite/libgomp.c-c++-common/pr81875.c: New test.
7016
7017 2017-09-14  Tom de Vries  <tom@codesourcery.com>
7018
7019         * testsuite/libgomp.c++/cancel-taskgroup-1.C: Remove.
7020         * testsuite/libgomp.c/cancel-taskgroup-1.c: Move to ...
7021         * testsuite/libgomp.c-c++-common/cancel-taskgroup-1.c: ... here.
7022         * testsuite/libgomp.c/c.exp: Include test-cases from
7023         libgomp.c-c++-common.
7024         * testsuite/libgomp.c++/c++.exp: Same.  Force c++-mode compilation of .c
7025         files.
7026
7027 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
7028
7029         PR c++/81314
7030         * testsuite/libgomp.c++/pr81314.C: New test.
7031
7032 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
7033
7034         * libgomp.texi (Top): www.openacc.org now uses https.
7035         (Enabling OpenACC): Ditto.
7036         (acc_get_num_devices): Ditto.
7037         (acc_set_device_type): Ditto.
7038         (acc_get_device_type): Ditto.
7039         (acc_set_device_num): Ditto.
7040         (acc_get_device_num): Ditto.
7041         (acc_async_test): Ditto.
7042         (acc_async_test_all): Ditto.
7043         (acc_wait): Ditto.
7044         (acc_wait_all): Ditto.
7045         (acc_wait_all_async): Ditto.
7046         (acc_wait_async): Ditto.
7047         (acc_init): Ditto.
7048         (acc_shutdown): Ditto.
7049         (acc_on_device): Ditto.
7050         (acc_malloc): Ditto.
7051         (acc_free): Ditto.
7052         (acc_copyin): Ditto.
7053         (acc_present_or_copyin): Ditto.
7054         (acc_create): Ditto.
7055         (acc_present_or_create): Ditto.
7056         (acc_copyout): Ditto.
7057         (acc_delete): Ditto.
7058         (acc_update_device): Ditto.
7059         (acc_update_self): Ditto.
7060         (acc_map_data): Ditto.
7061         (acc_unmap_data): Ditto.
7062         (acc_deviceptr): Ditto.
7063         (acc_hostptr): Ditto.
7064         (acc_is_present): Ditto.
7065         (acc_memcpy_to_device): Ditto.
7066         (acc_memcpy_from_device): Ditto.
7067         (acc_get_current_cuda_device): Ditto.
7068         (acc_get_current_cuda_context): Ditto.
7069         (acc_get_cuda_stream): Ditto.
7070         (acc_set_cuda_stream): Ditto.
7071         (ACC_DEVICE_TYPE): Ditto.
7072         (ACC_DEVICE_NUM): Ditto.
7073         (OpenACC Library Interoperability): Ditto.
7074
7075 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
7076
7077         PR c/81687
7078         * testsuite/libgomp.c/pr81687-1.c: New test.
7079         * testsuite/libgomp.c/pr81687-2.c: New test.
7080
7081 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
7082
7083         PR c/69389
7084         * testsuite/libgomp.c/pr69389.c: New test.
7085         * testsuite/libgomp.c++/pr69389.C: New test.
7086
7087 2017-08-07  Tom de Vries  <tom@codesourcery.com>
7088
7089         PR middle-end/78266
7090         * testsuite/libgomp.oacc-c-c++-common/vprop-2.c: New test.
7091         * testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove xfail.
7092
7093 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
7094
7095         PR c/45784
7096         * testsuite/libgomp.c/pr45784.c: New test.
7097         * testsuite/libgomp.c++/pr45784.C: New test.
7098
7099 2017-07-19  Tom de Vries  <tom@codesourcery.com>
7100
7101         * testsuite/libgomp.oacc-c/vec.c: New test.
7102
7103 2017-07-03  Tom de Vries  <tom@codesourcery.com>
7104
7105         * plugin/plugin-hsa.c: Fix secure_getenv.h include.
7106
7107 2017-06-27  Tom de Vries  <tom@codesourcery.com>
7108
7109         * plugin/plugin-nvptx.c (notify_var): New function.
7110         (nvptx_exec): Use notify_var for GOMP_OPENACC_DIM.
7111
7112 2017-06-27  Tom de Vries  <tom@codesourcery.com>
7113
7114         * env.c (parse_unsigned_long_1): Factor out of ...
7115         (parse_unsigned_long): ... here.
7116         (parse_int_1): Factor out of ...
7117         (parse_int): ... here.
7118         (parse_int_secure): New function.
7119         (initialize_env): Use parse_int_secure for GOMP_DEBUG.
7120         * secure_getenv.h: Factor out of ...
7121         * plugin/plugin-hsa.c: ... here.
7122         * testsuite/libgomp.oacc-c-c++-common/gomp-debug-env.c: New test.
7123
7124 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
7125
7126         PR c++/81130
7127         * testsuite/libgomp.c++/pr81130.C: New test.
7128
7129 2017-06-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7130
7131         * testsuite/libgomp.fortran/strassen.f90: Remove dg-skip-if
7132         default args.
7133         * testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove
7134         dg-xfail-run-if default args.
7135
7136 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7137
7138         * testsuite/libgomp.c/pr39591-2.c: Fix test case.
7139         * testsuite/libgomp.c/pr39591-3.c: Likewise.
7140
7141 2017-05-30  Jakub Jelinek  <jakub@redhat.com>
7142
7143         PR libgomp/80822
7144         * config/linux/affinity.c (gomp_affinity_init_level_1): New function.
7145         (gomp_affinity_init_level): Use it.  Always analyze the core and thread
7146         sibling lists, depending on level just pick up what CPUs to put
7147         together into a place vs. whether add multiple ordered places.
7148
7149 2017-05-24  Thomas Schwinge  <thomas@codesourcery.com>
7150
7151         * openacc.h (acc_async_wait, acc_async_wait_all): New prototypes.
7152         * libgomp.map (OACC_2.0.1): Add these.
7153         * oacc-async.c (acc_async_wait, acc_async_wait_all): New aliases
7154         for "acc_wait", and "acc_wait_all", respectively.
7155         * openacc.f90 (acc_async_wait, acc_async_wait_all): New interfaces
7156         for "acc_wait", and "acc_wait_all", respectively.
7157         * openacc_lib.h (acc_async_wait, acc_async_wait_all): Likewise.
7158         * libgomp.texi (acc_wait, acc_wait_all): Update.
7159         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Update.
7160         * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: New file.
7161         * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
7162
7163         * openacc_lib.h (acc_pcopyin, acc_pcreate): Route to
7164         acc_present_or_copyin and acc_present_or_create procedures,
7165         respectively.
7166         * testsuite/libgomp.oacc-fortran/lib-32-1.f: Exercise these, and
7167         generally different variants of OpenACC Runtime Library functions.
7168         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
7169
7170         * testsuite/libgomp.oacc-fortran/lib-32-1.f: New file.
7171         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
7172
7173         * openacc.h (acc_pcopyin, acc_pcreate): Provide prototypes instead
7174         of preprocessor definitions.
7175         * libgomp.h (strong_alias): Guard by "#ifdef
7176         HAVE_ATTRIBUTE_ALIAS".
7177         * oacc-mem.c: Provide "acc_pcreate" as alias for
7178         "acc_present_or_create", and "acc_pcopyin" as alias for
7179         "acc_present_or_copyin".
7180         * libgomp.map: New version "OACC_2.0.1".
7181         (OACC_2.0.1): Add "acc_pcopyin", and "acc_pcreate".
7182         * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Remove, merging
7183         its content into...
7184         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: ... this file.
7185         Extend testing.
7186
7187         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output
7188         when disabling nvptx offloading.
7189
7190 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
7191
7192         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Update.
7193         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
7194         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Likewise.
7195
7196         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Rewrite.
7197         * testsuite/lib/libgomp.exp
7198         (check_effective_target_openacc_nvidia_accel_configured): New
7199         proc.
7200         * testsuite/libgomp.oacc-c++/c++.exp (check_effective_target_c)
7201         (check_effective_target_c++): New procs.
7202         * testsuite/libgomp.oacc-c/c.exp (check_effective_target_c)
7203         (check_effective_target_c++): Likewise.
7204
7205 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
7206
7207         PR middle-end/80809
7208         * testsuite/libgomp.c/pr80809-2.c: New test.
7209         * testsuite/libgomp.c/pr80809-3.c: New test.
7210
7211         PR middle-end/80809
7212         * testsuite/libgomp.c/pr80809-1.c: New test.
7213
7214         PR middle-end/80853
7215         * testsuite/libgomp.c/pr80853.c: New test.
7216
7217 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
7218
7219         * testsuite/libgomp.oacc-c++/template-reduction.C: Update.
7220         * testsuite/libgomp.oacc-c-c++-common/nested-2.c: Update.
7221         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
7222         * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
7223         * testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Likewise.
7224
7225         * plugin/plugin-hsa.c (DLSYM_FN, init_hsa_runtime_functions):
7226         Debug output for failure.
7227
7228 2017-05-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7229
7230         * testsuite/lib/libgomp.exp: Load scanlang.exp.
7231
7232 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
7233
7234         PR bootstrap/80531
7235         * configure.tgt (*-*-aix*): Add -frandom-seed=$@ to XCFLAGS to avoid
7236         bootstrap compare failures.
7237
7238 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
7239
7240         * testsuite/libgomp.c/target-36.c: New testcase.
7241
7242 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
7243
7244         * plugin/plugin-nvptx.c (cuda_lib_inited): Use signed char type
7245         instead of char.
7246
7247 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
7248
7249         PR libgomp/80394
7250         * testsuite/libgomp.c/pr80394.c: New test.
7251
7252 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
7253
7254         PR libgomp/79876
7255         * config/posix/thread-stacksize.h: New file.
7256         * config/darwin/thread-stacksize.h: New file.
7257         * config/nvptx/thread-stacksize.h: New file.
7258         * env.c: Include thread-stacksize.h.
7259         (initialize_env): Initialize stacksize to GOMP_DEFAULT_STACKSIZE
7260         instead of 0.  Call pthread_attr_setstacksize even if
7261         GOMP_DEFAULT_STACKSIZE is non-zero.
7262
7263 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
7264
7265         * env.c (initialize_env): Initialize stacksize to 0.
7266
7267 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
7268
7269         PR c++/80029
7270         * testsuite/libgomp.oacc-c-c++-common/declare-vla.c: New test.
7271
7272 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
7273
7274         PR c/79940
7275         * testsuite/libgomp.c/pr79940.c: New test.
7276
7277 2017-02-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7278
7279         * testsuite/libgomp.c/pr48591.c: Enable on all __float128
7280         targets.
7281         Add __float128 options.
7282
7283 2017-02-11  John David Anglin  <danglin@gcc.gnu.org>
7284
7285         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Remove
7286         hppa*-*-* dg-skip-if directive.
7287
7288 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
7289
7290         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Move
7291         dg-skip-if directive into a comment.
7292
7293 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
7294             Chung-Lin Tang  <cltang@codesourcery.com>
7295
7296         * testsuite/libgomp.oacc-c-c++-common/tile-1.c: New.
7297         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust and
7298         add additional case.
7299         * testsuite/libgomp.oacc-c-c++-common/vprop.c: XFAIL under
7300         "openacc_nvidia_accel_selected".
7301         * libgomp.oacc-fortran/nested-function-1.f90 (test2):
7302         Add num_workers(8) clause.
7303
7304 2017-02-08  John David Anglin  <danglin@gcc.gnu.org>
7305
7306         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Skip on
7307         hppa*-*-*.
7308         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Don't
7309         include complex.h on hppa*-*-hpux*.
7310         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise.
7311
7312 2017-02-02  Thomas Schwinge  <thomas@codesourcery.com>
7313
7314         * plugin/plugin-nvptx.c (nvptx_exec): Make it static.
7315
7316         * libgomp-plugin.h (GOMP_OFFLOAD_openacc_parallel): Rename to
7317         GOMP_OFFLOAD_openacc_exec.  Adjust all users.
7318         (GOMP_OFFLOAD_openacc_get_current_cuda_device): Rename to
7319         GOMP_OFFLOAD_openacc_cuda_get_current_device.  Adjust all users.
7320         (GOMP_OFFLOAD_openacc_get_current_cuda_context): Rename to
7321         GOMP_OFFLOAD_openacc_cuda_get_current_context.  Adjust all users.
7322         (GOMP_OFFLOAD_openacc_get_cuda_stream): Rename to
7323         GOMP_OFFLOAD_openacc_cuda_get_stream.  Adjust all users.
7324         (GOMP_OFFLOAD_openacc_set_cuda_stream): Rename to
7325         GOMP_OFFLOAD_openacc_cuda_set_stream.  Adjust all users.
7326
7327 2017-01-31  Thomas Schwinge  <thomas@codesourcery.com>
7328
7329         * libgomp-plugin.h: #include <stdbool.h>.
7330         (GOMP_OFFLOAD_get_name, GOMP_OFFLOAD_get_caps)
7331         (GOMP_OFFLOAD_get_type, GOMP_OFFLOAD_get_num_devices)
7332         (GOMP_OFFLOAD_init_device, GOMP_OFFLOAD_fini_device)
7333         (GOMP_OFFLOAD_version, GOMP_OFFLOAD_load_image)
7334         (GOMP_OFFLOAD_unload_image, GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free)
7335         (GOMP_OFFLOAD_dev2host, GOMP_OFFLOAD_host2dev)
7336         (GOMP_OFFLOAD_dev2dev, GOMP_OFFLOAD_can_run, GOMP_OFFLOAD_run)
7337         (GOMP_OFFLOAD_async_run, GOMP_OFFLOAD_openacc_parallel)
7338         (GOMP_OFFLOAD_openacc_register_async_cleanup)
7339         (GOMP_OFFLOAD_openacc_async_test)
7340         (GOMP_OFFLOAD_openacc_async_test_all)
7341         (GOMP_OFFLOAD_openacc_async_wait)
7342         (GOMP_OFFLOAD_openacc_async_wait_async)
7343         (GOMP_OFFLOAD_openacc_async_wait_all)
7344         (GOMP_OFFLOAD_openacc_async_wait_all_async)
7345         (GOMP_OFFLOAD_openacc_async_set_async)
7346         (GOMP_OFFLOAD_openacc_create_thread_data)
7347         (GOMP_OFFLOAD_openacc_destroy_thread_data)
7348         (GOMP_OFFLOAD_openacc_get_current_cuda_device)
7349         (GOMP_OFFLOAD_openacc_get_current_cuda_context)
7350         (GOMP_OFFLOAD_openacc_get_cuda_stream)
7351         (GOMP_OFFLOAD_openacc_set_cuda_stream): New prototypes.
7352         * libgomp.h (struct acc_dispatch_t, struct gomp_device_descr): Use
7353         these.
7354         * plugin/plugin-hsa.c (GOMP_OFFLOAD_load_image)
7355         (GOMP_OFFLOAD_unload_image): Fix argument types.
7356
7357 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
7358
7359         * testsuite/lib/libgomp.exp
7360         (check_effective_target_hsa_offloading_selected_nocache): Fix up
7361         check_compile invocation.  Fix up removal of executable.  Drop
7362         bogus "2>&1" argument.
7363
7364         * testsuite/libgomp.fortran/declare-simd-4.f90: Add cleanup-modules
7365         directive.
7366
7367 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
7368             Martin Jambor  <mjambor@suse.cz>
7369
7370         * plugin/hsa.h: Moved to top level include.
7371         * plugin/plugin-hsa.c: Chanfgd include of hsa.h accordingly.
7372
7373 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
7374
7375         PR other/79046
7376         * testsuite/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
7377         of cat to get version from BASE-VER file.
7378         * testsuite/Makefile.in: Regenerated.
7379
7380 2017-01-19  Jakub Jelinek  <jakub@redhat.com>
7381
7382         * plugin/cuda/cuda.h (CUdeviceptr): Typedef to unsigned long long even
7383         for _WIN64.
7384
7385 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
7386
7387         * plugin/hsa.h: Add GCC runtime library exception.
7388         * plugin/hsa_ext_finalize.h: Likewise.
7389
7390         * plugin/configfrag.ac: For --without-cuda-driver don't initialize
7391         CUDA_DRIVER_INCLUDE nor CUDA_DRIVER_LIB.  If both
7392         CUDA_DRIVER_INCLUDE and CUDA_DRIVER_LIB are empty and linking small
7393         cuda program fails, define PLUGIN_NVPTX_DYNAMIC to 1 and use
7394         plugin/include/cuda as include dir and -ldl instead of -lcuda as
7395         library to link ptx plugin against.
7396         * plugin/plugin-nvptx.c: Include dlfcn.h if PLUGIN_NVPTX_DYNAMIC.
7397         (CUDA_CALLS): Define.
7398         (cuda_lib, cuda_lib_inited): New variables.
7399         (init_cuda_lib): New function.
7400         (CUDA_CALL_PREFIX): Define.
7401         (CUDA_CALL_ERET, CUDA_CALL_ASSERT): Use CUDA_CALL_PREFIX.
7402         (CUDA_CALL): Use FN instead of (FN).
7403         (CUDA_CALL_NOCHECK): Define.
7404         (cuda_error, fini_streams_for_device, select_stream_for_async,
7405         nvptx_attach_host_thread_to_device, nvptx_open_device, link_ptx,
7406         event_gc, nvptx_exec, nvptx_async_test, nvptx_async_test_all,
7407         nvptx_wait_all, nvptx_set_clocktick, GOMP_OFFLOAD_unload_image,
7408         nvptx_stacks_alloc, nvptx_stacks_free, GOMP_OFFLOAD_run): Use
7409         CUDA_CALL_NOCHECK.
7410         (nvptx_init): Call init_cuda_lib, if it fails, return false.  Use
7411         CUDA_CALL_NOCHECK.
7412         (nvptx_get_num_devices): Call init_cuda_lib, if it fails, return 0.
7413         Use CUDA_CALL_NOCHECK.
7414         * plugin/cuda/cuda.h: New file.
7415         * config.h.in: Regenerated.
7416         * configure: Regenerated.
7417
7418         PR other/79046
7419         * configure.ac: Add GCC_BASE_VER.
7420         * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
7421         get version from BASE-VER file.
7422         * testsuite/Makefile.in: Regenerated.
7423         * configure: Regenerated.
7424         * Makefile.in: Regenerated.
7425
7426 2017-01-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7427
7428         PR libgomp/60670
7429         * Makefile.am: Make fincludedir multilib-aware.
7430         * Makefile.in: Regenerate.
7431
7432 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
7433
7434         Update copyright years.
7435
7436         * libgomp.texi: Bump @copying's copyright year.
7437
7438 2016-12-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7439
7440         * libgomp/config/rtems/pool.h (gomp_thread_pool_reservoir): Use
7441         pthread_spinlock_t instead of gomp_mutex_t lock.
7442         (gomp_get_thread_pool): Likewise.
7443         (gomp_release_thread_pool): Likewise.
7444         * libgomp/config/rtems/proc.c (allocate_thread_pool_reservoir):
7445         Likewise.
7446
7447 2016-12-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7448
7449         * config/rtems/pool.h (gomp_get_thread_pool): Return proper
7450         thread pool in case nthreads == 1.
7451
7452 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
7453
7454         * config/nvptx/env.c: Delete.
7455         * icv.c: Move definitions of ICV variables back ...
7456         * env.c: ...here.  Do not compile environment-related functionality if
7457         LIBGOMP_OFFLOADED_ONLY is set.
7458
7459 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
7460
7461         * configure.ac [nvptx*-*-*] (libgomp_offloaded_only): Set and use it...
7462         (LIBGOMP_OFFLOADED_ONLY): ...here; new define.
7463         * configure: Regenerate.
7464         * config.h.in: Likewise.
7465
7466 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
7467
7468         * Makefile.in: Regenerate with automake-1.11.6.
7469         * aclocal.m4: Likewise.
7470         * configure: Likewise.
7471         * testsuite/Makefile.in: Likewise.
7472
7473 2016-11-28  Alexander Monakov  <amonakov@ispras.ru>
7474
7475         * config/nvptx/critical.c: Delete to use generic implementation.
7476
7477 2016-11-28  Jonas Hahnfeld  <Hahnfeld@itc.rwth-aachen.de>
7478
7479         * config/linux/affinity.c [!HAVE_PTHREAD_AFFINITY_NP]: Include
7480         ../../affinity.c as fallback.
7481         * config/nvptx/affinity.c: Delete to use fallback implementation.
7482
7483 2016-11-23  Alexander Monakov  <amonakov@ispras.ru>
7484             Jakub Jelinek  <jakub@redhat.com>
7485             Dmitry Melnik  <dm@ispras.ru>
7486
7487         * Makefile.am (libgomp_la_SOURCES): Add atomic.c, icv.c, icv-device.c.
7488         * Makefile.in. Regenerate.
7489         * configure.ac [nvptx*-*-*] (libgomp_use_pthreads): Set and use it...
7490         (LIBGOMP_USE_PTHREADS): ...here; new define.
7491         * configure: Regenerate.
7492         * config.h.in: Likewise.
7493         * config/posix/affinity.c: Move to...
7494         * affinity.c: ...here (new file).  Guard use of Pthreads-specific
7495         interface by LIBGOMP_USE_PTHREADS. 
7496         * critical.c: Split out GOMP_atomic_{start,end} into...
7497         * atomic.c: ...here (new file).
7498         * env.c: Split out ICV definitions into...
7499         * icv.c: ...here (new file) and...
7500         * icv-device.c: ...here. New file.
7501         * config/linux/lock.c (gomp_init_lock_30): Move to generic lock.c.
7502         (gomp_destroy_lock_30): Ditto.
7503         (gomp_set_lock_30): Ditto.
7504         (gomp_unset_lock_30): Ditto.
7505         (gomp_test_lock_30): Ditto.
7506         (gomp_init_nest_lock_30): Ditto.
7507         (gomp_destroy_nest_lock_30): Ditto.
7508         (gomp_set_nest_lock_30): Ditto.
7509         (gomp_unset_nest_lock_30): Ditto.
7510         (gomp_test_nest_lock_30): Ditto.
7511         * lock.c: New.
7512         * config/nvptx/lock.c: New.
7513         * config/nvptx/bar.c: New.
7514         * config/nvptx/bar.h: New.
7515         * config/nvptx/doacross.h: New.
7516         * config/nvptx/error.c: New.
7517         * config/nvptx/icv-device.c: New.
7518         * config/nvptx/mutex.h: New.
7519         * config/nvptx/pool.h: New.
7520         * config/nvptx/proc.c: New.
7521         * config/nvptx/ptrlock.h: New.
7522         * config/nvptx/sem.h: New.
7523         * config/nvptx/simple-bar.h: New.
7524         * config/nvptx/target.c: New.
7525         * config/nvptx/task.c: New.
7526         * config/nvptx/team.c: New.
7527         * config/nvptx/time.c: New.
7528         * config/posix/simple-bar.h: New.
7529         * libgomp.h: Guard pthread.h inclusion.  Include simple-bar.h.
7530         (gomp_num_teams_var): Declare.
7531         (struct gomp_thread_pool): Change threads_dock member to
7532         gomp_simple_barrier_t.
7533         [__nvptx__] (gomp_thread): New implementation.
7534         (gomp_thread_attr): Guard by LIBGOMP_USE_PTHREADS.
7535         (gomp_thread_destructor): Ditto.
7536         (gomp_init_thread_affinity): Ditto.
7537         * team.c: Guard uses of Pthreads-specific interfaces by
7538         LIBGOMP_USE_PTHREADS.  Adjust all uses of threads_dock.
7539         (gomp_free_thread) [__nvptx__]: Do not call 'free'.
7540         * config/nvptx/alloc.c: Delete.
7541         * config/nvptx/barrier.c: Ditto.
7542         * config/nvptx/fortran.c: Ditto.
7543         * config/nvptx/iter.c: Ditto.
7544         * config/nvptx/iter_ull.c: Ditto.
7545         * config/nvptx/loop.c: Ditto.
7546         * config/nvptx/loop_ull.c: Ditto.
7547         * config/nvptx/ordered.c: Ditto.
7548         * config/nvptx/parallel.c: Ditto.
7549         * config/nvptx/priority_queue.c: Ditto.
7550         * config/nvptx/sections.c: Ditto.
7551         * config/nvptx/single.c: Ditto.
7552         * config/nvptx/splay-tree.c: Ditto.
7553         * config/nvptx/work.c: Ditto.
7554         * testsuite/libgomp.fortran/fortran.exp (lang_link_flags): Pass
7555         -foffload=-lgfortran in addition to -lgfortran.
7556         * testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags): Ditto.
7557         * plugin/plugin-nvptx.c: Include <limits.h>.
7558         (struct targ_fn_descriptor): Add new fields.
7559         (struct ptx_device): Ditto.  Set them...
7560         (nvptx_open_device): ...here.
7561         (nvptx_adjust_launch_bounds): New.
7562         (nvptx_host2dev): Allow NULL 'nvthd'.
7563         (nvptx_dev2host): Ditto.
7564         (GOMP_OFFLOAD_get_caps): Add GOMP_OFFLOAD_CAP_OPENMP_400.
7565         (link_ptx): Adjust log sizes.
7566         (nvptx_host2dev): Allow NULL 'nvthd'.
7567         (nvptx_dev2host): Ditto.
7568         (nvptx_set_clocktick): New.  Use it...
7569         (GOMP_OFFLOAD_load_image): ...here.  Set new targ_fn_descriptor
7570         fields.
7571         (GOMP_OFFLOAD_dev2dev): New.
7572         (nvptx_adjust_launch_bounds): New.
7573         (nvptx_stacks_size): New.
7574         (nvptx_stacks_alloc): New.
7575         (nvptx_stacks_free): New.
7576         (GOMP_OFFLOAD_run): New.
7577         (GOMP_OFFLOAD_async_run): New (stub).
7578
7579 2016-11-23  Martin Jambor  <mjambor@suse.cz>
7580
7581         * testsuite/libgomp.hsa.c/bits-insns.c: New test.
7582         * testsuite/libgomp.hsa.c/tiling-1.c: Likewise.
7583         * testsuite/libgomp.hsa.c/tiling-2.c: Likewise.
7584
7585 2016-11-23  Martin Liska  <mliska@suse.cz>
7586             Martin Jambor  <mjambor@suse.cz>
7587
7588         * plugin/hsa.h: New file.
7589         * plugin/hsa_ext_finalize.h: New file.
7590         * plugin/configfrag.ac: Remove hsa-kmt-lib test.  Added checks for
7591         header file unistd.h, and functions secure_getenv, __secure_getenv,
7592         getuid, geteuid, getgid and getegid.
7593         * plugin/Makefrag.am (libgomp_plugin_hsa_la_CPPFLAGS): Added
7594         -D_GNU_SOURCE.
7595         * plugin/plugin-hsa.c: Include config.h, inttypes.h and stdbool.h.
7596         Handle various cases of secure_getenv presence, add an implementation
7597         when we can test effective UID and GID.
7598         (struct hsa_runtime_fn_info): New structure.
7599         (hsa_runtime_fn_info hsa_fns): New variable.
7600         (hsa_runtime_lib): Likewise.
7601         (support_cpu_devices): Likewise.
7602         (init_enviroment_variables): Load newly introduced ENV
7603         variables.
7604         (hsa_warn): Call hsa run-time functions via hsa_fns structure.
7605         (hsa_fatal): Likewise.
7606         (DLSYM_FN): New macro.
7607         (init_hsa_runtime_functions): New function.
7608         (suitable_hsa_agent_p): Call hsa run-time functions via hsa_fns
7609         structure.  Depending on environment, also allow CPU devices.
7610         (init_hsa_context): Call hsa run-time functions via hsa_fns structure.
7611         (get_kernarg_memory_region): Likewise.
7612         (GOMP_OFFLOAD_init_device): Likewise.
7613         (destroy_hsa_program): Likewise.
7614         (init_basic_kernel_info): New function.
7615         (GOMP_OFFLOAD_load_image): Use it.
7616         (create_and_finalize_hsa_program): Call hsa run-time functions via
7617         hsa_fns structure.
7618         (create_single_kernel_dispatch): Likewise.
7619         (release_kernel_dispatch): Likewise.
7620         (init_single_kernel): Likewise.
7621         (parse_target_attributes): Allow up multiple HSA grid dimensions.
7622         (get_group_size): New function.
7623         (run_kernel): Likewise.
7624         (GOMP_OFFLOAD_run): Outline most functionality to run_kernel.
7625         (GOMP_OFFLOAD_fini_device): Call hsa run-time functions via hsa_fns
7626         structure.
7627         * testsuite/lib/libgomp.exp: Remove hsa_kmt_lib support.
7628         * testsuite/libgomp-test-support.exp.in: Likewise.
7629         * Makefile.in: Regenerated.
7630         * aclocal.m4: Likewise.
7631         * config.h.in: Likewise.
7632         * configure: Likewise.
7633         * testsuite/Makefile.in: Likewise.
7634
7635 2016-11-15  Martin Jambor  <mjambor@suse.cz>
7636             Alexander Monakov  <amonakov@ispras.ru>
7637
7638         * testsuite/libgomp.fortran/examples-4/device-1.f90 (e_57_1): Add
7639         mapping clauses to target constructs.
7640         * testsuite/libgomp.fortran/examples-4/device-3.f90 (e_57_3): Ditto.
7641
7642 2016-11-15  Matthias Klose  <doko@ubuntu.com>
7643
7644         * configure: Regenerate.
7645
7646 2016-11-10  Jakub Jelinek  <jakub@redhat.com>
7647
7648         * omp_lib.f90.in (openmp_version): Change to 201511 from 201307.
7649         * omp_lib.h.in (openmp_version): Likewise.
7650         * testsuite/libgomp.fortran/openmp_version-1.f: Expect 201511 instead
7651         of 201307.
7652         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
7653
7654         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90
7655         (fib_wrapper): Add map(from: x) clause.
7656         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90
7657         (e_53_2): Likewise.
7658         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90
7659         (accum): Add map(tmp) clause.
7660         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90
7661         (accum): Add map(tofrom: tmp) clause.
7662         * testsuite/libgomp.fortran/examples-4/target_data-3.f90
7663         (gramSchmidt): Likewise.
7664         * testsuite/libgomp.fortran/examples-4/teams-2.f90 (dotprod): Add
7665         map(tofrom: sum) clause.
7666         * testsuite/libgomp.fortran/nestedfn5.f90 (foo): Add twice
7667         map (alloc: a, l) clause.  Add defaultmap(tofrom: scalar) clause.
7668         * testsuite/libgomp.fortran/pr66199-2.f90: Adjust for linear clause
7669         only allowed on the loop iterator.
7670         * testsuite/libgomp.fortran/target4.f90 (foo): Add map(t) clause.
7671         * testsuite/libgomp.fortran/taskloop2.f90: New test.
7672         * testsuite/libgomp.fortran/taskloop4.f90: New test.
7673         * testsuite/libgomp.fortran/doacross1.f90: New test.
7674         * testsuite/libgomp.fortran/doacross3.f90: New test.
7675         * testsuite/libgomp.fortran/taskloop1.f90: New test.
7676         * testsuite/libgomp.fortran/taskloop3.f90: New test.
7677         * testsuite/libgomp.fortran/doacross2.f90: New test.
7678         * testsuite/libgomp.c/doacross-1.c (main): Add missing
7679         #pragma omp atomic read.
7680         * testsuite/libgomp.c/doacross-2.c (main): Likewise.
7681         * testsuite/libgomp.c/doacross-3.c (main): Likewise.
7682
7683 2016-11-02  Cesar Philippidis  <cesar@codesourcery.com>
7684             Nathan Sidwell  <nathan@acm.org>
7685
7686         * plugin/plugin-nvptx.c (nvptx_exec): Interrogate board attributes
7687         to determine default geometry.
7688         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Set gang
7689         dimension.
7690
7691 2016-11-01  Jakub Jelinek  <jakub@redhat.com>
7692
7693         * hashtab.h: Use standard GPLv3 with runtime exception
7694         boilerplate.
7695
7696 2016-10-27  Aldy Hernandez  <aldyh@redhat.com>
7697
7698         * oacc-init.c (goacc_new_thread): Use sizeof of the appropriate
7699         size when allocating new thread.
7700
7701 2016-09-14  Marek Polacek  <polacek@redhat.com>
7702
7703         * testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated.
7704
7705 2016-08-19  Jakub Jelinek  <jakub@redhat.com>
7706
7707         PR fortran/71014
7708         * testsuite/libgomp.fortran/pr71014.f90: New test.
7709
7710 2016-08-18  Chung-Lin Tang  <cltang@codesourcery.com>
7711
7712         PR middle-end/70895
7713         * testsuite/libgomp.oacc-fortran/reduction-7.f90: Add explicit
7714         firstprivate clauses.
7715         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Remove explicit
7716         copy clauses.
7717         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
7718         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise.
7719         * testsuite/libgomp.oacc-c-c++-common/reduction-flt.c: Likewise.
7720         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
7721         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise.
7722         * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
7723         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
7724         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.
7725         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
7726         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
7727         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
7728         * testsuite/libgomp.oacc-c-c++-common/reduction-dbl.c: Likewise.
7729
7730 2016-08-14  Chung-Lin Tang  <cltang@codesourcery.com>
7731
7732         PR fortran/70598
7733         * testsuite/libgomp.oacc-fortran/host_data-1.f90: New test.
7734
7735 2016-08-08  Jakub Jelinek  <jakub@redhat.com>
7736
7737         PR c++/58706
7738         * testsuite/libgomp.c++/pr58706.C: New test.
7739
7740 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
7741
7742         * testsuite/libgomp.oacc-c++/routine-1-auto.C: New file.
7743         * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Likewise.
7744         * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
7745         Likewise.
7746         * testsuite/libgomp.oacc-c++/routine-1-template.C: Likewise.
7747         * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C:
7748         Likewise.
7749         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Adjust.
7750
7751         * testsuite/libgomp.oacc-c-c++-common/crash-1.c: Make it a "link"
7752         test, and don't hardcode -O0.
7753
7754 2016-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7755
7756         * testsuite/libgomp.oacc-c-c++-common/crash-1.c: New.
7757
7758 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
7759
7760         * testsuite/libgomp.oacc-c-c++-common/zero_length_subarrays.c: New
7761         test.
7762
7763 2016-07-03  H.J. Lu  <hongjiu.lu@intel.com>
7764
7765         PR middle-end/71734
7766         * testsuite/libgomp.fortran/pr71734-1.f90: New test.
7767         * testsuite/libgomp.fortran/pr71734-2.f90: Likewise.
7768
7769 2016-07-01  Jakub Jelinek  <jakub@redhat.com>
7770
7771         PR fortran/71717
7772         * testsuite/libgomp.fortran/associate3.f90: New test.
7773
7774 2016-06-17  Jakub Jelinek  <jakub@redhat.com>
7775
7776         * testsuite/libgomp.c++/target-21.C: New test.
7777
7778 2016-06-16  Jakub Jelinek  <jakub@redhat.com>
7779
7780         * testsuite/libgomp.c++/target-20.C: New test.
7781
7782 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
7783             Cesar Philippidis  <cesar@codesourcery.com>
7784
7785         PR middle-end/71373
7786         * libgomp.oacc-c/nested-function-1.c: New file.
7787         * libgomp.oacc-c/nested-function-2.c: Likewise.
7788         * libgomp.oacc-fortran/nested-function-1.f90: Likewise.
7789         * libgomp.oacc-fortran/nested-function-2.f90: Likewise.
7790         * libgomp.oacc-fortran/nested-function-3.f90: Likewise.
7791
7792 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
7793
7794         PR c/71381
7795         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: #include
7796         "../../../gcc/testsuite/c-c++-common/goacc/cache-1.c".
7797         * testsuite/libgomp.oacc-fortran/cache-1.f95: New file.
7798
7799 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
7800
7801         * testsuite/libgomp.oacc-fortran/reduction-8.f90: New testcase.
7802         * testsuite/libgomp.oacc-c-c++-common/reduction-8.c: New testcase.
7803
7804 2016-06-01  Cesar Philippidis  <cesar@codesourcery.com>
7805
7806         PR c/70688
7807         * testsuite/libgomp.oacc-c-c++-common/pr70688.c: New file.
7808
7809 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
7810
7811         * testsuite/libgomp.c/doacross-1.c (main): Use schedule(static)
7812         instead of invalid schedule(static, 0).
7813         * testsuite/libgomp.c/doacross-2.c (main): Likewise.
7814
7815 2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>
7816
7817         * oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter.
7818         * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Add 'int async'
7819         parameter, use to set async stream around call to gomp_unmap_vars,
7820         call gomp_unmap_vars() with 'do_copyfrom' set to true.
7821         * plugin/plugin-nvptx.c (struct ptx_event): Add 'int val' field.
7822         (event_gc): Adjust event handling loop, collect PTX_EVT_ASYNC_CLEANUP
7823         events and call GOMP_PLUGIN_async_unmap_vars() for each of them.
7824         (event_add): Add int parameter, initialize 'val' field when
7825         adding new ptx_event struct.
7826         (nvptx_evec): Adjust event_add() call arguments.
7827         (nvptx_host2dev): Likewise.
7828         (nvptx_dev2host): Likewise.
7829         (nvptx_wait_async): Likewise.
7830         (nvptx_wait_all_async): Likewise.
7831         (GOMP_OFFLOAD_openacc_register_async_cleanup): Add async parameter,
7832         pass to event_add() call.
7833         * oacc-host.c (host_openacc_register_async_cleanup): Add 'int async'
7834         parameter.
7835         * oacc-mem.c (gomp_acc_remove_pointer): Adjust async case to
7836         call openacc.register_async_cleanup_func() hook.
7837         * oacc-parallel.c (GOACC_parallel_keyed): Likewise.
7838         * target.c (gomp_copy_from_async): Delete function.
7839         (gomp_map_vars): Remove async_refcount.
7840         (gomp_unmap_vars): Likewise.
7841         (gomp_load_image_to_device): Likewise.
7842         (omp_target_associate_ptr): Likewise.
7843         * libgomp.h (struct splay_tree_key_s): Remove async_refcount.
7844         (acc_dispatch_t.register_async_cleanup_func): Add int parameter.
7845         (gomp_copy_from_async): Remove.
7846
7847 2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>
7848
7849         * target.c (gomp_device_copy): New function.
7850         (gomp_copy_host2dev): Likewise.
7851         (gomp_copy_dev2host): Likewise.
7852         (gomp_free_device_memory): Likewise.
7853         (gomp_map_vars_existing): Adjust to call gomp_copy_host2dev.
7854         (gomp_map_pointer): Likewise.
7855         (gomp_map_vars): Adjust to call gomp_copy_host2dev, handle
7856         NULL value from alloc_func plugin hook.
7857         (gomp_unmap_tgt): Adjust to call gomp_free_device_memory.
7858         (gomp_copy_from_async): Adjust to call gomp_copy_dev2host.
7859         (gomp_unmap_vars): Likewise.
7860         (gomp_update): Adjust to call gomp_copy_dev2host and
7861         gomp_copy_host2dev functions.
7862         (gomp_unload_image_from_device): Handle false value from
7863         unload_image_func plugin hook.
7864         (gomp_init_device): Handle false value from init_device_func
7865         plugin hook.
7866         (gomp_exit_data): Adjust to call gomp_copy_dev2host.
7867         (omp_target_free): Adjust to call gomp_free_device_memory.
7868         (omp_target_memcpy): Handle return values from host2dev_func,
7869         dev2host_func, and dev2dev_func plugin hooks.
7870         (omp_target_memcpy_rect_worker): Likewise.
7871         (gomp_target_fini): Handle false value from fini_device_func
7872         plugin hook.
7873         * libgomp.h (struct gomp_device_descr): Adjust return type of
7874         init_device_func, fini_device_func, unload_image_func, free_func,
7875         dev2host_func,host2dev_func, and dev2dev_func plugin hooks to 'bool'.
7876         * oacc-init.c (acc_shutdown_1): Handle false value from
7877         fini_device_func plugin hook.
7878         * oacc-host.c (host_init_device): Change return type to bool.
7879         (host_fini_device): Likewise.
7880         (host_unload_image): Likewise.
7881         (host_free): Likewise.
7882         (host_dev2host): Likewise.
7883         (host_host2dev): Likewise.
7884         * oacc-mem.c (acc_free): Handle plugin hook fatal error case.
7885         (acc_memcpy_to_device): Likewise.
7886         (acc_memcpy_from_device): Likewise.
7887         (delete_copyout): Add libfnname parameter, handle free_func
7888         hook fatal error case.
7889         (acc_delete): Adjust delete_copyout call.
7890         (acc_copyout): Likewise.
7891         (update_dev_host): Move gomp_mutex_unlock to after
7892         host2dev/dev2host hook calls.
7893
7894         * plugin/plugin-hsa.c (hsa_warn): Adjust 'hsa_error' local variable
7895         to 'hsa_error_msg', for clarity.
7896         (hsa_fatal): Likewise.
7897         (hsa_error): New function.
7898         (init_hsa_context): Change return type to bool, adjust to return
7899         false on error.
7900         (GOMP_OFFLOAD_get_num_devices): Adjust to handle init_hsa_context
7901         return value.
7902         (GOMP_OFFLOAD_init_device): Change return type to bool, adjust to
7903         return false on error.
7904         (get_agent_info): Adjust to return NULL on error.
7905         (destroy_hsa_program): Change return type to bool, adjust to
7906         return false on error.
7907         (GOMP_OFFLOAD_load_image): Adjust to return -1 on error.
7908         (destroy_module): Change return type to bool, adjust to
7909         return false on error.
7910         (GOMP_OFFLOAD_unload_image): Likewise.
7911         (GOMP_OFFLOAD_fini_device): Likewise.
7912         (GOMP_OFFLOAD_alloc): Change to return NULL when called.
7913         (GOMP_OFFLOAD_free): Change to return false when called.
7914         (GOMP_OFFLOAD_dev2host): Likewise.
7915         (GOMP_OFFLOAD_host2dev): Likewise.
7916         (GOMP_OFFLOAD_dev2dev): Likewise.
7917
7918         * plugin/plugin-nvptx.c (CUDA_CALL_ERET): New convenience macro.
7919         (CUDA_CALL): Likewise.
7920         (CUDA_CALL_ASSERT): Likewise.
7921         (map_init): Change return type to bool, use CUDA_CALL* macros.
7922         (map_fini): Likewise.
7923         (init_streams_for_device): Change return type to bool, adjust
7924         call to map_init.
7925         (fini_streams_for_device): Change return type to bool, adjust
7926         call to map_fini.
7927         (select_stream_for_async): Release stream_lock before calls to
7928         GOMP_PLUGIN_fatal, adjust call to map_init.
7929         (nvptx_init): Use CUDA_CALL* macros.
7930         (nvptx_attach_host_thread_to_device): Change return type to bool,
7931         use CUDA_CALL* macros.
7932         (nvptx_open_device): Use CUDA_CALL* macros.
7933         (nvptx_close_device): Change return type to bool, use CUDA_CALL*
7934         macros.
7935         (nvptx_get_num_devices): Use CUDA_CALL* macros.
7936         (link_ptx): Change return type to bool, use CUDA_CALL* macros.
7937         (nvptx_exec): Use CUDA_CALL* macros.
7938         (nvptx_alloc): Use CUDA_CALL* macros.
7939         (nvptx_free): Change return type to bool, use CUDA_CALL* macros.
7940         (nvptx_host2dev): Likewise.
7941         (nvptx_dev2host): Likewise.
7942         (nvptx_wait): Use CUDA_CALL* macros.
7943         (nvptx_wait_async): Likewise.
7944         (nvptx_wait_all): Likewise.
7945         (nvptx_wait_all_async): Likewise.
7946         (nvptx_set_cuda_stream): Adjust order of stream_lock acquire,
7947         use CUDA_CALL* macros, adjust call to map_fini.
7948         (GOMP_OFFLOAD_init_device): Change return type to bool,
7949         adjust code accordingly.
7950         (GOMP_OFFLOAD_fini_device): Likewise.
7951         (GOMP_OFFLOAD_load_image): Adjust calls to
7952         nvptx_attach_host_thread_to_device/link_ptx to handle errors,
7953         use CUDA_CALL* macros.
7954         (GOMP_OFFLOAD_unload_image): Change return type to bool, adjust
7955         return code.
7956         (GOMP_OFFLOAD_alloc): Adjust calls to code to handle error return.
7957         (GOMP_OFFLOAD_free): Change return type to bool, adjust calls to
7958         handle error return.
7959         (GOMP_OFFLOAD_dev2host): Likewise.
7960         (GOMP_OFFLOAD_host2dev): Likewise.
7961         (GOMP_OFFLOAD_openacc_register_async_cleanup): Use CUDA_CALL* macros.
7962         (GOMP_OFFLOAD_openacc_create_thread_data): Likewise.
7963
7964 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
7965
7966         * oacc-mem.c (acc_malloc): Update handling of shared-memory targets.
7967         (acc_free): Likewise.
7968         (acc_memcpy_to_device): Likewise.
7969         (acc_memcpy_from_device): Likewise.
7970         (acc_deviceptr): Likewise.
7971         (acc_hostptr): Likewise.
7972         (acc_is_present): Likewise.
7973         (acc_map_data): Likewise.
7974         (acc_unmap_data): Likewise.
7975         (present_create_copy): Likewise.
7976         (delete_copyout): Likewise.
7977         (update_dev_host): Likewise.
7978         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Remove xfail.
7979         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: New test.
7980         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Adjust test.
7981         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
7982         * testsuite/libgomp.oacc-c-c++-common/enter_exit-lib.c: New test.
7983         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Adjust test so that
7984         it only runs on nvptx targets.
7985         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
7986         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
7987         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
7988         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
7989         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
7990         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
7991         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
7992         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
7993         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
7994         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
7995         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
7996         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
7997         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
7998         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
7999         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
8000         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
8001         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
8002         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
8003         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
8004         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
8005         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
8006         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
8007         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
8008
8009 2016-05-23  Martin Jambor  <mjambor@suse.cz>
8010
8011         * testsuite/libgomp.hsa.c/switch-sbr-2.c: New test.
8012
8013 2016-05-17  Chung-Lin Tang  <cltang@codesourcery.com>
8014
8015         * oacc-init.c (acc_init): Remove !cached_base_dev condition on call
8016         to gomp_init_targets_once.
8017         (acc_set_device_type): Remove !cached_base_dev condition on call to
8018         gomp_init_targets_once, move call to before acc_device_lock acquire,
8019         to avoid deadlock.
8020         (acc_get_device_num): Remove !cached_base_dev condition on call to
8021         gomp_init_targets_once.
8022         (acc_set_device_num): Likewise.
8023
8024 2016-05-16  Martin Jambor  <mjambor@suse.cz>
8025
8026         * testsuite/libgomp.hsa.c/complex-align-2.c: New test.
8027
8028 2016-05-02  Nathan Sidwell  <nathan@codesourcery.com>
8029
8030         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust
8031         expected partitioning.
8032
8033 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
8034
8035         PR middle-end/70626
8036         * testsuite/libgomp.oacc-c++/template-reduction.C: Adjust test.
8037         * testsuite/libgomp.oacc-c-c++-common/combined-reduction.c: New test.
8038         * testsuite/libgomp.oacc-fortran/combined-reduction.f90: New test.
8039
8040 2016-04-21  Alexander Monakov  <amonakov@ispras.ru>
8041
8042         * plugin/plugin-nvptx.c (map_fini): Make cuMemFreeHost error
8043         non-fatal.
8044
8045 2016-04-19  Jakub Jelinek  <jakub@redhat.com>
8046
8047         PR middle-end/70680
8048         * testsuite/libgomp.c/pr70680-1.c: New test.
8049         * testsuite/libgomp.c/pr70680-2.c: New test.
8050
8051 2016-04-14  Cesar Philippidis  <cesar@codesourcery.com>
8052
8053         * testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Don't
8054         pass parameter variables to subroutines.
8055
8056 2016-04-14  Cesar Philippidis  <cesar@codesourcery.com>
8057
8058         PR middle-end/70643
8059         * testsuite/libgomp.oacc-fortran/pr70643.f90: New test.
8060
8061 2016-04-13  Cesar Philippidis  <cesar@codesourcery.com>
8062
8063         PR testsuite/68242
8064         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Adjust test.
8065         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
8066
8067 2016-04-12  Thomas Schwinge  <thomas@codesourcery.com>
8068
8069         * libgomp_g.h: Rename GOACC_parallel_keyd prototype to
8070         GOACC_parallel_keyed, restore GOACC_parallel prototype, new
8071         GOACC_declare prototype.
8072
8073         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c:
8074         Merge this file, and...
8075         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gv-np-1.c:
8076         ... this file, and...
8077         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c:
8078         ... this file, and...
8079         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c:
8080         ... this file, and...
8081         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c:
8082         ... this file, and...
8083         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c:
8084         ... this file, and...
8085         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c:
8086         ... this file, and...
8087         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c:
8088         ... this file, and...
8089         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c:
8090         ... this file, and...
8091         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c:
8092         ... this file, and...
8093         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c:
8094         ... this file, and...
8095         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c:
8096         ... this file, and...
8097         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c:
8098         ... this file into...
8099         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: ... this
8100         file.
8101
8102         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c:
8103         Make failure observable.
8104
8105 2016-04-12  Jakub Jelinek  <jakub@redhat.com>
8106
8107         * libgomp.h (struct gomp_target_task): Remove firstprivate_copies
8108         field.
8109         * target.c (gomp_target_fallback_firstprivate,
8110         gomp_target_unshare_firstprivate): Removed.
8111         (GOMP_target_ext): Copy firstprivate vars into gomp_allocaed memory
8112         before waiting for dependencies.
8113         (gomp_target_task_fn): Don't copy firstprivate vars here.
8114         * task.c (GOMP_PLUGIN_target_task_completion): Don't free
8115         firstprivate_copies here.
8116         (gomp_create_target_task): Don't initialize firstprivate_copies field.
8117         * testsuite/libgomp.c/target-25.c (main): Use map (to:) instead of
8118         explicit/implicit firstprivate.
8119
8120 2016-04-08  Cesar Philippidis  <cesar@codesourcery.com>
8121
8122         PR lto/70289
8123         PR ipa/70348
8124         PR tree-optimization/70373
8125         PR middle-end/70533
8126         PR middle-end/70534
8127         PR middle-end/70535
8128         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c: New
8129         test.
8130         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c: New
8131         test.
8132         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c: New
8133         test.
8134         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c: New
8135         test.
8136         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c: New
8137         test.
8138         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c: New
8139         test.
8140         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c: New
8141         test.
8142         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c: New
8143         test.
8144         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c: New
8145         test.
8146         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c: New test.
8147         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c: New test.
8148         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c: New test.
8149         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c: New
8150         test.
8151         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c: New
8152         test.
8153         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c: New
8154         test.
8155         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c: New
8156         test.
8157         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Add test
8158         coverage.
8159         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
8160         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
8161         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: New test.
8162         * testsuite/libgomp.oacc-c-c++-common/pr70289.c: New test.
8163         * testsuite/libgomp.oacc-c-c++-common/pr70373.c: New test.
8164         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Add test
8165         coverage.
8166         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
8167         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
8168         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
8169         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
8170         * testsuite/libgomp.oacc-c-c++-common/reduction-6.c: New test.
8171         * testsuite/libgomp.oacc-c-c++-common/reduction.h: New test.
8172         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: New test.
8173         * testsuite/libgomp.oacc-fortran/pr70289.f90: New test.
8174         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Add test coverage.
8175         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
8176         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
8177         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
8178         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
8179         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
8180         * testsuite/libgomp.oacc-fortran/reduction-7.f90: New test.
8181
8182 2016-03-30  Thomas Schwinge  <thomas@codesourcery.com>
8183             James Norris  <jnorris@codesourcery.com>
8184             Nathan Sidwell  <nathan@codesourcery.com>
8185             Julian Brown  <julian@codesourcery.com>
8186             Cesar Philippidis  <cesar@codesourcery.com>
8187             Chung-Lin Tang  <cltang@codesourcery.com>
8188             Tom de Vries  <tom@codesourcery.com>
8189
8190         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Update.
8191         * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
8192         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
8193         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Likewise.
8194         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
8195         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
8196         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
8197         * testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise.
8198         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
8199         XFAIL.
8200         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Update.
8201         Incorporate...
8202         * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: ... this
8203         file.
8204         * testsuite/libgomp.oacc-c++/template-reduction.C: New file.
8205         * testsuite/libgomp.oacc-c-c++-common/gang-static-1.c: Likewise.
8206         * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Likewise.
8207         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-clauses.c:
8208         Likewise.
8209         * testsuite/libgomp.oacc-c-c++-common/private-variables.c:
8210         Likewise.
8211         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
8212         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Likewise.
8213         * testsuite/libgomp.oacc-c-c++-common/routine-4.c: Likewise.
8214         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise.
8215         * testsuite/libgomp.oacc-fortran/clauses-1.f90: Likewise.
8216         * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
8217         * testsuite/libgomp.oacc-fortran/firstprivate-1.f90: Likewise.
8218         * testsuite/libgomp.oacc-fortran/gang-static-1.f90: Likewise.
8219         * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
8220         * testsuite/libgomp.oacc-fortran/implicit-firstprivate-ref.f90:
8221         Likewise.
8222         * testsuite/libgomp.oacc-fortran/pr68813.f90: Likewise.
8223         * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
8224         * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Merge this
8225         file...
8226         * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: ..., and this
8227         file into...
8228         * testsuite/libgomp.oacc-c-c++-common/data-clauses.h: ... this new
8229         file.  Update.
8230         * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels.c: New
8231         file.
8232         * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel.c:
8233         Likewise.
8234         * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: Rename to...
8235         * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c:
8236         ... this new file.  Update.
8237         * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: Rename to...
8238         * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c:
8239         ... this new file.  Update.
8240         * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: New
8241         file.  Incorporate...
8242         * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c: ... this
8243         file, and...
8244         * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: ... this
8245         file, and...
8246         * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: ... this
8247         file.
8248         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Remove file.
8249
8250 2016-03-29  Thomas Schwinge  <thomas@codesourcery.com>
8251
8252         * testsuite/libgomp.oacc-c++/c++.exp [!lang_test_file_found]: Call
8253         set-torture-options.
8254
8255 2016-03-24  Thomas Schwinge  <thomas@codesourcery.com>
8256
8257         * testsuite/libgomp.oacc-c++/c++.exp: Set up torture testing, use
8258         gcc-dg-runtest.
8259         * testsuite/libgomp.oacc-c/c.exp: Likewise.
8260         * testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: Specify
8261         -fno-builtin-acc_on_device instead of -O0.
8262         * testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: Skip for
8263         -O0.
8264         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
8265         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c:
8266         Likewise.
8267         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
8268         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
8269         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
8270         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
8271         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
8272         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
8273         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
8274         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
8275         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
8276         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
8277         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
8278         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
8279         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
8280         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise.
8281         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise.
8282         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
8283         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise.
8284         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-2.c:
8285         Don't specify -O2.
8286         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-3.c:
8287         Likewise.
8288         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta.c:
8289         Likewise.
8290
8291 2016-03-24  Martin Liska  <mliska@suse.cz>
8292
8293         * plugin/plugin-hsa.c (packet_store_release): New function
8294         that is taken from the HSA runtime manual.
8295         (GOMP_OFFLOAD_run): Use the function.
8296
8297 2016-03-23  Jakub Jelinek  <jakub@redhat.com>
8298
8299         PR c++/70376
8300         * testsuite/libgomp.c++/pr70376.C: New test.
8301
8302 2016-03-23  Tom de Vries  <tom@codesourcery.com>
8303
8304         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Add missing
8305         initialization of lresult and lvresult.
8306         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Same.
8307
8308 2016-03-23  James Norris  <jnorris@codesourcery.com>
8309             Daichi Fukuoka <dc-fukuoka@sgi.com>
8310
8311         PR libgomp/69414
8312         * oacc-mem.c (delete_copyout, update_dev_host): Fix device address.
8313         * testsuite/libgomp.oacc-c-c++-common/update-1.c: Additional tests.
8314         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
8315         * testsuite/libgomp.oacc-fortran/update-1.f90: New file.
8316
8317 2016-03-23  Martin Liska  <mliska@suse.cz>
8318
8319         PR hsa/70337
8320         * plugin/plugin-hsa.c (GOMP_OFFLOAD_run): Copy shadow
8321         argument just in case a dispatched kernel uses that argument.
8322
8323 2016-03-16  Thomas Schwinge  <thomas@codesourcery.com>
8324
8325         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Adjust to
8326         -ftree-parallelize-loops/-fopenacc changes.
8327         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95:
8328         Likewise.
8329         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95:
8330         Likewise.
8331         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95:
8332         Likewise.
8333         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95:
8334         Likewise.
8335         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Likewise.
8336         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Likewise.
8337
8338 2016-03-13  Thomas Schwinge  <thomas@codesourcery.com>
8339
8340         * testsuite/lib/libgomp.exp (libgomp_init): Potentially append to
8341         always_ld_library_path the path to libgcc_s.
8342
8343 2016-03-10  Cesar Philippidis  <cesar@codesourcery.com>
8344
8345         PR testsuite/70009
8346         * testsuite/libgomp.oacc-c-c++-common/vprop.c: Make test data signed.
8347
8348 2016-03-09  Tom de Vries  <tom@codesourcery.com>
8349
8350         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: New test.
8351         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95: Same.
8352         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95:
8353         Same.
8354         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95: Same.
8355         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95: Same.
8356         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Same.
8357         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Same.
8358
8359 2016-03-07  Martin Jambor  <mjambor@suse.cz>
8360
8361         * testsuite/lib/libgomp.exp
8362         (check_effective_target_hsa_offloading_selected_nocache): New.
8363         (check_effective_target_hsa_offloading_selected): Likewise.
8364         * testsuite/libgomp.hsa.c/c.exp: Likewise.
8365         * testsuite/libgomp.hsa.c/alloca-1.c: Likewise.
8366         * testsuite/libgomp.hsa.c/bitfield-1.c: Likewise.
8367         * testsuite/libgomp.hsa.c/builtins-1.c: Likewise.
8368         * testsuite/libgomp.hsa.c/complex-1.c: Likewise.
8369         * testsuite/libgomp.hsa.c/formal-actual-args-1.c: Likewise.
8370         * testsuite/libgomp.hsa.c/function-call-1.c: Likewise.
8371         * testsuite/libgomp.hsa.c/get-level-1.c: Likewise.
8372         * testsuite/libgomp.hsa.c/gridify-1.c: Likewise.
8373         * testsuite/libgomp.hsa.c/gridify-2.c: Likewise.
8374         * testsuite/libgomp.hsa.c/gridify-3.c: Likewise.
8375         * testsuite/libgomp.hsa.c/gridify-4.c: Likewise.
8376         * testsuite/libgomp.hsa.c/memory-operations-1.c: Likewise.
8377         * testsuite/libgomp.hsa.c/pr69568.c: Likewise.
8378         * testsuite/libgomp.hsa.c/rotate-1.c: Likewise.
8379         * testsuite/libgomp.hsa.c/switch-1.c: Likewise.
8380         * testsuite/libgomp.hsa.c/switch-branch-1.c: Likewise.
8381
8382 2016-03-07  Martin Jambor  <mjambor@suse.cz>
8383
8384         * testsuite/libgomp.c/examples-4/async_target-2.c: Only run on
8385         non-shared memory accelerators.
8386         * testsuite/libgomp.c/examples-4/device-1.c: Likewise.
8387         * testsuite/libgomp.c/examples-4/target-5.c: Likewise.
8388         * testsuite/libgomp.c/examples-4/target_data-6.c: Likewise.
8389         * testsuite/libgomp.c/examples-4/target_data-7.c: Likewise.
8390         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: Likewise.
8391         * testsuite/libgomp.fortran/examples-4/device-1.f90: Likewise.
8392         * testsuite/libgomp.fortran/examples-4/target-5.f90: Likewise.
8393         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: Likewise.
8394         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: Likewise.
8395
8396 2016-03-07  Martin Jambor  <mjambor@suse.cz>
8397
8398         * testsuite/lib/libgomp.exp (libgomp_init): Append -Wno-hsa to
8399         ALWAYS_CFLAGS.
8400
8401 2016-03-02  Jakub Jelinek  <jakub@redhat.com>
8402
8403         PR libgomp/69555
8404         * testsuite/libgomp.c++/pr69555-1.C: New test.
8405         * testsuite/libgomp.c++/pr69555-2.C: New test.
8406
8407 2016-02-26  Keith McDaniel <k.allen.mcdaniel@gmail.com>
8408             Martin Jambor  <mjambor@suse.cz>
8409
8410         * testsuite/lib/libgomp.exp
8411         (check_effective_target_offload_device_shared_as): New proc.
8412         * testsuite/libgomp.c++/declare_target-1.C: New test.
8413
8414 2016-02-25  Ilya Verbin  <ilya.verbin@intel.com>
8415
8416         PR driver/68463
8417         * testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: Remove.
8418
8419 2016-02-23  Thomas Schwinge  <thomas@codesourcery.com>
8420
8421         * oacc-parallel.c (GOACC_parallel_keyed): Initialize dims.
8422         * plugin/plugin-nvptx.c (nvptx_exec): Provide default values for
8423         dims.
8424         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Adjust to
8425         -ftree-parallelize-loops/-fopenacc changes.
8426         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Likewise.
8427         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c:
8428         Likewise.
8429         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c:
8430         Likewise.
8431         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c:
8432         Likewise.
8433         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c:
8434         Likewise.
8435         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c:
8436         Likewise.
8437         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c:
8438         Likewise.
8439         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c:
8440         Likewise.
8441         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Likewise.
8442         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c:
8443         Likewise.
8444         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Likewise.
8445         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c:
8446         Likewise.
8447         * testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Likewise.
8448         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c:
8449         Likewise.
8450
8451 2016-02-22  Cesar Philippidis  <cesar@codesourcery.com>
8452
8453         * testsuite/libgomp.oacc-c-c++-common/vprop.c: New test.
8454
8455 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
8456
8457         PR driver/69805
8458         * testsuite/libgomp.c/pr69805.c: New test.
8459
8460 2016-02-16  Tom de Vries  <tom@codesourcery.com>
8461
8462         PR lto/67709
8463         * testsuite/libgomp.fortran/declare-simd-4.f90: New test.
8464
8465 2016-02-09  Tom de Vries  <tom@codesourcery.com>
8466
8467         PR tree-optimization/69599
8468         * testsuite/libgomp.c/omp-nested-3.c: New test.
8469         * testsuite/libgomp.c/pr46032-2.c: New test.
8470         * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: New test.
8471         * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: New test.
8472
8473 2016-02-09  Tom de Vries  <tom@codesourcery.com>
8474
8475         PR lto/69707
8476         * testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: New test.
8477
8478 2016-02-02  Alexander Monakov  <amonakov@ispras.ru>
8479
8480         * testsuite/libgomp.c/target-31.c: Fix testcase.
8481
8482 2016-02-02  Alexander Monakov  <amonakov@ispras.ru>
8483
8484         * testsuite/libgomp.c/examples-4/teams-3.c: Add missing reduction
8485         clause.
8486         * testsuite/libgomp.c/examples-4/teams-4.c: Likewise.
8487         * testsuite/libgomp.fortran/examples-4/teams-3.f90: Add missing
8488         reduction and map clauses.
8489         * testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise.
8490
8491 2016-02-02  James Norris  <jnorris@codesourcery.com>
8492
8493         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Fix clause.
8494
8495 2016-02-02  Thomas Schwinge  <thomas@codesourcery.com>
8496
8497         * libgomp.map (GOACC_2.0): Remove GOACC_host_data.
8498         * oacc-parallel.c (GOACC_host_data): Remove function definition.
8499
8500         * testsuite/lib/libgomp.exp: Skip hsa offloading for OpenACC test
8501         cases.
8502
8503         * plugin/configfrag.ac (HSA_KMT_LIB, HSA_KMT_LDFLAGS): New
8504         variables.
8505         * testsuite/libgomp-test-support.exp.in (hsa_runtime_lib)
8506         (hsa_kmt_lib): Set variables.
8507         * testsuite/lib/libgomp.exp (libgomp_init): Use them to amend
8508         always_ld_library_path.
8509         * Makefile.in: Regenerate.
8510         * configure: Likewise.
8511         * testsuite/Makefile.in: Likewise.
8512
8513         * plugin/configfrag.ac (offload_additional_options)
8514         (offload_additional_lib_paths): Don't amend for hsa offloading.
8515         * configure: Regenerate.
8516
8517         * plugin/configfrag.ac: Don't configure for offloading target if
8518         we don't build the corresponding plugin.
8519         * configure: Regenerate.
8520
8521 2016-02-01  Nathan Sidwell  <nathan@codesourcery.com>
8522
8523         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: New.
8524         * testsuite/libgomp.oacc-fortran/routine-7.f90: Serialize loop.
8525
8526 2016-01-26  Tom de Vries  <tom@codesourcery.com>
8527
8528         PR tree-optimization/69110
8529         * testsuite/libgomp.c/pr69110.c: New test.
8530
8531 2016-01-25  Richard Biener  <rguenther@suse.de>
8532
8533         PR lto/69393
8534         * testsuite/libgomp.c++/pr69393.C: New testcase.
8535
8536 2016-01-22  Ilya Verbin  <ilya.verbin@intel.com>
8537
8538         * target.c (gomp_get_target_fn_addr): Allow host fallback if target
8539         function wasn't mapped to the device with non-shared memory.
8540
8541 2016-01-20  Ilya Verbin  <ilya.verbin@intel.com>
8542
8543         * task.c (gomp_create_target_task): Set firstprivate_copies to NULL.
8544
8545 2016-01-19  Martin Jambor  <mjambor@suse.cz>
8546             Martin Liska  <mliska@suse.cz>
8547
8548         * plugin/Makefrag.am: Add HSA plugin requirements.
8549         * plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable.
8550         (HSA_RUNTIME_LIB): Likewise.
8551         (HSA_RUNTIME_CPPFLAGS): Likewise.
8552         (HSA_RUNTIME_INCLUDE): New substitution.
8553         (HSA_RUNTIME_LIB): Likewise.
8554         (HSA_RUNTIME_LDFLAGS): Likewise.
8555         (hsa-runtime): New configure option.
8556         (hsa-runtime-include): Likewise.
8557         (hsa-runtime-lib): Likewise.
8558         (PLUGIN_HSA): New substitution variable.
8559         Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new
8560         configure options.
8561         (PLUGIN_HSA_CPPFLAGS): Likewise.
8562         (PLUGIN_HSA_LDFLAGS): Likewise.
8563         (PLUGIN_HSA_LIBS): Likewise.
8564         Check that we have access to HSA run-time.
8565         * libgomp-plugin.h (offload_target_type): New element
8566         OFFLOAD_TARGET_TYPE_HSA.
8567         * libgomp.h (gomp_target_task): New fields firstprivate_copies and
8568         args.
8569         (bool gomp_create_target_task): Updated.
8570         (gomp_device_descr): Extra parameter of run_func and async_run_func,
8571         new field can_run_func.
8572         * libgomp_g.h (GOMP_target_ext): Update prototype.
8573         * oacc-host.c (host_run): Added a new parameter args.
8574         * target.c (calculate_firstprivate_requirements): New function.
8575         (copy_firstprivate_data): Likewise.
8576         (gomp_target_fallback_firstprivate): Use them.
8577         (gomp_target_unshare_firstprivate): New function.
8578         (gomp_get_target_fn_addr): Allow returning NULL for shared memory
8579         devices.
8580         (GOMP_target): Do host fallback for all shared memory devices.  Do not
8581         pass any args to plugins.
8582         (GOMP_target_ext): Introduce device-specific argument parameter args.
8583         Allow host fallback if device shares memory.  Do not remap data if
8584         device has shared memory.
8585         (gomp_target_task_fn): Likewise.  Also treat shared memory devices
8586         like host fallback for mappings.
8587         (GOMP_target_data): Treat shared memory devices like host fallback.
8588         (GOMP_target_data_ext): Likewise.
8589         (GOMP_target_update): Likewise.
8590         (GOMP_target_update_ext): Likewise.  Also pass NULL as args to
8591         gomp_create_target_task.
8592         (GOMP_target_enter_exit_data): Likewise.
8593         (omp_target_alloc): Treat shared memory devices like host fallback.
8594         (omp_target_free): Likewise.
8595         (omp_target_is_present): Likewise.
8596         (omp_target_memcpy): Likewise.
8597         (omp_target_memcpy_rect): Likewise.
8598         (omp_target_associate_ptr): Likewise.
8599         (gomp_load_plugin_for_device): Also load can_run.
8600         * task.c (GOMP_PLUGIN_target_task_completion): Free
8601         firstprivate_copies.
8602         (gomp_create_target_task): Accept new argument args and store it to
8603         ttask.
8604         * plugin/plugin-hsa.c: New file.
8605
8606 2016-01-18  Tom de Vries  <tom@codesourcery.com>
8607
8608         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: New test.
8609         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Same.
8610         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c: Same.
8611         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c: Same.
8612         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c: Same.
8613         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c: Same.
8614         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c: Same.
8615         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c: Same.
8616         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c: Same.
8617         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-2.c: Same.
8618         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit-2.c:
8619         Same.
8620         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit.c:
8621         Same.
8622         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-update.c: Same.
8623         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data.c: Same.
8624         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Same.
8625         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c: Same.
8626         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Same.
8627         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c: Same.
8628         * testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Same.
8629         * testsuite/libgomp.oacc-c-c++-common/kernels-parallel-loop-data-enter-exit.c:
8630         Same.
8631         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c: Same.
8632
8633 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
8634
8635         * task.c (GOMP_PLUGIN_target_task_completion): Add missing return.
8636
8637 2016-01-15  Cesar Philippidis  <cesar@codesourcery.com>
8638
8639         * testsuite/libgomp.oacc-fortran/kernels-data.f90: New test.
8640
8641 2016-01-12  James Norris  <jnorris@codesourcery.com>
8642
8643         * libgomp.texi: Updates for OpenACC.
8644
8645 2016-01-11  Alexander Monakov  <amonakov@ispras.ru>
8646
8647         * plugin/plugin-nvptx.c (link_ptx): Do not set CU_JIT_TARGET.
8648
8649 2016-01-07  H.J. Lu  <hongjiu.lu@intel.com>
8650
8651         PR fortran/66680
8652         * testsuite/libgomp.fortran/pr66680.f90: New test.
8653
8654 2016-01-07  Jakub Jelinek  <jakub@redhat.com>
8655
8656         PR middle-end/68960
8657         * testsuite/libgomp.c/pr68960.c: New test.
8658
8659 2016-01-06  Nathan Sidwell  <nathan@acm.org>
8660
8661         * openacc.h (acc_on_device): Add routine pragma for C++ wrapper.
8662         * testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: New.
8663
8664 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
8665
8666         Update copyright years.
8667
8668         * libgomp.texi: Bump @copying's copyright year.
8669
8670 2015-12-31  Nathan Sidwell  <nathan@acm.org>
8671
8672         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Correct
8673         dg-additional-options syntax.
8674         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
8675         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
8676         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise.
8677         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
8678         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise.
8679         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
8680         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
8681         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
8682         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
8683         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise.
8684         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
8685         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
8686         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
8687         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise.
8688         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
8689         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
8690         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
8691         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
8692
8693 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
8694
8695         * libgomp.h (REFCOUNT_LINK): Define.
8696         (struct splay_tree_key_s): Add link_key.
8697         * target.c (gomp_map_vars): Treat REFCOUNT_LINK objects as not mapped.
8698         Replace target address of the pointer with target address of newly
8699         mapped object in the splay tree.  Set link pointer on target to the
8700         device address of the mapped object.
8701         (gomp_unmap_vars): Restore target address of the pointer in the splay
8702         tree for REFCOUNT_LINK objects after unmapping.
8703         (gomp_load_image_to_device): Set refcount to REFCOUNT_LINK for "omp
8704         declare target link" objects.
8705         (gomp_unload_image_from_device): Replace j with i.  Force unmap of all
8706         "omp declare target link" objects, which were mapped for the image.
8707         (gomp_exit_data): Restore target address of the pointer in the splay
8708         tree for REFCOUNT_LINK objects after unmapping.
8709         * testsuite/libgomp.c/target-link-1.c: New file.
8710
8711 2015-12-14  Ilya Verbin  <ilya.verbin@intel.com>
8712
8713         * libgomp.h (gomp_device_state): New enum.
8714         (struct gomp_device_descr): Replace is_initialized with state.
8715         (gomp_fini_device): Remove declaration.
8716         * oacc-host.c (host_dispatch): Use state instead of is_initialized.
8717         * oacc-init.c (acc_init_1): Use state instead of is_initialized.
8718         (acc_shutdown_1): Likewise.  Inline gomp_fini_device.
8719         (acc_set_device_type): Use state instead of is_initialized.
8720         (acc_set_device_num): Likewise.
8721         * target.c (resolve_device): Use state instead of is_initialized.
8722         Do not initialize finalized device.
8723         (gomp_map_vars): Do nothing if device is finalized.
8724         (gomp_unmap_vars): Likewise.
8725         (gomp_update): Likewise.
8726         (GOMP_offload_register_ver): Use state instead of is_initialized.
8727         (GOMP_offload_unregister_ver): Likewise.
8728         (gomp_init_device): Likewise.
8729         (gomp_unload_device): Likewise.
8730         (gomp_fini_device): Remove.
8731         (gomp_get_target_fn_addr): Do nothing if device is finalized.
8732         (GOMP_target): Go to host fallback if device is finalized.
8733         (GOMP_target_ext): Likewise.
8734         (gomp_exit_data): Do nothing if device is finalized.
8735         (gomp_target_task_fn): Go to host fallback if device is finalized.
8736         (gomp_target_fini): New static function.
8737         (gomp_target_init): Use state instead of is_initialized.
8738         Call gomp_target_fini at exit.
8739
8740 2015-12-09  Tom de Vries  <tom@codesourcery.com>
8741
8742         PR tree-optimization/68716
8743         * testsuite/libgomp.c/omp-nested-2.c: New test.
8744
8745 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
8746
8747         * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: Restrict to
8748         target openacc_nvidia_accel_selected.
8749         * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: Likewise.
8750         * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: Likewise.
8751         * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: Remove file.
8752         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: Remove file.
8753
8754 2015-12-01  Julian Brown  <julian@codesourcery.com>
8755             James Norris  <James_Norris@mentor.com>
8756
8757         * oacc-parallel.c (GOACC_host_data): New function.
8758         * libgomp.map (GOACC_host_data): Add to GOACC_2.0.1.
8759         * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: New test.
8760         * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: New test.
8761         * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: New test.
8762         * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: New test.
8763         * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: New test.
8764         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: New test.
8765
8766 2015-11-30  James Norris  <jnorris@codesourcery.com>
8767             Cesar Philippidis  <cesar@codesourcery.com>
8768
8769         libgomp/
8770         * libgomp.oacc-fortran/routine-5.f90: New test.
8771         * libgomp.oacc-fortran/routine-7.f90: New test.
8772         * libgomp.oacc-fortran/routine-9.f90: New test.
8773
8774 2015-11-30  Tom de Vries  <tom@codesourcery.com>
8775
8776         PR tree-optimization/46032
8777         * testsuite/libgomp.c/pr46032.c: New test.
8778
8779 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
8780
8781         PR libgomp/68579
8782         * task.c (gomp_task_run_post_handle_depend_hash): New forward decl.
8783         (gomp_create_target_task): Call it before freeing
8784         GOMP_TARGET_TASK_DATA tasks.
8785
8786         PR c/63326
8787         * testsuite/libgomp.c/cancel-parallel-2.c (foo): Add semicolon
8788         in between case label and OpenMP standalone directives.
8789         * testsuite/libgomp.c++/cancel-parallel-2.C (foo): Likewise.
8790
8791 2015-11-26  David Edelsohn  <dje.gcc@gmail.com>
8792
8793         * configure: Regenerate.
8794
8795 2015-11-26  Jakub Jelinek  <jakub@redhat.com>
8796
8797         * testsuite/libgomp.c/target-35.c: New test.
8798
8799 2015-11-22  James Norris  <jnorris@codesourcery.com>
8800             Cesar Philippidis  <cesar@codesourcery.com>
8801
8802         * testsuite/libgomp.oacc-fortran/declare-1.f90: New test.
8803         * testsuite/libgomp.oacc-fortran/declare-2.f90: Likewise.
8804         * testsuite/libgomp.oacc-fortran/declare-3.f90: Likewise.
8805         * testsuite/libgomp.oacc-fortran/declare-4.f90: Likewise.
8806         * testsuite/libgomp.oacc-fortran/declare-5.f90: Likewise.
8807
8808 2015-11-20  Jakub Jelinek  <jakub@redhat.com>
8809
8810         PR middle-end/68221
8811         * testsuite/libgomp.c/reduction-11.c: Remove xfail.
8812         * testsuite/libgomp.c/reduction-12.c: Likewise.
8813         * testsuite/libgomp.c++/reduction-11.C: Likewise.
8814         * testsuite/libgomp.c++/reduction-12.C: Likewise.
8815
8816 2015-11-19  Nathan Sidwell  <nathan@codesourcery.com>
8817
8818         * libgomp.oacc-c-c++-common/reduction-dbl.c: New.
8819         * libgomp.oacc-c-c++-common/reduction-flt.c: New.
8820         * libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Use typedef.
8821         * libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Use typedef.
8822         * libgomp.oacc-c-c++-common/reduction-2.c: Uncomment broken tests
8823         and fix.
8824         * libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
8825         * libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
8826
8827 2015-11-18  Nathan Sidwell  <nathan@codesourcery.com>
8828
8829         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Add
8830         worker & gang cases.
8831         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.
8832
8833 2015-11-17  Cesar Philippidis  <cesar@codesourcery.com>
8834
8835         * config/nvptx/priority_queue.c: New file.
8836
8837 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
8838
8839         * libgomp.texi: Update references from OpenMP 4.0 to OpenMP 4.5
8840         sections.
8841
8842 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
8843             Aldy Hernandez  <aldyh@redhat.com>
8844             Ilya Verbin  <ilya.verbin@intel.com>
8845
8846         * ordered.c (gomp_doacross_init, GOMP_doacross_post,
8847         GOMP_doacross_wait, gomp_doacross_ull_init, GOMP_doacross_ull_post,
8848         GOMP_doacross_ull_wait): For GFS_GUIDED don't divide number of
8849         iterators or IV by chunk size.
8850         * parallel.c (gomp_resolve_num_threads): Don't assume that
8851         if thr->ts.team is non-NULL, then pool must be non-NULL.
8852         * libgomp-plugin.h (GOMP_PLUGIN_target_task_completion): Declare.
8853         * libgomp.map (GOMP_PLUGIN_1.1): New symbol version, export
8854         GOMP_PLUGIN_target_task_completion.
8855         * Makefile.am (libgomp_la_SOURCES): Add priority_queue.c.
8856         * Makefile.in: Regenerate.
8857         * libgomp.h: Shuffle prototypes and forward definitions around so
8858         priority queues can be defined.
8859         (enum gomp_task_kind): Add GOMP_TASK_ASYNC_RUNNING.
8860         (enum gomp_target_task_state): New enum.
8861         (struct gomp_target_task): Add state, tgt, task and team fields.
8862         (gomp_create_target_task): Change return type to bool, add
8863         state argument.
8864         (gomp_target_task_fn): Change return type to bool.
8865         (struct gomp_device_descr): Add async_run_func.
8866         (struct gomp_task): Remove children, next_child, prev_child,
8867         next_queue, prev_queue, next_taskgroup, prev_taskgroup.
8868         Add pnode field.
8869         (struct gomp_taskgroup): Remove children.
8870         Add taskgroup_queue.
8871         (struct gomp_team): Change task_queue type to a priority queue.
8872         (splay_compare): Define inline.
8873         (priority_queue_offset): New.
8874         (priority_node_to_task): New.
8875         (task_to_priority_node): New.
8876         * oacc-mem.c: Do not include splay-tree.h.
8877         * priority_queue.c: New file.
8878         * priority_queue.h: New file.
8879         * splay-tree.c: Do not include splay-tree.h.
8880         (splay_tree_foreach_internal): New.
8881         (splay_tree_foreach): New.
8882         * splay-tree.h: Become re-entrant if splay_tree_prefix is defined.
8883         (splay_tree_callback): Define typedef.
8884         * target.c (splay_compare): Move to libgomp.h.
8885         (GOMP_target): Don't adjust *thr in any way around running offloaded
8886         task.
8887         (GOMP_target_ext): Likewise.  Handle target nowait.
8888         (GOMP_target_update_ext, GOMP_target_enter_exit_data): Check
8889         return value from gomp_create_target_task, if false, fallthrough
8890         as if no dependencies exist.
8891         (gomp_target_task_fn): Change return type to bool, return true
8892         if the task should have another part scheduled later.  Handle
8893         target nowait.
8894         (gomp_load_plugin_for_device): Initialize async_run.
8895         * task.c (gomp_init_task): Initialize children_queue.
8896         (gomp_clear_parent_in_list): New.
8897         (gomp_clear_parent_in_tree): New.
8898         (gomp_clear_parent): Handle priorities.
8899         (GOMP_task): Likewise.
8900         (priority_queue_move_task_first,
8901         gomp_target_task_completion, GOMP_PLUGIN_target_task_completion):
8902         New functions.
8903         (gomp_create_target_task): Use priority queues.  Change return type
8904         to bool, add state argument, return false if for async
8905         {{enter,exit} data,update} constructs no dependencies need to be
8906         waited for, handle target nowait.  Set task->fn to NULL instead of
8907         gomp_target_task_fn.
8908         (verify_children_queue): Remove.
8909         (priority_list_upgrade_task): New.
8910         (priority_queue_upgrade_task): New.
8911         (verify_task_queue): Remove.
8912         (priority_list_downgrade_task): New.
8913         (priority_queue_downgrade_task): New.
8914         (gomp_task_run_pre): Use priority queues.
8915         Abstract code out to priority_queue_downgrade_task.
8916         (gomp_task_run_post_handle_dependers): Use priority queues.
8917         (gomp_task_run_post_remove_parent): Likewise.
8918         (gomp_task_run_post_remove_taskgroup): Likewise.
8919         (gomp_barrier_handle_tasks): Likewise.  Handle target nowait target
8920         tasks specially.
8921         (GOMP_taskwait): Likewise.
8922         (gomp_task_maybe_wait_for_dependencies): Likewise.  Abstract code to
8923         priority-queue_upgrade_task.
8924         (GOMP_taskgroup_start): Use priority queues.
8925         (GOMP_taskgroup_end): Likewise.  Handle target nowait target tasks
8926         specially.  If taskgroup is NULL, and thr->ts.level is 0, act as a
8927         barrier.
8928         * taskloop.c (GOMP_taskloop): Handle priorities.
8929         * team.c (gomp_new_team): Call priority_queue_init.
8930         (free_team): Call priority_queue_free.
8931         (gomp_free_thread): Call gomp_team_end if thr->ts.team is artificial
8932         team created for target nowait in implicit parallel region.
8933         (gomp_team_start): For nested check, test thr->ts.level instead of
8934         thr->ts.team != NULL.
8935         * testsuite/libgomp.c/doacross-3.c: New test.
8936         * testsuite/libgomp.c/ordered-5.c: New test.
8937         * testsuite/libgomp.c/priority.c: New test.
8938         * testsuite/libgomp.c/target-31.c: New test.
8939         * testsuite/libgomp.c/target-32.c: New test.
8940         * testsuite/libgomp.c/target-33.c: New test.
8941         * testsuite/libgomp.c/target-34.c: New test.
8942
8943 2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>
8944
8945         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: New.
8946
8947         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Sequential
8948         loop is sequential.
8949
8950 2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>
8951
8952         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: New.
8953         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: New.
8954
8955 2015-11-12  James Norris  <jnorris@codesourcery.com>
8956             Joseph Myers  <joseph@codesourcery.com>
8957
8958         * libgomp.map (GOACC_2.0.1): Export GOACC_declare.
8959         * oacc-parallel.c (GOACC_declare): New function.
8960         * testsuite/libgomp.oacc-c-c++-common/declare-1.c: New test.
8961         * testsuite/libgomp.oacc-c-c++-common/declare-2.c: Likewise.
8962         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Likewise.
8963         * testsuite/libgomp.oacc-c-c++-common/declare-5.c: Likewise.
8964         * testsuite/libgomp.oacc-c++/declare-1.C: Likewise.
8965
8966 2015-11-12  Nathan Sidwell  <nathan@codesourcery.com>
8967
8968         * testsuite/libgomp.oacc-c-c++-common/default-1.c: New.
8969
8970 2015-11-1  Nathan Sidwell  <nathan@codesourcery.com>
8971
8972         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: New.
8973         * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: New.
8974
8975 2015-11-09  Nathan Sidwell  <nathan@codesourcery.com>
8976
8977         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Remove
8978         inadvertent commit.
8979
8980 2015-11-09  Nathan Sidwell  <nathan@codesourcery.com>
8981
8982         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: New.
8983         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: New.
8984         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: New.
8985         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: New.
8986         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: New.
8987
8988 2015-11-06  Thomas Schwinge  <thomas@codesourcery.com>
8989
8990         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: XFAIL.
8991         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
8992
8993 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
8994             Ilya Verbin  <ilya.verbin@intel.com>
8995
8996         * libgomp_g.h (GOMP_loop_nonmonotonic_dynamic_next,
8997         GOMP_loop_nonmonotonic_dynamic_start,
8998         GOMP_loop_nonmonotonic_guided_next,
8999         GOMP_loop_nonmonotonic_guided_start,
9000         GOMP_loop_ull_nonmonotonic_dynamic_next,
9001         GOMP_loop_ull_nonmonotonic_dynamic_start,
9002         GOMP_loop_ull_nonmonotonic_guided_next,
9003         GOMP_loop_ull_nonmonotonic_guided_start,
9004         GOMP_parallel_loop_nonmonotonic_dynamic,
9005         GOMP_parallel_loop_nonmonotonic_guided): New prototypes.
9006         (GOMP_target_41): Renamed to ...
9007         (GOMP_target_ext): ... this.  Add num_teams and thread_limit
9008         arguments.
9009         (GOMP_target_data_41): Renamed to ...
9010         (GOMP_target_data_ext): ... this.
9011         (GOMP_target_update_41): Renamed to ...
9012         (GOMP_target_update_ext): ... this.
9013         * libgomp.map (GOMP_4.5): Export GOMP_target_ext,
9014         GOMP_target_data_ext and GOMP_target_update_ext instead of
9015         GOMP_target_41, GOMP_target_data_41 and GOMP_target_update_41.
9016         Export GOMP_loop_nonmonotonic_dynamic_next,
9017         GOMP_loop_nonmonotonic_dynamic_start,
9018         GOMP_loop_nonmonotonic_guided_next,
9019         GOMP_loop_nonmonotonic_guided_start,
9020         GOMP_loop_ull_nonmonotonic_dynamic_next,
9021         GOMP_loop_ull_nonmonotonic_dynamic_start,
9022         GOMP_loop_ull_nonmonotonic_guided_next,
9023         GOMP_loop_ull_nonmonotonic_guided_start,
9024         GOMP_parallel_loop_nonmonotonic_dynamic and
9025         GOMP_parallel_loop_nonmonotonic_guided.
9026         * loop.c (GOMP_parallel_loop_nonmonotonic_dynamic,
9027         GOMP_parallel_loop_nonmonotonic_guided,
9028         GOMP_loop_nonmonotonic_dynamic_start,
9029         GOMP_loop_nonmonotonic_guided_start,
9030         GOMP_loop_nonmonotonic_dynamic_next,
9031         GOMP_loop_nonmonotonic_guided_next): New aliases or functions.
9032         * loop_ull.c (GOMP_loop_ull_nonmonotonic_dynamic_start,
9033         GOMP_loop_ull_nonmonotonic_guided_start,
9034         GOMP_loop_ull_nonmonotonic_dynamic_next,
9035         GOMP_loop_ull_nonmonotonic_guided_next): Likewise.
9036         * target.c (gomp_map_0len_lookup, gomp_map_val): New inline
9037         functions.
9038         (gomp_map_vars): Handle GOMP_MAP_ALWAYS_POINTER.  For
9039         GOMP_MAP_ZERO_LEN_ARRAY_SECTION use gomp_map_0len_lookup.
9040         Use gomp_map_val function.
9041         (gomp_target_fallback_firstprivate): New static function.
9042         (GOMP_target_41): Renamed to ...
9043         (GOMP_target_ext): ... this.  Add num_teams and thread_limit
9044         arguments.  Move firstprivate fallback handling into a new
9045         function.
9046         (GOMP_target_data_41): Renamed to ...
9047         (GOMP_target_data_ext): ... this.
9048         (GOMP_target_update_41): Renamed to ...
9049         (GOMP_target_update_ext): ... this.
9050         (gomp_exit_data): For GOMP_MAP_*ZERO_LEN* use
9051         gomp_map_0len_lookup instead of gomp_map_lookup.
9052         (omp_target_is_present): Use gomp_map_0len_lookup instead of
9053         gomp_map_lookup.
9054         * testsuite/libgomp.c/target-28.c: Likewise.
9055         * testsuite/libgomp.c/monotonic-1.c: New test.
9056         * testsuite/libgomp.c/monotonic-2.c: New test.
9057         * testsuite/libgomp.c/nonmonotonic-1.c: New test.
9058         * testsuite/libgomp.c/nonmonotonic-2.c: New test.
9059         * testsuite/libgomp.c/pr66199-5.c: New test.
9060         * testsuite/libgomp.c/pr66199-6.c: New test.
9061         * testsuite/libgomp.c/pr66199-7.c: New test.
9062         * testsuite/libgomp.c/pr66199-8.c: New test.
9063         * testsuite/libgomp.c/pr66199-9.c: New test.
9064         * testsuite/libgomp.c/reduction-11.c: New test.
9065         * testsuite/libgomp.c/reduction-12.c: New test.
9066         * testsuite/libgomp.c/reduction-13.c: New test.
9067         * testsuite/libgomp.c/reduction-14.c: New test.
9068         * testsuite/libgomp.c/reduction-15.c: New test.
9069         * testsuite/libgomp.c/target-12.c (main): Adjust for
9070         omp_target_is_present change for one-past-last element.
9071         * testsuite/libgomp.c/target-17.c (foo): Drop tests where
9072         the same var is both mapped and privatized.
9073         * testsuite/libgomp.c/target-19.c (foo): Adjust for different
9074         handling of zero-length array sections.
9075         * testsuite/libgomp.c/target-28.c: New test.
9076         * testsuite/libgomp.c/target-29.c: New test.
9077         * testsuite/libgomp.c/target-30.c: New test.
9078         * testsuite/libgomp.c/target-teams-1.c: New test.
9079         * testsuite/libgomp.c++/member-6.C: New test.
9080         * testsuite/libgomp.c++/member-7.C: New test.
9081         * testsuite/libgomp.c++/monotonic-1.C: New test.
9082         * testsuite/libgomp.c++/monotonic-2.C: New test.
9083         * testsuite/libgomp.c++/nonmonotonic-1.C: New test.
9084         * testsuite/libgomp.c++/nonmonotonic-2.C: New test.
9085         * testsuite/libgomp.c++/pr66199-3.C: New test.
9086         * testsuite/libgomp.c++/pr66199-4.C: New test.
9087         * testsuite/libgomp.c++/pr66199-5.C: New test.
9088         * testsuite/libgomp.c++/pr66199-6.C: New test.
9089         * testsuite/libgomp.c++/pr66199-7.C: New test.
9090         * testsuite/libgomp.c++/pr66199-8.C: New test.
9091         * testsuite/libgomp.c++/pr66199-9.C: New test.
9092         * testsuite/libgomp.c++/reduction-11.C: New test.
9093         * testsuite/libgomp.c++/reduction-12.C: New test.
9094         * testsuite/libgomp.c++/target-13.C: New test.
9095         * testsuite/libgomp.c++/target-14.C: New test.
9096         * testsuite/libgomp.c++/target-15.C: New test.
9097         * testsuite/libgomp.c++/target-16.C: New test.
9098         * testsuite/libgomp.c++/target-17.C: New test.
9099         * testsuite/libgomp.c++/target-18.C: New test.
9100         * testsuite/libgomp.c++/target-19.C: New test.
9101
9102 2015-11-04  Nathan Sidwell  <nathan@codesourcery.com>
9103
9104         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Fix dimensions
9105         and reduction copy.
9106         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
9107         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
9108         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
9109         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
9110         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Likewise.
9111         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
9112         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
9113         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
9114         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
9115         * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c: Likewise.
9116         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
9117         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
9118         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
9119         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: New.
9120
9121 2015-11-04  Nathan Sidwell  <nathan@codesourcery.com>
9122
9123         * libgomp.oacc-c-c++-common/loop-red-g-1.c: New.
9124         * libgomp.oacc-c-c++-common/loop-red-gwv-1.c: New.
9125         * libgomp.oacc-c-c++-common/loop-red-v-1.c: New.
9126         * libgomp.oacc-c-c++-common/loop-red-v-2.c: New.
9127         * libgomp.oacc-c-c++-common/loop-red-w-1.c: New.
9128         * libgomp.oacc-c-c++-common/loop-red-w-2.c: New.
9129         * libgomp.oacc-c-c++-common/loop-red-wv-1.c: New.
9130         * libgomp.oacc-fortran/reduction-5.f90: Avoid reference var.
9131
9132 2015-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9133
9134         * libgomp.h (struct acc_dispatch_t): Remove args from exec_func.
9135         * plugin/plugin-nvptx.c (nvptx_exec): Remove sizes & kinds arg.
9136         (GOMP_OFFLOAD_openacc_parallel): Likewise.
9137         * oacc-host.c (host_openacc_exec): Likewise.
9138         * oacc-parallel.c (GOACC_parallel_keyed): Adjust exec_func call.
9139
9140 2015-11-03  Julian Brown  <julian@codesourcery.com>
9141             Thomas Schwinge  <thomas@codesourcery.com>
9142
9143         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: New file.
9144         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
9145         * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c:
9146         Likewise.
9147         * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: Likewise.
9148         * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: Likewise.
9149
9150 2015-11-03  James Norris  <jnorris@codesourcery.com>
9151
9152         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-1.c: New
9153         file.
9154         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-2.c:
9155         Likewise.
9156         * testsuite/libgomp.oacc-c-c++-common/atomic_rw-1.c: Likewise.
9157         * testsuite/libgomp.oacc-c-c++-common/atomic_update-1.c: Likewise.
9158         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Likewise.
9159         * testsuite/libgomp.oacc-fortran/atomic_rw-1.f90: New file.
9160         * testsuite/libgomp.oacc-fortran/atomic_update-1.f90: Likewise.
9161
9162 2015-10-29  Nathan Sidwell  <nathan@codesourcery.com>
9163
9164         * openacc.h (enum acc_device_t): Reformat. Ensure layout
9165         compatibility.
9166         (enum acc_async_t): Reformat.
9167         (acc_on_device): Declare compatible with builtin and provide C++
9168         wrapper.
9169         * testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: New.
9170
9171 2015-10-29  Thomas Schwinge  <thomas@codesourcery.com>
9172             Cesar Philippidis  <cesar@codesourcery.com>
9173
9174         * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: Rename to...
9175         * testsuite/libgomp.oacc-c-c++-common/combined-directives-1.c:
9176         ... this.  Add a description of the test at the top of the file.
9177         * testsuite/libgomp.oacc-fortran/combdir-1.f90: Rename file to...
9178         * testsuite/libgomp.oacc-fortran/combined-directives-1.f90:
9179         ... this.  Add a description of the test at the top of the file.
9180
9181 2015-10-28  Nathan Sidwell  <nathan@codesourcery.com>
9182
9183         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: New.
9184         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: New.
9185         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: New.
9186         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: New.
9187         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: New.
9188         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: New.
9189
9190 2015-10-27  Nathan Sidwell  <nathan@codesourcery.com>
9191
9192         * plugin/plugin-nvptx.c (nvptx_exec): Remove check on compute
9193         dimensions.
9194
9195 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
9196
9197         PR testsuite/68063
9198         * testsuite/libgomp.c++/member-1.C (A::m1): Add missing private clause.
9199
9200 2015-10-27  James Norris  <jnorris@codesourcery.com>
9201
9202         * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: New file.
9203         * testsuite/libgomp.oacc-fortran/combdir-1.f90: Likewise.
9204
9205 2015-10-26  Thomas Schwinge  <thomas@codesourcery.com>
9206
9207         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Print to stderr.
9208         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
9209
9210         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Remove explicit
9211         acc_device_nvidia usage.
9212         * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
9213         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
9214         * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
9215
9216         * oacc-init.c (acc_shutdown): Call gomp_init_targets_once.
9217         * testsuite/libgomp.oacc-c-c++-common/lib-8.c: New file.
9218
9219         PR libgomp/66518
9220         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Resolve XFAIL.
9221
9222         PR libgomp/65437
9223         PR libgomp/66518
9224         * oacc-mem.c (update_dev_host): Call goacc_lazy_initialize.
9225         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Remove XFAIL.
9226
9227 2015-10-23  Tom de Vries  <tom@codesourcery.com>
9228
9229         PR testsuite/68063
9230         * testsuite/libgomp.c++/member-2.C (A::m1): Add missing private clause.
9231
9232 2015-10-20  Nathan Sidwell  <nathan@codesourcery.com>
9233
9234         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Set sane
9235         vector_length.
9236         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
9237
9238 2015-10-14  Ilya Verbin  <ilya.verbin@intel.com>
9239             Aleksander Ivanushenko  <aleksander.ivanushenko@intel.com>
9240
9241         * target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end
9242         to 0 when mapnum is 0.
9243
9244 2015-10-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9245
9246         * fortran.c (omp_get_place_proc_ids_, omp_get_partition_place_nums_):
9247         Cast to int from int32_t.
9248
9249 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
9250             Aldy Hernandez  <aldyh@redhat.com>
9251             Ilya Verbin  <ilya.verbin@intel.com>
9252
9253         * config/linux/affinity.c (omp_get_place_num_procs,
9254         omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
9255         * config/linux/doacross.h: New file.
9256         * config/posix/affinity.c (omp_get_place_num_procs,
9257         omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
9258         * config/posix/doacross.h: New file.
9259         * env.c: Include gomp-constants.h.
9260         (struct gomp_task_icv): Rename run_sched_modifier to
9261         run_sched_chunk_size.
9262         (gomp_max_task_priority_var): New variable.
9263         (parse_schedule): Rename run_sched_modifier to run_sched_chunk_size.
9264         (handle_omp_display_env): Change _OPENMP value from 201307 to
9265         201511.  Print OMP_MAX_TASK_PRIORITY.
9266         (initialize_env): Parse OMP_MAX_TASK_PRIORITY.
9267         (omp_set_schedule, omp_get_schedule): Rename modifier argument to
9268         chunk_size and run_sched_modifier to run_sched_chunk_size.
9269         (omp_get_max_task_priority, omp_get_initial_device,
9270         omp_get_num_places, omp_get_place_num, omp_get_partition_num_places,
9271         omp_get_partition_place_nums): New functions.
9272         * fortran.c (omp_set_schedule_, omp_set_schedule_8_,
9273         omp_get_schedule_, omp_get_schedule_8_): Rename modifier argument
9274         to chunk_size.
9275         (omp_get_num_places_, omp_get_place_num_procs_,
9276         omp_get_place_num_procs_8_, omp_get_place_proc_ids_,
9277         omp_get_place_proc_ids_8_, omp_get_place_num_,
9278         omp_get_partition_num_places_, omp_get_partition_place_nums_,
9279         omp_get_partition_place_nums_8_, omp_get_initial_device_,
9280         omp_get_max_task_priority_): New functions.
9281         * libgomp_g.h (GOMP_loop_doacross_static_start,
9282         GOMP_loop_doacross_dynamic_start, GOMP_loop_doacross_guided_start,
9283         GOMP_loop_doacross_runtime_start, GOMP_loop_ull_doacross_static_start,
9284         GOMP_loop_ull_doacross_dynamic_start,
9285         GOMP_loop_ull_doacross_guided_start,
9286         GOMP_loop_ull_doacross_runtime_start, GOMP_doacross_post,
9287         GOMP_doacross_wait, GOMP_doacross_ull_post, GOMP_doacross_wait,
9288         GOMP_taskloop, GOMP_taskloop_ull, GOMP_target_41,
9289         GOMP_target_data_41, GOMP_target_update_41,
9290         GOMP_target_enter_exit_data): New prototypes.
9291         (GOMP_task): Add prototype argument.
9292         * libgomp.h (_LIBGOMP_CHECKING_): Define to 0 if not yet defined.
9293         (struct gomp_doacross_work_share): New type.
9294         (struct gomp_work_share): Add doacross field.
9295         (struct gomp_task_icv): Rename run_sched_modifier to
9296         run_sched_chunk_size.
9297         (enum gomp_task_kind): Rename GOMP_TASK_IFFALSE to
9298         GOMP_TASK_UNDEFERRED.  Add comments.
9299         (struct gomp_task_depend_entry): Add comments.
9300         (struct gomp_task): Likewise.
9301         (struct gomp_taskgroup): Likewise.
9302         (struct gomp_target_task): New type.
9303         (struct gomp_team): Add comment.
9304         (gomp_get_place_proc_ids_8, gomp_doacross_init,
9305         gomp_doacross_ull_init, gomp_task_maybe_wait_for_dependencies,
9306         gomp_create_target_task, gomp_target_task_fn): New prototypes.
9307         (struct target_var_desc): New type.
9308         (struct target_mem_desc): Adjust comment.  Use struct
9309         target_var_desc instead of splay_tree_key for list.
9310         (REFCOUNT_INFINITY): Define.
9311         (struct splay_tree_key_s): Remove copy_from field.
9312         (struct gomp_device_descr): Add dev2dev_func field.
9313         (enum gomp_map_vars_kind): New enum.
9314         (gomp_map_vars): Add one argument.
9315         * libgomp.map (OMP_4.5): Export omp_get_max_task_priority,
9316         omp_get_max_task_priority_, omp_get_num_places, omp_get_num_places_,
9317         omp_get_place_num_procs, omp_get_place_num_procs_,
9318         omp_get_place_num_procs_8_, omp_get_place_proc_ids,
9319         omp_get_place_proc_ids_, omp_get_place_proc_ids_8_, omp_get_place_num,
9320         omp_get_place_num_, omp_get_partition_num_places,
9321         omp_get_partition_num_places_, omp_get_partition_place_nums,
9322         omp_get_partition_place_nums_, omp_get_partition_place_nums_8_,
9323         omp_get_initial_device, omp_get_initial_device_, omp_target_alloc,
9324         omp_target_free, omp_target_is_present, omp_target_memcpy,
9325         omp_target_memcpy_rect, omp_target_associate_ptr and
9326         omp_target_disassociate_ptr.
9327         (GOMP_4.0.2): Renamed to ...
9328         (GOMP_4.5): ... this.  Export GOMP_target_41, GOMP_target_data_41,
9329         GOMP_target_update_41, GOMP_target_enter_exit_data, GOMP_taskloop,
9330         GOMP_taskloop_ull, GOMP_loop_doacross_dynamic_start,
9331         GOMP_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
9332         GOMP_loop_doacross_static_start, GOMP_doacross_post,
9333         GOMP_doacross_wait, GOMP_loop_ull_doacross_dynamic_start,
9334         GOMP_loop_ull_doacross_guided_start,
9335         GOMP_loop_ull_doacross_runtime_start,
9336         GOMP_loop_ull_doacross_static_start, GOMP_doacross_ull_post and
9337         GOMP_doacross_ull_wait.
9338         * libgomp.texi: Document omp_get_max_task_priority.
9339         Rename modifier argument to chunk_size for omp_set_schedule and
9340         omp_get_schedule.  Document OMP_MAX_TASK_PRIORITY env var.
9341         * loop.c (GOMP_loop_runtime_start): Adjust for run_sched_modifier
9342         to run_sched_chunk_size renaming.
9343         (GOMP_loop_ordered_runtime_start): Likewise.
9344         (gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start,
9345         gomp_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
9346         GOMP_parallel_loop_runtime_start): New functions.
9347         (GOMP_parallel_loop_runtime): Adjust for run_sched_modifier
9348         to run_sched_chunk_size renaming.
9349         (GOMP_loop_doacross_static_start, GOMP_loop_doacross_dynamic_start,
9350         GOMP_loop_doacross_guided_start): New functions or aliases.
9351         * loop_ull.c (GOMP_loop_ull_runtime_start): Adjust for
9352         run_sched_modifier to run_sched_chunk_size renaming.
9353         (GOMP_loop_ull_ordered_runtime_start): Likewise.
9354         (gomp_loop_ull_doacross_static_start,
9355         gomp_loop_ull_doacross_dynamic_start,
9356         gomp_loop_ull_doacross_guided_start,
9357         GOMP_loop_ull_doacross_runtime_start): New functions.
9358         (GOMP_loop_ull_doacross_static_start,
9359         GOMP_loop_ull_doacross_dynamic_start,
9360         GOMP_loop_ull_doacross_guided_start): New functions or aliases.
9361         * oacc-mem.c (acc_map_data, present_create_copy,
9362         gomp_acc_insert_pointer): Pass GOMP_MAP_VARS_OPENACC instead of false
9363         to gomp_map_vars.
9364         (gomp_acc_remove_pointer): Use copy_from from target_var_desc.
9365         * oacc-parallel.c (GOACC_data_start): Pass GOMP_MAP_VARS_OPENACC
9366         instead of false to gomp_map_vars.
9367         (GOACC_parallel_keyed): Likewise.  Use copy_from from target_var_desc.
9368         * omp.h.in (omp_lock_hint_t): New type.
9369         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
9370         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
9371         omp_get_place_num, omp_get_partition_num_places,
9372         omp_get_partition_place_nums, omp_get_initial_device,
9373         omp_get_max_task_priority, omp_target_alloc, omp_target_free,
9374         omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect,
9375         omp_target_associate_ptr, omp_target_disassociate_ptr): New
9376         prototypes.
9377         * omp_lib.f90.in (omp_lock_hint_kind): New parameter.
9378         (omp_lock_hint_none, omp_lock_hint_uncontended,
9379         omp_lock_hint_contended, omp_lock_hint_nonspeculative,
9380         omp_lock_hint_speculative): New parameters.
9381         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
9382         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
9383         omp_get_place_num, omp_get_partition_num_places,
9384         omp_get_partition_place_nums, omp_get_initial_device,
9385         omp_get_max_task_priority): New interfaces.
9386         (omp_set_schedule, omp_get_schedule): Rename modifier argument
9387         to chunk_size.
9388         * omp_lib.h.in (omp_lock_hint_kind): New parameter.
9389         (omp_lock_hint_none, omp_lock_hint_uncontended,
9390         omp_lock_hint_contended, omp_lock_hint_nonspeculative,
9391         omp_lock_hint_speculative): New parameters.
9392         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
9393         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
9394         omp_get_place_num, omp_get_partition_num_places,
9395         omp_get_partition_place_nums, omp_get_initial_device,
9396         omp_get_max_task_priority): New functions and subroutines.
9397         * ordered.c: Include stdarg.h and string.h.
9398         (MAX_COLLAPSED_BITS): Define.
9399         (gomp_doacross_init, GOMP_doacross_post, GOMP_doacross_wait,
9400         gomp_doacross_ull_init, GOMP_doacross_ull_post,
9401         GOMP_doacross_ull_wait): New functions.
9402         * target.c: Include errno.h.
9403         (resolve_device): If device is not initialized, call
9404         gomp_init_device on it.
9405         (gomp_map_lookup): New function.
9406         (gomp_map_vars_existing): Add tgt_var argument, fill it in.
9407         Don't bump refcount if REFCOUNT_INFINITY.  Handle
9408         GOMP_MAP_ALWAYS_TO_P.
9409         (get_kind): Rename is_openacc argument to short_mapkind.
9410         (gomp_map_pointer): Use gomp_map_lookup.
9411         (gomp_map_fields_existing): New function.
9412         (gomp_map_vars): Rename is_openacc argument to short_mapkind
9413         and is_target to pragma_kind.  Handle GOMP_MAP_VARS_ENTER_DATA,
9414         handle GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_STRUCT,
9415         GOMP_MAP_USE_DEVICE_PTR, GOMP_MAP_ZERO_LEN_ARRAY_SECTION.
9416         Adjust for tgt->list changed type and copy_from living in there.
9417         (gomp_copy_from_async): Adjust for tgt->list changed type and
9418         copy_from living in there.
9419         (gomp_unmap_vars): Likewise.
9420         (gomp_update): Likewise.  Rename is_openacc argument to
9421         short_mapkind.  Don't fail if object is not mapped.
9422         (gomp_load_image_to_device): Initialize refcount to
9423         REFCOUNT_INFINITY.
9424         (gomp_target_fallback): New function.
9425         (gomp_get_target_fn_addr): Likewise.
9426         (GOMP_target): Adjust gomp_map_vars caller, use
9427         gomp_get_target_fn_addr and gomp_target_fallback.
9428         (GOMP_target_41): New function.
9429         (gomp_target_data_fallback): New function.
9430         (GOMP_target_data): Use it, adjust gomp_map_vars caller.
9431         (GOMP_target_data_41): New function.
9432         (GOMP_target_update): Adjust gomp_update caller.
9433         (GOMP_target_update_41): New function.
9434         (gomp_exit_data, GOMP_target_enter_exit_data,
9435         gomp_target_task_fn, omp_target_alloc, omp_target_free,
9436         omp_target_is_present, omp_target_memcpy,
9437         omp_target_memcpy_rect_worker, omp_target_memcpy_rect,
9438         omp_target_associate_ptr, omp_target_disassociate_ptr,
9439         gomp_load_plugin_for_device): New functions.
9440         * task.c: Include gomp-constants.h.  Include taskloop.c
9441         twice to get GOMP_taskloop and GOMP_taskloop_ull definitions.
9442         (gomp_task_handle_depend): New function.
9443         (GOMP_task): Use it.  Add priority argument.  Use
9444         gomp-constant.h constants instead of hardcoded numbers.
9445         Rename GOMP_TASK_IFFALSE to GOMP_TASK_UNDEFERRED.
9446         (gomp_create_target_task): New function.
9447         (verify_children_queue, verify_taskgroup_queue,
9448         verify_task_queue): New functions.
9449         (gomp_task_run_pre): Call verify_*_queue functions.
9450         If an upcoming tied task is about to leave the sibling or
9451         taskgroup queues in an invalid state, adjust appropriately.
9452         Remove taskgroup argument.  Add comments.
9453         (gomp_task_run_post_handle_dependers): Add comments.
9454         (gomp_task_run_post_remove_parent): Likewise.
9455         (gomp_barrier_handle_tasks): Adjust gomp_task_run_pre caller.
9456         (GOMP_taskwait): Likewise.  Add comments.
9457         (gomp_task_maybe_wait_for_dependencies): Fix scheduling
9458         problem such that the first non parent_depends_on task does not
9459         end up at the end of the children queue.
9460         (GOMP_taskgroup_start): Rename GOMP_TASK_IFFALSE to
9461         GOMP_TASK_UNDEFERRED.
9462         (GOMP_taskgroup_end): Adjust gomp_task_run_pre caller.
9463         * taskloop.c: New file.
9464         * testsuite/lib/libgomp.exp
9465         (check_effective_target_offload_device_nonshared_as): New proc.
9466         * testsuite/libgomp.c/affinity-2.c: New test.
9467         * testsuite/libgomp.c/doacross-1.c: New test.
9468         * testsuite/libgomp.c/doacross-2.c: New test.
9469         * testsuite/libgomp.c/examples-4/declare_target-1.c (fib_wrapper):
9470         Add map clause to target.
9471         * testsuite/libgomp.c/examples-4/declare_target-4.c (accum): Likewise.
9472         * testsuite/libgomp.c/examples-4/declare_target-5.c (accum): Likewise.
9473         * testsuite/libgomp.c/examples-4/device-1.c (main): Likewise.
9474         * testsuite/libgomp.c/examples-4/device-3.c (main): Likewise.
9475         * testsuite/libgomp.c/examples-4/target_data-3.c (gramSchmidt):
9476         Likewise.
9477         * testsuite/libgomp.c/examples-4/teams-2.c (dotprod): Likewise.
9478         * testsuite/libgomp.c/examples-4/teams-3.c (dotprod): Likewise.
9479         * testsuite/libgomp.c/examples-4/teams-4.c (dotprod): Likewise.
9480         * testsuite/libgomp.c/for-2.h (OMPTGT, OMPTO, OMPFROM): Define if
9481         not defined.  Use those where needed.
9482         * testsuite/libgomp.c/for-4.c: New test.
9483         * testsuite/libgomp.c/for-5.c: New test.
9484         * testsuite/libgomp.c/for-6.c: New test.
9485         * testsuite/libgomp.c/linear-1.c: New test.
9486         * testsuite/libgomp.c/ordered-4.c: New test.
9487         * testsuite/libgomp.c/pr66199-2.c (f2): Adjust for linear clause
9488         only allowed on the loop iterator.
9489         * testsuite/libgomp.c/pr66199-3.c: New test.
9490         * testsuite/libgomp.c/pr66199-4.c: New test.
9491         * testsuite/libgomp.c/reduction-7.c: New test.
9492         * testsuite/libgomp.c/reduction-8.c: New test.
9493         * testsuite/libgomp.c/reduction-9.c: New test.
9494         * testsuite/libgomp.c/reduction-10.c: New test.
9495         * testsuite/libgomp.c/target-1.c (fn2, fn3, fn4): Add
9496         map(tofrom:s).
9497         * testsuite/libgomp.c/target-2.c (fn2, fn3, fn4): Likewise.
9498         * testsuite/libgomp.c/target-7.c (foo): Add map(h) where needed.
9499         * testsuite/libgomp.c/target-11.c: New test.
9500         * testsuite/libgomp.c/target-12.c: New test.
9501         * testsuite/libgomp.c/target-13.c: New test.
9502         * testsuite/libgomp.c/target-14.c: New test.
9503         * testsuite/libgomp.c/target-15.c: New test.
9504         * testsuite/libgomp.c/target-16.c: New test.
9505         * testsuite/libgomp.c/target-17.c: New test.
9506         * testsuite/libgomp.c/target-18.c: New test.
9507         * testsuite/libgomp.c/target-19.c: New test.
9508         * testsuite/libgomp.c/target-20.c: New test.
9509         * testsuite/libgomp.c/target-21.c: New test.
9510         * testsuite/libgomp.c/target-22.c: New test.
9511         * testsuite/libgomp.c/target-23.c: New test.
9512         * testsuite/libgomp.c/target-24.c: New test.
9513         * testsuite/libgomp.c/target-25.c: New test.
9514         * testsuite/libgomp.c/target-26.c: New test.
9515         * testsuite/libgomp.c/target-27.c: New test.
9516         * testsuite/libgomp.c/taskloop-1.c: New test.
9517         * testsuite/libgomp.c/taskloop-2.c: New test.
9518         * testsuite/libgomp.c/taskloop-3.c: New test.
9519         * testsuite/libgomp.c/taskloop-4.c: New test.
9520         * testsuite/libgomp.c++/ctor-13.C: New test.
9521         * testsuite/libgomp.c++/doacross-1.C: New test.
9522         * testsuite/libgomp.c++/examples-4/declare_target-2.C:
9523         Replace offload_device with offload_device_nonshared_as.
9524         * testsuite/libgomp.c++/for-12.C: New test.
9525         * testsuite/libgomp.c++/for-13.C: New test.
9526         * testsuite/libgomp.c++/for-14.C: New test.
9527         * testsuite/libgomp.c++/linear-1.C: New test.
9528         * testsuite/libgomp.c++/member-1.C: New test.
9529         * testsuite/libgomp.c++/member-2.C: New test.
9530         * testsuite/libgomp.c++/member-3.C: New test.
9531         * testsuite/libgomp.c++/member-4.C: New test.
9532         * testsuite/libgomp.c++/member-5.C: New test.
9533         * testsuite/libgomp.c++/ordered-1.C: New test.
9534         * testsuite/libgomp.c++/reduction-5.C: New test.
9535         * testsuite/libgomp.c++/reduction-6.C: New test.
9536         * testsuite/libgomp.c++/reduction-7.C: New test.
9537         * testsuite/libgomp.c++/reduction-8.C: New test.
9538         * testsuite/libgomp.c++/reduction-9.C: New test.
9539         * testsuite/libgomp.c++/reduction-10.C: New test.
9540         * testsuite/libgomp.c++/reference-1.C: New test.
9541         * testsuite/libgomp.c++/simd14.C: New test.
9542         * testsuite/libgomp.c++/target-2.C (fn2): Add map(tofrom: s) clause.
9543         * testsuite/libgomp.c++/target-5.C: New test.
9544         * testsuite/libgomp.c++/target-6.C: New test.
9545         * testsuite/libgomp.c++/target-7.C: New test.
9546         * testsuite/libgomp.c++/target-8.C: New test.
9547         * testsuite/libgomp.c++/target-9.C: New test.
9548         * testsuite/libgomp.c++/target-10.C: New test.
9549         * testsuite/libgomp.c++/target-11.C: New test.
9550         * testsuite/libgomp.c++/target-12.C: New test.
9551         * testsuite/libgomp.c++/taskloop-1.C: New test.
9552         * testsuite/libgomp.c++/taskloop-2.C: New test.
9553         * testsuite/libgomp.c++/taskloop-3.C: New test.
9554         * testsuite/libgomp.c++/taskloop-4.C: New test.
9555         * testsuite/libgomp.c++/taskloop-5.C: New test.
9556         * testsuite/libgomp.c++/taskloop-6.C: New test.
9557         * testsuite/libgomp.c++/taskloop-7.C: New test.
9558         * testsuite/libgomp.c++/taskloop-8.C: New test.
9559         * testsuite/libgomp.c++/taskloop-9.C: New test.
9560         * testsuite/libgomp.fortran/affinity1.f90: New test.
9561         * testsuite/libgomp.fortran/affinity2.f90: New test.
9562
9563 2015-10-13  Tom de Vries  <tom@codesourcery.com>
9564
9565         PR tree-optimization/67476
9566         * testsuite/libgomp.c/autopar-3.c: New test.
9567         * testsuite/libgomp.c/autopar-4.c: New test.
9568         * testsuite/libgomp.c/autopar-5.c: New test.
9569         * testsuite/libgomp.c/autopar-6.c: New test.
9570         * testsuite/libgomp.c/autopar-7.c: New test.
9571         * testsuite/libgomp.c/autopar-8.c: New test.
9572
9573 2015-10-12  James Norris  <jnorris@codesourcery.com>
9574
9575         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Fix loop
9576         initializer.
9577
9578 2015-10-09  David Malcolm  <dmalcolm@redhat.com>
9579
9580         * testsuite/lib/libgomp.exp: Load multiline.exp before prune.exp,
9581         using load_gcc_lib.
9582
9583 2015-10-02  Thomas Schwinge  <thomas@codesourcery.com>
9584
9585         * oacc-ptx.h: Remove file, moving its content into...
9586         * config/nvptx/fortran.c: ... here...
9587         * config/nvptx/oacc-init.c: ..., here...
9588         * config/nvptx/oacc-parallel.c: ..., and here.
9589         * config/nvptx/openacc.f90: New file.
9590         * plugin/plugin-nvptx.c: Don't include "oacc-ptx.h".
9591         (link_ptx): Don't link in predefined bits of PTX code.
9592
9593 2015-09-30  Nathan Sidwell  <nathan@codesourcery.com>
9594             Bernd Schmidt <bernds@codesourcery.com>
9595
9596         * plugin/plugin-nvptx.c (targ_fn_launch): Use GOMP_DIM_MAX.
9597         (struct targ_ptx_obj): New.
9598         (nvptx_tdata): Move earlier, change data format.
9599         (link_ptx): Take targ_ptx_obj ptr and count.  Allow multiple
9600         objects.
9601         (GOMP_OFFLOAD_load_image): Adjust.
9602
9603 2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>
9604
9605         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Add checkpoint.
9606         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
9607         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
9608         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
9609         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
9610         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
9611         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
9612         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
9613         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
9614         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
9615         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
9616         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
9617         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
9618         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
9619         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
9620         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
9621         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
9622         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
9623         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
9624         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
9625         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
9626         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
9627         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
9628         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
9629         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
9630         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
9631         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
9632         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
9633         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
9634         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
9635         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
9636         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
9637         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
9638         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
9639         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
9640         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
9641         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
9642         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
9643         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
9644         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
9645         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
9646         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
9647         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
9648         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
9649         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
9650         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
9651         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
9652         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
9653         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
9654         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
9655         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
9656         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
9657         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
9658         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
9659         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
9660         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
9661         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
9662         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
9663         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
9664         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
9665         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
9666         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
9667         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
9668
9669 2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>
9670
9671         * oacc-init.c (acc_on_device): Force optimization level.
9672
9673 2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>
9674
9675         * plugin/plugin-nvptx.c (ARRAYSIZE): Delete.
9676         (cuda_errlist): Delete.
9677         (cuda_error): Reimplement.
9678
9679 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
9680
9681         * libgomp.h (acc_dispatch_t): Replace separate geometry args with
9682         array.
9683         * libgomp.map (GOACC_parallel_keyed): New.
9684         * oacc-parallel.c (goacc_wait): Take pointer to va_list.  Adjust
9685         all callers.
9686         (GOACC_parallel_keyed): New interface.  Lose geometry arguments
9687         and take keyed varargs list.  Adjust call to exec_func.
9688         (GOACC_parallel): Force host fallback.
9689         * libgomp_g.h (GOACC_parallel): Remove.
9690         (GOACC_parallel_keyed): Declare.
9691         * plugin/plugin-nvptx.c (struct targ_fn_launch): New struct.
9692         (struct targ_gn_descriptor): Replace name field with launch field.
9693         (nvptx_exec): Lose separate geometry args, take array.  Process
9694         dynamic dimensions and adjust.
9695         (struct nvptx_tdata): Replace fn_names field with fn_descs.
9696         (GOMP_OFFLOAD_load_image): Adjust for change in function table
9697         data.
9698         (GOMP_OFFLOAD_openacc_parallel): Adjust for change in dimension
9699         passing.
9700         * oacc-host.c (host_openacc_exec): Adjust for change in dimension
9701         passing.
9702
9703 2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>
9704
9705         PR libgomp/67141
9706         * oacc-int.h (goacc_host_init): Add declaration.
9707         * oacc-host.c (goacc_host_init): Remove static and constructor attribute.
9708         * oacc-init.c (goacc_runtime_initialize): Call goacc_host_init() at end.
9709
9710 2015-09-08  Aditya Kumar  <hiraditya@msn.com>
9711             Sebastian Pop  <s.pop@samsung.com>
9712
9713         * testsuite/libgomp.graphite/bounds.c (int foo): Modified test case to
9714         match o/p.
9715         * testsuite/libgomp.graphite/force-parallel-1.c (void parloop): Same.
9716         * testsuite/libgomp.graphite/force-parallel-4.c: Same.
9717         * testsuite/libgomp.graphite/force-parallel-5.c: Same.
9718         * testsuite/libgomp.graphite/force-parallel-7.c: Same.
9719         * testsuite/libgomp.graphite/force-parallel-8.c: Same.
9720
9721 2015-09-03  Jakub Jelinek  <jakub@redhat.com>
9722
9723         * configure.tgt: Add missing ;; in between nvptx and rtems
9724         snippets.
9725
9726 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9727
9728         * config/posix/pool.h (gomp_adjust_thread_attr): New.
9729         * config/rtems/pool.h (gomp_adjust_thread_attr): Likewise.
9730         (gomp_thread_pool_reservoir): Add priority member.
9731         * confi/rtems/proc.c (allocate_thread_pool_reservoir): Add
9732         priority.
9733         (parse_thread_pools): Likewise.
9734         * team.c (gomp_team_start): Call configuration provided
9735         gomp_adjust_thread_attr(). Destroy thread attributes if
9736         necessary.
9737         * libgomp.texi: Document GOMP_RTEMS_THREAD_POOLS.
9738
9739 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9740
9741         * config/posix/pool.h: New.
9742         * config/rtems/pool.h: Likewise.
9743         * config/rtems/proc.c: Likewise.
9744         * libgomp.h (gomp_thread_destructor): Declare.
9745         * team.c: Include configuration provided "pool.h".
9746         (gomp_get_thread_pool): Define in configuration.
9747         (gomp_team_end): Call configuration defined
9748         gomp_release_thread_pool().
9749
9750 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9751
9752         * config/rtems/bar.c: New.
9753         * config/rtems/bar.h: Likewise.
9754         * config/rtems/mutex.c: Likewise.
9755         * config/rtems/mutex.h: Likewise.
9756         * config/rtems/sem.c: Likewise.
9757         * config/rtems/sem.h: Likewise.
9758         * configure.ac (*-*-rtems*): Check that Newlib provides a proper
9759         <sys/lock.h> header file.
9760         * configure.tgt (*-*-rtems*): Enable RTEMS configuration if
9761         supported by Newlib.
9762         * configure: Regenerate.
9763
9764 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9765
9766         * team.c (gomp_new_thread_pool): Delete and move content to ...
9767         (gomp_get_thread_pool): ... new function.  Allocate and
9768         initialize thread pool on demand.
9769         (get_last_team): Use gomp_get_thread_pool().
9770         (gomp_team_start): Delete thread pool initialization.
9771
9772 2015-09-03  Tom de Vries  <tom@codesourcery.com>
9773
9774         PR tree-optimization/65637
9775         * testsuite/libgomp.c/autopar-2.c: New test.
9776
9777 2015-08-29  Tom de Vries  <tom@codesourcery.com>
9778
9779         PR tree-optimization/46193
9780         * testsuite/libgomp.c/pr46193.c: New test.
9781
9782 2015-08-24  Nathan Sidwell  <nathan@codesourcery.com>
9783
9784         libgomp/
9785         * libgomp.map: Add 4.0.2 version.
9786         * target.c (offload_image_descr): Add version field.
9787         (gomp_load_image_to_device): Add version argument.  Adjust plugin
9788         call.  Improve load mismatch diagnostic.
9789         (gomp_unload_image_from_device): Add version argument.  Adjust plugin
9790         call.
9791         (GOMP_offload_regster): Make stub function, move bulk to ...
9792         (GOMP_offload_register_ver): ... here.  Process version argument.
9793         (GOMP_offload_unregister): Make stub function, move bulk to ...
9794         (GOMP_offload_unregister_ver): ... here.  Process version argument.
9795         (gomp_init_device): Process version field.
9796         (gomp_unload_device): Process version field.
9797         (gomp_load_plugin_for_device): Reimplement DLSYM & DLSYM_OPT
9798         macros.  Check plugin version.
9799         * libgomp.h (gomp_device_descr): Add version function field.  Adjust
9800         loader and unloader types.
9801         * oacc-host.c: Include gomp-constants.h.
9802         (host_version): New.
9803         (host_load_image, host_unload_image): Adjust.
9804         (host_dispatch): Add host_version.
9805         * plugin/plugin-nvptx.c: Include gomp-constants.h.
9806         (GOMP_OFFLOAD_version): New.
9807         (GOMP_OFFLOAD_load_image): Add version arg and check it.
9808         (GOMP_OFFLOAD_unload_image): Likewise.
9809         * plugin/plugin-host.c: Include gomp-constants.h.
9810         (GOMP_OFFLOAD_version): New.
9811         (GOMP_OFFLOAD_load_image): Add version arg.
9812         (GOMP_OFFLOAD_unload_image): Likewise.
9813
9814 2015-08-24  Tom de Vries  <tom@codesourcery.com>
9815
9816         PR tree-optimization/65468
9817         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: New test.
9818
9819 2015-08-24  Tom de Vries  <tom@codesourcery.com>
9820
9821         PR tree-optimization/65468
9822         * testsuite/libgomp.c/static-chunk-size-one.c: New test.
9823
9824 2015-08-24  Joost VandeVondele  <vondele@gnu.gcc.org>
9825
9826         PR libgomp/66761
9827         PR libgomp/67303
9828         * iter.c (gomp_iter_dynamic_next): Employ an atomic load.
9829         (gomp_iter_guided_next): Idem.
9830         * iter_ull.c (gomp_iter_ull_dynamic_next): Idem.
9831         (gomp_iter_ull_guided_next): Idem.
9832         * config/linux/wait.h (do_spin): Idem.
9833
9834 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
9835
9836         * libgomp-plugin.h (enum offload_target_type): Remove
9837         OFFLOAD_TARGET_TYPE_HOST_NONSHM.
9838         * openacc.f90 (openacc_kinds): Remove acc_device_host_nonshm.
9839         * openacc.h (enum acc_device_t): Likewise.
9840         * openacc_lib.h: Likewise.
9841         * oacc-init.c (name_of_acc_device_t): Don't handle it.
9842         (acc_on_device): Just use __builtin_acc_on_device.
9843         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Don't forbid usage
9844         of acc_on_device builtin.
9845         * plugin/plugin-host.h: Remove file.
9846         * plugin/plugin-host.c: Likewise, but salvage some content into...
9847         * oacc-host.c: ... this file.
9848         * plugin/Makefrag.am: Don't build libgomp-plugin-host_nonshm.la.
9849         * plugin/configfrag.ac (offload_targets): Don't add host_nonshm.
9850         * Makefile.in: Regenerate.
9851         * configure: Likewise.
9852         * testsuite/lib/libgomp.exp
9853         (check_effective_target_openacc_host_nonshm_selected): Remove.
9854         * testsuite/libgomp.oacc-c++/c++.exp: Don't handle
9855         ACC_DEVICE_TYPE=host_nonshm.
9856         * testsuite/libgomp.oacc-c/c.exp: Likewise.
9857         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
9858         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
9859         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
9860         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
9861         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
9862
9863 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
9864             Jakub Jelinek  <jakub@redhat.com>
9865
9866         * config/nvptx/affinity.c: New file.
9867         * config/nvptx/alloc.c: Likewise.
9868         * config/nvptx/bar.c: Likewise.
9869         * config/nvptx/barrier.c: Likewise.
9870         * config/nvptx/critical.c: Likewise.
9871         * config/nvptx/env.c: Likewise.
9872         * config/nvptx/error.c: Likewise.
9873         * config/nvptx/fortran.c: Likewise.
9874         * config/nvptx/iter.c: Likewise.
9875         * config/nvptx/iter_ull.c: Likewise.
9876         * config/nvptx/libgomp-plugin.c: Likewise.
9877         * config/nvptx/lock.c: Likewise.
9878         * config/nvptx/loop.c: Likewise.
9879         * config/nvptx/loop_ull.c: Likewise.
9880         * config/nvptx/mutex.c: Likewise.
9881         * config/nvptx/oacc-async.c: Likewise.
9882         * config/nvptx/oacc-cuda.c: Likewise.
9883         * config/nvptx/oacc-host.c: Likewise.
9884         * config/nvptx/oacc-init.c: Likewise.
9885         * config/nvptx/oacc-mem.c: Likewise.
9886         * config/nvptx/oacc-parallel.c: Likewise.
9887         * config/nvptx/oacc-plugin.c: Likewise.
9888         * config/nvptx/omp-lock.h: Likewise.
9889         * config/nvptx/ordered.c: Likewise.
9890         * config/nvptx/parallel.c: Likewise.
9891         * config/nvptx/proc.c: Likewise.
9892         * config/nvptx/ptrlock.c: Likewise.
9893         * config/nvptx/sections.c: Likewise.
9894         * config/nvptx/sem.c: Likewise.
9895         * config/nvptx/single.c: Likewise.
9896         * config/nvptx/splay-tree.c: Likewise.
9897         * config/nvptx/target.c: Likewise.
9898         * config/nvptx/task.c: Likewise.
9899         * config/nvptx/team.c: Likewise.
9900         * config/nvptx/time.c: Likewise.
9901         * config/nvptx/work.c: Likewise.
9902         * configure.ac: Don't probe pthreads support for host nvptx*-*-*.
9903         * configure: Regenerate.
9904         * configure.tgt (config_path): Set to "nvptx" for target
9905         nvptx*-*-*.
9906
9907 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
9908
9909         * testsuite/libgomp.oacc-c-c++-common/vector-type-1.c: New file.
9910
9911 2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>
9912
9913         * plugin/plugin-nvptx.c: Don't include dlfcn.h.
9914         (cuda_errlist): Constify.
9915         (errmsg):  Move into ...
9916         (cuda_error): ... here.  Make smaller.
9917         (_XSTR, _STR): Delete.
9918         (cuda_synames): Delete.
9919         (verify_device_library): Delete.
9920         (nvptx_init): Don't call it.
9921
9922 2015-07-28  Tom de Vries  <tom@codesourcery.com>
9923
9924         * testsuite/libgomp.c/uns-outer-4.c: New test.
9925
9926 2015-07-24  Cesar Philippidis  <cesar@codesourcery.com>
9927
9928         * testsuite/libgomp.c/pr66714.c: New test.
9929
9930 2015-07-22  Maxim Blumenthal  <maxim.blumenthal@intel.com>
9931
9932         PR libgomp/66950
9933         * testsuite/libgomp.c/examples-4/simd-7.c (N): Change to 30 from 45.
9934         (fib_ref): New function.
9935         (fib): Correct corner cases in the recursion.
9936         (main): Replace the non-simd loop with fib_ref call.
9937         * testsuite/libgomp.fortran/examples-4/simd-7.f90: (fib_ref): New
9938         subroutine.
9939         (fibonacci): Lower the parameter N to 30.  Correct accordingly check
9940         for the last array element value.  Replace the non-simd loop with
9941         fib_ref call.  Remove redundant b_ref array.  Remove the comparison
9942         of the last array element with according Fibonacci sequence element.
9943         (fib): Correct corner cases in the recursion.
9944
9945 2015-07-21  Nathan Sidwell  <nathan@codesourcery.com>
9946
9947         * target.c (gomp_offload_image_to_device): Rename to ...
9948         (gomp_load_image_to_device): ... here.
9949         (GOMP_offload_register): Adjust call.
9950         (gomp_init_device): Likewise.
9951         (gomp_unload_image_from_device): New.  Broken out of ...
9952         (GOMP_offload_unregister): ... here.  Call it.
9953         (gomp_unload_device): New.
9954         * libgomp.h (gomp_unload_device): Declare.
9955         * oacc-init.c (acc_shutdown_1): Unload from device before deleting
9956         mem maps.
9957
9958 2015-07-20  Nathan Sidwell  <nathan@codesourcery.com>
9959
9960         * oacc-parallel.c (GOACC_parallel): Move variadic handling into
9961         wait=-specific if.
9962         (GOACC_enter_exit_data, GOACC_update): Use consistent num_waits
9963         !=0 condition.
9964         (goacc_waits): Move !num_waits handling to ...
9965         (GOACC_wait): ... here, the only caller that might have zero waits.
9966
9967         * plugin/plugin-nvptx.c (struct targ_fn_descriptor): Move later.
9968         (struct ptx_image_data): Move earlier, add fns field.
9969         (struct ptx_device): Add images and image_lock fields.
9970         (ptx_images, ptx_image_lock): Delete.
9971         (nvptx_open_device): Initialize images and image_lock fields.
9972         (nvptx_close_device): Destroy image_lock.
9973         (GOMP_OFFLOAD_load_image): Register image to device-specific fields.
9974         (GOMP_OFFLOAD_unload_image): Unregister image from device-specific
9975         fields.
9976
9977 2015-07-17  Nathan Sidwell  <nathan@codesourcery.com>
9978
9979         * target.c (GOMP_offload_register): Use int for device type arg.
9980         (GOMP_offload_unregister): Likewise.
9981
9982         * target.c (struct_offload_image_descr): Constify host_table.
9983         (gomp_offload_image_to_device): Likewise.
9984         (GOMP_offload_register, GOMP_offload_unregister): Likewise.
9985
9986         * libgomp.h (gomp_device_descr): Constify target data arguments.
9987         * target.c (struct offload_image_descr): Constify target_data.
9988         (gomp_offload_image_to_device): Likewise.
9989         (GOMP_offload_register): Likewise.
9990         (GOMP_offload_unregister): Likewise.
9991         * plugin/plugin-host.c (GOMP_OFFLOAD_load_image,
9992         GOMP_OFFLOAD_unload_image): Constify target data.
9993         * plugin/plugin-nvptx.c (struct ptx_image_data): Constify target data.
9994         (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): Likewise.
9995
9996 2015-07-16  Nathan Sidwell  <nathan@codesourcery.com>
9997
9998         * plugin/plugin-nvptx.c (link_ptx): Constify string argument.
9999         Workaround driver library const error.
10000         (struct nvptx_tdata, nvptx_tdata_t): New.
10001         (GOMP_OFFLOAD_load_image): Use struct for target_data's real
10002         type.
10003
10004 2015-07-15  Maxim Blumenthal  <maxim.blumenthal@intel.com>
10005
10006         * testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Change type
10007         of EPS parameter from integer to real.
10008         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: (check): Change
10009         type of EPS parameter from integer to real.
10010
10011 2015-07-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10012
10013         * team.c (get_last_team): New.
10014         (gomp_new_team): Recycle last non-nested team if possible.
10015         (gomp_team_end): Move team work share list free lock destruction
10016         to ...
10017         (free_team): ... here.
10018
10019 2015-07-14  Maxim Blumenthal  <maxim.blumenthal@intel.com>
10020
10021         * testsuite/libgomp.c/examples-4/simd-3.c: (main): Change type of res
10022         and ref from int to double.  Replaced their comparison with
10023         an inequality of their difference and EPS.
10024         * testsuite/libgomp.c/examples-4/simd-8.c: (main): Replace the
10025         comparison of pri and a reference number with an inequality of their
10026         difference and EPS.
10027         * testsuite/libgomp.fortran/examples-4/simd-3.f90: (main): Replaced
10028         the comparison of sum and sum_ref with an inequality of their
10029         difference and EPS.
10030         * testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Replace
10031         the comparison of pri and a reference number with an inequality of
10032         their difference and EPS.
10033
10034 2015-07-13  Maxim Blumenthal  <maxim.blumenthal@intel.com>
10035
10036         * testsuite/libgomp.c++/examples-4/e.53.2.C: Renamed to...
10037         * testsuite/libgomp.c++/examples-4/declare_target-2.C: ...this.
10038         * testsuite/libgomp.c++/examples-4/e.51.5.C: Renamed to...
10039         * testsuite/libgomp.c++/examples-4/target_data-5.C: ...this.
10040         * testsuite/libgomp.c/examples-4/e.56.3.c: Renamed to...
10041         * testsuite/libgomp.c/examples-4/array_sections-3.c: ...this.
10042         * testsuite/libgomp.c/examples-4/e.56.4.c: Renamed to...
10043         * testsuite/libgomp.c/examples-4/array_sections-4.c: ...this.
10044         * testsuite/libgomp.c/examples-4/e.55.1.c: Renamed to...
10045         * testsuite/libgomp.c/examples-4/async_target-1.c: ...this.
10046         * testsuite/libgomp.c/examples-4/e.55.2.c: Renamed to...
10047         * testsuite/libgomp.c/examples-4/async_target-2.c: ...this.
10048         (vec_mult_ref): Remove v1 and v2 arguments, turn them into local
10049         variables.
10050         (vec_mult): Likewise.  Add #pragma omp taskwait.
10051         (main): Adjust caller.
10052         * testsuite/libgomp.c/examples-4/e.53.1.c: Renamed to...
10053         * testsuite/libgomp.c/examples-4/declare_target-1.c: ...this.
10054         * testsuite/libgomp.c/examples-4/e.53.3.c: Renamed to...
10055         * testsuite/libgomp.c/examples-4/declare_target-3.c: ...this.
10056         * testsuite/libgomp.c/examples-4/e.53.4.c: Renamed to...
10057         * testsuite/libgomp.c/examples-4/declare_target-4.c: ...this.
10058         * testsuite/libgomp.c/examples-4/e.53.5.c: Renamed to...
10059         * testsuite/libgomp.c/examples-4/declare_target-5.c: ...this.
10060         * testsuite/libgomp.c/examples-4/e.57.1.c: Renamed to...
10061         * testsuite/libgomp.c/examples-4/device-1.c: ...this.
10062         * testsuite/libgomp.c/examples-4/e.57.2.c: Renamed to...
10063         * testsuite/libgomp.c/examples-4/device-2.c: ...this.
10064         * testsuite/libgomp.c/examples-4/e.57.3.c: Renamed to...
10065         * testsuite/libgomp.c/examples-4/device-3.c: ...this.
10066         * testsuite/libgomp.c/examples-4/simd-1.c: New file.
10067         * testsuite/libgomp.c/examples-4/simd-2.c: New file.
10068         * testsuite/libgomp.c/examples-4/simd-3.c: New file.
10069         * testsuite/libgomp.c/examples-4/simd-4.c: New file.
10070         * testsuite/libgomp.c/examples-4/simd-5.c: New file.
10071         * testsuite/libgomp.c/examples-4/simd-6.c: New file.
10072         * testsuite/libgomp.c/examples-4/simd-7.c: New file.
10073         * testsuite/libgomp.c/examples-4/simd-8.c: New file.
10074         * testsuite/libgomp.c/examples-4/e.50.1.c: Renamed to...
10075         * testsuite/libgomp.c/examples-4/target-1.c: ...this.
10076         * testsuite/libgomp.c/examples-4/e.50.2.c: Renamed to...
10077         * testsuite/libgomp.c/examples-4/target-2.c: ...this.
10078         * testsuite/libgomp.c/examples-4/e.50.3.c: Renamed to...
10079         * testsuite/libgomp.c/examples-4/target-3.c: ...this.
10080         * testsuite/libgomp.c/examples-4/e.50.4.c: Renamed to...
10081         * testsuite/libgomp.c/examples-4/target-4.c: ...this.
10082         * testsuite/libgomp.c/examples-4/e.50.5.c: Renamed to...
10083         * testsuite/libgomp.c/examples-4/target-5.c: ...this.
10084         * testsuite/libgomp.c/examples-4/e.51.1.c: Renamed to...
10085         * testsuite/libgomp.c/examples-4/target_data-1.c: ...this.
10086         * testsuite/libgomp.c/examples-4/e.51.2.c: Renamed to...
10087         * testsuite/libgomp.c/examples-4/target_data-2.c: ...this.
10088         * testsuite/libgomp.c/examples-4/e.51.3.c: Renamed to...
10089         * testsuite/libgomp.c/examples-4/target_data-3.c: ...this.
10090         * testsuite/libgomp.c/examples-4/e.51.4.c: Renamed to...
10091         * testsuite/libgomp.c/examples-4/target_data-4.c: ...this.
10092         * testsuite/libgomp.c/examples-4/e.51.6.c: Renamed to...
10093         * testsuite/libgomp.c/examples-4/target_data-6.c: ...this.
10094         * testsuite/libgomp.c/examples-4/e.51.7.c: Renamed to...
10095         * testsuite/libgomp.c/examples-4/target_data-7.c: ...this.
10096         * testsuite/libgomp.c/examples-4/e.52.1.c: Renamed to...
10097         * testsuite/libgomp.c/examples-4/target_update-1.c: ...this.
10098         * testsuite/libgomp.c/examples-4/e.52.2.c: Renamed to...
10099         * testsuite/libgomp.c/examples-4/target_update-2.c: ...this.
10100         * testsuite/libgomp.c/examples-4/task_dep-1.c: New file.
10101         * testsuite/libgomp.c/examples-4/task_dep-2.c: New file.
10102         * testsuite/libgomp.c/examples-4/task_dep-3.c: New file.
10103         * testsuite/libgomp.c/examples-4/task_dep-4.c: New file.
10104         * testsuite/libgomp.c/examples-4/task_dep-5.c: New file.
10105         * testsuite/libgomp.c/examples-4/e.54.2.c: Renamed to...
10106         * testsuite/libgomp.c/examples-4/teams-2.c: ...this.
10107         * testsuite/libgomp.c/examples-4/e.54.3.c: Renamed to...
10108         * testsuite/libgomp.c/examples-4/teams-3.c: ...this.
10109         * testsuite/libgomp.c/examples-4/e.54.4.c: Renamed to...
10110         * testsuite/libgomp.c/examples-4/teams-4.c: ...this.
10111         * testsuite/libgomp.c/examples-4/e.54.5.c: Renamed to...
10112         * testsuite/libgomp.c/examples-4/teams-5.c: ...this.
10113         * testsuite/libgomp.c/examples-4/e.54.6.c: Renamed to...
10114         * testsuite/libgomp.c/examples-4/teams-6.c: ...this.
10115         * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Renamed to...
10116         * testsuite/libgomp.fortran/examples-4/array_sections-3.f90: ...this.
10117         * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Renamed to...
10118         * testsuite/libgomp.fortran/examples-4/array_sections-4.f90: ...this.
10119         * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Renamed to...
10120         * testsuite/libgomp.fortran/examples-4/async_target-1.f90: ...this.
10121         * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Renamed to...
10122         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: ...this.
10123         (vec_mult): Add !$omp taskwait.
10124         * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Renamed to...
10125         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: ...this.
10126         * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Renamed to...
10127         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: ...this.
10128         * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Renamed to...
10129         * testsuite/libgomp.fortran/examples-4/declare_target-3.f90: ...this.
10130         * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Renamed to...
10131         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90: ...this.
10132         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Renamed to...
10133         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90: ...this.
10134         * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Renamed to...
10135         * testsuite/libgomp.fortran/examples-4/device-1.f90: ...this.
10136         * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Renamed to...
10137         * testsuite/libgomp.fortran/examples-4/device-2.f90: ...this.
10138         * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Renamed to...
10139         * testsuite/libgomp.fortran/examples-4/device-3.f90: ...this.
10140         * testsuite/libgomp.fortran/examples-4/simd-1.f90: New file.
10141         * testsuite/libgomp.fortran/examples-4/simd-2.f90: New file.
10142         * testsuite/libgomp.fortran/examples-4/simd-3.f90: New file.
10143         * testsuite/libgomp.fortran/examples-4/simd-4.f90: New file.
10144         * testsuite/libgomp.fortran/examples-4/simd-5.f90: New file.
10145         * testsuite/libgomp.fortran/examples-4/simd-6.f90: New file.
10146         * testsuite/libgomp.fortran/examples-4/simd-7.f90: New file.
10147         * testsuite/libgomp.fortran/examples-4/simd-8.f90: New file.
10148         * testsuite/libgomp.fortran/examples-4/e.50.1.f90: Renamed to...
10149         * testsuite/libgomp.fortran/examples-4/target-1.f90: ...this.
10150         * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Renamed to...
10151         * testsuite/libgomp.fortran/examples-4/target-2.f90: ...this.
10152         * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Renamed to...
10153         * testsuite/libgomp.fortran/examples-4/target-3.f90: ...this.
10154         * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Renamed to...
10155         * testsuite/libgomp.fortran/examples-4/target-4.f90: ...this.
10156         * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Renamed to...
10157         * testsuite/libgomp.fortran/examples-4/target-5.f90: ...this.
10158         * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Renamed to...
10159         * testsuite/libgomp.fortran/examples-4/target_data-1.f90: ...this.
10160         * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Renamed to...
10161         * testsuite/libgomp.fortran/examples-4/target_data-2.f90: ...this.
10162         * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Renamed to...
10163         * testsuite/libgomp.fortran/examples-4/target_data-3.f90: ...this.
10164         * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Renamed to...
10165         * testsuite/libgomp.fortran/examples-4/target_data-4.f90: ...this.
10166         * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Renamed to...
10167         * testsuite/libgomp.fortran/examples-4/target_data-5.f90: ...this.
10168         * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Renamed to...
10169         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: ...this.
10170         * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Renamed to...
10171         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: ...this.
10172         * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Renamed to...
10173         * testsuite/libgomp.fortran/examples-4/target_update-1.f90: ...this.
10174         * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Renamed to...
10175         * testsuite/libgomp.fortran/examples-4/target_update-2.f90: ...this.
10176         * testsuite/libgomp.fortran/examples-4/task_dep-1.f90: New file.
10177         * testsuite/libgomp.fortran/examples-4/task_dep-2.f90: New file.
10178         * testsuite/libgomp.fortran/examples-4/task_dep-3.f90: New file.
10179         * testsuite/libgomp.fortran/examples-4/task_dep-4.f90: New file.
10180         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: New file.
10181         * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Renamed to...
10182         * testsuite/libgomp.fortran/examples-4/teams-2.f90: ...this.
10183         * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Renamed to...
10184         * testsuite/libgomp.fortran/examples-4/teams-3.f90: ...this.
10185         * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Renamed to...
10186         * testsuite/libgomp.fortran/examples-4/teams-4.f90: ...this.
10187         * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Renamed to...
10188         * testsuite/libgomp.fortran/examples-4/teams-5.f90: ...this.
10189         * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Renamed to...
10190         * testsuite/libgomp.fortran/examples-4/teams-6.f90: ...this.
10191
10192 2015-07-10  Tom de Vries  <tom@codesourcery.com>
10193
10194         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: New test.
10195         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: New test.
10196
10197 2015-07-08  Thomas Schwinge  <thomas@codesourcery.com>
10198
10199         PR libgomp/65099
10200         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not
10201         in a 64-bit configuration.
10202         * testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia
10203         offloading testing if no such device is available.
10204         * testsuite/libgomp.oacc-c/c.exp: Likewise.
10205         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
10206
10207 2015-07-08  Tom de Vries  <tom@codesourcery.com>
10208
10209         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Fix
10210         second call to f.
10211         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
10212
10213 2015-07-07  Tom de Vries  <tom@codesourcery.com>
10214
10215         PR tree-optimization/66642
10216         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Test low
10217         iteration count case.
10218         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c (init): New
10219         function, factor out of ...
10220         (main): ... here.  Test low iteration count case.
10221
10222 2015-07-06  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10223
10224         * libgomp.h (gomp_thread_pool): Comment last_team field.
10225
10226 2015-07-02  Uros Bizjak  <ubizjak@gmail.com>
10227
10228         * testsuite/libgomp.c++/pr66702-1.C: Require
10229         vect_simd_clones effective target.
10230         * testsuite/libgomp.c++/pr66702-2.C: Ditto.
10231
10232 2015-06-30  Tom de Vries  <tom@codesourcery.com>
10233
10234         * testsuite/libgomp.oacc-c++/c++.exp: Set DEFAULT_CFLAGS to -O2 if not
10235         already set.  Use DEFAULT_CFLAGS in dg-runtest.
10236         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Remove dg-options
10237         "-O2".
10238
10239 2015-06-30  Tom de Vries  <tom@codesourcery.com>
10240
10241         * testsuite/libgomp.c++/c++.exp: Set DEFAULT_CFLAGS to -O2 if not
10242         already set.  Use DEFAULT_CFLAGS in dg-runtest.
10243         * testsuite/libgomp.c++/atomic-16.C: Remove dg-options "-O2 -fopenmp".
10244         * testsuite/libgomp.c++/pr64824.C: Same.
10245         * testsuite/libgomp.c++/pr64868.C: Same.
10246         * testsuite/libgomp.c++/pr66199-1.C: Same.
10247         * testsuite/libgomp.c++/pr66199-2.C: Same.
10248         * testsuite/libgomp.c++/target-2.C: Same.
10249         * testsuite/libgomp.c++/for-7.C: Use dg-additional-options for
10250         -std=<standard> option.
10251         * testsuite/libgomp.c++/udr-11.C: Same.
10252         * testsuite/libgomp.c++/udr-12.C: Same.
10253         * testsuite/libgomp.c++/udr-13.C: Same.
10254         * testsuite/libgomp.c++/udr-14.C: Same.
10255         * testsuite/libgomp.c++/udr-15.C: Same.
10256         * testsuite/libgomp.c++/udr-16.C: Same.
10257         * testsuite/libgomp.c++/udr-17.C: Same.
10258         * testsuite/libgomp.c++/udr-18.C: Same.
10259         * testsuite/libgomp.c++/udr-19.C: Same.
10260         * testsuite/libgomp.c++/atomic-1.C: Remove dg-options "-O2".
10261         * testsuite/libgomp.c++/simd-1.C: Same.
10262         * testsuite/libgomp.c++/simd-2.C: Same.
10263         * testsuite/libgomp.c++/simd-3.C: Same.
10264         * testsuite/libgomp.c++/simd-4.C: Same.
10265         * testsuite/libgomp.c++/simd-5.C: Same.
10266         * testsuite/libgomp.c++/simd-6.C: Same.
10267         * testsuite/libgomp.c++/simd-7.C: Same.
10268         * testsuite/libgomp.c++/simd-8.C: Same.
10269         * testsuite/libgomp.c++/simd-9.C: Same.
10270         * testsuite/libgomp.c++/simd10.C: Same.
10271         * testsuite/libgomp.c++/simd11.C: Same.
10272         * testsuite/libgomp.c++/simd12.C: Same.
10273         * testsuite/libgomp.c++/simd13.C: Same.
10274
10275 2015-06-30  Jakub Jelinek  <jakub@redhat.com>
10276
10277         PR middle-end/66702
10278         * testsuite/libgomp.c++/pr66702-1.C: New test.
10279         * testsuite/libgomp.c++/pr66702-2.C: New test.
10280
10281 2015-06-30  Tom de Vries  <tom@codesourcery.com>
10282
10283         * testsuite/libgomp.c/parloops-exit-first-loop-alt-5.c: New test.
10284         * testsuite/libgomp.c/parloops-exit-first-loop-alt-6.c: New test.
10285         * testsuite/libgomp.c/parloops-exit-first-loop-alt-7.c: New test.
10286         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Update comment.
10287
10288 2015-06-30  Tom de Vries  <tom@codesourcery.com>
10289
10290         PR tree-optimization/66652
10291         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (f): Rewrite
10292         using restrict pointers.
10293         (main): Add arguments to calls to f.
10294         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
10295
10296 2015-06-23  Andreas Tobler  <andreast@gcc.gnu.org>
10297
10298         * configure.ac: Fix check for header <sys/sysctl.h>.
10299         * configure: Regenerate.
10300         * config.h.in: Likewise.
10301
10302 2015-06-23  Tom de Vries  <tom@codesourcery.com>
10303
10304         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Use
10305         abort.
10306         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c (main): Same.
10307
10308 2015-06-19  Thomas Schwinge  <thomas@codesourcery.com>
10309
10310         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Only consider for
10311         acc_device_nvidia.
10312
10313         PR libgomp/66518
10314         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: XFAIL.
10315         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
10316
10317 2015-06-15  Tom de Vries  <tom@codesourcery.com>
10318
10319         * testsuite/libgomp.c/atomic-1.c: Remove dg-options "-O2".  Use
10320         dg-additional-options for any remaining options.
10321         * testsuite/libgomp.c/atomic-2.c: Same.
10322         * testsuite/libgomp.c/atomic-4.c: Same.
10323         * testsuite/libgomp.c/atomic-5.c: Same.
10324         * testsuite/libgomp.c/atomic-6.c: Same.
10325         * testsuite/libgomp.c/autopar-1.c: Same.
10326         * testsuite/libgomp.c/copyin-1.c: Same.
10327         * testsuite/libgomp.c/copyin-2.c: Same.
10328         * testsuite/libgomp.c/copyin-3.c: Same.
10329         * testsuite/libgomp.c/examples-4/e.53.5.c: Same.
10330         * testsuite/libgomp.c/nestedfn-5.c: Same.
10331         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Same.
10332         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Same.
10333         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: Same.
10334         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
10335         * testsuite/libgomp.c/pr32362-1.c: Same.
10336         * testsuite/libgomp.c/pr32362-2.c: Same.
10337         * testsuite/libgomp.c/pr32362-3.c: Same.
10338         * testsuite/libgomp.c/pr39591-1.c: Same.
10339         * testsuite/libgomp.c/pr39591-2.c: Same.
10340         * testsuite/libgomp.c/pr39591-3.c: Same.
10341         * testsuite/libgomp.c/pr58392.c: Same.
10342         * testsuite/libgomp.c/pr58756.c: Same.
10343         * testsuite/libgomp.c/simd-1.c: Same.
10344         * testsuite/libgomp.c/simd-10.c: Same.
10345         * testsuite/libgomp.c/simd-11.c: Same.
10346         * testsuite/libgomp.c/simd-12.c: Same.
10347         * testsuite/libgomp.c/simd-13.c: Same.
10348         * testsuite/libgomp.c/simd-14.c: Same.
10349         * testsuite/libgomp.c/simd-15.c: Same.
10350         * testsuite/libgomp.c/simd-2.c: Same.
10351         * testsuite/libgomp.c/simd-3.c: Same.
10352         * testsuite/libgomp.c/simd-4.c: Same.
10353         * testsuite/libgomp.c/simd-5.c: Same.
10354         * testsuite/libgomp.c/simd-6.c: Same.
10355         * testsuite/libgomp.c/simd-7.c: Same.
10356         * testsuite/libgomp.c/simd-8.c: Same.
10357         * testsuite/libgomp.c/simd-9.c: Same.
10358
10359 2015-06-15  Tom de Vries  <tom@codesourcery.com>
10360
10361         * testsuite/libgomp.c/pr35625.c: Fix typo.
10362
10363 2015-06-15  Tom de Vries  <tom@codesourcery.com>
10364
10365         * testsuite/libgomp.c/atomic-18.c: Remove superfluous -fopenmp setting
10366         in dg-options.
10367         * testsuite/libgomp.c/atomic-3.c: Same.
10368         * testsuite/libgomp.c/debug-1.c: Same.
10369         * testsuite/libgomp.c/nqueens-1.c: Same.
10370         * testsuite/libgomp.c/pr26171.c: Same.
10371         * testsuite/libgomp.c/pr48591.c: Same.
10372         * testsuite/libgomp.c/pr64824.c: Same.
10373         * testsuite/libgomp.c/pr64868.c: Same.
10374         * testsuite/libgomp.c/pr66133.c: Same.
10375         * testsuite/libgomp.c/pr66199-1.c: Same.
10376         * testsuite/libgomp.c/pr66199-2.c: Same.
10377         * testsuite/libgomp.c/target-8.c: Same.
10378
10379 2015-06-15  Tom de Vries  <tom@codesourcery.com>
10380
10381         * testsuite/libgomp.c/collapse-3.c: Use dg-additional-options for
10382         -std={gnu99,c99}.
10383         * testsuite/libgomp.c/for-1.c: Same.
10384         * testsuite/libgomp.c/for-2.c: Same.
10385         * testsuite/libgomp.c/for-3.c: Same.
10386         * testsuite/libgomp.c/pr35625.c: Same.
10387         * testsuite/libgomp.c/pr39154.c: Same.
10388         * testsuite/libgomp.c/simd-16.c: Same.
10389         * testsuite/libgomp.c/simd-17.c: Same.
10390
10391 2015-06-13  Tom de Vries  <tom@codesourcery.com>
10392
10393         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: New test.
10394
10395 2015-06-13  Tom de Vries  <tom@codesourcery.com>
10396
10397         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Add comment.
10398         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
10399         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Add comment.
10400         (N): Define.
10401         (main): Use N instead of hardcoded constants.
10402
10403 2015-06-05  Tom de Vries  <tom@codesourcery.com>
10404
10405         merge from gomp4 branch:
10406         2015-05-28  Tom de Vries  <tom@codesourcery.com>
10407
10408         PR tree-optimization/65443
10409         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: New test.
10410         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: New test.
10411         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: New test.
10412
10413 2015-05-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
10414
10415         * testsuite/libgomp.graphite/bounds.c: Adjust for
10416         cleanup-tree-dump removal.
10417         * testsuite/libgomp.graphite/force-parallel-1.c: Likewise.
10418         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
10419         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
10420         * testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
10421         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
10422         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
10423         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
10424         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
10425         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
10426         * testsuite/libgomp.graphite/pr41118.c: Likewise.
10427
10428 2015-05-28  Uros Bizjak  <ubizjak@gmail.com>
10429
10430         * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Remove function.
10431         (futex_wait) [!__x86_64__]: Use __asm operand instead of sys_futex0.
10432         (futex_wake) [!__x86_64__]: Ditto.
10433
10434 2015-05-28  Julian Brown  <julian@codesourcery.com>
10435
10436         * oacc-init.c (resolve_device): Add FAIL_IS_ERROR argument. Update
10437         function comment. Only call gomp_fatal if new argument is true.
10438         (acc_dev_num_out_of_range): New function.
10439         (acc_init_1, acc_shutdown_1): Update call to resolve_device. Call
10440         acc_dev_num_out_of_range as appropriate.
10441         (acc_get_num_devices, acc_set_device_type, acc_get_device_type)
10442         (acc_get_device_num, acc_set_device_num): Update calls to
10443         resolve_device.
10444         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Update expected test
10445         output.
10446
10447 2015-05-28  Julian Brown  <julian@codesourcery.com>
10448
10449         PR libgomp/65742
10450         * oacc-init.c (plugin/plugin-host.h): Include.
10451         (acc_on_device): Check whether we're in an offloaded region for
10452         host_nonshm
10453         plugin. Don't use __builtin_acc_on_device.
10454         * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_parallel): Set
10455         nonshm_exec flag in thread-local data.
10456         (GOMP_OFFLOAD_openacc_create_thread_data): Allocate thread-local
10457         data for host_nonshm plugin.
10458         (GOMP_OFFLOAD_openacc_destroy_thread_data): Free thread-local data
10459         for host_nonshm plugin.
10460         * plugin/plugin-host.h: New.
10461
10462 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
10463
10464         * config/linux/ia64/futex.h (sys_futex0) Change operand "op" to int.
10465
10466 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
10467
10468         * config/linux/wait.h (gomp_futex_wait, gomp_futex_wake):
10469         Declare as int.
10470         (FUTEX_PRIVATE_FLAG): Remove L suffix.
10471         * config/linux/mutex.c (gomp_futex_wait, gomp_futex_wake):
10472         Declare as int.
10473
10474 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
10475
10476         * config/linux/x86/futex.h (sys_futex0) [__PIC__]: Remove function.
10477
10478 2015-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
10479
10480         * target.c (gomp_map_pointer): New function abstracting out
10481         GOMP_MAP_POINTER handling.
10482         (gomp_map_vars): Remove GOMP_MAP_POINTER handling code and use
10483         gomp_map_pointer().
10484
10485 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
10486
10487         PR middle-end/66199
10488         * testsuite/libgomp.c/pr66199-1.c: New test.
10489         * testsuite/libgomp.c/pr66199-2.c: New test.
10490         * testsuite/libgomp.c++/pr66199-1.C: New test.
10491         * testsuite/libgomp.c++/pr66199-2.C: New test.
10492         * testsuite/libgomp.fortran/pr66199-1.f90: New test.
10493         * testsuite/libgomp.fortran/pr66199-2.f90: New test.
10494
10495 2015-05-19  Julian Brown  <julian@codesourcery.com>
10496
10497         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return zero
10498         on cuInit failure.
10499
10500 2015-05-13  Jakub Jelinek  <jakub@redhat.com>
10501
10502         PR middle-end/66133
10503         * testsuite/libgomp.c/pr66133.c: New test.
10504
10505 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
10506
10507         * Makefile.in: Regenerated with automake-1.11.6.
10508         * aclocal.m4: Likewise.
10509         * config.h.in: Likewise.
10510         * configure: Likewise.
10511         * testsuite/Makefile.in: Likewise.
10512
10513 2015-05-08  Jason Merrill  <jason@redhat.com>
10514
10515         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c (main): Use
10516         _Complex.
10517
10518         * openacc.h (__GOACC_NOTHROW): Fix noexcept syntax.
10519
10520 2015-05-06  Julian Brown  <julian@codesourcery.com>
10521
10522         * oacc-init.c (acc_device_lock): Add explanatory comment.
10523         (resolve_device): Add comment about locking requirement.
10524         (acc_init_1, acc_shutdown_1): Likewise. Add locking around
10525         gomp_init_device and gomp_fini_device calls.
10526         (acc_get_num_devices, acc_set_device_type, acc_get_device_type)
10527         (acc_get_device_num, acc_set_device_num): Add locking around
10528         resolve_device and gomp_init_device calls.
10529
10530 2015-05-06  Julian Brown  <julian@codesourcery.com>
10531
10532         * oacc-init.c (acc_shutdown_1): Call gomp_mutex_unlock for
10533         goacc_thread_lock on error paths.
10534         * oacc-mem.c (lookup_host): Remove locking from function. Note
10535         locking requirement for caller in function comment.
10536         (lookup_dev): Likewise.
10537         (acc_free, acc_deviceptr, acc_hostptr, acc_is_present)
10538         (acc_map_data, acc_unmap_data, present_create_copy, delete_copyout)
10539         (update_dev_host, gomp_acc_insert_pointer, gomp_acc_remove_pointer):
10540         Add locking.
10541
10542 2015-05-05  Thomas Schwinge  <thomas@codesourcery.com>
10543
10544         PR testsuite/65205
10545         PR libgomp/65993
10546         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: In dg-output,
10547         don't expect "0x" prefix for "%p" format specifier, don't expect
10548         "(nil)" for NULL pointer.
10549         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
10550         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
10551         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
10552         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
10553         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
10554         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
10555         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
10556         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
10557         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
10558         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
10559         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
10560         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
10561         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
10562         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
10563         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
10564         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
10565         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
10566         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
10567         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
10568         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
10569         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
10570         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
10571         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
10572         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
10573         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
10574         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
10575         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
10576         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
10577         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: More
10578         accurately specify what we're looking for.
10579         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
10580         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
10581         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
10582         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
10583         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
10584
10585 2015-04-30  James Norris  <jnorris@codesourcery.com>
10586
10587         PR testsuite/65205
10588         * testsuite/lib/libgomp.exp
10589         (check_effective_target_openacc_host_selected)
10590         (check_effective_target_openacc_host_nonshm_selected): New
10591         procedures.
10592         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Fix misuse of
10593         dg-shouldfail.
10594         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
10595         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
10596         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
10597         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
10598         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
10599         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
10600         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
10601         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
10602         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
10603         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
10604         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
10605         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
10606         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
10607         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
10608         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
10609         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
10610         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
10611         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
10612         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
10613         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
10614         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
10615         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
10616         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
10617         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
10618         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
10619         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
10620         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
10621         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
10622         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
10623         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
10624         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
10625         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
10626         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
10627         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
10628         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
10629         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
10630         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
10631         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
10632         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
10633         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
10634         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
10635         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
10636         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
10637
10638 2015-04-08  Julian Brown  <julian@codesourcery.com>
10639
10640         * libgomp.h (target_mem_desc: Remove mem_map field.
10641         (acc_dispatch_t): Remove open_device_func, close_device_func,
10642         get_device_num_func, set_device_num_func, target_data members.
10643         Change create_thread_data_func argument to device number instead of
10644         generic pointer.
10645         * oacc-async.c (assert.h): Include.
10646         (acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
10647         (acc_wait_all, acc_wait_all_async): Use current host thread's
10648         active device, not base_dev.
10649         * oacc-cuda.c (acc_get_current_cuda_device)
10650         (acc_get_current_cuda_context, acc_get_cuda_stream)
10651         (acc_set_cuda_stream): Likewise.
10652         * oacc-host.c (host_dispatch): Don't set open_device_func,
10653         close_device_func, get_device_num_func or set_device_num_func.
10654         * oacc-init.c (base_dev, init_key): Remove.
10655         (cached_base_dev): New.
10656         (name_of_acc_device_t): New.
10657         (acc_init_1): Initialise default-numbered device, not zeroth.
10658         (acc_shutdown_1): Close all devices of a given type.
10659         (goacc_destroy_thread): Don't use base_dev.
10660         (lazy_open, lazy_init, lazy_init_and_open): Remove.
10661         (goacc_attach_host_thread_to_device): New.
10662         (acc_init): Reimplement with goacc_attach_host_thread_to_device.
10663         (acc_get_num_devices): Don't use base_dev.
10664         (acc_set_device_type): Reimplement.
10665         (acc_get_device_type): Don't use base_dev.
10666         (acc_get_device_num): Tweak logic.
10667         (acc_set_device_num): Likewise.
10668         (acc_on_device): Use acc_get_device_type.
10669         (goacc_runtime_initialize): Initialize cached_base_dev not base_dev.
10670         (goacc_lazy_initialize): Reimplement with acc_init and
10671         goacc_attach_host_thread_to_device.
10672         * oacc-int.h (goacc_thread): Add base_dev field.
10673         (base_dev): Remove extern declaration.
10674         (goacc_attach_host_thread_to_device): Add prototype.
10675         * oacc-mem.c (acc_malloc): Use current thread's device instead of
10676         base_dev.
10677         (acc_free): Likewise.
10678         (acc_memcpy_to_device): Likewise.
10679         (acc_memcpy_from_device): Likewise.
10680         * oacc-parallel.c (select_acc_device): Remove. Replace calls with
10681         goacc_lazy_initialize (throughout).
10682         (GOACC_parallel): Use tgt_offset to locate target functions.
10683         * target.c (gomp_map_vars): Don't set tgt->mem_map.
10684         (gomp_unmap_vars): Use devicep->mem_map pointer not tgt->mem_map.
10685         (gomp_load_plugin_for_device): Remove open_device, close_device,
10686         get_device_num, set_device_num openacc hook initialisation. Don't set
10687         openacc.target_data.
10688         * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_open_device)
10689         (GOMP_OFFLOAD_openacc_close_device)
10690         (GOMP_OFFLOAD_openacc_get_device_num)
10691         (GOMP_OFFLOAD_openacc_set_device_num): Remove.
10692         (GOMP_OFFLOAD_openacc_create_thread_data): Change (unused) argument
10693         to int.
10694         * plugin/plugin-nvptx.c (ptx_inited): Remove.
10695         (instantiated_devices, ptx_dev_lock): New.
10696         (struct ptx_image_data): New.
10697         (ptx_devices, ptx_images, ptx_image_lock): New.
10698         (fini_streams_for_device): Reorder cuStreamDestroy call.
10699         (nvptx_get_num_devices): Remove forward declaration.
10700         (nvptx_init): Change return type to bool.
10701         (nvptx_fini): Remove.
10702         (nvptx_attach_host_thread_to_device): New.
10703         (nvptx_open_device): Return struct ptx_device* instead of void*.
10704         (nvptx_close_device): Change argument type to struct ptx_device*,
10705         return type to void.
10706         (nvptx_get_num_devices): Use instantiated_devices not ptx_inited.
10707         (kernel_target_data, kernel_host_table): Remove static globals.
10708         (GOMP_OFFLOAD_register_image, GOMP_OFFLOAD_get_table): Remove.
10709         (GOMP_OFFLOAD_init_device): Reimplement.
10710         (GOMP_OFFLOAD_fini_device): Likewise.
10711         (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New.
10712         (GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free, GOMP_OFFLOAD_dev2host)
10713         (GOMP_OFFLOAD_host2dev): Use ORD argument.
10714         (GOMP_OFFLOAD_openacc_open_device)
10715         (GOMP_OFFLOAD_openacc_close_device)
10716         (GOMP_OFFLOAD_openacc_set_device_num)
10717         (GOMP_OFFLOAD_openacc_get_device_num): Remove.
10718         (GOMP_OFFLOAD_openacc_create_thread_data): Change argument to int
10719         (device number).
10720
10721         testsuite/
10722         * libgomp.oacc-c-c++-common/lib-9.c: Fix devnum check in test.
10723
10724 2015-04-06  Ilya Verbin  <ilya.verbin@intel.com>
10725
10726         * libgomp-plugin.h (struct mapping_table): Replace with addr_pair.
10727         * libgomp.h (struct gomp_memory_mapping): Remove.
10728         (struct target_mem_desc): Change type of mem_map from
10729         gomp_memory_mapping * to splay_tree_s *.
10730         (struct gomp_device_descr): Remove register_image_func, get_table_func.
10731         Add load_image_func, unload_image_func.
10732         Change type of mem_map from gomp_memory_mapping to splay_tree_s.
10733         Remove offload_regions_registered.
10734         (gomp_init_tables): Remove.
10735         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
10736         to splay_tree_s *.
10737         * libgomp.map (GOMP_4.0.1): Add GOMP_offload_unregister.
10738         * oacc-host.c (host_dispatch): Do not initialize register_image_func,
10739         get_table_func, mem_map.is_initialized, mem_map.splay_tree.root,
10740         offload_regions_registered.
10741         Initialize load_image_func, unload_image_func, mem_map.root.
10742         (goacc_host_init): Do not initialize host_dispatch.mem_map.lock.
10743         * oacc-init.c (lazy_open): Don't call gomp_init_tables.
10744         (acc_shutdown_1): Use dev's lock and splay_tree instead of mem_map's.
10745         * oacc-mem.c (lookup_host): Get gomp_device_descr *dev instead of
10746         gomp_memory_mapping *.  Use dev's lock and splay_tree.
10747         (lookup_dev): Use dev's lock.
10748         (acc_deviceptr): Pass dev to lookup_host instead of mem_map.
10749         (acc_is_present): Likewise.
10750         (acc_map_data): Likewise.
10751         (acc_unmap_data): Likewise.  Use dev's lock.
10752         (present_create_copy): Likewise.
10753         (delete_copyout): Pass dev to lookup_host instead of mem_map.
10754         (update_dev_host): Likewise.
10755         (gomp_acc_remove_pointer): Likewise.  Use dev's lock.
10756         * oacc-parallel.c (GOACC_parallel): Use dev's lock and splay_tree.
10757         * plugin/plugin-host.c (GOMP_OFFLOAD_register_image): Remove.
10758         (GOMP_OFFLOAD_get_table): Remove
10759         (GOMP_OFFLOAD_load_image): New function.
10760         (GOMP_OFFLOAD_unload_image): New function.
10761         * target.c (register_lock): New mutex for offload image registration.
10762         (num_devices): Do not guard with PLUGIN_SUPPORT.
10763         (gomp_realloc_unlock): New static function.
10764         (gomp_map_vars_existing): Add device descriptor argument.  Unlock mutex
10765         before gomp_fatal.
10766         (gomp_map_vars): Use dev's lock and splay_tree instead of mem_map's.
10767         Pass devicep to gomp_map_vars_existing.  Unlock mutex before gomp_fatal.
10768         (gomp_copy_from_async): Use dev's lock and splay_tree instead of
10769         mem_map's.
10770         (gomp_unmap_vars): Likewise.
10771         (gomp_update): Remove gomp_memory_mapping argument.  Use dev's lock and
10772         splay_tree instead of mm's.  Unlock mutex before gomp_fatal.
10773         (gomp_offload_image_to_device): New static function.
10774         (GOMP_offload_register): Add mutex lock.
10775         Call gomp_offload_image_to_device for all initialized devices.
10776         Replace gomp_realloc with gomp_realloc_unlock.
10777         (GOMP_offload_unregister): New function.
10778         (gomp_init_tables): Replace with gomp_init_device.  Replace a call to
10779         get_table_func from the plugin with calls to init_device_func and
10780         gomp_offload_image_to_device.
10781         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
10782         to splay_tree_s *.
10783         (GOMP_target): Do not call gomp_init_tables.  Use dev's lock and
10784         splay_tree instead of mem_map's.  Unlock mutex before gomp_fatal.
10785         (GOMP_target_data): Do not call gomp_init_tables.
10786         (GOMP_target_update): Likewise.  Remove argument from gomp_update.
10787         (gomp_load_plugin_for_device): Replace register_image and get_table
10788         with load_image and unload_image in DLSYM ().
10789         (gomp_register_images_for_device): Remove function.
10790         (gomp_target_init): Do not initialize current_device.mem_map.*,
10791         current_device.offload_regions_registered.
10792         Remove call to gomp_register_images_for_device.
10793         Do not free offload_images and num_offload_images.
10794
10795 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
10796
10797         PR fortran/65597
10798         * testsuite/libgomp.fortran/pr65597.f90: New test.
10799
10800 2015-03-27  Tom de Vries  <tom@codesourcery.com>
10801
10802         PR testsuite/65594
10803         * testsuite/libgomp.graphite/force-parallel-6.c (abort): Declare.
10804         (init, check): New function.
10805         (foo): Change return type to void.
10806         (main): Call init and check.
10807
10808 2015-03-27  Tom de Vries  <tom@codesourcery.com>
10809
10810         PR testsuite/65594
10811         * testsuite/libgomp.graphite/force-parallel-6.c (M): Define.
10812         (foo): Use M for non-inner loops to scale down test-case.
10813
10814 2015-03-25  Kai Tietz  <ktietz@redhat.com>
10815
10816         PR libgomp/64972
10817         * oacc-parallel.c (GOACC_parallel): Use PRIu64 if available.
10818         (GOACC_data_start): Likewise.
10819         * target.c (gomp_map_vars): Likewise.
10820
10821 2015-03-21  John David Anglin  <danglin@gcc.gnu.org>
10822
10823         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Don't run on
10824         hppa*-*-hpux*.
10825
10826 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
10827
10828         * testsuite/libgomp.c/target-10.c: New test.
10829         * testsuite/libgomp.c++/target-4.C: New test.
10830
10831 2015-03-13  Ilya Verbin  <ilya.verbin@intel.com>
10832
10833         * testsuite/libgomp.fortran/declare-target-1.f90: New test.
10834         * testsuite/libgomp.fortran/declare-target-2.f90: New file.
10835
10836 2015-03-13  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10837
10838         * configure.tgt (*-*-rtems*): Use local-exec TLS model.
10839         * configure.ac (*-*-rtems*): Assume Pthread is supported.
10840         (pthread.h): Check for this header file.
10841         * configure: Regenerate.
10842
10843 2015-02-25  Tom de Vries  <tom@codesourcery.com>
10844
10845         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (DO_PRAGMA)
10846         (check_reduction_op, check_reduction_macro, max, min):
10847         Declare.
10848         (test_reductions_int, test_reductions_minmax, test_reductions_bool): New
10849         function.
10850         (main): Use new functions.
10851
10852 2015-02-18  Ilya Tocar  <ilya.tocar@intel.com>
10853
10854         * target.c (gomp_load_plugin_for_device): Use const char * instead of
10855         char * for variables holding dlerror return values.
10856         (DLSYM_OPT): Ditto.
10857
10858 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
10859
10860         * libgomp-plugin.c (GOMP_PLUGIN_debug): Fix typo.
10861
10862 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
10863             Cesar Philippidis  <cesar@codesourcery.com>
10864
10865         * oacc-ptx.h (GOACC_INTERNAL_PTX): Add GOACC_tid, GOACC_ntid,
10866         GOACC_ctaid, and GOACC_nctaid routines.
10867
10868 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
10869
10870         PR c/64824
10871         * testsuite/libgomp.c/atomic-18.c: New test.
10872         * testsuite/libgomp.c++/atomic-16.C: New test.
10873
10874 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
10875
10876         PR c/64824
10877         PR c/64868
10878         * testsuite/libgomp.c/pr64824.c: New test.
10879         * testsuite/libgomp.c/pr64868.c: New test.
10880         * testsuite/libgomp.c++/pr64824.C: New test.
10881         * testsuite/libgomp.c++/pr64868.C: New test.
10882
10883 2015-02-01  David Edelsohn  <dje.gcc@gmail.com>
10884
10885         PR libgomp/64635
10886         * configure.tgt (*-*-aix*): Use standard posix plugin-suffix.h.
10887         Link with -lpthread.
10888         * config/aix/plugin-suffix.h: Delete.
10889
10890 2015-01-28  Jack Howarth  <howarth.at.gcc@gmail.com>
10891
10892         PR libgomp/64635
10893         * configure.tgt (*-*-aix*): Use config_path "aix posix".
10894         (*-*-darwin*): Use config_path "bsd darwin posix".
10895         (*-*-hpux*): Use config_path "hpux posix".
10896         * target.c: Add include of plugin-suffix.h and use
10897         SONAME_SUFFIX macro.
10898         * config/aix/plugin-suffix.h: New file.
10899         * config/darwin/plugin-suffix.h: New file.
10900         * config/hpux/plugin-suffix.h: New file.
10901         * config/posix/plugin-suffix.h: New file.
10902
10903 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
10904
10905         PR middle-end/64734
10906         * libgomp.c/pr64734.c: New test.
10907
10908 2015-01-23  Tom de Vries  <tom@codesourcery.com>
10909
10910         PR libgomp/64672
10911         * testsuite/libgomp.oacc-c-c++-common/abort-5.c: New test.
10912
10913 2015-01-23  Tom de Vries  <tom@codesourcery.com>
10914
10915         PR libgomp/64707
10916         * testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to
10917         dg-options.
10918
10919 2015-01-19  Thomas Schwinge  <thomas@codesourcery.com>
10920
10921         PR libgomp/64625
10922         * libgomp_g.h (GOACC_data_start, GOACC_enter_exit_data)
10923         (GOACC_parallel, GOACC_update): Remove const_void *offload_table
10924         formal parameter.  Update all users.
10925         * target.c (GOMP_target, GOMP_target_data, GOMP_target_update):
10926         Document unused formal parameter.
10927
10928 2015-01-16  Thomas Schwinge  <thomas@codesourcery.com>
10929
10930         * oacc-parallel.c: Don't include <alloca.h>.
10931         (GOACC_parallel): Use gomp_alloca instead of alloca.
10932
10933 2015-01-16  Gerald Pfeifer  <gerald@pfeifer.com>
10934
10935         * target.c (num_devices): Guard with PLUGIN_SUPPORT.
10936
10937 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
10938             James Norris  <jnorris@codesourcery.com>
10939             Tom de Vries  <tom@codesourcery.com>
10940             Julian Brown  <julian@codesourcery.com>
10941             Cesar Philippidis  <cesar@codesourcery.com>
10942             Nathan Sidwell  <nathan@codesourcery.com>
10943             Tobias Burnus  <burnus@net-b.de>
10944
10945         * Makefile.am (search_path): Add $(top_srcdir)/../include.
10946         (libgomp_la_SOURCES): Add splay-tree.c, libgomp-plugin.c,
10947         oacc-parallel.c, oacc-host.c, oacc-init.c, oacc-mem.c,
10948         oacc-async.c, oacc-plugin.c, oacc-cuda.c.
10949         [USE_FORTRAN] (libgomp_la_SOURCES): Add openacc.f90.
10950         Include $(top_srcdir)/plugin/Makefrag.am.
10951         (nodist_libsubinclude_HEADERS): Add openacc.h.
10952         [USE_FORTRAN] (nodist_finclude_HEADERS): Add openacc_lib.h,
10953         openacc.f90, openacc.mod, openacc_kinds.mod.
10954         (omp_lib.mod): Generalize into...
10955         (%.mod): ... this new rule.
10956         (openacc_kinds.mod, openacc.mod): New rules.
10957         * plugin/configfrag.ac: New file.
10958         * configure.ac: Move plugin/offloading support into it.  Include
10959         it.  Instantiate testsuite/libgomp-test-support.pt.exp.
10960         * plugin/Makefrag.am: New file.
10961         * testsuite/Makefile.am (OFFLOAD_TARGETS)
10962         (OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS): Don't
10963         export.
10964         (libgomp-test-support.exp): New rule.
10965         (all-local): Depend on it.
10966         * Makefile.in: Regenerate.
10967         * testsuite/Makefile.in: Regenerate.
10968         * config.h.in: Likewise.
10969         * configure: Likewise.
10970         * configure.tgt: Harden shell syntax.
10971         * env.c: Include "oacc-int.h".
10972         (parse_acc_device_type): New function.
10973         (gomp_debug_var, goacc_device_type, goacc_device_num): New
10974         variables.
10975         (initialize_env): Initialize those.  Call
10976         goacc_runtime_initialize.
10977         * error.c (gomp_vdebug, gomp_debug, gomp_vfatal): New functions.
10978         (gomp_fatal): Call gomp_vfatal.
10979         * libgomp.h: Include "libgomp-plugin.h" and <stdarg.h>.
10980         (gomp_debug_var, goacc_device_type, goacc_device_num, gomp_vdebug)
10981         (gomp_debug, gomp_verror, gomp_vfatal, gomp_init_targets_once)
10982         (splay_tree_node, splay_tree, splay_tree_key)
10983         (struct target_mem_desc, struct splay_tree_key_s)
10984         (struct gomp_memory_mapping, struct acc_dispatch_t)
10985         (struct gomp_device_descr, gomp_acc_insert_pointer)
10986         (gomp_acc_remove_pointer, target_mem_desc, gomp_copy_from_async)
10987         (gomp_unmap_vars, gomp_init_device, gomp_init_tables)
10988         (gomp_free_memmap, gomp_fini_device): New declarations.
10989         (gomp_vdebug, gomp_debug): New macros.
10990         Include "splay-tree.h".
10991         * libgomp.map (OACC_2.0): New symbol version.  Use for
10992         acc_get_num_devices, acc_get_num_devices_h_, acc_set_device_type,
10993         acc_set_device_type_h_, acc_get_device_type,
10994         acc_get_device_type_h_, acc_set_device_num, acc_set_device_num_h_,
10995         acc_get_device_num, acc_get_device_num_h_, acc_async_test,
10996         acc_async_test_h_, acc_async_test_all, acc_async_test_all_h_,
10997         acc_wait, acc_wait_h_, acc_wait_async, acc_wait_async_h_,
10998         acc_wait_all, acc_wait_all_h_, acc_wait_all_async,
10999         acc_wait_all_async_h_, acc_init, acc_init_h_, acc_shutdown,
11000         acc_shutdown_h_, acc_on_device, acc_on_device_h_, acc_malloc,
11001         acc_free, acc_copyin, acc_copyin_32_h_, acc_copyin_64_h_,
11002         acc_copyin_array_h_, acc_present_or_copyin,
11003         acc_present_or_copyin_32_h_, acc_present_or_copyin_64_h_,
11004         acc_present_or_copyin_array_h_, acc_create, acc_create_32_h_,
11005         acc_create_64_h_, acc_create_array_h_, acc_present_or_create,
11006         acc_present_or_create_32_h_, acc_present_or_create_64_h_,
11007         acc_present_or_create_array_h_, acc_copyout, acc_copyout_32_h_,
11008         acc_copyout_64_h_, acc_copyout_array_h_, acc_delete,
11009         acc_delete_32_h_, acc_delete_64_h_, acc_delete_array_h_,
11010         acc_update_device, acc_update_device_32_h_,
11011         acc_update_device_64_h_, acc_update_device_array_h_,
11012         acc_update_self, acc_update_self_32_h_, acc_update_self_64_h_,
11013         acc_update_self_array_h_, acc_map_data, acc_unmap_data,
11014         acc_deviceptr, acc_hostptr, acc_is_present, acc_is_present_32_h_,
11015         acc_is_present_64_h_, acc_is_present_array_h_,
11016         acc_memcpy_to_device, acc_memcpy_from_device,
11017         acc_get_current_cuda_device, acc_get_current_cuda_context,
11018         acc_get_cuda_stream, acc_set_cuda_stream.
11019         (GOACC_2.0): New symbol version.  Use for GOACC_data_end,
11020         GOACC_data_start, GOACC_enter_exit_data, GOACC_parallel,
11021         GOACC_update, GOACC_wait, GOACC_get_thread_num,
11022         GOACC_get_num_threads.
11023         (GOMP_PLUGIN_1.0): New symbol version.  Use for
11024         GOMP_PLUGIN_malloc, GOMP_PLUGIN_malloc_cleared,
11025         GOMP_PLUGIN_realloc, GOMP_PLUGIN_debug, GOMP_PLUGIN_error,
11026         GOMP_PLUGIN_fatal, GOMP_PLUGIN_async_unmap_vars,
11027         GOMP_PLUGIN_acc_thread.
11028         * libgomp.texi: Update for OpenACC changes, and GOMP_DEBUG
11029         environment variable.
11030         * libgomp_g.h (GOACC_data_start, GOACC_data_end)
11031         (GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait)
11032         (GOACC_get_num_threads, GOACC_get_thread_num): New declarations.
11033         * splay-tree.h (splay_tree_lookup, splay_tree_insert)
11034         (splay_tree_remove): New declarations.
11035         (rotate_left, rotate_right, splay_tree_splay, splay_tree_insert)
11036         (splay_tree_remove, splay_tree_lookup): Move into...
11037         * splay-tree.c: ... this new file.
11038         * target.c: Include "oacc-plugin.h", "oacc-int.h", <assert.h>.
11039         (splay_tree_node, splay_tree, splay_tree_key)
11040         (struct target_mem_desc, struct splay_tree_key_s)
11041         (struct gomp_device_descr): Don't declare.
11042         (num_devices_openmp): New variable.
11043         (gomp_get_num_devices ): Use it.
11044         (gomp_init_targets_once): New function.
11045         (gomp_get_num_devices ): Use it.
11046         (get_kind, gomp_copy_from_async, gomp_free_memmap)
11047         (gomp_fini_device, gomp_register_image_for_device): New functions.
11048         (gomp_map_vars): Add devaddrs parameter.
11049         (gomp_update): Add mm parameter.
11050         (gomp_init_device): Move most of it into...
11051         (gomp_init_tables): ... this new function.
11052         (gomp_register_images_for_device): Remove function.
11053         (splay_compare, gomp_map_vars, gomp_unmap_vars, gomp_init_device):
11054         Make them hidden instead of static.
11055         (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_vars)
11056         (gomp_update, gomp_init_device, GOMP_target, GOMP_target_data)
11057         (GOMP_target_end_data, GOMP_target_update)
11058         (gomp_load_plugin_for_device, gomp_target_init): Update for
11059         OpenACC changes.
11060         * oacc-async.c: New file.
11061         * oacc-cuda.c: Likewise.
11062         * oacc-host.c: Likewise.
11063         * oacc-init.c: Likewise.
11064         * oacc-int.h: Likewise.
11065         * oacc-mem.c: Likewise.
11066         * oacc-parallel.c: Likewise.
11067         * oacc-plugin.c: Likewise.
11068         * oacc-plugin.h: Likewise.
11069         * oacc-ptx.h: Likewise.
11070         * openacc.f90: Likewise.
11071         * openacc.h: Likewise.
11072         * openacc_lib.h: Likewise.
11073         * plugin/plugin-host.c: Likewise.
11074         * plugin/plugin-nvptx.c: Likewise.
11075         * libgomp-plugin.c: Likewise.
11076         * libgomp-plugin.h: Likewise.
11077         * libgomp_target.h: Remove file after merging content into the
11078         former file.  Update all users.
11079         * testsuite/lib/libgomp.exp: Load libgomp-test-support.exp.
11080         (offload_targets_s, offload_targets_s_openacc): New variables.
11081         (check_effective_target_openacc_nvidia_accel_present)
11082         (check_effective_target_openacc_nvidia_accel_selected): New
11083         procedures.
11084         (libgomp_init): Update for OpenACC changes.
11085         * testsuite/libgomp-test-support.exp.in: New file.
11086         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
11087         * testsuite/libgomp.oacc-c/c.exp: Likewise.
11088         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
11089         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Likewise.
11090         * testsuite/libgomp.oacc-c-c++-common/abort-2.c: Likewise.
11091         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
11092         * testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise.
11093         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
11094         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
11095         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: Likewise.
11096         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Likewise.
11097         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
11098         * testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise.
11099         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
11100         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
11101         * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
11102         * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
11103         * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
11104         * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
11105         * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
11106         * testsuite/libgomp.oacc-c-c++-common/data-1.c: Likewise.
11107         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
11108         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
11109         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
11110         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
11111         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
11112         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
11113         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
11114         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
11115         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
11116         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
11117         * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
11118         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
11119         * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Likewise.
11120         * testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise.
11121         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
11122         * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
11123         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
11124         * testsuite/libgomp.oacc-c-c++-common/lib-12.c: Likewise.
11125         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
11126         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
11127         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
11128         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
11129         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
11130         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
11131         * testsuite/libgomp.oacc-c-c++-common/lib-19.c: Likewise.
11132         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
11133         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
11134         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
11135         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
11136         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
11137         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
11138         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
11139         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
11140         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
11141         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
11142         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
11143         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
11144         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
11145         * testsuite/libgomp.oacc-c-c++-common/lib-31.c: Likewise.
11146         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
11147         * testsuite/libgomp.oacc-c-c++-common/lib-33.c: Likewise.
11148         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
11149         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
11150         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
11151         * testsuite/libgomp.oacc-c-c++-common/lib-37.c: Likewise.
11152         * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Likewise.
11153         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
11154         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
11155         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
11156         * testsuite/libgomp.oacc-c-c++-common/lib-41.c: Likewise.
11157         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
11158         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
11159         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
11160         * testsuite/libgomp.oacc-c-c++-common/lib-45.c: Likewise.
11161         * testsuite/libgomp.oacc-c-c++-common/lib-46.c: Likewise.
11162         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
11163         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
11164         * testsuite/libgomp.oacc-c-c++-common/lib-49.c: Likewise.
11165         * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Likewise.
11166         * testsuite/libgomp.oacc-c-c++-common/lib-50.c: Likewise.
11167         * testsuite/libgomp.oacc-c-c++-common/lib-51.c: Likewise.
11168         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
11169         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
11170         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
11171         * testsuite/libgomp.oacc-c-c++-common/lib-55.c: Likewise.
11172         * testsuite/libgomp.oacc-c-c++-common/lib-56.c: Likewise.
11173         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
11174         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
11175         * testsuite/libgomp.oacc-c-c++-common/lib-59.c: Likewise.
11176         * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise.
11177         * testsuite/libgomp.oacc-c-c++-common/lib-60.c: Likewise.
11178         * testsuite/libgomp.oacc-c-c++-common/lib-61.c: Likewise.
11179         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
11180         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
11181         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
11182         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
11183         * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Likewise.
11184         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
11185         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
11186         * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
11187         * testsuite/libgomp.oacc-c-c++-common/lib-7.c: Likewise.
11188         * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
11189         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
11190         * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
11191         * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
11192         * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
11193         * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
11194         * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
11195         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
11196         * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
11197         * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
11198         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
11199         * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
11200         * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
11201         * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
11202         * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
11203         * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
11204         * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise.
11205         * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise.
11206         * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise.
11207         * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise.
11208         * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
11209         * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
11210         * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
11211         * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise.
11212         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
11213         * testsuite/libgomp.oacc-c-c++-common/nested-2.c: Likewise.
11214         * testsuite/libgomp.oacc-c-c++-common/offset-1.c: Likewise.
11215         * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: Likewise.
11216         * testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise.
11217         * testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: Likewise.
11218         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
11219         * testsuite/libgomp.oacc-c-c++-common/present-2.c: Likewise.
11220         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
11221         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
11222         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
11223         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
11224         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
11225         * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c:
11226         Likewise.
11227         * testsuite/libgomp.oacc-c-c++-common/subr.h: Likewise.
11228         * testsuite/libgomp.oacc-c-c++-common/subr.ptx: Likewise.
11229         * testsuite/libgomp.oacc-c-c++-common/timer.h: Likewise.
11230         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
11231         * testsuite/libgomp.oacc-c-c++-common/update-1.c: Likewise.
11232         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
11233         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
11234         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
11235         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
11236         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
11237         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
11238         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
11239         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
11240         * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
11241         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
11242         * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
11243         * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
11244         * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
11245         * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
11246         * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
11247         * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
11248         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
11249         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
11250         * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
11251         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
11252         * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
11253         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
11254         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
11255         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
11256         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
11257         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
11258         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
11259         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
11260         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
11261         * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
11262         * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
11263         * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
11264         * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
11265         * testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
11266         * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
11267         * testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
11268         * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
11269         * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
11270         * testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
11271         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
11272         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
11273         * testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
11274         * testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
11275         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
11276         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
11277         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
11278         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
11279         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
11280         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
11281         * testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
11282         * testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
11283         * testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
11284         * testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
11285         * testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
11286         * testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
11287
11288 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
11289             Julian Brown  <julian@codesourcery.com>
11290             David Malcolm  <dmalcolm@redhat.com>
11291
11292         * configure.ac: Rename libgomp from "GNU OpenMP Runtime Library"
11293         to "GNU Offloading and Multi Processing Runtime Library".  Change
11294         all users.
11295         * configure: Regenerate.
11296         * libgomp.texi: Update.
11297
11298 2015-01-08  Thomas Schwinge  <thomas@codesourcery.com>
11299
11300         * configure.ac [tgt_dir] (offload_additional_lib_paths): Also add
11301         "$tgt_dir/lib32".
11302         * configure: Regenerate.
11303
11304         * testsuite/lib/libgomp.exp (libgomp_init): Correctly match
11305         "intelmic" in $offload_targets.
11306
11307 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
11308
11309         Update copyright years.
11310
11311         * libgomp.texi: Bump @copying's copyright year.
11312
11313 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11314
11315         * testsuite/lib/libgomp.exp: Load target-utils.exp.
11316         Move load of target-supports.exp earlier.
11317
11318 2014-12-10  Ilya Verbin  <ilya.verbin@intel.com>
11319
11320         * testsuite/libgomp.c/target-9.c: New test.
11321
11322 2014-12-09  Varvara Rainchik  <varvara.rainchik@intel.com>
11323
11324         * config.h.in: Regenerate.
11325         * configure: Regenerate.
11326         * configure.ac: Add GCC_CHECK_EMUTLS.
11327         * libgomp.h: Add check for USE_EMUTLS: this case
11328         is equal to HAVE_TLS.
11329         * team.c: Likewise.
11330
11331 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
11332
11333         * configure.tgt (x86_64-*-linux*): Tune -m32 multilib to generic.
11334
11335 2014-11-28  Andrey Turetskiy  <andrey.turetskiy@intel.com>
11336             Ilya Verbin  <ilya.verbin@intel.com>
11337
11338         * testsuite/libgomp.c/target-critical-1.c: New test.
11339
11340 2014-11-26  Jakub Jelinek  <jakub@redhat.com>
11341
11342         * testsuite/libgomp.c/examples-4/e.53.4.c: Add -DITESTITERS=20
11343         to dg-options unless expensive testing is on.
11344         (TESTITERS): Define to N if not defined.
11345         (main): Use TESTITERS instead of N.
11346         * testsuite/libgomp.c/examples-4/e.55.1.c: Define CHUNKSZ from
11347         dg-additional-options depending on whether expensive testing is on.
11348         * testsuite/libgomp.fortran/examples-4/e.55.1.f90 (e_55_1_mod):
11349         Decrease N to 100000 and CHUNKSZ to 10000.
11350
11351 2014-11-24  Jakub Jelinek  <jakub@redhat.com>
11352
11353         PR fortran/63938
11354         * testsuite/libgomp.fortran/pr63938-1.f90: New test.
11355         * testsuite/libgomp.fortran/pr63938-2.f90: New test.
11356
11357 2014-11-21  Steve Ellcey  <sellcey@imgtec.com>
11358
11359         * config/linux/mips/futex.h (SYS_futex): Define if not already done.
11360
11361 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
11362
11363         PR bootstrap/63784
11364         * configure: Regenerated.
11365
11366 2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
11367
11368         * testsuite/libgomp.c/examples-4/e.53.5.c: Require
11369         vect_simd_clones effective target.
11370         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
11371
11372 2014-11-14  Jakub Jelinek  <jakub@redhat.com>
11373
11374         * libgomp.c/examples-4/e.54.2.c (main): Use N / 8 instead
11375         of 32 as block_size.
11376         * libgomp.fortran/examples-4/e.54.2.f90 (e_54_1): Use n / 8
11377         instead of 32 as block_size.
11378
11379 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
11380             Ilya Verbin  <ilya.verbin@intel.com>
11381
11382         * Makefile.in: Regenerate.
11383         * configure: Regenerate.
11384         * configure.ac: Set up offload_additional_options,
11385         offload_additional_lib_paths and offload_targets.
11386         * testsuite/Makefile.am: Export environment variables: OFFLOAD_TARGETS,
11387         OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS.
11388         * testsuite/Makefile.in: Regenerate.
11389         * testsuite/lib/libgomp.exp (libgomp_init): Append
11390         offload_additional_lib_paths to LD_LIBRARY_PATH.  Append
11391         offload_additional_options to ALWAYS_CFLAGS.  Append liboffloadmic
11392         build directory to LD_LIBRARY_PATH for intelmic offload targets.
11393
11394 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
11395             Ilya Verbin  <ilya.verbin@intel.com>
11396             Kirill Yukhin  <kirill.yukhin@intel.com>
11397             Ilya Tocar  <ilya.tocar@intel.com>
11398
11399         * testsuite/lib/libgomp.exp
11400         (check_effective_target_offload_device): New.
11401         * testsuite/libgomp.c++/c++.exp: Include tests from subdirectories.
11402         * testsuite/libgomp.c++/examples-4/e.51.5.C: New test.
11403         * testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto.
11404         * testsuite/libgomp.c/examples-4/e.50.1.c: Ditto.
11405         * testsuite/libgomp.c/examples-4/e.50.2.c: Ditto.
11406         * testsuite/libgomp.c/examples-4/e.50.3.c: Ditto.
11407         * testsuite/libgomp.c/examples-4/e.50.4.c: Ditto.
11408         * testsuite/libgomp.c/examples-4/e.50.5.c: Ditto.
11409         * testsuite/libgomp.c/examples-4/e.51.1.c: Ditto.
11410         * testsuite/libgomp.c/examples-4/e.51.2.c: Ditto.
11411         * testsuite/libgomp.c/examples-4/e.51.3.c: Ditto.
11412         * testsuite/libgomp.c/examples-4/e.51.4.c: Ditto.
11413         * testsuite/libgomp.c/examples-4/e.51.6.c: Ditto.
11414         * testsuite/libgomp.c/examples-4/e.51.7.c: Ditto.
11415         * testsuite/libgomp.c/examples-4/e.52.1.c: Ditto.
11416         * testsuite/libgomp.c/examples-4/e.52.2.c: Ditto.
11417         * testsuite/libgomp.c/examples-4/e.53.1.c: Ditto.
11418         * testsuite/libgomp.c/examples-4/e.53.3.c: Ditto.
11419         * testsuite/libgomp.c/examples-4/e.53.4.c: Ditto.
11420         * testsuite/libgomp.c/examples-4/e.53.5.c: Ditto.
11421         * testsuite/libgomp.c/examples-4/e.54.2.c: Ditto.
11422         * testsuite/libgomp.c/examples-4/e.54.3.c: Ditto.
11423         * testsuite/libgomp.c/examples-4/e.54.4.c: Ditto.
11424         * testsuite/libgomp.c/examples-4/e.54.5.c: Ditto.
11425         * testsuite/libgomp.c/examples-4/e.54.6.c: Ditto.
11426         * testsuite/libgomp.c/examples-4/e.55.1.c: Ditto.
11427         * testsuite/libgomp.c/examples-4/e.55.2.c: Ditto.
11428         * testsuite/libgomp.c/examples-4/e.56.3.c: Ditto.
11429         * testsuite/libgomp.c/examples-4/e.56.4.c: Ditto.
11430         * testsuite/libgomp.c/examples-4/e.57.1.c: Ditto.
11431         * testsuite/libgomp.c/examples-4/e.57.2.c: Ditto.
11432         * testsuite/libgomp.c/examples-4/e.57.3.c: Ditto.
11433         * testsuite/libgomp.c/target-7.c: Fix test.
11434         * testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test.
11435         * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto.
11436         * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto.
11437         * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto.
11438         * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto.
11439         * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto.
11440         * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto.
11441         * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto.
11442         * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto.
11443         * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto.
11444         * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto.
11445         * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto.
11446         * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto.
11447         * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto.
11448         * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto.
11449         * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto.
11450         * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto.
11451         * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto.
11452         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
11453         * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto.
11454         * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto.
11455         * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto.
11456         * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto.
11457         * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto.
11458         * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto.
11459         * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto.
11460         * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto.
11461         * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto.
11462         * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto.
11463         * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto.
11464         * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto.
11465
11466 2014-11-13  Jakub Jelinek  <jakub@redhat.com>
11467             Ilya Verbin  <ilya.verbin@intel.com>
11468             Thomas Schwinge  <thomas@codesourcery.com>
11469             Andrey Turetskiy  <andrey.turetskiy@intel.com>
11470
11471         * libgomp.map (GOMP_4.0.1): New symbol version.
11472         Add GOMP_offload_register.
11473         * libgomp_target.h: New file.
11474         * splay-tree.h: New file.
11475         * target.c: Include config.h, libgomp_target.h, dlfcn.h, splay-tree.h.
11476         (gomp_target_init): New forward declaration.
11477         (gomp_is_initialized): New static variable.
11478         (splay_tree_node, splay_tree, splay_tree_key): New typedefs.
11479         (struct target_mem_desc, struct splay_tree_key_s, offload_image_descr):
11480         New structures.
11481         (offload_images, num_offload_images, devices, num_devices): New static
11482         variables.
11483         (splay_compare): New static function.
11484         (struct gomp_device_descr): New structure.
11485         (gomp_get_num_devices): Call gomp_target_init.
11486         (resolve_device, gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt)
11487         (gomp_unmap_vars, gomp_update, gomp_init_device): New static functions.
11488         (GOMP_offload_register): New function.
11489         (GOMP_target): Arrange for host callback to be performed in a separate
11490         initial thread and contention group, inheriting ICVs from
11491         gomp_global_icv etc.  Call gomp_map_vars and gomp_unmap_vars.
11492         Add device initialization and lookup for target function in splay tree.
11493         (GOMP_target_data): Add device initialization and call gomp_map_vars.
11494         (GOMP_target_end_data): Call gomp_unmap_vars.
11495         (GOMP_target_update): Add device initialization and call gomp_update.
11496         (gomp_load_plugin_for_device, gomp_register_images_for_device)
11497         (gomp_target_init): New static functions.
11498
11499 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
11500             Thomas Schwinge  <thomas@codesourcery.com>
11501             Ilya Verbin  <ilya.verbin@intel.com>
11502             Andrey Turetskiy  <andrey.turetskiy@intel.com>
11503
11504         * config.h.in: Regenerate.
11505         * configure: Regenerate.
11506         * configure.ac: Check for libdl, required for plugin support.
11507         (PLUGIN_SUPPORT): Define if plugins are supported.
11508         (enable_offload_targets): Support Intel MIC targets.
11509         (OFFLOAD_TARGETS): List of target names suitable for offloading.
11510
11511 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
11512
11513         PR target/63610
11514         * configure: Regenerate.
11515
11516 2014-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11517
11518         * config/posix/lock.c (_XOPEN_SOURCE) Define as 600.
11519
11520 2014-10-06  Marek Polacek  <polacek@redhat.com>
11521
11522         * testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
11523         * testsuite/libgomp.c/nqueens-1.c: Include <stdlib.h>.
11524         * testsuite/libgomp.c/thread-limit-1.c: Include <omp.h>
11525         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
11526
11527 2014-10-06  Marek Polacek  <polacek@redhat.com>
11528
11529         * testsuite/libgomp.c/affinity-1.c: Fix implicit declarations.
11530         * testsuite/libgomp.c/nqueens-1.c: Likewise.
11531         * testsuite/libgomp.c/pr26943-3.c: Likewise.
11532         * testsuite/libgomp.c/pr26943-4.c: Likewise.
11533         * testsuite/libgomp.c/pr36802-2.c: Likewise.
11534         * testsuite/libgomp.c/pr36802-3.c: Likewise.
11535         * testsuite/libgomp.c/thread-limit-1.c: Likewise.
11536         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
11537         * testsuite/libgomp.c/appendix-a/a.15.1.c: Include <omp.h>.
11538         * testsuite/libgomp.c/omp-loop02.c: Fix defaulting to int.
11539         * testsuite/libgomp.c/omp-parallel-for.c: Likewise.
11540         * testsuite/libgomp.c/omp-parallel-if.c: Likewise.
11541         * testsuite/libgomp.c/omp-single-1.c: Likewise.
11542         * testsuite/libgomp.c/omp-single-2.c: Likewise.
11543         * testsuite/libgomp.c/omp_matvec.c: Likewise.
11544         * testsuite/libgomp.c/omp_workshare3.c: Likewise.
11545         * testsuite/libgomp.c/omp_workshare4.c: Likewise.
11546         * testsuite/libgomp.c/shared-1.c: Fix defaulting to int.  Fix implicit
11547         declarations.
11548
11549 2014-10-03  Jakub Jelinek  <jakub@redhat.com>
11550
11551         PR libgomp/61200
11552         * testsuite/libgomp.c/pr61200.c: New test.
11553
11554 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
11555
11556         PR c++/63248
11557         * testsuite/libgomp.c++/pr63248.C: New test.
11558
11559 2014-08-04  Jakub Jelinek  <jakub@redhat.com>
11560
11561         * task.c (GOMP_taskgroup_end): If taskgroup->num_children
11562         is not zero, but taskgroup->children is NULL and there are
11563         any task->children, schedule those instead of waiting.
11564         * testsuite/libgomp.c/depend-6.c: New test.
11565         * testsuite/libgomp.c/depend-7.c: New test.
11566         * testsuite/libgomp.c/depend-8.c: New test.
11567         * testsuite/libgomp.c/depend-9.c: New test.
11568         * testsuite/libgomp.c/depend-10.c: New test.
11569
11570 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
11571
11572         * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
11573         (struct gomp_taskwait): New type.
11574         (struct gomp_task): Add taskwait and parent_depends_on, remove
11575         in_taskwait and taskwait_sem fields.
11576         (gomp_finish_task): Don't destroy taskwait_sem.
11577         * task.c (gomp_init_task): Don't init in_taskwait, instead init
11578         taskwait and parent_depends_on.
11579         (GOMP_task): For if (0) tasks with depend clause that depend on
11580         earlier tasks don't defer them, instead call
11581         gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
11582         Initialize redundant_out field, for redundant out entries just
11583         move them at the end of linked list instead of removing them
11584         completely, and set redundant_out flag instead of redundant.
11585         (gomp_task_run_pre): Update last_parent_depends_on if scheduling
11586         that task.
11587         (gomp_task_run_post_handle_dependers): If parent is in
11588         gomp_task_maybe_wait_for_dependencies and newly runnable task
11589         is not parent_depends_on, queue it in parent->children linked
11590         list after all runnable tasks with parent_depends_on set.
11591         Adjust for addition of taskwait indirection.
11592         (gomp_task_run_post_remove_parent): If parent is in
11593         gomp_task_maybe_wait_for_dependencies and task to be removed
11594         is parent_depends_on, decrement n_depend and if needed awake
11595         parent.  Adjust for addition of taskwait indirection.
11596         (GOMP_taskwait): Adjust for addition of taskwait indirection.
11597         (gomp_task_maybe_wait_for_dependencies): New function.
11598         * testsuite/libgomp.c/depend-5.c: New test.
11599
11600 2014-07-13  Tobias Burnus  <burnus@net-b.de>
11601
11602         * testsuite/libgomp.fortran/pr34020.f90: Make compile
11603         with TS 18508/Fortran 2015.
11604
11605 2014-07-06  Marek Polacek  <polacek@redhat.com>
11606
11607         PR c/6940
11608         * testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.
11609
11610 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
11611
11612         * testsuite/lib/libgomp.exp (libgomp_target_compile): If $source
11613         matches regex $lang_source_re, add $lang_include_flags to options.
11614         * testsuite/libgomp.c/c.exp: Unset lang_include_flags.
11615         * testsuite/libgomp.c++/c++.exp: Likewise.
11616         * testsuite/libgomp.fortran/fortran.exp: Likewise.  Set lang_source_re
11617         and lang_include_flags instead of adding -fintrinsic-modules-path= to
11618         ALWAYS_CFLAGS.
11619         * testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags.
11620
11621 2014-07-03  Thomas Schwinge  <thomas@codesourcery.com>
11622
11623         * testsuite/libgomp.fortran/fortran.exp: Explain
11624         gfortran-dg-runtest usage.
11625
11626 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
11627
11628         * testsuite/libgomp.fortran/simd5.f90: New test.
11629         * testsuite/libgomp.fortran/simd6.f90: New test.
11630         * testsuite/libgomp.fortran/simd7.f90: New test.
11631
11632 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
11633
11634         * testsuite/libgomp.c/for-2.c: Define SC to static for
11635         #pragma omp for simd testing.
11636         * testsuite/libgomp.c/for-2.h (SC): Define if not defined.
11637         (N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use
11638         SC macro.
11639         * testsuite/libgomp.c/simd-14.c: New test.
11640         * testsuite/libgomp.c/simd-15.c: New test.
11641         * testsuite/libgomp.c/simd-16.c: New test.
11642         * testsuite/libgomp.c/simd-17.c: New test.
11643         * testsuite/libgomp.c++/for-10.C: Define SC to static for
11644         #pragma omp for simd testing.
11645         * testsuite/libgomp.c++/simd10.C: New test.
11646         * testsuite/libgomp.c++/simd11.C: New test.
11647         * testsuite/libgomp.c++/simd12.C: New test.
11648         * testsuite/libgomp.c++/simd13.C: New test.
11649
11650         * testsuite/libgomp.fortran/aligned1.f03: New test.
11651         * testsuite/libgomp.fortran/nestedfn5.f90: New test.
11652         * testsuite/libgomp.fortran/target7.f90: Surround loop spawning
11653         tasks with !$omp parallel !$omp single.
11654         * testsuite/libgomp.fortran/target8.f90: New test.
11655         * testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust
11656         not to use trim in the combiner, instead call elemental function.
11657         (fn): New elemental function.
11658         * testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init):
11659         Make elemental.
11660         * testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out,
11661         omp_in): Likewise.
11662         * testsuite/libgomp.fortran/udr12.f90: New test.
11663         * testsuite/libgomp.fortran/udr13.f90: New test.
11664         * testsuite/libgomp.fortran/udr14.f90: New test.
11665         * testsuite/libgomp.fortran/udr15.f90: New test.
11666
11667 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
11668
11669         * omp_lib.f90.in (openmp_version): Set to 201307.
11670         * omp_lib.h.in (openmp_version): Likewise.
11671         * testsuite/libgomp.c/target-8.c: New test.
11672         * testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch
11673         and inbranch clauses.
11674         * testsuite/libgomp.fortran/depend-3.f90: New test.
11675         * testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new
11676         openmp_version.
11677         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
11678         * testsuite/libgomp.fortran/target1.f90: New test.
11679         * testsuite/libgomp.fortran/target2.f90: New test.
11680         * testsuite/libgomp.fortran/target3.f90: New test.
11681         * testsuite/libgomp.fortran/target4.f90: New test.
11682         * testsuite/libgomp.fortran/target5.f90: New test.
11683         * testsuite/libgomp.fortran/target6.f90: New test.
11684         * testsuite/libgomp.fortran/target7.f90: New test.
11685
11686 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
11687
11688         PR fortran/60928
11689         * testsuite/libgomp.fortran/allocatable9.f90: New test.
11690         * testsuite/libgomp.fortran/allocatable10.f90: New test.
11691         * testsuite/libgomp.fortran/allocatable11.f90: New test.
11692         * testsuite/libgomp.fortran/allocatable12.f90: New test.
11693         * testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
11694         * testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
11695         * testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
11696         * testsuite/libgomp.fortran/associate1.f90: New test.
11697         * testsuite/libgomp.fortran/associate2.f90: New test.
11698         * testsuite/libgomp.fortran/procptr1.f90: New test.
11699
11700 2014-06-06  Jakub Jelinek  <jakub@redhat.com>
11701
11702         * testsuite/libgomp.fortran/simd1.f90: New test.
11703         * testsuite/libgomp.fortran/udr1.f90: New test.
11704         * testsuite/libgomp.fortran/udr2.f90: New test.
11705         * testsuite/libgomp.fortran/udr3.f90: New test.
11706         * testsuite/libgomp.fortran/udr4.f90: New test.
11707         * testsuite/libgomp.fortran/udr5.f90: New test.
11708         * testsuite/libgomp.fortran/udr6.f90: New test.
11709         * testsuite/libgomp.fortran/udr7.f90: New test.
11710         * testsuite/libgomp.fortran/udr8.f90: New test.
11711         * testsuite/libgomp.fortran/udr9.f90: New test.
11712         * testsuite/libgomp.fortran/udr10.f90: New test.
11713         * testsuite/libgomp.fortran/udr11.f90: New test.
11714
11715 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
11716
11717         * testsuite/libgomp.fortran/declare-simd-1.f90: Require
11718         vect_simd_clones effective target.
11719         * testsuite/libgomp.fortran/declare-simd-2.f90: Ditto.
11720
11721 2014-05-21  Jakub Jelinek  <jakub@redhat.com>
11722
11723         PR middle-end/61252
11724         * testsuite/libgomp.c++/simd-9.C: New test.
11725
11726 2014-05-18  Uros Bizjak  <ubizjak@gmail.com>
11727
11728         * libgomp.texi (Runitme Library Routines): Remove multiple @menu.
11729         (Environment Variables) Move OMP_PROC_BIND and OMP_STACKSIZE node
11730         texts according to their @menu entry positions.
11731
11732 2014-05-11  Jakub Jelinek  <jakub@redhat.com>
11733
11734         * testsuite/libgomp.fortran/cancel-do-1.f90: New test.
11735         * testsuite/libgomp.fortran/cancel-do-2.f90: New test.
11736         * testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
11737         * testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
11738         * testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
11739         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
11740         * testsuite/libgomp.fortran/declare-simd-1.f90: New test.
11741         * testsuite/libgomp.fortran/declare-simd-2.f90: New test.
11742         * testsuite/libgomp.fortran/declare-simd-3.f90: New test.
11743         * testsuite/libgomp.fortran/depend-1.f90: New test.
11744         * testsuite/libgomp.fortran/depend-2.f90: New test.
11745         * testsuite/libgomp.fortran/omp_atomic5.f90: New test.
11746         * testsuite/libgomp.fortran/simd1.f90: New test.
11747         * testsuite/libgomp.fortran/simd2.f90: New test.
11748         * testsuite/libgomp.fortran/simd3.f90: New test.
11749         * testsuite/libgomp.fortran/simd4.f90: New test.
11750         * testsuite/libgomp.fortran/taskgroup1.f90: New test.
11751
11752 2014-05-02  Jakub Jelinek  <jakub@redhat.com>
11753
11754         * testsuite/libgomp.c/simd-10.c: New test.
11755         * testsuite/libgomp.c/simd-11.c: New test.
11756         * testsuite/libgomp.c/simd-12.c: New test.
11757         * testsuite/libgomp.c/simd-13.c: New test.
11758
11759 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
11760
11761         * testsuite/libgomp.c++/atomic-14.C: Allow seq_cst and
11762         atomic type clauses in any order and optional comma in between.
11763         * testsuite/libgomp.c++/atomic-15.C: Likewise.
11764         * testsuite/libgomp.c/atomic-17.c: Likewise.
11765
11766         * testsuite/libgomp.c/simd-7.c: New test.
11767         * testsuite/libgomp.c/simd-8.c: New test.
11768         * testsuite/libgomp.c/simd-9.c: New test.
11769         * testsuite/libgomp.c/loop-16.c: New test.
11770
11771 2014-04-02  Richard Henderson  <rth@redhat.com>
11772
11773         * config/linux/futex.h (futex_wait): Get error value from errno.
11774         (futex_wake): Likewise.
11775
11776 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
11777
11778         PR c++/60331
11779         * testsuite/libgomp.c++/udr-11.C: New test.
11780         * testsuite/libgomp.c++/udr-12.C: New test.
11781         * testsuite/libgomp.c++/udr-13.C: New test.
11782         * testsuite/libgomp.c++/udr-14.C: New test.
11783         * testsuite/libgomp.c++/udr-15.C: New test.
11784         * testsuite/libgomp.c++/udr-16.C: New test.
11785         * testsuite/libgomp.c++/udr-17.C: New test.
11786         * testsuite/libgomp.c++/udr-18.C: New test.
11787         * testsuite/libgomp.c++/udr-19.C: New test.
11788
11789 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
11790
11791         Update copyright years
11792
11793 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
11794
11795         * hashtab.h: Use the standard form for the copyright notice.
11796
11797 2014-01-02  Tobias Burnus  <burnus@net-b.de>
11798
11799         * libgomp.texi: Bump @copying's copyright year.
11800
11801 2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>
11802
11803         * testsuite/libgomp.c/affinity-1.c: Remove alloca.h include. Replace
11804         alloca () with __builtin_alloca ().
11805         * testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
11806         * testsuite/libgomp.c/lock-3.c: Likewise.
11807         * testsuite/libgomp.c/pr48591.c: Likewise.
11808
11809 2013-12-17  Jakub Jelinek  <jakub@redhat.com>
11810
11811         PR testsuite/59534
11812         * testsuite/libgomp.fortran/retval1.f90 (e5): Avoid non-shortcircuited
11813         comparisons.
11814
11815 2013-12-16  Jakub Jelinek  <jakub@redhat.com>
11816
11817         PR libgomp/58756
11818         * testsuite/libgomp.c/pr58756.c: New test.
11819
11820 2013-12-12  Jakub Jelinek  <jakub@redhat.com>
11821
11822         PR libgomp/59467
11823         * testsuite/libgomp.fortran/crayptr2.f90: Add private (d) clause to
11824         !$omp parallel.
11825
11826 2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
11827
11828         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
11829         ALWAYS_CFLAGS.
11830         * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
11831         * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
11832         * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
11833         * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
11834         Likewise.
11835
11836         * libgomp_g.h: Include <stddef.h> for size_t.
11837
11838         * libgomp.spec.in: Update comment about libgomp's dependencies.
11839         * configure.ac: Likewise.
11840         * configure: Regenerate.
11841
11842 2013-10-16  Tobias Burnus  <burnus@net-b.de>
11843
11844         * libgomp.texi: (Runtime Library Routines): Update references for
11845         OpenMP 4.0. Add omp_get_cancellation, omp_get_default_device,
11846         omp_get_num_devices, omp_get_num_teams, omp_get_proc_bind,
11847         omp_get_team_num, omp_is_initial_device, omp_set_default_device.
11848         (Environment Variables): Update references for OpenMP 4.0. Add
11849         OMP_CANCELLATION, OMP_DEFAULT_DEVICE, OMP_PLACES.
11850         Move OMP_DISPLAY_ENV and OMP_PROC_BIND up to be in alphabetical
11851         order.
11852
11853 2013-10-14  Jakub Jelinek  <jakub@redhat.com>
11854
11855         * env.c (parse_bind_var): Initialize value to avoid
11856         (false positive) warning.
11857
11858 2013-10-12  Jakub Jelinek  <jakub@redhat.com>
11859
11860         PR libgomp/58691
11861         * config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
11862         to check variable.
11863         (gomp_init_num_threads): Move i variable declaration into
11864         #ifdef CPU_ALLOC_SIZE block.
11865         * config/linux/affinity.c (gomp_affinity_init_level): Test
11866         gomp_places_list_len == 0 rather than gomp_places_list == 0
11867         when checking for topology reading error.
11868         * team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
11869         * env.c (parse_affinity): Add ignore argument, if true, don't populate
11870         gomp_places_list, only parse env var and always return false.
11871         (parse_places_var): Likewise.  Don't check gomp_global_icv.bind_var.
11872         (initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
11873         vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
11874         and either of these variables were parsed correctly into a places
11875         list.
11876
11877 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
11878             Jakub Jelinek  <jakub@redhat.com>
11879
11880         * testsuite/libgomp.graphite/force-parallel-1.c: Expect 4 instead
11881         of 5 loopfn matches.
11882         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
11883         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
11884         * testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
11885         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
11886         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
11887         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
11888         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
11889         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
11890
11891 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
11892
11893         * Makefile.am (omp_lib.mod): Streamline rule.
11894         * Makefile.in: Regenerate.
11895
11896         * libgomp.texi (Runtime Library Routines): C linkage, don't throw
11897         exceptions.
11898
11899         * testsuite/libgomp.c/lib-1.c (main): Add missing error check.
11900         * testsuite/libgomp.fortran/lib1.f90: Likewise.
11901         * testsuite/libgomp.fortran/lib2.f: Likewise.
11902         * testsuite/libgomp.fortran/lib3.f: Likewise.
11903
11904         * configure.ac: Typo fix.
11905         * configure: Regenerate.
11906
11907         * testsuite/libgomp.fortran/openmp_version-1.f: New file.
11908         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
11909
11910         * omp.h.in: Don't touch the user's namespace.
11911
11912 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
11913             Tobias Burnus  <burnus@net-b.de>
11914             Richard Henderson  <rth@redhat.com>
11915
11916         * target.c: New file.
11917         * Makefile.am (libgomp_la_SOURCES): Add target.c.
11918         * Makefile.in: Regenerated.
11919         * libgomp_g.h (GOMP_task): Add depend argument.
11920         (GOMP_barrier_cancel, GOMP_loop_end_cancel,
11921         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
11922         GOMP_target_end_data, GOMP_target_update, GOMP_teams,
11923         GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
11924         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
11925         GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
11926         GOMP_taskgroup_start, GOMP_taskgroup_end,
11927         GOMP_parallel_sections): New prototypes.
11928         * fortran.c (omp_is_initial_device): Add ialias_redirect.
11929         (omp_is_initial_device_): New function.
11930         (ULP, STR1, STR2, ialias_redirect): Removed.
11931         (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
11932         omp_set_default_device_8_, omp_get_default_device_,
11933         omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
11934         functions.
11935         * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
11936         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
11937         GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
11938         @@GOMP_4.0.
11939         (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
11940         omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
11941         omp_set_default_device, omp_set_default_device_,
11942         omp_set_default_device_8_, omp_get_default_device,
11943         omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
11944         omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
11945         omp_get_team_num_): Export @@OMP_4.0.
11946         * team.c (struct gomp_thread_start_data): Add place field.
11947         (gomp_thread_start): Clear thr->thread_pool and
11948         thr->task before returning.  Use gomp_team_barrier_wait_final
11949         instead of gomp_team_barrier_wait.  Initialize thr->place.
11950         (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
11951         team_cancelled and task_queued_count fields.
11952         (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
11953         before calling pthread_exit.
11954         (gomp_free_thread): No longer static.  Use
11955         gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
11956         (gomp_team_start): Add flags argument.  Set
11957         thr->thread_pool->threads_busy to nthreads immediately after creating
11958         new pool.  Use gomp_managed_threads_lock instead of
11959         gomp_remaining_threads_lock.  Handle OpenMP 4.0 affinity.
11960         (gomp_team_end): Use gomp_managed_threads_lock instead of
11961         gomp_remaining_threads_lock.  Use gomp_team_barrier_wait_final instead
11962         of gomp_team_barrier_wait.  If team->team_cancelled, call
11963         gomp_fini_workshare on ws chain starting at team->work_shares_to_free
11964         rather than thr->ts.work_share.
11965         (initialize_team): Don't call gomp_sem_init here.
11966         * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
11967         caller.
11968         (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
11969         * env.c (gomp_global_icv): Add default_device_var, target_data and
11970         bind_var initializers.
11971         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
11972         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
11973         gomp_places_list_len): New variables.
11974         (parse_bind_var, parse_one_place, parse_places_var): New functions.
11975         (parse_affinity): Rewritten to construct OMP_PLACES list with unit
11976         sized places.
11977         (gomp_cancel_var): New global variable.
11978         (parse_int): New function.
11979         (handle_omp_display_env): New function.
11980         (initialize_env): Use it.  Initialize default_device_var.
11981         Parse OMP_CANCELLATION env var.  Use parse_bind_var to parse
11982         OMP_PROC_BIND instead of parse_boolean.  Use parse_places_var for
11983         OMP_PLACES parsing.  Don't call parse_affinity if OMP_PLACES has
11984         been successfully parsed (and call gomp_init_affinity in that case).
11985         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
11986         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
11987         omp_get_team_num, omp_is_initial_device): New functions.
11988         * libgomp.h: Include stdlib.h.
11989         (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
11990         Define.
11991         (struct target_mem_desc): Forward declare.
11992         (struct gomp_task_icv): Add default_device_var, target_data, bind_var
11993         and thread_limit_var fields.
11994         (gomp_get_num_devices): New prototype.
11995         (gomp_cancel_var): New extern decl.
11996         (struct gomp_team): Add work_shares_to_free, work_share_cancelled,
11997         team_cancelled and task_queued_count fields.  Add comments about
11998         task_{,queued_,running_}count.
11999         (gomp_cancel_kind): New enum.
12000         (gomp_work_share_end_cancel): New prototype.
12001         (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
12002         copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
12003         and depend fields.
12004         (struct gomp_taskgroup): New type.
12005         (struct gomp_task_depend_entry,
12006         struct gomp_dependers_vec): New types.
12007         (gomp_finish_task): Free depend_hash if non-NULL.
12008         (struct gomp_team_state): Add place_partition_off
12009         and place_partition_len fields.
12010         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
12011         gomp_places_list_len): New extern decls.
12012         (struct gomp_thread): Add place field.
12013         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
12014         (gomp_init_thread_affinity): Add place argument.
12015         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
12016         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
12017         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
12018         gomp_affinity_init_level, gomp_affinity_print_place): New
12019         prototypes.
12020         (gomp_team_start): Add flags argument.
12021         (gomp_thread_limit_var, gomp_remaining_threads_count,
12022         gomp_remaining_threads_lock): Remove.
12023         (gomp_managed_threads_lock): New variable.
12024         (struct gomp_thread_pool): Add threads_busy field.
12025         (gomp_free_thread): New prototype.
12026         * task.c: Include hashtab.h.
12027         (hash_entry_type): New typedef.
12028         (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
12029         (gomp_init_task): Clear dependers, depend_hash, depend_count,
12030         copy_ctors_done and taskgroup fields.
12031         (GOMP_task): Add depend argument, handle depend clauses.  If
12032         gomp_team_barrier_cancelled or if it's taskgroup has been
12033         cancelled, don't queue or start new tasks.  Set copy_ctors_done
12034         field if needed.  Initialize taskgroup field.  If copy_ctors_done
12035         and already cancelled, don't discard the task.  If taskgroup is
12036         non-NULL, enqueue the task into taskgroup queue.  Increment
12037         num_children field in taskgroup.  Increment task_queued_count.
12038         (gomp_task_run_pre, gomp_task_run_post_remove_parent,
12039         gomp_task_run_post_remove_taskgroup): New inline functions.
12040         (gomp_task_run_post_handle_depend_hash,
12041         gomp_task_run_post_handle_dependers,
12042         gomp_task_run_post_handle_depend): New functions.
12043         (GOMP_taskwait): Use them.  If more than one new tasks
12044         have been queued, wake other threads if needed.
12045         (gomp_barrier_handle_tasks): Likewise.  If
12046         gomp_team_barrier_cancelled, don't start any new tasks, just free
12047         all tasks.
12048         (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
12049         * omp_lib.f90.in
12050         (omp_proc_bind_kind, omp_proc_bind_false,
12051         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
12052         omp_proc_bind_spread): New params.
12053         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
12054         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
12055         omp_get_team_num, omp_is_initial_device): New interfaces.
12056         (omp_get_dynamic, omp_get_nested, omp_in_parallel,
12057         omp_get_max_threads, omp_get_num_procs, omp_get_num_threads,
12058         omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels,
12059         omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num,
12060         omp_get_team_size, omp_get_active_level, omp_in_final): Remove
12061         useless use omp_lib_kinds.
12062         * omp.h.in (omp_proc_bind_t): New typedef.
12063         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
12064         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
12065         omp_get_team_num, omp_is_initial_device): New prototypes.
12066         * loop.c (gomp_parallel_loop_start): Add flags argument, pass it
12067         through to gomp_team_start.
12068         (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
12069         GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
12070         Adjust gomp_parallel_loop_start callers.
12071         (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
12072         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
12073         GOMP_loop_end_cancel): New functions.
12074         (GOMP_parallel_end): Add ialias_redirect.
12075         * hashtab.h: New file.
12076         * libgomp.texi (Environment Variables): Minor cleanup,
12077         update section refs to OpenMP 4.0rc2.
12078         (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
12079         environment variables.
12080         * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
12081         team->work_shares_to_free to thr->ts.work_share before calling
12082         free_work_share.
12083         (gomp_work_share_end_cancel): New function.
12084         * config/linux/proc.c: Include errno.h.
12085         (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
12086         (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
12087         sizeof (cpu_set_t) to determine number of iterations.  Fix up check
12088         extern decl.  Use CPU_COUNT_S if available, or CPU_COUNT if
12089         gomp_cpuset_size is sizeof (cpu_set_t).
12090         (gomp_init_num_threads): Initialize gomp_cpuset_size,
12091         gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
12092         of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
12093         to pthread_getaffinity_np.  Free and clear gomp_cpusetp if it didn't
12094         contain any logical CPUs.
12095         (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
12096         is NULL.  Use gomp_cpusetp instead of &cpuset and pass
12097         gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
12098         pthread_getaffinity_np.  Check gomp_places_list instead of
12099         gomp_cpu_affinity.  Adjust gomp_cpuset_popcount caller.
12100         * config/linux/bar.c (gomp_barrier_wait_end,
12101         gomp_barrier_wait_last): Use BAR_* defines.
12102         (gomp_team_barrier_wait_end): Likewise.  Clear BAR_CANCELLED
12103         from state where needed.  Set work_share_cancelled to 0 on last
12104         thread.
12105         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
12106         gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
12107         functions.
12108         * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
12109         Add cpusetsize argument.
12110         (gomp_cpuset_size, gomp_cpusetp): Declare.
12111         * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
12112         (affinity_counter): Remove.
12113         (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
12114         if CPU_ALLOC_SIZE isn't defined.
12115         (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
12116         silently create OMP_PLACES=threads, if it is non-NULL afterwards,
12117         bind current thread to the first place.
12118         (gomp_init_thread_affinity): Rewritten.  Add place argument, just
12119         pthread_setaffinity_np to gomp_places_list[place].
12120         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
12121         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
12122         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
12123         gomp_affinity_init_level, gomp_affinity_print_place): New functions.
12124         * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
12125         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
12126         (gomp_barrier_t): Add awaited_final field.
12127         (gomp_barrier_init): Initialize awaited_final field.
12128         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
12129         gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
12130         prototypes.
12131         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.  Use BAR_*
12132         defines.
12133         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
12134         gomp_team_barrier_cancelled): New inline functions.
12135         (gomp_barrier_last_thread,
12136         gomp_team_barrier_set_task_pending,
12137         gomp_team_barrier_clear_task_pending,
12138         gomp_team_barrier_set_waiting_for_tasks,
12139         gomp_team_barrier_waiting_for_tasks,
12140         gomp_team_barrier_done): Use BAR_* defines.
12141         * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
12142         (gomp_barrier_wait_end): Use BAR_* defines.
12143         (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
12144         Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
12145         Use BAR_* defines.
12146         (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
12147         gomp_team_barrier_cancel): New functions.
12148         * config/posix/affinity.c (gomp_init_thread_affinity): Add place
12149         argument.
12150         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
12151         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
12152         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
12153         gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
12154         * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
12155         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
12156         (gomp_barrier_t): Add cancellable field.
12157         (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
12158         gomp_team_barrier_cancel): New prototypes.
12159         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
12160         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
12161         gomp_team_barrier_cancelled): New inline functions.
12162         (gomp_barrier_wait_start, gomp_barrier_last_thread,
12163         gomp_team_barrier_set_task_pending,
12164         gomp_team_barrier_clear_task_pending,
12165         gomp_team_barrier_set_waiting_for_tasks,
12166         gomp_team_barrier_waiting_for_tasks,
12167         gomp_team_barrier_done): Use BAR_* defines.
12168         * barrier.c (GOMP_barrier_cancel): New function.
12169         * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
12170         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
12171         omp_proc_bind_spread): New params.
12172         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
12173         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
12174         omp_get_team_num, omp_is_initial_device): New externals.
12175         * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
12176         New functions.
12177         (gomp_resolve_num_threads): Adjust for thread_limit now being in
12178         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
12179         infinity.  If not nested, just return minimum of max_num_threads
12180         and icv->thread_limit_var and if thr->thread_pool, set threads_busy
12181         to the returned value.  Otherwise, don't update atomically
12182         gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
12183         (GOMP_parallel_end): Adjust for thread_limit now being in
12184         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
12185         infinity.  Adjust threads_busy in the pool rather than
12186         gomp_remaining_threads_count.  Remember team->nthreads and call
12187         gomp_team_end before adjusting threads_busy, if not nested
12188         afterwards, just set it to 1 non-atomically.  Add ialias.
12189         (GOMP_parallel_start): Adjust gomp_team_start caller.
12190         * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
12191         * testsuite/libgomp.c/affinity-1.c: New test.
12192         * testsuite/libgomp.c/atomic-15.c: New test.
12193         * testsuite/libgomp.c/atomic-16.c: New test.
12194         * testsuite/libgomp.c/atomic-17.c: New test.
12195         * testsuite/libgomp.c/cancel-for-1.c: New test.
12196         * testsuite/libgomp.c/cancel-for-2.c: New test.
12197         * testsuite/libgomp.c/cancel-parallel-1.c: New test.
12198         * testsuite/libgomp.c/cancel-parallel-2.c: New test.
12199         * testsuite/libgomp.c/cancel-parallel-3.c: New test.
12200         * testsuite/libgomp.c/cancel-sections-1.c: New test.
12201         * testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
12202         * testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
12203         * testsuite/libgomp.c/depend-1.c: New test.
12204         * testsuite/libgomp.c/depend-2.c: New test.
12205         * testsuite/libgomp.c/depend-3.c: New test.
12206         * testsuite/libgomp.c/depend-4.c: New test.
12207         * testsuite/libgomp.c/for-1.c: New test.
12208         * testsuite/libgomp.c/for-1.h: New file.
12209         * testsuite/libgomp.c/for-2.c: New test.
12210         * testsuite/libgomp.c/for-2.h: New file.
12211         * testsuite/libgomp.c/for-3.c: New test.
12212         * testsuite/libgomp.c/pr58392.c: New test.
12213         * testsuite/libgomp.c/simd-1.c: New test.
12214         * testsuite/libgomp.c/simd-2.c: New test.
12215         * testsuite/libgomp.c/simd-3.c: New test.
12216         * testsuite/libgomp.c/simd-4.c: New test.
12217         * testsuite/libgomp.c/simd-5.c: New test.
12218         * testsuite/libgomp.c/simd-6.c: New test.
12219         * testsuite/libgomp.c/target-1.c: New test.
12220         * testsuite/libgomp.c/target-2.c: New test.
12221         * testsuite/libgomp.c/target-3.c: New test.
12222         * testsuite/libgomp.c/target-4.c: New test.
12223         * testsuite/libgomp.c/target-5.c: New test.
12224         * testsuite/libgomp.c/target-6.c: New test.
12225         * testsuite/libgomp.c/target-7.c: New test.
12226         * testsuite/libgomp.c/taskgroup-1.c: New test.
12227         * testsuite/libgomp.c/thread-limit-1.c: New test.
12228         * testsuite/libgomp.c/thread-limit-2.c: New test.
12229         * testsuite/libgomp.c/thread-limit-3.c: New test.
12230         * testsuite/libgomp.c/udr-1.c: New test.
12231         * testsuite/libgomp.c/udr-2.c: New test.
12232         * testsuite/libgomp.c/udr-3.c: New test.
12233         * testsuite/libgomp.c++/affinity-1.C: New test.
12234         * testsuite/libgomp.c++/atomic-10.C: New test.
12235         * testsuite/libgomp.c++/atomic-11.C: New test.
12236         * testsuite/libgomp.c++/atomic-12.C: New test.
12237         * testsuite/libgomp.c++/atomic-13.C: New test.
12238         * testsuite/libgomp.c++/atomic-14.C: New test.
12239         * testsuite/libgomp.c++/atomic-15.C: New test.
12240         * testsuite/libgomp.c++/cancel-for-1.C: New test.
12241         * testsuite/libgomp.c++/cancel-for-2.C: New test.
12242         * testsuite/libgomp.c++/cancel-parallel-1.C: New test.
12243         * testsuite/libgomp.c++/cancel-parallel-2.C: New test.
12244         * testsuite/libgomp.c++/cancel-parallel-3.C: New test.
12245         * testsuite/libgomp.c++/cancel-sections-1.C: New test.
12246         * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
12247         * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
12248         * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
12249         * testsuite/libgomp.c++/cancel-test.h: New file.
12250         * testsuite/libgomp.c++/for-9.C: New test.
12251         * testsuite/libgomp.c++/for-10.C: New test.
12252         * testsuite/libgomp.c++/for-11.C: New test.
12253         * testsuite/libgomp.c++/simd-1.C: New test.
12254         * testsuite/libgomp.c++/simd-2.C: New test.
12255         * testsuite/libgomp.c++/simd-3.C: New test.
12256         * testsuite/libgomp.c++/simd-4.C: New test.
12257         * testsuite/libgomp.c++/simd-5.C: New test.
12258         * testsuite/libgomp.c++/simd-6.C: New test.
12259         * testsuite/libgomp.c++/simd-7.C: New test.
12260         * testsuite/libgomp.c++/simd-8.C: New test.
12261         * testsuite/libgomp.c++/target-1.C: New test.
12262         * testsuite/libgomp.c++/target-2.C: New test.
12263         * testsuite/libgomp.c++/target-2-aux.cc: New file.
12264         * testsuite/libgomp.c++/target-3.C: New test.
12265         * testsuite/libgomp.c++/taskgroup-1.C: New test.
12266         * testsuite/libgomp.c++/udr-1.C: New test.
12267         * testsuite/libgomp.c++/udr-2.C: New test.
12268         * testsuite/libgomp.c++/udr-3.C: New test.
12269         * testsuite/libgomp.c++/udr-4.C: New test.
12270         * testsuite/libgomp.c++/udr-5.C: New test.
12271         * testsuite/libgomp.c++/udr-6.C: New test.
12272         * testsuite/libgomp.c++/udr-7.C: New test.
12273         * testsuite/libgomp.c++/udr-8.C: New test.
12274         * testsuite/libgomp.c++/udr-9.C: New test.
12275
12276 2013-09-20  Jakub Jelinek  <jakub@redhat.com>
12277
12278         PR testsuite/57605
12279         * testsuite/lib/libgomp.exp: Add -fdiagnostics-color=never to
12280         ALWAYS_CFLAGS.
12281
12282 2013-09-20  Alan Modra  <amodra@gmail.com>
12283
12284         * configure: Regenerate.
12285
12286 2013-09-19  Jakub Jelinek  <jakub@redhat.com>
12287
12288         * testsuite/libgomp.c/sections-2.c: New test.
12289
12290 2013-06-28  Marcus Shawcroft  <marcus.shawcroft@arm.com>
12291
12292         * testsuite/libgomp.fortran/strassen.f90:
12293         Add dg-skip-if aarch64_tiny.
12294
12295 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
12296             Cesar Philippidis  <cesar@codesourcery.com>
12297
12298         * testsuite/lib/libgomp.exp: Reorder lib loads into dependency order.
12299         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
12300         * testsuite/libgomp.c/c.exp: load_gcc_lib gcc-dg.exp.
12301         * testsuite/libgomp.fortran/fortran.exp: Likewise.
12302         * testsuite/libgomp.graphite/graphite.exp: Likewise.
12303         * testsuite/libgomp.c++/c++.exp: load_gcc_lib gcc-dg.exp.
12304         Use dg-runtest rather than gfortran-dg-runtest.
12305
12306 2013-06-10  Thomas Schwinge  <thomas@codesourcery.com>
12307
12308         * testsuite/libgomp.c/icv-2.c: Extend current handling of
12309         Linux-based x86 systems to cover all GNU systems.
12310         * testsuite/libgomp.c/lock-3.c: Likewise.
12311         * testsuite/libgomp.c/pr48591.c: Likewise.
12312
12313 2013-06-06  Thomas Schwinge  <thomas@codesourcery.com>
12314
12315         * configure.tgt (XCFLAGS): Add -ftls-model=initial-exec for
12316         GNU/Hurd, as done for Linux-based systems.
12317
12318         * config/posix/ptrlock.h: Fix comment.
12319
12320 2013-05-27  Tobias Burnus  <burnus@net-b.de>
12321
12322         PR fortran/57423
12323         * libgomp.texi (omp_set_dynamic, omp_set_nested, omp_set_nested,
12324         omp_set_num_threads, omp_init_lock, omp_set_lock, omp_test_lock,
12325         omp_unset_lock, omp_destroy_lock, omp_init_nest_lock,
12326         omp_set_nest_lock, omp_test_nest_lock, omp_unset_nest_lock,
12327         omp_destroy_nest_lock): Correct arguments to match the one in
12328         the OpenMP spec.
12329         * omp_lib.f90.in (omp_init_lock, omp_init_nest_lock, omp_destroy_lock
12330         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock, omp_unset_lock,
12331         omp_unset_nest_lock, omp_set_dynamic, omp_set_nested,
12332         omp_set_num_threads, omp_test_lock, omp_test_nest_lock): Ditto.
12333
12334 2013-05-16  Jakub Jelinek  <jakub@redhat.com>
12335
12336         * testsuite/libgomp.c/loop-13.c: New test.
12337         * testsuite/libgomp.c/loop-14.c: New test.
12338         * testsuite/libgomp.c/loop-15.c: New test.
12339         * testsuite/libgomp.c++/loop-13.C: New test.
12340         * testsuite/libgomp.c++/loop-14.C: New test.
12341         * testsuite/libgomp.c++/loop-15.C: New test.
12342
12343 2013-02-06  Jakub Jelinek  <jakub@redhat.com>
12344
12345         PR middle-end/56217
12346         * testsuite/libgomp.c++/pr56217.C: New test.
12347
12348 2013-02-01  Alan Modra  <amodra@gmail.com>
12349
12350         * task.c (GOMP_task, GOMP_taskwait): Comment.
12351
12352 2013-01-31  Dmitry Vyukov  <dvyukov@gcc.gnu.org>
12353             Joost VandeVondele  <Joost.VandeVondele@mat.ethz.ch>
12354
12355         PR libgomp/55561
12356         * config/linux/wait.h (do_spin): Use atomic load for addr.
12357         * config/linux/ptrlock.c (gomp_ptrlock_get_slow): Use atomic
12358         for intptr and ptrlock.
12359         * config/linux/ptrlock.h (gomp_ptrlock_get): Use atomic load
12360         for ptrlock.
12361
12362 2013-01-22  Alan Modra  <amodra@gmail.com>
12363
12364         PR libgomp/51376
12365         PR libgomp/56073
12366         * task.c (GOMP_task): Revert 2011-12-09 change.
12367         (GOMP_taskwait): Likewise.  Instead use atomic load with acquire
12368         barrier to read task->children..
12369         (gomp_barrier_handle_tasks): ..and matching atomic store with
12370         release barrier here when setting parent->children to NULL.
12371
12372 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
12373             Tobias Burnus  <burnus@net-b.de>
12374
12375         PR driver/55884
12376         * testsuite/libgomp.fortran/fortran.exp: Use
12377         -fintrinsic-modules-path= instead of
12378         -fintrinsic-modules-path.
12379
12380 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
12381
12382         Update copyright years.
12383
12384 2012-12-19  Tobias Burnus  <burnus@net-b.de>
12385
12386         * testsuite/libgomp.fortran/fortran.exp: Set
12387         -fintrinsic-modules-path.
12388
12389 2012-12-19  Tobias Burnus  <burnus@net-b.de>
12390
12391         * testsuite/libgomp.fortran/use_intrinsic_1.f90: New; moved
12392         from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90.
12393
12394 2012-11-21  Jakub Jelinek  <jakub@redhat.com>
12395
12396         PR libgomp/55411
12397         * team.c (gomp_free_thread): Decrease gomp_managed_threads
12398         if pool had any threads_used.
12399
12400 2012-11-07  Jack Howarth <howarth@bromo.med.uc.edu>
12401
12402         * testsuite/libgomp.c++/pr24455.C: Use
12403         -Wl,-undefined,dynamic_lookup on darwin.
12404
12405 2012-11-07  David Edelsohn  <dje.gcc@gmail.com>
12406
12407         * testsuite/libgomp.c++/pr24455.C: Use -Wl,-G on AIX.
12408
12409 2012-10-24  Dominique d'Humieres  <dominiq@lps.ens.fr>
12410
12411         * testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.
12412
12413 2012-10-23  Ian Bolton  <ian.bolton@arm.com>
12414             Jim MacArthur  <jim.macarthur@arm.com>
12415             Marcus Shawcroft  <marcus.shawcroft@arm.com>
12416             Nigel Stephens  <nigel.stephens@arm.com>
12417             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12418             Richard Earnshaw  <rearnsha@arm.com>
12419             Sofiane Naci  <sofiane.naci@arm.com>
12420             Stephen Thomas  <stephen.thomas@arm.com>
12421             Tejas Belagod  <tejas.belagod@arm.com>
12422             Yufeng Zhang  <yufeng.zhang@arm.com>
12423
12424         * configure.tgt: Add AArch64.
12425
12426 2012-10-04  Jason Merrill  <jason@redhat.com>
12427
12428         * testsuite/libgomp.c++/tls-init1.C: New.
12429
12430 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
12431
12432         * configure: Regenerated.
12433
12434 2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>
12435
12436         * config/linux/mips/futex.h (sys_futex0): Change to static
12437         function with noinline, nomips16 attributes under MIPS16. Adjust
12438         asm statement to place 'li v0,SYS_futex' immediately before
12439         syscall insn.
12440
12441 2012-07-04  Sandra Loosemore <sandra@codesourcery.com>
12442
12443         * libgomp.texi (Library Index): Renamed from "Index" to prevent
12444         conflict with index.html on case-insensitive file systems.
12445
12446 2012-07-03  Uros Bizjak  <ubizjak@gmail.com>
12447
12448         * config/linux/x86/futex.h (cpu_relax): Use __builtin_ia32_pause.
12449         * testsuite/libgomp.c/sort-1.c (busy_wait): Ditto.
12450
12451 2012-07-02  Richard Guenther  <rguenther@suse.de>
12452             Michael Matz  <matz@suse.de>
12453             Tobias Grosser <tobias@grosser.es>
12454             Sebastian Pop <sebpop@gmail.com>
12455
12456         * testsuite/libgomp.graphite/force-parallel-4.c: Adjust.
12457         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
12458         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
12459         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
12460
12461 2012-06-28  Andreas Schwab  <schwab@linux-m68k.org>
12462
12463         * libgomp.texi: Include gpl_v3.texi instead of gpl.texi.
12464
12465 2012-06-22  Richard Guenther  <rguenther@suse.de>
12466
12467         Merge from graphite branch
12468         2012-01-13  Tobias Grosser  <tobias@grosser.es>
12469
12470         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
12471         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
12472
12473 2012-06-07  Jakub Jelinek  <jakub@redhat.com>
12474
12475         PR middle-end/53580
12476         * testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
12477         use GOMP_barrier () call instead.
12478         * testsuite/libgomp.c/pr26943-3.c: Likewise.
12479         * testsuite/libgomp.c/pr26943-4.c: Likewise.
12480         * testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
12481         call GOMP_barrier instead.
12482         * testsuite/libgomp.fortran/vla5.f90: Likewise.
12483
12484 2012-06-06  Jakub Jelinek  <jakub@redhat.com>
12485
12486         PR libgomp/52993
12487         * config/linux/lock.c (gomp_init_nest_lock_25): Fix up last
12488         argument to memset call.
12489
12490 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
12491
12492         * configure: Regenerated.
12493
12494 2012-04-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12495
12496         * testsuite/lib/libgomp.exp: Add -fno-diagnostics-show-caret.
12497
12498 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
12499
12500         PR bootstrap/52812
12501         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
12502
12503 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
12504
12505         PR middle-end/52547
12506         * testsuite/libgomp.c/pr52547.c: New test.
12507
12508 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
12509
12510         * testsuite/lib/libgomp.exp: load fortran-modules.exp
12511
12512 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12513
12514         * configure.tgt (mips-sgi-irix6*): Remove.
12515
12516 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12517
12518         * configure.tgt (alpha*-dec-osf*): Remove.
12519
12520         * config/osf/sem.h: Remove.
12521         * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally.
12522
12523 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
12524
12525         * config/linux/sparc/futex.h (cpu_relax): Read from CC register.
12526
12527 2012-02-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12528
12529         PR libstdc++/52188
12530         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove symvers_renaming.
12531         Remove ENABLE_SYMVERS_SOL2.
12532         * configure: Regenerate.
12533         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
12534         (PREPROCESS): New variable.
12535         (libgomp.ver): New target.
12536         [LIBGOMP_BUILD_VERSIONED_SHLIB &&
12537         LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
12538         LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
12539         Use libgomp.ver.
12540         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
12541         * Makefile.in: Regenerate.
12542
12543 2012-02-14  Walter Lee  <walt@tilera.com>
12544
12545         * configure.tgt: Handle tilegx and tilepro.
12546         * config/linux/tile/futex.h: New file.
12547
12548 2012-02-08  Richard Guenther  <rguenther@suse.de>
12549
12550         PR tree-optimization/46886
12551         * testsuite/libgomp.c/pr46886.c: New testcase.
12552
12553 2012-01-25  Matthias Klose  <doko@ubuntu.com>
12554
12555         * config/linux/arm: Remove empty directory.
12556         * configure.tgt (config_path): Remove linux-arm for arm*-*-linux*.
12557
12558 2011-12-09  Alan Modra  <amodra@gmail.com>
12559
12560         PR libgomp/51376
12561         * task.c (GOMP_taskwait): Don't access task->children outside of
12562         task_lock mutex region.
12563         (GOMP_task): Likewise.
12564
12565 2011-12-06  Jakub Jelinek  <jakub@redhat.com>
12566
12567         PR libgomp/51132
12568         * testsuite/libgomp.graphite/force-parallel-1.c: Move large arrays
12569         to file scope.
12570         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
12571         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
12572         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
12573         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
12574         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
12575
12576 2011-12-02  Alan Modra  <amodra@gmail.com>
12577
12578         * config/linux/affinity.c: Use atomic rather than sync builtin.
12579         * config/linux/lock.c: Likewise.
12580         * config/linux/ptrlock.h: Likewise.
12581         * config/linux/ptrlock.c: Likewise.
12582         * config/linux/ptrlock.h (gomp_ptrlock_set): Always write here..
12583         * config/linux/ptrlock.c (gomp_ptrlock_set_slow): ..not here.
12584         * config/linux/futex.h (atomic_write_barrier): Delete unused function.
12585         * config/linux/alpha/futex.h (atomic_write_barrier): Likewise.
12586         * config/linux/ia64/futex.h (atomic_write_barrier): Likewise.
12587         * config/linux/mips/futex.h (atomic_write_barrier): Likewise.
12588         * config/linux/powerpc/futex.h (atomic_write_barrier): Likewise.
12589         * config/linux/s390/futex.h (atomic_write_barrier): Likewise.
12590         * config/linux/sparc/futex.h (atomic_write_barrier): Likewise.
12591         * config/linux/x86/futex.h (atomic_write_barrier): Likewise.
12592
12593 2011-11-30  Alan Modra  <amodra@gmail.com>
12594
12595         PR libgomp/51298
12596         * config/linux/bar.h: Use atomic rather than sync builtins.
12597         * config/linux/bar.c: Likewise.  Add missing acquire
12598         synchronisation on generation field.
12599         * task.c (gomp_barrier_handle_tasks): Regain lock so as to not
12600         double unlock.
12601
12602 2011-11-30  Alan Modra  <amodra@gmail.com>
12603
12604         * ordered.c (gomp_ordered_sync): Add MEMMODEL_ACQ_REL fence.
12605         * critical.c (GOMP_critical_start): Add MEMMODEL_RELEASE fence.
12606         * config/linux/mutex.h: Use atomic rather than sync builtins.
12607         * config/linux/mutex.c: Likewise.  Comment.  Use -1 for waiting state.
12608         * config/linux/omp-lock.h: Comment fix.
12609         * config/linux/arm/mutex.h: Delete.
12610         * config/linux/powerpc/mutex.h: Delete.
12611         * config/linux/ia64/mutex.h: Delete.
12612         * config/linux/mips/mutex.h: Delete.
12613
12614 2011-11-30  Alan Modra  <amodra@gmail.com>
12615
12616         PR libgomp/51249
12617         * config/linux/sem.h: Rewrite.
12618         * config/linux/sem.c: Rewrite.
12619
12620 2011-11-28  Richard Henderson  <rth@redhat.com>
12621
12622         * libgomp.h (enum memmodel): New.
12623
12624 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
12625
12626         * configure: Regenerate.
12627
12628 2011-10-10  Matthias Klose  <doko@ubuntu.com>
12629
12630         * config/posix95: Remove empty directory.
12631
12632 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
12633
12634         * testsuite/libgomp.fortran/threadprivate4.f90: New test.
12635
12636 2011-08-19  Jakub Jelinek  <jakub@redhat.com>
12637
12638         PR fortran/49792
12639         * testsuite/libgomp.fortran/pr49792-1.f90: New test.
12640         * testsuite/libgomp.fortran/pr49792-2.f90: New test.
12641
12642 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12643
12644         * config/posix95/lock.c, posix95/omp-lock.h: Remove.
12645
12646 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12647
12648         PR libgomp/49965
12649         * testsuite/libgomp.c++/task-8.C: Replaced err by errval.
12650
12651 2011-08-03  Uros Bizjak  <ubizjak@gmail.com>
12652
12653         * config/linux/proc.h: New.
12654         * config/linux/proc.c: Include "proc.h".  Do not include <sched.h>.
12655         (gomp_cpuset_popcount): Rename from cpuset_popcount.  No more static.
12656         (gomp_init_num_threads): Update call to cpuset_popcount.
12657         (get_num_procs): Ditto.
12658         * config/linux/affinity.c (gomp_init_affinity): Call
12659         gomp_cpuset_popcount.
12660
12661 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
12662
12663         PR fortran/42041
12664         PR fortran/46752
12665         * omp.h.in (omp_in_final): New prototype.
12666         * omp_lib.f90.in (omp_in_final): New interface.
12667         (omp_integer_kind, omp_logical_kind): Remove
12668         and replace all its uses in the module with 4.
12669         (openmp_version): Change to 201107.
12670         * omp_lib.h.in (omp_sched_static, omp_sched_dynamic,
12671         omp_sched_guided, omp_sched_auto): Use omp_sched_kind
12672         kind for the parameters.
12673         (omp_in_final): New external.
12674         (openmp_version): Change to 201107.
12675         * task.c (omp_in_final): New function.
12676         (gomp_init_task): Initialize final_task.
12677         (GOMP_task): Remove unused attribute from flags.  Handle final
12678         tasks.
12679         (GOMP_taskyield): New function.
12680         (omp_in_final): Return true if if (false) or final (true) task
12681         or descendant of final (true).
12682         * fortran.c (omp_in_final_): New function.
12683         * libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_.
12684         (GOMP_3.0): Export GOMP_taskyield.
12685         * env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New
12686         variables.
12687         (parse_unsigned_long_list): New function.
12688         (initialize_env): Use it for OMP_NUM_THREADS.  Call parse_boolean
12689         with "OMP_PROC_BIND".  If OMP_PROC_BIND=true, call gomp_init_affinity
12690         even if parse_affinity returned false.
12691         * config/linux/affinity.c (gomp_init_affinity): Handle
12692         gomp_cpu_affinity_len == 0.
12693         * libgomp_g.h (GOMP_taskyield): New prototype.
12694         * libgomp.h (struct gomp_task): Add final_task field.
12695         (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs.
12696         * team.c (gomp_team_start): Override new task's nthreads_var icv
12697         if list form OMP_NUM_THREADS has been used and it has value for
12698         the new nesting level.
12699
12700         * testsuite/libgomp.c/atomic-11.c: New test.
12701         * testsuite/libgomp.c/atomic-12.c: New test.
12702         * testsuite/libgomp.c/atomic-13.c: New test.
12703         * testsuite/libgomp.c/atomic-14.c: New test.
12704         * testsuite/libgomp.c/reduction-6.c: New test.
12705         * testsuite/libgomp.c/task-5.c: New test.
12706         * testsuite/libgomp.c++/atomic-2.C: New test.
12707         * testsuite/libgomp.c++/atomic-3.C: New test.
12708         * testsuite/libgomp.c++/atomic-4.C: New test.
12709         * testsuite/libgomp.c++/atomic-5.C: New test.
12710         * testsuite/libgomp.c++/atomic-6.C: New test.
12711         * testsuite/libgomp.c++/atomic-7.C: New test.
12712         * testsuite/libgomp.c++/atomic-8.C: New test.
12713         * testsuite/libgomp.c++/atomic-9.C: New test.
12714         * testsuite/libgomp.c++/task-8.C: New test.
12715         * testsuite/libgomp.c++/reduction-4.C: New test.
12716         * testsuite/libgomp.fortran/allocatable7.f90: New test.
12717         * testsuite/libgomp.fortran/allocatable8.f90: New test.
12718         * testsuite/libgomp.fortran/crayptr3.f90: New test.
12719         * testsuite/libgomp.fortran/omp_atomic3.f90: New test.
12720         * testsuite/libgomp.fortran/omp_atomic4.f90: New test.
12721         * testsuite/libgomp.fortran/pointer1.f90: New test.
12722         * testsuite/libgomp.fortran/pointer2.f90: New test.
12723         * testsuite/libgomp.fortran/task4.f90: New test.
12724
12725 2011-08-02  Tobias Burnus  <burnus@net-b.de>
12726
12727         * libgomp.texi: Update OpenMP spec references to 3.1.
12728         (omp_in_final,OMP_PROC_BIND): New sections.
12729         (OMP_NUM_THREADS): Document that the value can be now a list.
12730         (GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref.
12731
12732 2011-08-02  H.J. Lu  <hongjiu.lu@intel.com>
12733
12734         * config/linux/x86/futex.h: Check __x86_64__ instead of
12735         __LP64__.
12736
12737 2011-07-29  Jakub Jelinek  <jakub@redhat.com>
12738
12739         PR middle-end/49897
12740         PR middle-end/49898
12741         * testsuite/libgomp.c/pr49897-1.c: New test.
12742         * testsuite/libgomp.c/pr49897-2.c: New test.
12743         * testsuite/libgomp.c/pr49898-1.c: New test.
12744         * testsuite/libgomp.c/pr49898-2.c: New test.
12745
12746 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
12747
12748         * testsuite/lib/libgomp.exp (libgomp_init): Add -march=i486
12749         for ia32 instead of ilp32.
12750
12751         * testsuite/libgomp.c/atomic-1.c: Require ia32 instead of ilp32.
12752         * testsuite/libgomp.c/atomic-6.c: Likewise.
12753
12754 2011-07-23  Sebastian Pop  <sebastian.pop@amd.com>
12755
12756         * testsuite/libgomp.graphite/force-parallel-1.c: Un-xfail.
12757         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust pattern.
12758
12759 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12760
12761         PR libgomp/45351
12762         * config/osf/sem.h: New file.
12763         * configure.tgt (alpha*-dec-osf*): Prepend osf to config_path.
12764
12765 2011-07-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12766
12767         PR target/49541
12768         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -lgomp to
12769         ldflags.
12770
12771 2011-07-15  Jakub Jelinek  <jakub@redhat.com>
12772
12773         * config/linux/wait.h (do_spin): New inline, largely copied
12774         from do_wait, just don't do futex_wait here, instead return true if
12775         it should be done.
12776         (do_wait): Implement using do_spin.
12777         * config/linux/mutex.h (gomp_mutex_lock_slow): Add an int argument
12778         to prototype.
12779         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
12780         __sync_bool_compare_and_swap, pass the oldval to
12781         gomp_mutex_lock_slow.
12782         * config/linux/mutex.c (gomp_mutex_lock_slow): Add oldval argument.
12783         If all mutex contenders are just spinning and not sleeping, don't
12784         change state to 2 unnecessarily.  Optimize the loop when state has
12785         already become 2 to use just one atomic operation per loop instead
12786         of two.
12787         * config/linux/ia64/mutex.h (gomp_mutex_lock_slow): Add an int argument
12788         to prototype.
12789         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
12790         __sync_bool_compare_and_swap, pass the oldval to
12791         gomp_mutex_lock_slow.
12792
12793 2011-06-22  Jakub Jelinek  <jakub@redhat.com>
12794
12795         PR libgomp/49490
12796         * iter.c (gomp_iter_static_next): For chunk size 0
12797         only use n ceil/ nthreads size for the first
12798         n % nthreads threads in the team instead of
12799         all threads except for the last few ones which
12800         get less work or none at all.
12801         * iter_ull.c (gomp_iter_ull_static_next): Likewise.
12802         * env.c (parse_schedule): If OMP_SCHEDULE doesn't have
12803         chunk argument, set run_sched_modifier to 0 for static
12804         resp. 1 for other kinds.  If chunk argument is 0
12805         and not static, set value to 1.
12806
12807 2011-05-19  Jakub Jelinek  <jakub@redhat.com>
12808
12809         PR c++/49043
12810         * testsuite/libgomp.c++/pr49043.C: New test.
12811
12812         PR c++/48869
12813         * testsuite/libgomp.c++/pr48869.C: New test.
12814
12815 2011-05-06  Jakub Jelinek  <jakub@redhat.com>
12816
12817         PR fortran/48894
12818         * fortran.c: Include limits.h.
12819         (TO_INT): Define.
12820         (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
12821         *set.
12822         (omp_set_num_threads_8_, omp_set_schedule_8_,
12823         omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
12824         omp_get_team_size_8_): Use TO_INT macro.
12825         * testsuite/libgomp.fortran/pr48894.f90: New test.
12826
12827 2011-04-13  Jakub Jelinek  <jakub@redhat.com>
12828
12829         PR middle-end/48591
12830         * testsuite/libgomp.c/pr48591.c: New test.
12831
12832 2011-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12833
12834         PR bootstrap/48135
12835         * acinclude.m4 (enable_symvers): Handle --disable-symvers.
12836         * configure: Regenerate.
12837
12838 2011-02-27  Jakub Jelinek  <jakub@redhat.com>
12839
12840         PR fortran/47886
12841         * testsuite/libgomp.fortran/task3.f90: New test.
12842
12843 2011-02-24  Tobias Burnus  <burnus@net-b.de>
12844
12845         * libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.
12846
12847 2011-02-23  Jakub Jelinek  <jakub@redhat.com>
12848
12849         PR libgomp/47854
12850         * libgomp.texi (omp_get_wtime): Don't say time in the past
12851         must be Unix Epoch.
12852
12853 2011-02-18  Jakub Jelinek  <jakub@redhat.com>
12854
12855         PR libgomp/47804
12856         * testsuite/libgomp.fortran/fortran.exp: Check for both
12857         libquadmath.a and libquadmath.${shlib_ext}.  If neither exists,
12858         but $blddir != "", still append ${blddir}/${lang_library_path}
12859         to ld_library_path.
12860
12861 2011-02-16  Tobias Burnus  <burnus@net-b.de>
12862
12863         PR libgomp/47758
12864         * testsuite/libgomp.fortran/fortran.exp: Check for the existence
12865         of libquadmath.a before adding its libpath to ldflags.
12866
12867 2011-02-14  Jakub Jelinek  <jakub@redhat.com>
12868
12869         PR libgomp/47731
12870         * config/linux/futex.h (futex_wait): Pass NULL as timeout argument
12871         to FUTEX_WAIT futex syscall.
12872         * config/linux/wait.h: Include <futex.h> instead of "futex.h".
12873
12874 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12875
12876         * configure: Regenerate.
12877
12878 2011-01-20  Benjamin Kosnik  <bkoz@redhat.com>
12879
12880         PR libstdc++/36104
12881         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Accept gnu variants.
12882
12883 2011-01-16  Gerald Pfeifer
12884
12885         * configure.tgt (*-*-freebsd*): Add -lpthread to XLDFLAGS.
12886
12887 2010-12-14  Jakub Jelinek  <jakub@redhat.com>
12888
12889         PR fortran/46874
12890         * libgomp.fortran/allocatable6.f90: New test.
12891
12892 2010-12-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12893
12894         * acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
12895         * configure: Regenerate.
12896
12897 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
12898
12899         PR target/40125
12900         PR lto/46695
12901         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
12902         * Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags.
12903         * aclocal.m4: Regenerate.
12904         * configure: Regenerate.
12905         * Makefile.in: Regenerate.
12906         * testsuite/Makefile.in: Regenerate.
12907
12908 2010-12-02  Jakub Jelinek  <jakub@redhat.com>
12909
12910         PR fortran/46753
12911         * libgomp.fortran/pr46753.f90: New test.
12912
12913         PR libgomp/43706
12914         * env.c (initialize_env): Default to spin count 300000
12915         instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
12916         is specified.
12917
12918         PR libgomp/45240
12919         * parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
12920         at the end if sync builtins aren't supported.
12921
12922 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12923
12924         * configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
12925
12926 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12927
12928         * testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0.
12929
12930 2010-11-24  Iain Sandoe  <iains@gcc.gnu.org>
12931
12932         * testsuite/libgomp.fortran/fortran.exp: Add paths for libquadmath.
12933
12934 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12935             Tobias Burnus  <burnus@net-b.de>
12936
12937         PR fortran/32049
12938         * configure.ac:
12939         * configure: Regenerate.
12940
12941 2010-10-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>
12942
12943         * config/linux/futex.h: New.
12944         * config/linux/arm/mutex.h: New.
12945         * configure.tgt (arm*-*-linux*): Add config path.
12946
12947 2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
12948
12949         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
12950
12951 2010-09-23  Tobias Burnus  <burnus@net-b.de>
12952
12953         * libgomp.texi (omp_get_nested, omp_set_nested, omp_set_dynamic):
12954         Change Fortran datatype to LOGICAL.
12955         (omp_set_lock, omp_test_lock, omp_unset_lock, omp_set_nested_lock,
12956         omp_unset_nested_lock): Use intent(inout) instead of intent(out).
12957
12958 2010-08-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12959
12960         * configure: Regenerate.
12961
12962 2010-07-26  Jakub Jelinek  <jakub@redhat.com>
12963
12964         * libgomp.texi: Add function keyword to a couple of Fortran
12965         interfaces, use integer instead of int for Fortran.
12966
12967 2010-07-26  Aldy Hernandez  <aldyh@redhat.com>
12968
12969         * libgomp.texi: Fix spelling and pasto problems throughout.
12970         Adjust prototypes to match code.
12971
12972 2010-07-24  Tobias Burnus  <burnus@net-b.de>
12973
12974         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to
12975         silence -fwhole-file warning.
12976
12977 2010-07-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12978
12979         * configure.tgt (*-*-solaris2.[56]*): Removed.
12980
12981 2010-07-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12982
12983         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
12984         Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU,
12985         LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals.
12986         (HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless
12987         targetting solaris2*.
12988         * configure: Regenerate.
12989         * config.h.in: Regenerate.
12990
12991         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect
12992         libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU.
12993         Add libgomp_version_dep.
12994         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol
12995         versioning.
12996         [!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep.
12997         (libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep).
12998         * Makefile.in: Regenerate.
12999
13000         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless
13001         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
13002         * libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0
13003         to common block, protected by
13004         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
13005
13006 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
13007
13008         * libgomp.texi: Move to GFDL version 1.3.  Update copyright years.
13009
13010 2010-06-09  Iain Sandoe  <iains@gcc.gnu.org>
13011
13012         PR bootstrap/43170
13013         * configure: Regenerate.
13014
13015 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13016
13017         PR other/43620
13018         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
13019         * configure: Regenerate.
13020         * Makefile.in: Regenerate.
13021         * testsuite/Makefile.in: Regenerate.
13022
13023 2010-04-26  Jakub Jelinek  <jakub@redhat.com>
13024
13025         PR c/43893
13026         * testsuite/libgomp.c/pr43893.c: New test.
13027         * testsuite/libgomp.c++/pr43893.C: New test.
13028
13029 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
13030
13031         PR middle-end/43570
13032         * testsuite/libgomp.fortran/vla8.f90: New test.
13033
13034 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
13035
13036         PR libgomp/43706
13037         * config/linux/affinity.c (gomp_init_affinity): Decrease
13038         gomp_available_cpus if affinity mask confines the process to fewer
13039         CPUs.
13040         * config/linux/proc.c (get_num_procs): If gomp_cpu_affinity is
13041         non-NULL, just return gomp_available_cpus.
13042
13043         PR libgomp/43569
13044         * sections.c (gomp_sections_init): Initialize ws->mode.
13045
13046 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
13047
13048         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Remove set but
13049         not unused bar variable.
13050         * configure: Regenerate.
13051
13052 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13053
13054         * Makefile.in: Regenerate.
13055         * aclocal.m4: Regenerate.
13056         * testsuite/Makefile.in: Regenerate.
13057
13058 2010-03-22  Jakub Jelinek  <jakub@redhat.com>
13059
13060         PR libgomp/42942
13061         * env.c (parse_unsigned_long): Add ALLOW_ZERO argument.
13062         (initialize_env): Adjust callers.
13063         (omp_set_max_active_levels): Set gomp_max_active_levels_var even
13064         when the argument is 0.
13065
13066         * testsuite/libgomp.c/pr42942.c: New test.
13067
13068 2010-03-08  Tobias Grosser  <grosser@fim.uni-passau.de>
13069
13070         PR middle-end/42644
13071         PR middle-end/42130
13072         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
13073         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust.
13074
13075 2010-01-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13076
13077         * testsuite/libgomp.c++/task-1.C: Renamed err to e.
13078         * testsuite/libgomp.c++/task-6.C: Likewise.
13079
13080 2010-01-28  Steve Ellcey  <sje@cup.hp.com>
13081
13082         * configure.tgt (*-*-hpux*): Add -frandom-seed flag.
13083
13084 2010-01-26  Paolo Bonzini  <bonzini@gnu.org>
13085
13086         * configure.ac: Test for executability of _the first word_ of GFORTRAN.
13087         * configure: Regenerate.
13088
13089 2010-01-26  Jakub Jelinek  <jakub@redhat.com>
13090
13091         PR fortran/42866
13092         * testsuite/libgomp.fortran/allocatable5.f90: New test.
13093
13094 2010-01-20  Paolo Bonzini  <bonzini@gnu.org>
13095
13096         * configure.ac: Test for executability of GFORTRAN.
13097         * configure: Regenerate.
13098
13099 2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13100
13101         * configure: Regenerate.
13102
13103 2010-01-04  H.J. Lu  <hongjiu.lu@intel.com>
13104
13105         PR libgomp/42602
13106         * libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.
13107
13108 2010-01-03  Richard Guenther  <rguenther@suse.de>
13109
13110         * testsuite/libgomp.fortran/recursion1.f90: New testcase.
13111
13112 2009-12-23  Sebastian Pop  <sebpop@gmail.com>
13113
13114         * testsuite/libgomp.graphite/pr4118.c: New.
13115
13116 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
13117
13118         * testsuite/libgomp.fortran/crayptr2.f90: Remove forced static linkage
13119         for darwin, protect the test with require-effective-target tls_runtime.
13120         * testsuite/libgomp.fortran/pr32550.f90: Ditto.
13121
13122 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
13123
13124         PR target/41605
13125         * testsuite/lib/libgomp.exp: Provide -B options to allow for
13126         link spec %s substitutions for static libraries.
13127
13128 2009-12-18  Jack Howarth <howarth@bromo.med.uc.edu>
13129
13130         PR testsuite/42135
13131         * libgomp.graphite/force-parallel-2.c: Reduce array size.
13132
13133 2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13134
13135         * Makefile.in: Regenerate.
13136         * configure: Regenerate.
13137         * testsuite/Makefile.in: Regenerate.
13138
13139 2009-11-30  Dave Korn  <dave.korn.cygwin@gmail.com>
13140
13141         * testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
13142         settings for LC_ALL and LANG.
13143
13144 2009-11-25  Jakub Jelinek  <jakub@redhat.com>
13145
13146         PR fortran/42162
13147         * testsuite/libgomp.fortran/pr42162.f90: New test.
13148
13149 2009-11-13  Jakub Jelinek  <jakub@redhat.com>
13150
13151         PR middle-end/42029
13152         * testsuite/libgomp.c/pr42029.c: New test.
13153
13154 2009-10-26  Jakub Jelinek  <jakub@redhat.com>
13155
13156         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
13157         *s.  Accept ld version without text in ()s.
13158         * configure: Regenerated.
13159
13160 2009-10-22  Razya Ladelsky  <razya@il.ibm.com>
13161
13162         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust scan.
13163
13164 2009-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13165
13166         PR libgomp/41418
13167         * configure.ac: Set FC to "no" if $GFORTRAN starts with "no"
13168         or a hyphen (happens with fortran language disabled).
13169         * configure: Regenerate.
13170
13171 2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13172
13173         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid 'head',
13174         use sed script portable to Solaris /bin/sed for extracting ld
13175         version.
13176         * configure: Regenerate.
13177
13178 2009-09-17  Alexander Monakov  <amonakov@ispras.ru>
13179
13180         * testsuite/libgomp.graphite/bounds.c: New test.
13181
13182 2009-09-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13183
13184         * Makefile.am (libgomp_la_LINK): New.
13185         * Makefile.in: Regenerate.
13186
13187 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13188
13189         * configure.ac (AC_PREREQ): Bump to 2.64.
13190
13191 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13192
13193         * Makefile.am (install-html, install-pdf): Remove.
13194         * Makefile.in: Regenerate.
13195
13196         * Makefile.in: Regenerate.
13197         * aclocal.m4: Regenerate.
13198         * config.h.in: Regenerate.
13199         * configure: Regenerate.
13200         * testsuite/Makefile.in: Regenerate.
13201
13202 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13203
13204         * Makefile.am (LINK): Add $(AM_LIBTOOLFLAGS) and $(LIBTOOLFLAGS).
13205         * Makefile.in: Regenerate.
13206
13207 2009-08-20  Dave Korn  <dave.korn.cygwin@gmail.com>
13208
13209         * Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
13210         * Makefile.in: Regenerate.
13211
13212 2009-08-19  Tobias Burnus  <burnus@net-b.de>
13213
13214         PR fortran/41102
13215         omp_lib.h.in: Fix -std=f95 errors.
13216
13217 2009-08-14  David Edelsohn  <edelsohn@gnu.org>
13218
13219         * testsuite/libgomp.graphite: Move from gcc.dg/graphite.
13220         * testsuite/libgomp.graphite/graphite_autopar.exp: Delete.
13221         * testsuite/libgomp.graphite/graphite.exp: New.
13222
13223 2009-08-05  Andreas Tobler  <a.tobler@schweiz.org>
13224
13225         * testsuite/libgomp.fortran/fortran.exp: Add flags in case of shared
13226         only build.
13227
13228 2009-08-04  David Daney  <ddaney@caviumnetworks.com>
13229
13230         * config/linux/mutex.h (gomp_mutex_unlock): Add comment about
13231         needed memory barrier semantics.
13232         * config/linux/mips/mutex.h: New file.
13233
13234 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13235
13236         * configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
13237
13238 2009-07-16  Joseph Myers  <joseph@codesourcery.com>
13239
13240         * configure: Regenerate.
13241
13242 2009-07-11  Richard Sandiford  <rdsandiford@googlemail.com>
13243
13244         PR testsuite/40699
13245         PR testsuite/40707
13246         PR testsuite/40709
13247         * testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
13248         * testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
13249         testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.
13250
13251 2009-07-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
13252
13253         * testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
13254         options when choosing a multilib.
13255
13256 2009-06-30  Richard Sandiford  <r.sandiford@uk.ibm.com>
13257
13258         * testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
13259         ld_library_path.  Use add_path.  Add just find_libgcc_s to
13260         ld_library_path, not every libgcc multilib directory.
13261         * testsuite/libgomp.c/c.exp (ld_library_path): Don't call
13262         gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
13263         * testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
13264         Use add_path.
13265         * testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.
13266
13267 2009-06-09  Nathan Froyd  <froydnj@codesourcery.com>
13268
13269         * Makefile.am (LTLDFLAGS): Define.
13270         (LINK): Define.
13271         * Makefile.in: Regenerate.
13272
13273 2009-05-27  Janne Blomqvist  <jb@gcc.gnu.org>
13274
13275         PR fortran/39718
13276         * testsuite/libgomp.fortran/fortran.exp: Don't link with
13277         libgfortranbegin, check existence of libgfortran.a instead of
13278         libgfortranbegin.a.
13279
13280 2009-05-20  Jakub Jelinek  <jakub@redhat.com>
13281
13282         PR libgomp/40174
13283         * team.c (gomp_thread_start): Destroy thr->release semaphore.
13284         (gomp_free_pool_helper): Likewise.
13285
13286 2009-04-20  Vasilis Liaskovitis  <vliaskov@gmail.com>
13287             Jakub Jelinek  <jakub@redhat.com>
13288
13289         PR fortran/35423
13290         * testsuite/libgomp.fortran/workshare2.f90: New test.
13291
13292 2009-04-09  Nick Clifton  <nickc@redhat.com>
13293
13294         * iter.c: Change copyright header to refer to version 3 of the
13295         GNU General Public License with version 3.1 of the GCC Runtime
13296         Library Exception and to point readers at the COPYING3 and
13297         COPYING3.RUNTIME files and the FSF's license web page.
13298         * alloc.c: Likewise.
13299         * barrier.c: Likewise.
13300         * config/bsd/proc.c: Likewise.
13301         * config/linux/affinity.c: Likewise.
13302         * config/linux/alpha/futex.h: Likewise.
13303         * config/linux/bar.c: Likewise.
13304         * config/linux/bar.h: Likewise.
13305         * config/linux/ia64/futex.h: Likewise.
13306         * config/linux/ia64/mutex.h: Likewise.
13307         * config/linux/lock.c: Likewise.
13308         * config/linux/mips/futex.h: Likewise.
13309         * config/linux/mutex.c: Likewise.
13310         * config/linux/mutex.h: Likewise.
13311         * config/linux/powerpc/futex.h: Likewise.
13312         * config/linux/proc.c: Likewise.
13313         * config/linux/ptrlock.c: Likewise.
13314         * config/linux/ptrlock.h: Likewise.
13315         * config/linux/s390/futex.h: Likewise.
13316         * config/linux/sem.c: Likewise.
13317         * config/linux/sem.h: Likewise.
13318         * config/linux/sparc/futex.h: Likewise.
13319         * config/linux/wait.h: Likewise.
13320         * config/linux/x86/futex.h: Likewise.
13321         * config/mingw32/proc.c: Likewise.
13322         * config/mingw32/time.c: Likewise.
13323         * config/posix/affinity.c: Likewise.
13324         * config/posix/bar.c: Likewise.
13325         * config/posix/bar.h: Likewise.
13326         * config/posix/lock.c: Likewise.
13327         * config/posix/mutex.h: Likewise.
13328         * config/posix/proc.c: Likewise.
13329         * config/posix/ptrlock.h: Likewise.
13330         * config/posix/sem.c: Likewise.
13331         * config/posix/sem.h: Likewise.
13332         * config/posix/time.c: Likewise.
13333         * config/posix95/lock.c: Likewise.
13334         * critical.c: Likewise.
13335         * env.c: Likewise.
13336         * error.c: Likewise.
13337         * fortran.c: Likewise.
13338         * iter_ull.c: Likewise.
13339         * libgomp.h: Likewise.
13340         * libgomp_f.h.in: Likewise.
13341         * libgomp_g.h: Likewise.
13342         * loop.c: Likewise.
13343         * loop_ull.c: Likewise.
13344         * omp.h.in: Likewise.
13345         * omp_lib.f90.in: Likewise.
13346         * omp_lib.h.in: Likewise.
13347         * ordered.c: Likewise.
13348         * parallel.c: Likewise.
13349         * sections.c: Likewise.
13350         * single.c: Likewise.
13351         * task.c: Likewise.
13352         * team.c: Likewise.
13353         * work.c: Likewise.
13354
13355 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
13356
13357         * testsuite/config/default.exp: Change copyright header to refer to
13358         version 3 of the GNU General Public License and to point readers
13359         at the COPYING3 file and the FSF's license web page.
13360
13361 2009-04-08  Jakub Jelinek  <jakub@redhat.com>
13362
13363         PR middle-end/39573
13364         * libgomp.c++/pr39573.C: New test.
13365
13366 2009-04-01  Jakub Jelinek  <jakub@redhat.com>
13367
13368         PR other/39591
13369         * testsuite/libgomp.c/pr39591-1.c: New test.
13370         * testsuite/libgomp.c/pr39591-2.c: New test.
13371         * testsuite/libgomp.c/pr39591-3.c: New test.
13372
13373 2009-03-25  Uros Bizjak  <ubizjak@gmail.com>
13374
13375         * testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
13376         * testsuite/libgomp.c/atomic-6.c: Ditto.
13377
13378 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
13379
13380         PR c/39495
13381         * testsuite/libgomp.c/loop-12.c: New test.
13382         * testsuite/libgomp.c/loop-11.c: New test.
13383         * testsuite/libgomp.c++/loop-11.C: New test.
13384         * testsuite/libgomp.c++/loop-12.C: New test.
13385         * testsuite/libgomp.c++/for-8.C: New test.
13386
13387 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13388
13389         * configure: Regenerate.
13390
13391 2009-02-11  Jakub Jelinek  <jakub@redhat.com>
13392
13393         PR middle-end/39154
13394         * testsuite/libgomp.c/pr39154.c: New test.
13395
13396 2009-01-30  Ian Lance Taylor  <iant@google.com>
13397
13398         * acinclude.m4 (LIBCOMP_CHECK_LINKER_FEATURES): Set
13399         libgomp_ld_is_gold.  Get gold version number.
13400         (LIBGOMP_ENABLE_SYMVERS): Gold always support symbol versioning.
13401         * configure: Rebuild.
13402
13403 2009-01-19  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
13404
13405         * testsuite/lib/libgomp.exp: Add -B option for targets that
13406         use libgfortran.a%s in their specs.
13407
13408 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
13409
13410         PR libgomp/38086
13411         * acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check.
13412         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if
13413         HAVE_AS_SYMVER_DIRECTIVE is not defined.
13414         * configure: Regenerated.
13415         * config.h.in: Likewise.
13416
13417 2008-12-28  Jakub Jelinek  <jakub@redhat.com>
13418
13419         PR c++/38650
13420         * testsuite/libgomp.c/pr38650.c: New test.
13421         * testsuite/libgomp.c++/pr38650.C: New test.
13422
13423 2008-12-27  Jakub Jelinek  <jakub@redhat.com>
13424
13425         * testsuite/libgomp.c/collapse-1.c (main): Add private(k) clause.
13426
13427 2008-12-26  Uros Bizjak  <ubizjak@gmail.com>
13428
13429         * testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.
13430
13431 2008-12-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13432
13433         * configure: Regenerate.
13434
13435 2008-12-08  Jakub Jelinek  <jakub@redhat.com>
13436
13437         PR middle-end/36802
13438         * testsuite/libgomp.c/pr36802-1.c: New test.
13439         * testsuite/libgomp.c/pr36802-2.c: New test.
13440         * testsuite/libgomp.c/pr36802-3.c: New test.
13441
13442 2008-12-01  Janis Johnson  <janis187@us.ibm.com>
13443
13444         PR libgomp/38270
13445         * config/linux/powerpc/mutex.h: New.
13446
13447 2008-12-01  Jakub Jelinek  <jakub@redhat.com>
13448
13449         PR c++/38257
13450         * testsuite/libgomp.c++/for-7.C: New test.
13451
13452         PR c++/38348
13453         * testsuite/libgomp.c++/for-6.C: New test.
13454
13455 2008-11-26  Janis Johnson  <janis187@us.ibm.com>
13456
13457         PR testsuite/28870
13458         * testsuite/lib/libgomp.exp: Include new timeout library files.
13459         (libgomp_target_compile): Set timeout value from new proc.
13460
13461 2008-11-13  Steve Ellcey  <sje@cup.hp.com>
13462
13463         PR libgomp/37938
13464         * config/linux/ia64/mutex.h: New.
13465
13466 2008-11-04  Tobias Burnus  <burnus@net-b.de>
13467
13468         PR libgomp/37935
13469         * libgomp.texi (Runtime library routines, environment variables):
13470         Update for OpenMP version 3.0.
13471
13472 2008-09-26  Peter O'Gorman  <pogma@thewrittenword.com>
13473             Steve Ellcey  <sje@cup.hp.com>
13474
13475         * configure: Regenerate for new libtool.
13476         * Makefile.in: Ditto.
13477         * testsuite/Makefile.in: Ditto.
13478
13479 2008-09-19  Jakub Jelinek  <jakub@redhat.com>
13480             Andreas Tobler  <a.tobler@schweiz.org>
13481
13482         * config/bsd/proc.c: New file.
13483         * configure.tgt (*-*-darwin*): Use config_path "bsd posix".
13484         * configure.ac: Check for header <sys/sysctl.h>
13485         * configure: Regenerate.
13486         * config.h.in: Likewise.
13487
13488 2008-09-05  Janis Johnson  <janis187@us.ibm.com>
13489
13490         * testsuite/ligbomp.c/c.exp: Unset lang_test_file only if it exists.
13491
13492 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
13493
13494         * Makefile.am (libgomp_la_LDFLAGS): Add -no-undefined.
13495         * Makefile.in: Regenerated.
13496         * testsuite/Makefile.in: Regenerated.
13497
13498 2008-08-21  Nathan Froyd  <froydnj@codesourcery.com>
13499
13500         * testsuite/lib/libgomp.exp (libgomp_init): Only set things that
13501         depend on blddir if blddir exists.
13502         (libgomp_target_compile): Likewise.
13503         * testsuite/libgomp.c++/c++.exp: Likewise.
13504         * testsuite/libgomp.fortran/fortran.exp: Likewise.
13505
13506 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13507
13508         * libgomp.texi: Update to GFDL 1.2.  Update copyright years.
13509         Do not list GPL as Invariant Section.
13510
13511 2008-07-28  Ilie Garbacea  <ilie@mips.com>
13512             Chao-ying Fu  <fu@mips.com>
13513
13514         * configure.tgt: Enable futex for MIPS.
13515         * config/linux/mips/futex.h: New file.
13516
13517 2008-07-16  Jakub Jelinek  <jakub@redhat.com>
13518
13519         * team.c (gomp_team_end): Free team immediately if it has
13520         just one thread.
13521
13522 2008-07-08  David Edelsohn  <edelsohn@gnu.org>
13523
13524         * testsuite/libgomp.c++/c++.exp: Append multilib library path.
13525         * testsuite/libgomp.fortran/fortran.exp: Same.
13526         * testsuite/libgomp.c/c.exp: Same.
13527         * testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
13528         directory to library path first.
13529
13530 2008-06-29  Krister Walfridsson  <krister.walfridsson@gmail.com>
13531
13532         * env.c (parse_stacksize): Add cast to avoid warning.
13533         (parse_spincount): Likewise.
13534
13535 2008-06-27  Jakub Jelinek  <jakub@redhat.com>
13536
13537         * testsuite/libgomp.c/loop-10.c: New test.
13538         * libgomp.c/loop-3.c (main): Add lastprivate clause.
13539         * libgomp.c++/loop-6.C (main): Likewise.
13540
13541         PR debug/36617
13542         * testsuite/libgomp.c/debug-1.c: New test.
13543
13544 2008-06-19  Jakub Jelinek  <jakub@redhat.com>
13545
13546         * testsuite/libgomp.c/nqueens-1.c: New test.
13547
13548         PR c++/36523
13549         * testsuite/libgomp.c++/task-7.C: New function.
13550
13551 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13552
13553         * configure: Regenerate.
13554
13555 2008-06-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
13556
13557         * env.c (initialize_env): Always initialize gomp_remaining_threads_lock
13558         mutex when HAVE_SYNC_BUILTINS isn't defined.
13559
13560 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13561
13562         * libgomp.texi (omp_test_lock): Fix typo.
13563
13564 2008-06-12  Tobias Burnus  <burnus@net-b.de>
13565
13566         * omp_lib.f90.in: Add "implicit none".
13567
13568 2008-06-12  Jakub Jelinek  <jakub@redhat.com>
13569
13570         PR middle-end/36506
13571         * testsuite/libgomp.c/reduction-5.c: New test.
13572
13573 2008-06-11  Jakub Jelinek  <jakub@redhat.com>
13574
13575         * libgomp.h (struct gomp_task): Add in_tied_task field.
13576         * task.c (gomp_init_task): Initialize it.
13577         (GOMP_task): Likewise.  Call gomp_team_barrier_set_task_pending
13578         unconditionally.  Don't call gomp_team_barrier_wake if
13579         current task is implicit or if(0) from implicit and number of
13580         running tasks is equal to nthreads - 1.
13581
13582         PR libgomp/36471
13583         * omp_lib.f90.in (omp_get_ancestor_thread_num_8,
13584         omp_get_team_size_8): Fix pastos.
13585
13586         PR libgomp/36469
13587         * configure.ac: Add AC_CHECK_FUNCS (strtoull).
13588         * configure: Regenerated.
13589         * config.h.in: Regenerated.
13590         * env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
13591         defined.
13592
13593 2008-06-06  Andreas Tobler  <a.tobler@schweiz.org>
13594
13595         PR bootstrap/36452
13596         * loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
13597         (GOMP_loop_ull_dynamic_start): Likewise.
13598         (GOMP_loop_ull_guided_start): Likewise.
13599         (GOMP_loop_ull_ordered_static_start): Likewise.
13600         (GOMP_loop_ull_ordered_dynamic_start): Likewise.
13601         (GOMP_loop_ull_ordered_guided_start): Likewise.
13602
13603 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
13604             Richard Henderson  <rth@redhat.com>
13605             Ulrich Drepper  <drepper@redhat.com>
13606             Jakob Blomer  <jakob.blomer@ira.uka.de>
13607
13608         * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
13609         Substitute also OMP_*LOCK_25*.
13610         * configure: Regenerated.
13611         * config.h.in: Regenerated.
13612         * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
13613         ptrlock.c and task.c.
13614         * Makefile.in: Regenerated.
13615         * testsuite/Makefile.in: Regenerated.
13616         * task.c: New file.
13617         * loop_ull.c: New file.
13618         * iter_ull.c: New file.
13619         * libgomp.h: Include ptrlock.h.
13620         (enum gomp_task_kind): New type.
13621         (struct gomp_team): Add task_lock, task_queue, task_count,
13622         task_running_count, single_count fields.  Add
13623         work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
13624         Remove work_share_lock, generation_mask,
13625         oldest_live_gen, num_live_gen and init_work_shares fields, add
13626         work work_share_list_alloc, work_share_list_free and work_share_chunk
13627         fields.  Change work_shares from pointer to pointers into an array.
13628         Change ordered_release field into gomp_sem_t ** from flexible array
13629         member.  Add implicit_task and initial_work_shares fields.
13630         Move close to the end of the struct.
13631         (struct gomp_team_state): Add single_count, last_work_share,
13632         active_level and level fields, remove work_share_generation.
13633         (gomp_barrier_handle_tasks): New prototype.
13634         (gomp_finish_task): New inline function.
13635         (struct gomp_work_share): Move chunk_size, end, incr into
13636         transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
13637         next_ll fields.  Reshuffle fields.  Add next_alloc,
13638         next_ws, next_free and inline_ordered_team_ids fields, change
13639         ordered_team_ids into pointer from flexible array member.
13640         Add mode field.  Put lock and next into a different cache line
13641         from most of the write-once fields.
13642         (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
13643         gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
13644         gomp_iter_ull_guided_next): New prototypes.
13645         (gomp_new_icv): New prototype.
13646         (struct gomp_thread): Add thread_pool and task fields.
13647         (struct gomp_thread_pool): New type.
13648         (gomp_new_team): New prototype.
13649         (gomp_team_start): Change type of last argument.
13650         (gomp_new_work_share): Removed.
13651         (gomp_init_work_share, gomp_fini_work_share): New prototypes.
13652         (gomp_work_share_init_done): New static inline.
13653         (gomp_throttled_spin_count_var, gomp_available_cpus,
13654         gomp_managed_threads): New extern decls.
13655         (gomp_init_task): New prototype.
13656         (gomp_spin_count_var): New extern var decl.
13657         (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
13658         or no alias support, or if not PIC.
13659         (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
13660         gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
13661         gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
13662         gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
13663         gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
13664         gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
13665         gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
13666         gomp_test_nest_lock_25): New prototypes.
13667         (omp_lock_symver, strong_alias): Define.
13668         (gomp_remaining_threads_count, gomp_remaining_threads_lock): New
13669         decls.
13670         (gomp_end_task): New.
13671         (struct gomp_task_icv, gomp_global_icv): New.
13672         (gomp_thread_limit_var, gomp_max_active_levels_var): New.
13673         (struct gomp_task): New.
13674         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
13675         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
13676         (gomp_icv): New.
13677         (gomp_schedule_type): Reorder enum to match
13678         omp_sched_t.
13679         * team.c (struct gomp_thread_start_data): Add thread_pool and task
13680         fields.
13681         (gomp_thread_start): Add gomp_team_barrier_wait call.
13682         For non-nested case remove clearing of docked thread thr fields.
13683         Use pool fields instead of global gomp_* variables.  Use
13684         gomp_barrier_wait_last when needed.  Initialize ts.active_level.
13685         Create tasks for each member thread.
13686         (free_team): Only destroy team barrier, task_lock here and free it.
13687         (gomp_free_thread): Free last_team if non-NULL.
13688         (gomp_team_end): Call gomp_team_barrier_wait instead of
13689         gomp_barrier_wait.  For nested case call one extra
13690         gomp_barrier_wait.  Move here some destruction from free_team.
13691         Call free_team on pool->last_team if any, rather than freeing
13692         current team.  Destroy work_share_list_free_lock ifndef
13693         HAVE_SYNC_BUILTINS.
13694         (gomp_new_icv): New function.
13695         (gomp_threads, gomp_threads_size, gomp_threads_used,
13696         gomp_threads_dock): Removed.
13697         (gomp_thread_destructor): New variable.
13698         (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
13699         functions.
13700         (gomp_team_start): Create new pool if current thread doesn't have
13701         one.  Use pool fields instead of global gomp_* variables.
13702         Initialize thread_pool field for new threads.  Clear single_count.
13703         Change last argument from ws to team, don't create
13704         new team, set ts.work_share to &team->work_shares[0] and clear
13705         ts.last_work_share.  Don't clear ts.work_share_generation.
13706         If number of threads changed, adjust atomically gomp_managed_threads.
13707         Use gomp_init_task instead of gomp_new_task,
13708         set thr->task to the corresponding implicit_task array entry.
13709         Create tasks for each member thread.  Initialize ts.level.
13710         (initialize_team): Call pthread_key_create on
13711         gomp_thread_destructor.
13712         (team_destructor): New function.
13713         (new_team): Removed.
13714         (gomp_new_team): New function.
13715         (free_team): Free gomp_work_share blocks chained through next_alloc,
13716         instead of freeing work_shares and destroying work_share_lock.
13717         (gomp_team_end): Call gomp_fini_work_share.  If number of threads
13718         changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
13719         * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
13720         of gomp_barrier_wait.
13721         * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
13722         instead of gomp_barrier_wait.  Call gomp_work_share_init_done
13723         if gomp_work_share_start returned true.  Don't unlock ws->lock.
13724         (GOMP_single_copy_end): Call gomp_team_barrier_wait instead
13725         of gomp_barrier_wait.
13726         (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
13727         gomp_work_share_init_done if gomp_work_share_start returned true.
13728         Don't unlock ws->lock.
13729         * work.c: Include stddef.h.
13730         (free_work_share): Use work_share_list_free_lock instead
13731         of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
13732         Call gomp_fini_work_share and then either free ws if orphaned, or
13733         put it into work_share_list_free list of the current team.
13734         (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
13735         functions.
13736         (gomp_work_share_start, gomp_work_share_end,
13737         gomp_work_share_end_nowait): Rewritten.
13738         * omp_lib.f90.in Change some tabs to spaces to prevent warnings.
13739         (openmp_version): Set to 200805.
13740         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
13741         omp_sched_guided, omp_sched_auto): New parameters.
13742         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
13743         omp_set_max_active_levels, omp_get_max_active_levels,
13744         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
13745         omp_get_active_level): New interfaces.
13746         * omp_lib.h.in (openmp_version): Set to 200805.
13747         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
13748         omp_sched_guided, omp_sched_auto): New parameters.
13749         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
13750         omp_set_max_active_levels, omp_get_max_active_levels,
13751         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
13752         omp_get_active_level): New externals.
13753         * loop.c: Include limits.h.
13754         (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
13755         GFS_AUTO.
13756         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
13757         Likewise.  Use gomp_icv.
13758         (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
13759         ts.static_trip here.
13760         (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
13761         gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
13762         (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
13763         gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
13764         don't unlock ws->lock, otherwise lock it.
13765         (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
13766         gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
13767         (gomp_parallel_loop_start): Call gomp_new_team instead of
13768         gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
13769         Adjust gomp_team_start caller.  Pass 0 as second argument to
13770         gomp_resolve_num_threads.
13771         (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
13772         If adding ws->chunk_size nthreads + 1 times after end won't
13773         overflow, set ws->mode to 1.
13774         * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
13775         GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
13776         GOMP_loop_ull_ordered_static_start,
13777         GOMP_loop_ull_ordered_dynamic_start,
13778         GOMP_loop_ull_ordered_guided_start,
13779         GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
13780         GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
13781         GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
13782         GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
13783         GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
13784         prototypes.
13785         * libgomp.map: Export lock routines also @@OMP_2.0.
13786         (GOMP_loop_ordered_dynamic_first,
13787         GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
13788         GOMP_loop_ordered_static_first): Remove.
13789         (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
13790         GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
13791         GOMP_loop_ull_ordered_dynamic_next,
13792         GOMP_loop_ull_ordered_dynamic_start,
13793         GOMP_loop_ull_ordered_guided_next,
13794         GOMP_loop_ull_ordered_guided_start,
13795         GOMP_loop_ull_ordered_runtime_next,
13796         GOMP_loop_ull_ordered_runtime_start,
13797         GOMP_loop_ull_ordered_static_next,
13798         GOMP_loop_ull_ordered_static_start,
13799         GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
13800         GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
13801         GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
13802         (omp_set_schedule, omp_get_schedule,
13803         omp_get_thread_limit, omp_set_max_active_levels,
13804         omp_get_max_active_levels, omp_get_level,
13805         omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
13806         omp_set_schedule_, omp_set_schedule_8_,
13807         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
13808         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
13809         omp_get_max_active_levels_, omp_get_level_,
13810         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
13811         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
13812         New exports @@OMP_3.0.
13813         * omp.h.in (omp_sched_t): New type.
13814         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
13815         omp_set_max_active_levels, omp_get_max_active_levels,
13816         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
13817         omp_get_active_level): New prototypes.
13818         * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
13819         gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
13820         gomp_thread_limit_var, gomp_remaining_threads_count,
13821         gomp_remaining_threads_lock): New variables.
13822         (parse_spincount): New function.
13823         (initialize_env): Call gomp_init_num_threads unconditionally.
13824         Initialize gomp_available_cpus.  Call parse_spincount,
13825         initialize gomp_{,throttled_}spin_count_var
13826         depending on presence and value of OMP_WAIT_POLICY and
13827         GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
13828         Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
13829         OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
13830         for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
13831         gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
13832         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
13833         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
13834         (gomp_global_icv): New.
13835         (parse_schedule): Use it.  Parse "auto".
13836         (omp_set_num_threads): Use gomp_icv.
13837         (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
13838         Likewise.
13839         (omp_get_max_threads): Move from parallel.c.
13840         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
13841         omp_set_max_active_levels, omp_get_max_active_levels): New functions,
13842         add ialias.
13843         (parse_stacksize, parse_wait_policy): New functions.
13844         * fortran.c: Rewrite lock wrappers, if symbol versioning provide
13845         both wrappers for compatibility and new locks.
13846         (omp_set_schedule, omp_get_schedule,
13847         omp_get_thread_limit, omp_set_max_active_levels,
13848         omp_get_max_active_levels, omp_get_level,
13849         omp_get_ancestor_thread_num, omp_get_team_size,
13850         omp_get_active_level): New ialias_redirect.
13851         (omp_set_schedule_, omp_set_schedule_8_,
13852         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
13853         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
13854         omp_get_max_active_levels_, omp_get_level_,
13855         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
13856         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
13857         New functions.
13858         * parallel.c: Include limits.h.
13859         (gomp_resolve_num_threads): Add count argument.  Rewritten.
13860         (GOMP_parallel_start): Call gomp_new_team and pass that as last
13861         argument to gomp_team_start.  Pass 0 as second argument to
13862         gomp_resolve_num_threads.
13863         (GOMP_parallel_end): Decrease gomp_remaining_threads_count
13864         if gomp_thread_limit_var != ULONG_MAX.
13865         (omp_in_parallel): Implement using ts.active_level.
13866         (omp_get_max_threads): Move to env.c.
13867         (omp_get_level, omp_get_ancestor_thread_num,
13868         omp_get_team_size, omp_get_active_level): New functions,
13869         add ialias.
13870         * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
13871         after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
13872         gomp_iter_dynamic_next instead of the _locked variant and don't take
13873         lock around it, otherwise acquire it before calling
13874         gomp_iter_dynamic_next_locked.
13875         (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
13876         gomp_iter_dynamic_next instead of the _locked variant and don't take
13877         lock around it.
13878         (GOMP_parallel_sections_start): Call gomp_new_team instead of
13879         gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
13880         Adjust gomp_team_start caller.  Pass count as second argument to
13881         gomp_resolve_num_threads, don't adjust num_threads after the call.
13882         Use gomp_icv.
13883         * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
13884         ws->chunk_size by incr.
13885         (gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
13886         code.
13887         * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
13888         types.
13889         (omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
13890         (omp_check_defines): Check even the compat defines.
13891         * config/linux/ptrlock.c: New file.
13892         * config/linux/ptrlock.h: New file.
13893         * config/linux/wait.h: New file.
13894         * config/posix/ptrlock.c: New file.
13895         * config/posix/ptrlock.h: New file.
13896         * config/linux/bar.h (gomp_team_barrier_wait,
13897         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
13898         (gomp_team_barrier_set_task_pending,
13899         gomp_team_barrier_clear_task_pending,
13900         gomp_team_barrier_set_waiting_for_tasks,
13901         gomp_team_barrier_waiting_for_tasks,
13902         gomp_team_barrier_done): New inlines.
13903         (gomp_barrier_t): Rewritten.
13904         (gomp_barrier_state_t): New typedef.
13905         (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
13906         gomp_barrier_wait_start): Rewritten.
13907         (gomp_barrier_wait_end): Change second argument to
13908         gomp_barrier_state_t.
13909         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
13910         inlines.
13911         * config/linux/bar.c: Include wait.h instead of libgomp.h and
13912         futex.h.
13913         (gomp_barrier_wait_end): Rewritten.
13914         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
13915         gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
13916         * config/posix/bar.h (gomp_barrier_t): Add generation field.
13917         (gomp_barrier_state_t): New typedef.
13918         (gomp_team_barrier_wait,
13919         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
13920         (gomp_barrier_wait_start): Or all but low 2 bits from generation
13921         into the return value.  Return gomp_barrier_state_t.
13922         (gomp_team_barrier_set_task_pending,
13923         gomp_team_barrier_clear_task_pending,
13924         gomp_team_barrier_set_waiting_for_tasks,
13925         gomp_team_barrier_waiting_for_tasks,
13926         gomp_team_barrier_done): New inlines.
13927         (gomp_barrier_wait_end): Change second argument to
13928         gomp_barrier_state_t.
13929         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
13930         inlines.
13931         * config/posix/bar.c (gomp_barrier_init): Clear generation field.
13932         (gomp_barrier_wait_end): Change second argument to
13933         gomp_barrier_state_t.
13934         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
13935         gomp_team_barrier_wake): New functions.
13936         * config/linux/mutex.c: Include wait.h instead of libgomp.h and
13937         futex.h.
13938         (gomp_futex_wake, gomp_futex_wait): New variables.
13939         (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
13940         * config/linux/lock.c: Rewrite to make locks task owned,
13941         for backwards compatibility provide the old entrypoints
13942         if symbol versioning.  Include wait.h instead of libgomp.h and
13943         futex.h.
13944         (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
13945         * config/posix95/lock.c: Rewrite to make locks task owned,
13946         for backwards compatibility provide the old entrypoints
13947         if symbol versioning.
13948         * config/posix/lock.c: Rewrite to make locks task owned,
13949         for backwards compatibility provide the old entrypoints
13950         if symbol versioning.
13951         * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
13952         (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
13953         * config/posix/proc.c, config/mingw32/proc.c: Similarly.
13954         * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
13955         (sys_futex0): Return error code.
13956         (futex_wake, futex_wait): If ENOSYS was returned, clear
13957         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
13958         (cpu_relax, atomic_write_barrier): New static inlines.
13959         * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
13960         (futex_wake, futex_wait): If ENOSYS was returned, clear
13961         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
13962         (cpu_relax, atomic_write_barrier): New static inlines.
13963         * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
13964         (sys_futex0): Return error code.
13965         (futex_wake, futex_wait): If ENOSYS was returned, clear
13966         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
13967         (cpu_relax, atomic_write_barrier): New static inlines.
13968         * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
13969         (sys_futex0): Return error code.
13970         (futex_wake, futex_wait): If ENOSYS was returned, clear
13971         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
13972         (cpu_relax, atomic_write_barrier): New static inlines.
13973         * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
13974         (sys_futex0): Return error code.
13975         (futex_wake, futex_wait): If ENOSYS was returned, clear
13976         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
13977         (cpu_relax, atomic_write_barrier): New static inlines.
13978         * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
13979         (sys_futex0): Return error code.
13980         (futex_wake, futex_wait): If ENOSYS was returned, clear
13981         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
13982         (cpu_relax, atomic_write_barrier): New static inlines.
13983         * config/linux/sem.c: Include wait.h instead of libgomp.h and
13984         futex.h.
13985         (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
13986         * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
13987         * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
13988         types.
13989         (omp_nest_lock_t): Change owner into void *, add lock field.
13990         * config/posix95/omp-lock.h: Include semaphore.h.
13991         (omp_lock_25_t, omp_nest_lock_25_t): New types.
13992         (omp_lock_t): Use sem_t instead of mutex if semaphores
13993         aren't broken.
13994         (omp_nest_lock_t): Likewise.  Change owner to void *.
13995         * config/posix/omp-lock.h: Include semaphore.h.
13996         (omp_lock_25_t, omp_nest_lock_25_t): New types.
13997         (omp_lock_t): Use sem_t instead of mutex if semaphores
13998         aren't broken.
13999         (omp_nest_lock_t): Likewise.  Add owner field.
14000
14001 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
14002
14003         * testsuite/libgomp.c/collapse-1.c: New test.
14004         * testsuite/libgomp.c/collapse-2.c: New test.
14005         * testsuite/libgomp.c/collapse-3.c: New test.
14006         * testsuite/libgomp.c/icv-1.c: New test.
14007         * testsuite/libgomp.c/icv-2.c: New test.
14008         * testsuite/libgomp.c/lib-2.c: New test.
14009         * testsuite/libgomp.c/lock-1.c: New test.
14010         * testsuite/libgomp.c/lock-2.c: New test.
14011         * testsuite/libgomp.c/lock-3.c: New test.
14012         * testsuite/libgomp.c/loop-4.c: New test.
14013         * testsuite/libgomp.c/loop-5.c: New test.
14014         * testsuite/libgomp.c/loop-6.c: New test.
14015         * testsuite/libgomp.c/loop-7.c: New test.
14016         * testsuite/libgomp.c/loop-8.c: New test.
14017         * testsuite/libgomp.c/loop-9.c: New test.
14018         * testsuite/libgomp.c/nested-3.c: New test.
14019         * testsuite/libgomp.c/nestedfn-6.c: New test.
14020         * testsuite/libgomp.c/sort-1.c: New test.
14021         * testsuite/libgomp.c/task-1.c: New test.
14022         * testsuite/libgomp.c/task-2.c: New test.
14023         * testsuite/libgomp.c/task-3.c: New test.
14024         * testsuite/libgomp.c/task-4.c: New test.
14025         * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
14026         to C++ testsuite default compiler options.
14027         * testsuite/libgomp.c++/collapse-1.C: New test.
14028         * testsuite/libgomp.c++/collapse-2.C: New test.
14029         * testsuite/libgomp.c++/ctor-10.C: New test.
14030         * testsuite/libgomp.c++/for-1.C: New test.
14031         * testsuite/libgomp.c++/for-2.C: New test.
14032         * testsuite/libgomp.c++/for-3.C: New test.
14033         * testsuite/libgomp.c++/for-4.C: New test.
14034         * testsuite/libgomp.c++/for-5.C: New test.
14035         * testsuite/libgomp.c++/loop-8.C: New test.
14036         * testsuite/libgomp.c++/loop-9.C: New test.
14037         * testsuite/libgomp.c++/loop-10.C: New test.
14038         * testsuite/libgomp.c++/task-1.C: New test.
14039         * testsuite/libgomp.c++/task-2.C: New test.
14040         * testsuite/libgomp.c++/task-3.C: New test.
14041         * testsuite/libgomp.c++/task-4.C: New test.
14042         * testsuite/libgomp.c++/task-5.C: New test.
14043         * testsuite/libgomp.c++/task-6.C: New test.
14044         * testsuite/libgomp.fortran/allocatable1.f90: New test.
14045         * testsuite/libgomp.fortran/allocatable2.f90: New test.
14046         * testsuite/libgomp.fortran/allocatable3.f90: New test.
14047         * testsuite/libgomp.fortran/allocatable4.f90: New test.
14048         * testsuite/libgomp.fortran/collapse1.f90: New test.
14049         * testsuite/libgomp.fortran/collapse2.f90: New test.
14050         * testsuite/libgomp.fortran/collapse3.f90: New test.
14051         * testsuite/libgomp.fortran/collapse4.f90: New test.
14052         * testsuite/libgomp.fortran/lastprivate1.f90: New test.
14053         * testsuite/libgomp.fortran/lastprivate2.f90: New test.
14054         * testsuite/libgomp.fortran/lib4.f90: New test.
14055         * testsuite/libgomp.fortran/lock-1.f90: New test.
14056         * testsuite/libgomp.fortran/lock-2.f90: New test.
14057         * testsuite/libgomp.fortran/nested1.f90: New test.
14058         * testsuite/libgomp.fortran/nestedfn4.f90: New test.
14059         * testsuite/libgomp.fortran/strassen.f90: New test.
14060         * testsuite/libgomp.fortran/tabs1.f90: New test.
14061         * testsuite/libgomp.fortran/tabs2.f: New test.
14062         * testsuite/libgomp.fortran/task1.f90: New test.
14063         * testsuite/libgomp.fortran/task2.f90: New test.
14064         * testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
14065         * testsuite/libgomp.fortran/vla5.f90: Likewise.
14066         * testsuite/libgomp.c/pr26943-2.c: Likewise.
14067         * testsuite/libgomp.c/pr26943-3.c: Likewise.
14068         * testsuite/libgomp.c/pr26943-4.c: Likewise.
14069
14070 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
14071
14072         PR c++/36308
14073         * testsuite/libgomp.c++/ctor-11.C: New test.
14074         * testsuite/libgomp.c++/ctor-12.C: New test.
14075
14076 2008-05-15  Janis Johnson  <janis187@us.ibm.com>
14077
14078         * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.
14079
14080 2008-05-07  Jakub Jelinek  <jakub@redhat.com>
14081
14082         PR middle-end/36106
14083         * testsuite/libgomp.c/atomic-5.c: New test.
14084         * testsuite/libgomp.c/atomic-6.c: New test.
14085         * testsuite/libgomp.c/autopar-1.c: New test.
14086
14087 2008-04-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14088
14089         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
14090         (LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
14091         (LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
14092         (LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
14093         * configure: Regenerate.
14094         * Makefile.in, testsuite/Makefile.in: Likewise.
14095
14096 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
14097
14098         PR bootstrap/35457
14099         * aclocal.m4: Regenerate.
14100         * configure: Regenerate.
14101
14102 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
14103
14104         PR middle-end/35611
14105         * testsuite/libgomp.c/atomic-4.c: New test.
14106
14107         PR libgomp/35625
14108         * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
14109         (gomp_iter_guided_next): Likewise.
14110         * testsuite/libgomp.c/pr35625.c: New test.
14111
14112 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14113
14114         * aclocal.m4: Regenerate.
14115         * configure: Likewise.
14116         * Makefile.in: Likewise.
14117         * testsuite/Makefile.in: Likewise.
14118
14119 2008-03-13  Jakub Jelinek  <jakub@redhat.com>
14120
14121         PR middle-end/35185
14122         * testsuite/libgomp.c++/pr35185.C: New test.
14123
14124 2008-03-12  Jakub Jelinek  <jakub@redhat.com>
14125
14126         PR middle-end/35549
14127         * testsuite/libgomp.c/pr35549.c: New test.
14128
14129 2008-03-06  Jakub Jelinek  <jakub@redhat.com>
14130
14131         * testsuite/libgomp.c/atomic-3.c: New test.
14132
14133 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14134
14135         PR fortran/33197
14136         * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
14137         .F08 file suffixes.
14138
14139 2008-03-03  Peter O'Gorman  <pogma@thewrittenword.com>
14140
14141         PR libgomp/33131
14142         * configure.ac: Add ACX_HEADER_STRING.
14143         * env.c: Include strings.h.
14144         * aclocal.m4: Regenerate.
14145         * config.h.in: Regenerate.
14146         * configure: Regenerate.
14147         * Makefile.in: Regenerate.
14148         * testsuite/Makefile.in: Regenerate.
14149
14150 2008-02-15  Jakub Jelinek  <jakub@redhat.com>
14151
14152         PR middle-end/35196
14153         * testsuite/libgomp.c/pr35196.c: New test.
14154
14155         PR middle-end/35130
14156         * testsuite/libgomp.fortran/pr35130.f90: New test.
14157         * testsuite/libgomp.c/pr35130.c: New test.
14158
14159 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
14160
14161         PR middle-end/33880
14162         * testsuite/libgomp.c/pr33880.c: New test.
14163         * testsuite/libgomp.fortran/pr33880.f90: New test.
14164
14165 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
14166
14167         * configure: Regenerate.
14168
14169 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
14170
14171         * configure.ac: Move futex checking into ../config/futex.m4.
14172         * configure: Rebuilt.
14173         * aclocal.m4: Rebuilt.
14174         * Makefile.in: Rebuilt.
14175
14176         * configure.tgt: Rename have_tls to gcc_cv_have_tls to match
14177         2007-10-15 ../config/tls.m4 change.
14178
14179 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
14180
14181         PR c++/34513
14182         * testsuite/libgomp.c/pr34513.c: New test.
14183         * testsuite/libgomp.c++/pr34513.C: New test.
14184
14185 2007-12-17  Jack Howarth  <howarth@bromo.med.uc.edu>
14186
14187         PR target/32765
14188         * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
14189
14190 2007-12-04  Jakub Jelinek  <jakub@redhat.com>
14191
14192         * omp.h.in (__GOMP_NOTHROW): Define.  Use it on omp_* prototypes.
14193
14194 2007-12-03  Jakub Jelinek  <jakub@redhat.com>
14195
14196         * testsuite/libgomp.c/private-1.c: New test.
14197
14198 2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>
14199             Paolo Bonzini  <bonzini@gnu.org>
14200
14201         * Makefile.am: Use space as vpath separator.  Use 'vpath %'
14202         instead of 'VPATH ='.
14203         * Makefile.in: Regenerate.
14204
14205 2007-11-23  Matthias Klose  <doko@ubuntu.com>
14206
14207         * configure.ac: Adjust makeinfo version check.
14208         * configure: Regenerate.
14209
14210 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
14211
14212         PR fortran/34020
14213         * testsuite/libgomp.fortran/pr34020.f90: New test.
14214
14215 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
14216
14217         PR c++/33894
14218         * testsuite/libgomp.c++/atomic-1.C: New test.
14219
14220 2007-10-25  Jakub Jelinek  <jakub@redhat.com>
14221
14222         PR libgomp/33275
14223         * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
14224         Make x and y integers rather than (implicit) reals.  Add private (j)
14225         clause to the last omp parallel.
14226
14227 2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
14228
14229         * configure: Regenerate following changes to ../config/tls.m4.
14230
14231 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
14232
14233         * testsuite/libgomp.fortran/stack.f90: New test.
14234
14235 2007-09-10  Danny Smith  <dannysmith@users.sourceforge.net>
14236
14237         * config/mingw32/proc.c: New file.
14238
14239 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
14240
14241         * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
14242         (main): Use __get_cpuid to get i386 target fetaures.
14243         * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
14244         (main): Use __get_cpuid to get x86_64 target fetaures.
14245
14246 2007-08-15  Jack Howarth  <howarth@bromo.med.uc.edu>
14247
14248         PR target/32765
14249         * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
14250         * testsuite/libgomp.fortran/crayptr2.f90: Likwise.
14251
14252 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
14253
14254         PR fortran/32550
14255         * testsuite/libgomp.fortran/pr32550.f90: New test.
14256         * testsuite/libgomp.fortran/crayptr2.f90: New test.
14257
14258 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
14259
14260         * aclocal.m4: Regenerated.
14261
14262 2007-07-05  Tobias Burnus  <burnus@net-b.de>
14263
14264         PR fortran/32359
14265         * testsuite/libgomp.fortran/pr32359.f90: New.
14266
14267 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
14268
14269         PR libgomp/32468
14270         * sections.c (GOMP_parallel_sections_start): Only decrease
14271         number of threads to COUNT if dyn_var is true.
14272         * testsuite/libgomp.c/pr32468.c: New test.
14273
14274 2007-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14275
14276         PR libgomp/26308
14277         * config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.
14278
14279 2007-06-21  Jakub Jelinek  <jakub@redhat.com>
14280
14281         PR middle-end/32362
14282         * testsuite/libgomp.c/pr32362-1.c: New test.
14283         * testsuite/libgomp.c/pr32362-2.c: New test.
14284         * testsuite/libgomp.c/pr32362-3.c: New test.
14285
14286 2007-06-07  Jakub Jelinek  <jakub@redhat.com>
14287
14288         * team.c (gomp_team_start): Fix setting up thread_attr
14289         stack size.
14290
14291 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
14292
14293         * configure: Regenerate.
14294
14295 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
14296
14297         * Makefile.in: Regenerate.
14298         * configure: Regenerate.
14299         * aclocal.m4: Regenerate.
14300         * testsuite/Makefile.in: Regenerate.
14301
14302 2007-05-04  Jakub Jelinek  <jakub@redhat.com>
14303
14304         * config/linux/proc.c: New file.
14305
14306         PR libgomp/28482
14307         * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
14308
14309 2007-04-19  Daniel Franke  <franke.daniel@gmail.com>
14310
14311         * libgomp.texi (GOMP_CPU_AFFINITY): Updated.
14312
14313 2007-04-16  Matthias Klose  <doko@debian.org>
14314
14315         * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
14316         flags if not building with -m64.
14317         * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
14318         flag for i?86-*-* targets, if current target matches -m64.
14319
14320 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
14321
14322         * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
14323         * Makefile.in: Regenerate.
14324
14325 2007-04-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
14326
14327         PR testsuite/31369
14328         * testsuite/libgomp.c++/c++.exp: Don't use concat when setting
14329         ld_library_path.
14330         * testsuite/libgomp.fortran/fortran.exp: Likewise.
14331
14332 2007-04-04  Jakub Jelinek  <jakub@redhat.com>
14333
14334         * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
14335         decls.
14336         (gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
14337         * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
14338         (parse_affinity): New function.
14339         (initialize_env): Call it and gomp_init_affinity.
14340         * team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
14341         create new pthread_attr_t and call gomp_init_thread_affinity
14342         on it for each thread before passing the attribute to pthread_create.
14343         * config/linux/affinity.c: New file.
14344         * config/posix/affinity.c: New file.
14345         * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
14346         * configure: Rebuilt.
14347         * config.h.in: Rebuilt.
14348         * Makefile.am (libgomp_la_SOURCES): Add affinity.c.
14349         * Makefile.in: Rebuilt.
14350
14351 2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>
14352
14353         * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
14354         *-*-darwin*.
14355         * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
14356         and use it if found.
14357
14358 2007-03-18  Uros Bizjak  <ubizjak@gmail.com>
14359
14360         * testsuite/config/default.exp: New file.
14361         * testsuite/lib/libgomp.exp: New file.
14362         * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
14363         libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
14364         load_lib *, load_gcc_lib *): Move to libgomp.exp.
14365         (libgomp_load): Remove.
14366         * testsuite/lib/libgomp.exp (libgomp_init): Compute
14367         always_ld_library_path, not ld_library_path.  Set additional_flags
14368         to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
14369         (target_compile): Do not call libgomp_init.  Append lang_library_path
14370         and lang_link_flags to options.
14371         * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
14372         ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
14373         here.
14374         * testsuite/libgomp.c++/c++.exp: Set ld_library_path from
14375         always_ld_library_path.  Set LD_LIBRARY_PATH here.
14376         * testsuite/libgomp.fortran/fortran.exp: Ditto.
14377         * testsuite/libgomp.c/atomic-1.c: Set dg-options to
14378         "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
14379         CX8 flag.
14380         * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
14381         lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
14382         * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
14383         * testsuite/libgomp.c/pr29947-1.c: Ditto.
14384         * testsuite/libgomp.c/atomic-10.c: Ditto.
14385
14386 2007-03-21  Jakub Jelinek  <jakub@redhat.com>
14387
14388         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
14389         dg-final cleanup-modules line.
14390         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
14391         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
14392         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
14393         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
14394         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
14395         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
14396         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
14397
14398 2007-03-18  Andreas Schwab  <schwab@suse.de>
14399
14400         * acinclude.m4: Adjust regular expression for ld version
14401         extraction.
14402         * configure: Regenerate.
14403
14404 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
14405
14406         * Makefile.am: Add install-pdf target as copied from
14407         automake v1.10 rules.
14408         * Makefile.in: Regenerate
14409
14410 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
14411
14412         PR libgomp/28486
14413         * configure: Regenerate.
14414
14415         PR c++/30703
14416         * testsuite/libgomp.c++/pr30703.C: New test.
14417
14418 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
14419
14420         Revert:
14421         2006-07-05  Eric Christopher  <echristo@apple.com>
14422         * configure.ac: Depend addition of -pthread on host OS.
14423         * configure: Regenerate.
14424
14425 2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14426
14427         * libgomp.texi: Fix spacing after abbreviations.
14428
14429 2007-01-31  Daniel Franke <franke.daniel@gmail.com>
14430
14431         PR libgomp/30546
14432         * configure.ac: Add check for makeinfo
14433         * Makefile.am: Redefined target libgomp.info, build libgomp.info only
14434         if an appropriate version of makeinfo is found.
14435         * aclocal.m4: Regenerated.
14436         * configure: Regenerated.
14437         * Makefile.in: Regenerated.
14438         * testsuite/Makefile.in: Regenerated.
14439
14440 2007-01-29  Daniel Franke <franke.daniel@gmail.com>
14441
14442         PR libgomp/30540
14443         * libgomp.texi: More about implementation-dependent settings.
14444
14445 2007-01-26  Tobias Burnus  <burnus@net-b.de>
14446
14447         * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
14448
14449 2007-01-24  Jakub Jelinek  <jakub@redhat.com>
14450
14451         PR middle-end/30494
14452         * testsuite/libgomp.c/pr30494.c: New test.
14453
14454 2007-01-15  Tom Tromey  <tromey@redhat.com>
14455
14456         * configure: Rebuilt.
14457         * configure.ac: Fixed comment.
14458
14459 2007-01-14  Daniel Franke  <franke.daniel@gmail.com>
14460
14461         * libgomp.texi: Document implementation specific default values of
14462         environment variables.
14463
14464 2006-12-21  Daniel Franke  <franke.daniel@gmail.com>
14465
14466         PR libgomp/28209
14467         * libgomp.texi: New file.
14468         * configure.ac: Add --enable-generated-files-in-srcdir option.
14469         * Makefile.am: Add info, dvi, pdf, html targets. On request, copy
14470         files to srcdir.
14471         * Makefile.in: Regenerated.
14472         * config.h.in: Regenerated.
14473         * testsuite/Makefile.in: Regenerated.
14474         * NOTES: Removed.
14475
14476 2006-12-04  Daniel Franke  <franke.daniel@gmail.com>
14477
14478         PR libgomp/29949
14479         * env.c (omp_set_num_threads): Set illegal thread count to 1.
14480
14481 2006-12-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
14482
14483         * configure: Regenerate.
14484
14485 2006-12-04  Jakub Jelinek  <jakub@redhat.com>
14486
14487         PR libgomp/29947
14488         * loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
14489         start if there shouldn't be any loop iterations.
14490         (gomp_loop_ordered_static_start): Remove start == end test.
14491         * testsuite/libgomp.c/pr29947-1.c: New test.
14492         * testsuite/libgomp.c/pr29947-2.c: New test.
14493
14494 2006-12-02  Eric Botcazou  <ebotcazou@libertysurf.fr>
14495
14496         * configure.tgt: Force initial-exec TLS model on Linux only.
14497
14498 2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
14499
14500         * configure: Regenerated.
14501
14502 2006-11-09  Uros Bizjak  <ubizjak@gmail.com>
14503
14504         * env.c (parse_schedule): Reject out of range values.
14505         (parse_unsigned_long): Reject out of range, negative or zero values.
14506
14507 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
14508
14509         PR fortran/29629
14510         * testsuite/libgomp.fortran/pr29629.f90: New test.
14511
14512 2006-10-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
14513
14514         PR libgomp/29494
14515         * configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
14516         * config/posix95: New directory.
14517         * config/posix95/omp-lock.h: New file.
14518         * config/posix95/lock.c: Likewise.
14519
14520 2006-10-14  Geoffrey Keating  <geoffk@apple.com>
14521
14522         * aclocal.m4: Regenerate.
14523         * configure: Regenerate.
14524
14525 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
14526
14527         * testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
14528         '<' to '<='.
14529
14530 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
14531
14532         * acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from
14533         test.
14534         * configure: Regenerate.
14535         * fortran.c  (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.
14536
14537 2006-09-26  Jakub Jelinek  <jakub@redhat.com>
14538
14539         PR middle-end/25261
14540         PR middle-end/28790
14541         * testsuite/libgomp.c/nestedfn-4.c: New test.
14542         * testsuite/libgomp.c/nestedfn-5.c: New test.
14543         * testsuite/libgomp.fortran/nestedfn3.f90: New test.
14544
14545         PR fortran/29097
14546         * testsuite/libgomp.fortran/condinc1.f: New test.
14547         * testsuite/libgomp.fortran/condinc2.f: New test.
14548         * testsuite/libgomp.fortran/condinc3.f90: New test.
14549         * testsuite/libgomp.fortran/condinc4.f90: New test.
14550         * testsuite/libgomp.fortran/condinc1.inc: New file.
14551
14552 2006-09-18  Tom Tromey  <tromey@redhat.com>
14553
14554         * configure: Rebuilt.
14555
14556 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
14557
14558         PR c/28768
14559         PR preprocessor/14634
14560         * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
14561         to AC_DEFINE.
14562         * configure: Regenerate.
14563
14564 2006-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
14565
14566         * testsuite/libgomp.fortran/reduction3.f90: Change
14567         -2147483648 to -huge(i)-1 to avoid overflow.
14568         * testsuite/libgomp.fortran/reduction4.f90: Change
14569         Z'ffffffff' to not(0) to avoid overflow.
14570
14571 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
14572
14573         PR libgomp/25938
14574         * Makefile.am (libsubincludedir): New.
14575         (nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
14576         * Makefile.in: Regenerate.
14577
14578 2006-08-17  Jakub Jelinek  <jakub@redhat.com>
14579
14580         PR libgomp/28725
14581         * env.c: Include ctype.h.
14582         (parse_schedule, parse_unsigned_long, parse_boolean): Allow
14583         leading and/or trailing whitespace and compare strings case
14584         insensitively.
14585
14586 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
14587
14588         PR fortran/28390
14589         * testsuite/libgomp.fortran/pr28390.f: New test.
14590
14591 2006-07-05  Eric Christopher  <echristo@apple.com>
14592
14593         * configure.ac: Depend addition of -pthread on host OS.
14594         * configure: Regenerate.
14595
14596 2006-06-21  Jakub Jelinek  <jakub@redhat.com>
14597
14598         * critical.c (GOMP_critical_name_start): Fix *pptr initialization
14599         when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
14600         defined.
14601
14602 2006-06-20  Jakub Jelinek  <jakub@redhat.com>
14603
14604         PR libgomp/26175
14605         PR libgomp/26477
14606         * configure.ac: If neither --enable-linux-futex nor
14607         --disable-linux-futex is passed, determine the default by checking
14608         for compiling and/or running against NPTL.  With --enable-linux-futex,
14609         check if SYS_gettid and SYS_futex are defined.
14610         * configure: Rebuilt.
14611
14612 2006-06-14  Richard Henderson  <rth@redhat.com>
14613
14614         PR libgomp/28008
14615         * env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
14616         undefined.  Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.
14617
14618 2006-06-09  Richard Henderson  <rth@redhat.com>
14619
14620         * env.c (gomp_nthreads_var): Change to unsigned long.
14621         (gomp_run_sched_chunk): Likewise.
14622         (parse_unsigned_long): Rename from parse_num_threads and generalize.
14623         (initialize_env): Initialize gomp_thread_attr.
14624         * libgomp.h (gomp_nthreads_var): Update decl.
14625         (gomp_run_sched_chunk): Likewise.
14626         (gomp_thread_attr): Declare.
14627         * team.c (gomp_thread_attr): Export.
14628         (initialize_team): Don't initialize it.
14629
14630 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
14631
14632         PR fortran/27916
14633         * testsuite/libgomp.fortran/pr27916-1.f90: New test.
14634         * testsuite/libgomp.fortran/pr27916-2.f90: New test.
14635
14636 2006-06-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
14637
14638         * config/mingw32/time.c: New file.
14639         * configure.tgt: Use it.
14640
14641 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
14642
14643         * Makefile.am: Add install-html target. Add install-html to .PHONY
14644         * Makefile.in: Regenerate.
14645
14646 2006-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
14647
14648         PR libgomp/27612
14649         * testsuite/libgomp.c/sections-1.c: Require sync_int_long.
14650         * testsuite/libgomp.c/critical-1.c: Likewise.
14651         * testsuite/libgomp.c/loop-1.c: Likewise.
14652         * testsuite/libgomp.c/loop-2.c: Likewise.
14653         * testsuite/libgomp.c/single-1.c: Likewise.
14654         * testsuite/libgomp.c/ordered-1.c: Likewise.
14655         * testsuite/libgomp.c/ordered-2.c: Likewise.
14656
14657 2006-05-15  Jakub Jelinek  <jakub@redhat.com>
14658
14659         PR middle-end/27416
14660         * libgomp.fortran/pr27416-1.f90: New test.
14661
14662 2006-05-03  Jakub Jelinek  <jakub@redhat.com>
14663
14664         PR fortran/27395
14665         * testsuite/libgomp.fortran/pr27395-1.f90: New test.
14666         * testsuite/libgomp.fortran/pr27395-2.f90: New test.
14667
14668 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
14669
14670         PR c++/26943
14671         * testsuite/libgomp.c/pr26943-1.c: New test.
14672         * testsuite/libgomp.c/pr26943-2.c: New test.
14673         * testsuite/libgomp.c/pr26943-3.c: New test.
14674         * testsuite/libgomp.c/pr26943-4.c: New test.
14675         * testsuite/libgomp.c++/pr27337.C: Remove barrier.
14676         * testsuite/libgomp.c++/pr26943.C: New test.
14677
14678 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
14679
14680         PR middle-end/27337
14681         * testsuite/libgomp.c++/pr27337.C: New test.
14682
14683 2006-04-26  Jakub Jelinek  <jakub@redhat.com>
14684
14685         PR c/26171
14686         * testsuite/libgomp.c/pr26171.c: New test.
14687
14688 2006-04-25  Richard Henderson  <rth@redhat.com>
14689
14690         PR libgomp/25865
14691         * configure.ac: Use GCC_CHECK_TLS.
14692         * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
14693         * Makefile.in, aclocal.m4, configure: Regenerate.
14694
14695 2006-04-10  Matthias Klose  <doko@debian.org>
14696
14697         * testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib
14698         directory names containing underscores.
14699
14700 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
14701
14702         PR c++/26691
14703         * testsuite/libgomp.c++/pr26691.C: New test.
14704
14705 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
14706
14707         * testsuite/libgomp.fortran/retval2.f90: New test.
14708
14709 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
14710
14711         * testsuite/libgomp.c++: New directory.
14712
14713 2006-02-25  Shantonu Sen  <ssen@opendarwin.org>
14714
14715         * config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
14716         * config/posix/sem.c: Implement the above.
14717
14718 2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>
14719
14720         * configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
14721         define HAVE_BROKEN_POSIX_SEMAPHORES.
14722         * configure: Rebuilt.
14723         * config.h.in: Rebuilt.
14724
14725 2006-02-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
14726
14727         PR bootstrap/26161
14728         * configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
14729         for the other pthread check.
14730         * configure: Regenerate.
14731         * config.h.in: Regenerate.
14732
14733 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
14734
14735         PR libgomp/25938
14736         PR libgomp/25984
14737         * Makefile.am (fincludedir): New variable.
14738         (nodist_include_HEADERS): Remove Fortran files.
14739         (nodist_finclude_HEADERS): New variable.
14740         * Makefile.in: Regenerated.
14741
14742 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
14743
14744         * testsuite/libgomp.fortran/vla7.f90: Add -w to options.
14745         Remove tests for returning assumed character length arrays.
14746
14747 2006-02-12  Roger Sayle  <roger@eyesopen.com>
14748             John David Anglin  <dave@hiauly1.hia.nrc.ca>
14749
14750         PR libgomp/25936
14751         * configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
14752
14753 2006-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
14754
14755         * testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
14756
14757 2006-02-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
14758
14759         * testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
14760         part of LD_LIBRARY_PATH manually.
14761
14762 2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>
14763
14764         PR libgomp/25852
14765         * testsuite/lib/libgomp-dg.exp (blddir): Set it in
14766         libgomp_init.
14767
14768 2005-01-25  Paolo Bonzini  <bonzini@gnu.org>
14769
14770         PR libgomp/25884
14771         * Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
14772         * configure.ac (PERL): Don't set.
14773         (gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
14774         (OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
14775         OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
14776         * omp.h.in: Wrap the new configure substitutions with @ characters.
14777         * omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
14778         * aclocal.m4, configure, Makefile.in: Regenerate.
14779         * mkomp_h.pl: Delete.
14780
14781 2005-01-24  Paolo Bonzini  <bonzini@gnu.org>
14782
14783         PR libgomp/25259
14784         * configure.ac: Use GCC_HEADER_STDINT.
14785         * libgomp.h: Include gstdint.h.
14786         * libgomp_f.h.in: Don't include stdint.h or inttypes.h.
14787         * configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.
14788
14789 2006-01-24  Richard Henderson  <rth@redhat.com>
14790
14791         PR libgomp/25942
14792         * configure.ac: Add AM_MAINTAINER_MODE.
14793         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.
14794
14795 2006-01-24  Diego Novillo  <dnovillo@redhat.com>
14796
14797         * Makefile.in: Regenerate.
14798         * testsuite/Makefile.in: Regenerate.
14799         * aclocal.m4: Regenerate.
14800
14801 2006-01-23  Andreas Tobler  <a.tobler@schweiz.ch>
14802
14803         * config/posix/proc.c: Conditional include of sys/loadavg.h for
14804         Solaris.
14805         * configure.ac: Add check for loadavg.h.
14806         (link_gomp): Adjust comment.
14807         * configure: Regenerate.
14808         * config.h.in: Regenerate.
14809
14810 2006-01-21  Steve Ellcey  <sje@cup.hp.com>
14811
14812         PR libgomp/25877
14813         * configure.ac: Remove check for alloca.h.
14814         * configure: Regenerate.
14815         * config.h.in: Regenerate.
14816         * libgomp.h: define gomp_alloca to be __builtin_alloca.
14817         * team.c: Remove use of alloca.h.
14818         Call gomp_alloca instead of alloca.
14819
14820 2006-01-20  Steve Ellcey  <sje@cup.hp.com>
14821
14822         PR libgomp/25877
14823         * team.c: Add include of alloca.h.
14824         * configure.ac: Add check for alloca.h.
14825         * configure: Regenerate.
14826         * config.h.in: Regenerate.
14827
14828 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
14829
14830         PR fortran/25219
14831         * testsuite/libgomp.fortran/pr25219.f90: New test.
14832
14833 2005-12-05  Uros Bizjak  <uros@kss-loka.si>
14834
14835         * testsuite/libgomp.c/pr24455.c, testsuite/libgomp.c/copyin-1.c,
14836         testsuite/libgomp.c/copyin-2.c, testsuite/libgomp.c/copyin-3.c,
14837         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
14838         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
14839         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455.C,
14840         testsuite/libgomp.fortran/threadprivate1.f90,
14841         testsuite/libgomp.fortran/threadprivate2.f90,
14842         testsuite/libgomp.fortran/threadprivate3.f90,
14843         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
14844         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
14845         testsuite/libgomp.fortran/omp_parse3.f90: Change required
14846         effective-target to TLS runtime.
14847
14848         * testsuite/libgomp.fortran/pr25162.f: Require
14849         effective-target TLS runtime.
14850
14851 2005-12-01  Jakub Jelinek  <jakub@redhat.com>
14852
14853         * testsuite/libgomp.fortran/nestedfn2.f90: New test.
14854         * testsuite/libgomp.c/nestedfn-3.c: New test.
14855
14856 2005-11-30  Jakub Jelinek  <jakub@redhat.com>
14857
14858         PR fortran/25162
14859         * testsuite/libgomp.fortran/pr25162.f: New test.
14860
14861 2005-11-28  Jakub Jelinek  <jakub@redhat.com>
14862
14863         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Fall back to
14864         CLOCK_REALTIME if clock_* (CLOCK_MONOTONIC, &ts) call failed.
14865
14866 2005-11-25  Jakub Jelinek  <jakub@redhat.com>
14867
14868         * alloc.c, barrier.c, critical.c, env.c, error.c, fortran.c, iter.c,
14869         libgomp.h, libgomp_f.h.in, libgomp_g.h, loop.c, mkomp_h.pl, omp.h.in,
14870         omp_lib.f90.in, omp_lib.h.in, ordered.c, parallel.c, sections.c,
14871         single.c, team.c, work.c, config/linux/alpha/futex.h,
14872         config/linux/bar.c, config/linux/bar.h, config/linux/ia64/futex.h,
14873         config/linux/lock.c, config/linux/mutex.c, config/linux/mutex.h,
14874         config/linux/powerpc/futex.h, config/linux/s390/futex.h,
14875         config/linux/sem.c, config/linux/sem.h, config/linux/sparc/futex.h,
14876         config/linux/x86/futex.h, config/posix/bar.c, config/posix/bar.h,
14877         config/posix/lock.c, config/posix/mutex.h, config/posix/proc.c,
14878         config/posix/sem.c, config/posix/sem.h, config/posix/time.c: Update
14879         FSF address.
14880
14881 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
14882
14883         * Makefile.am: Move libgomp_f.h from nodist_include_HEADERS
14884         to nodist_noinst_HEADERS.
14885         * Makefile.in: Rebuilt.
14886
14887         * config/posix/omp-lock.h (omp_nest_lock_t): Change into struct,
14888         add integer count field.
14889         * config/posix/lock.c (omp_destroy_nest_lock): Adjust for
14890         omp_nest_lock_t type change.
14891         (omp_init_nest_lock): Likewise.  Initialize count to 0.
14892         (omp_set_nest_lock): Adjust for omp_nest_lock_t type change.
14893         Increment count.
14894         (omp_unset_nest_lock): Adjust for omp_nest_lock_t type change.
14895         Decrement count.
14896         (omp_test_nest_lock): Adjust for omp_nest_lock_t type change.
14897         Increment count if successful and return the new nesting level.
14898         * config/linux/lock.c (omp_test_nest_lock): Return new nesting level.
14899         * omp_lib.f90.in (omp_test_lock): Fix LOCK argument type.
14900         * testsuite/libgomp.c/lib-1.c: New test.
14901         * testsuite/libgomp.fortran/lib1.f90: New test.
14902         * testsuite/libgomp.fortran/lib2.f: New test.
14903         * testsuite/libgomp.fortran/lib3.f: New test.
14904
14905 2005-11-17  Richard Henderson  <rth@redhat.com>
14906
14907         PR 24845
14908         * Makefile.am (nodist_toolexeclib_HEADERS): New.
14909         * configure.ac (link_gomp): New.  Substitute it.
14910         (AC_CONFIG_FILES): Add libgomp.spec.
14911         * libgomp.spec.in: New file.
14912         * Makefile.in, testsuite/Makefile.in, configure: Rebuild.
14913         * testsuite/lib/libgomp-dg.exp: Add -B${blddir}/ to flags.
14914
14915 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
14916
14917         * testsuite/libgomp.fortran/reduction1.f90: Adjust for
14918         reduction(-:var) behaving the same as reduction(+:var).
14919         * testsuite/libgomp.c/reduction-4.c: New test.
14920
14921 2005-11-15  Uros Bizjak  <uros@kss-loka.si>
14922
14923         * testsuite/libgomp.c/pr24455-1.c, testsuite/libgomp.c/pr24455.c,
14924         testsuite/libgomp.c/copyin-1.c, testsuite/libgomp.c/copyin-2.c,
14925         testsuite/libgomp.c/copyin-3.c,
14926         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
14927         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
14928         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455-1.C,
14929         testsuite/libgomp.c++/pr24455.C,
14930         testsuite/libgomp.fortran/threadprivate1.f90,
14931         testsuite/libgomp.fortran/threadprivate2.f90,
14932         testsuite/libgomp.fortran/threadprivate3.f90,
14933         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
14934         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
14935         testsuite/libgomp.fortran/omp_parse3.f90: Require
14936         effective-target TLS.
14937
14938 2005-11-14  Diego Novillo  <dnovillo@redhat.com>
14939
14940         * HEADER: Remove.
14941
14942 2005-11-13  Jakub Jelinek  <jakub@redhat.com>
14943
14944         PR libgomp/24797
14945         * team.c (initialize_team): Pass NULL rather than free as
14946         pthread_key_create destructor.  Initialize thread specific data
14947         pointer in initial thread to a static local variable rather than
14948         malloced memory.
14949
14950 2005-11-11  Uros Bizjak  <uros@kss-loka.si>
14951
14952         * testsuite/lib/libgomp-dg.exp: Locate libgcc.a and append
14953         its location to ld_library_path.
14954
14955 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
14956
14957         * testsuite/libgomp.c/c.exp: Rename from dg.exp.
14958
14959 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
14960
14961         * testsuite/libgomp.c: Rename from libgomp.dg.
14962
14963 2005-11-09  Diego Novillo  <dnovillo@redhat.com>
14964
14965         * testsuite/libgomp.c++/pr24455.C: Add copyin clause for
14966         threadprivate variable 'i'.
14967
14968 2005-11-09  Jakub Jelinek  <jakub@redhat.com>
14969
14970         * config/linux/s390/futex.h: New file.
14971         * configure.tgt: Use it.
14972
14973         * testsuite/libgomp.fortran/omp_parse4.f90: Move n initialization
14974         before the parallel.
14975
14976 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
14977
14978         PR c++/24734
14979         * testsuite/libgomp.c++/master-1.C: New test.
14980
14981 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
14982
14983         * testsuite/libgomp.dg/copyin-3.c: New test.
14984
14985 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
14986
14987         * testsuite/libgomp.fortran/retval1.f90: New test.
14988         * testsuite/libgomp.fortran/vla7.f90: New test.
14989
14990 2005-11-06  Jakub Jelinek  <jakub@redhat.com>
14991
14992         * testsuite/libgomp.fortran/vla2.f90: New test.
14993         * testsuite/libgomp.fortran/vla3.f90: New test.
14994         * testsuite/libgomp.fortran/vla4.f90: New test.
14995         * testsuite/libgomp.fortran/vla5.f90: New test.
14996         * testsuite/libgomp.fortran/vla6.f90: New test.
14997
14998 2005-11-01  Jakub Jelinek  <jakub@redhat.com>
14999
15000         * config/linux/sparc/futex.h: New file.
15001         * configure.tgt: Use it.
15002         * testsuite/lib/libgomp-dg.exp: Use -mcpu=v9 for sparc testing.
15003
15004         * critical.c: Include stdlib.h.
15005         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Avoid warnings about
15006         ignoring return value.
15007         * configure.ac: Don't put -Wc,-pthread into XCFLAGS until after
15008         LIBGOMP_CHECK_SYNC_BUILTINS check.
15009         * configure: Rebuilt.
15010
15011 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
15012
15013         * testsuite/libgomp.fortran/vla1.f90: New test.
15014
15015 2005-10-31  Richard Henderson  <rth@redhat.com>
15016
15017         * testsuite/libgomp.fortran/character2.f90: Fix race condition
15018         setting 's' in different threads.
15019
15020 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
15021
15022         * libgomp.h (attribute_hidden, ialias): Define.
15023         * config/posix/proc.c (omp_get_num_procs): Add ialias.
15024         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Likewise.
15025         * config/posix/lock.c (omp_init_lock, omp_init_nest_lock,
15026         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
15027         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
15028         omp_test_lock, omp_test_nest_lock): Likewise.
15029         * config/linux/lock.c (omp_init_lock, omp_init_nest_lock,
15030         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
15031         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
15032         omp_test_lock, omp_test_nest_lock): Likewise.
15033         * env.c (omp_set_dynamic, omp_set_nested, omp_set_num_threads,
15034         omp_get_dynamic, omp_get_nested): Likewise.
15035         * parallel.c (omp_get_num_threads, omp_get_max_threads,
15036         omp_get_thread_num, omp_in_parallel): Likewise.
15037         * fortran.c (ialias_redirect): Define.
15038         (omp_init_lock, omp_init_nest_lock, omp_destroy_lock,
15039         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock,
15040         omp_unset_lock, omp_unset_nest_lock, omp_test_lock,
15041         omp_test_nest_lock, omp_set_dynamic, omp_set_nested,
15042         omp_set_num_threads, omp_get_dynamic, omp_get_nested,
15043         omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
15044         omp_get_num_threads, omp_get_thread_num, omp_get_wtick,
15045         omp_get_wtime): Add ialias_redirect.
15046
15047 2005-10-30  Jakub Jelinek  <jakub@redhat.com>
15048
15049         * fortran.c: Include stdlib.h.
15050
15051 2005-10-29  Jakub Jelinek  <jakub@redhat.com>
15052
15053         * Makefile.am (env.o, env.lo): Depend on libgomp_f.h.
15054         * Makefile.in: Regenerated.
15055
15056 2005-10-28  Jakub Jelinek  <jakub@redhat.com>
15057
15058         * mkomp_h.pl: Remove all -Wc, option prefixes in $COMPILE.
15059         * libgomp_f.h.in (omp_check_defines): New function.
15060         * env.c: Include libgomp_f.h.
15061         (initialize_env): Call omp_check_defines.
15062
15063         * testsuite/libgomp.dg/copyin-2.c: New test.
15064         * testsuite/libgomp.c++/copyin-2.C: New test.
15065         * testsuite/libgomp.fortran/threadprivate3.f90: New test.
15066
15067         * testsuite/libgomp.fortran/threadprivate2.f90: New test.
15068         * testsuite/libgomp.fortran/sharing2.f90: New test.
15069
15070         * testsuite/libgomp.dg/copyin-1.c: New test.
15071         * testsuite/libgomp.c++/copyin-1.C: New test.
15072
15073 2005-10-26  Jakub Jelinek  <jakub@redhat.com>
15074
15075         * testsuite/libgomp.fortran/crayptr1.f90: New test.
15076
15077         * testsuite/libgomp.fortran/workshare1.f90: New test.
15078
15079         * libgomp.fortran/appendix-a/a.28.5.f90: Change into compile
15080         only test.
15081         * libgomp.fortran/sharing1.f90: New test.
15082
15083 2005-10-24  Jakub Jelinek  <jakub@redhat.com>
15084
15085         PR c++/24502
15086         * testsuite/libgomp.c++/loop-7.C: New test.
15087
15088         * testsuite/libgomp.dg/nestedfn-2.c: New test.
15089
15090         * testsuite/libgomp.dg/nestedfn-1.c: New test.
15091         * testsuite/libgomp.fortran/reduction6.f90: New test.
15092         * testsuite/libgomp.fortran/nestedfn1.f90: New test.
15093
15094 2005-10-23  Richard Henderson  <rth@redhat.com>
15095
15096         * testsuite/libgomp.c++/ctor-1.C: New.
15097         * testsuite/libgomp.c++/ctor-2.C: New.
15098         * testsuite/libgomp.c++/ctor-3.C: New.
15099         * testsuite/libgomp.c++/ctor-4.C: New.
15100         * testsuite/libgomp.c++/ctor-5.C: New.
15101         * testsuite/libgomp.c++/ctor-6.C: New.
15102         * testsuite/libgomp.c++/ctor-7.C: New.
15103         * testsuite/libgomp.c++/ctor-8.C: New.
15104         * testsuite/libgomp.c++/ctor-9.C: New.
15105
15106 2005-10-21  Diego Novillo  <dnovillo@redhat.com>
15107
15108         PR 24455
15109         * testsuite/libgomp.c++/pr24455-1.C: New test.
15110         * testsuite/libgomp.c++/pr24455.C: New test.
15111         * testsuite/libgomp.dg/pr24455-1.c: New test.
15112         * testsuite/libgomp.dg/pr24455.c: New test.
15113
15114 2005-10-20  Richard Henderson  <rth@redhat.com>
15115
15116         * testsuite/libgomp.c++/loop-6.C: New.
15117         * testsuite/libgomp.dg/loop-3.c: New.
15118
15119 2005-10-20  Jakub Jelinek  <jakub@redhat.com>
15120
15121         * testsuite/libgomp.fortran/jacobi.f: Don't make i and j
15122         explicitly private.
15123         * testsuite/libgomp.fortran/omp_parse1.f90 (test_do): Make i
15124         explicitly shared.
15125
15126 2005-10-19  Diego Novillo  <dnovillo@redhat.com>
15127
15128         * testsuite/libgomp.fortran/jacobi.f: New test.
15129
15130 2005-10-19  Richard Henderson  <rth@redhat.com>
15131
15132         * configure.tgt (i?86-linux): Default to with_arch instead of
15133         CFLAGS.  Add -mtune to match target_cpu.
15134         (x86_64-linux): Tune to i686.
15135
15136         * fortran.c (omp_test_nest_lock_): Fix typo.
15137
15138 2005-10-19  Jakub Jelinek  <jakub@redhat.com>
15139
15140         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
15141         gomp_ordered_sync): Do nothing if team->nthreads == 1.
15142         * testsuite/libgomp.dg/ordered-3.c: New test.
15143
15144         * testsuite/libgomp.dg/appendix-a/a.18.1.c: Remove unconditional abort.
15145         Remove volatile keyword.
15146
15147         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Reorder variables
15148         in COMMON block to avoid warnings on 64-bit targets.
15149
15150 2005-10-18  Diego Novillo  <dnovillo@redhat.com>
15151
15152         * testsuite/libgomp.dg/shared-3.c: New test.
15153
15154 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
15155
15156         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: Removed.
15157         * testsuite/libgomp.fortran/reduction5.f90: New test.
15158
15159 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
15160
15161         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Add -ffixed-form to
15162         dg-options.
15163         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.  Enable
15164         flush loop now that __sync_synchronize has proper memory barrier.
15165         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: Fix a typo.
15166         Add -ffixed-form to dg-options.
15167
15168 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
15169
15170         * testsuite/libgomp.fortran/fortran.exp: Also gather tests
15171         from subdirectories.
15172         * testsuite/libgomp.fortran/appendix-a/a.15.1.f90: New test.
15173         * testsuite/libgomp.fortran/appendix-a/a.16.1.f90: New test.
15174         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: New test.
15175         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: New test.
15176         * testsuite/libgomp.fortran/appendix-a/a.2.1.f90: New test.
15177         * testsuite/libgomp.fortran/appendix-a/a.21.1.f90: New test.
15178         * testsuite/libgomp.fortran/appendix-a/a.22.7.f90: New test.
15179         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: New test.
15180         * testsuite/libgomp.fortran/appendix-a/a.26.1.f90: New test.
15181         * testsuite/libgomp.fortran/appendix-a/a.28.1.f90: New test.
15182         * testsuite/libgomp.fortran/appendix-a/a.28.2.f90: New test.
15183         * testsuite/libgomp.fortran/appendix-a/a.28.3.f90: New test.
15184         * testsuite/libgomp.fortran/appendix-a/a.28.4.f90: New test.
15185         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: New test.
15186         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: New test.
15187         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: New test.
15188         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: New test.
15189         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: New test.
15190         * testsuite/libgomp.fortran/appendix-a/a.33.3.f90: New test.
15191         * testsuite/libgomp.fortran/appendix-a/a.38.1.f90: New test.
15192         * testsuite/libgomp.fortran/appendix-a/a.39.1.f90: New test.
15193         * testsuite/libgomp.fortran/appendix-a/a.4.1.f90: New test.
15194         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: New test.
15195         * testsuite/libgomp.fortran/appendix-a/a.5.1.f90: New test.
15196         * testsuite/libgomp.fortran/appendix-a/a10.1.f90: New test.
15197
15198 2005-10-17  Jakub Jelinek  <jakub@redhat.com>
15199
15200         * testsuite/libgomp.dg/dg.exp: Only unset lang_* if
15201         lang_library_path exists.  Use find instead of glob to gather tests.
15202         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: Removed.
15203
15204 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
15205
15206         * testsuite/libgomp.dg/appendix-a/a.15.1.c: New test.
15207         * testsuite/libgomp.dg/appendix-a/a.16.1.c: New test.
15208         * testsuite/libgomp.dg/appendix-a/a.18.1.c: New test.
15209         * testsuite/libgomp.dg/appendix-a/a.19.1.c: New test.
15210         * testsuite/libgomp.dg/appendix-a/a.2.1.c: New test.
15211         * testsuite/libgomp.dg/appendix-a/a.21.1.c: New test.
15212         * testsuite/libgomp.dg/appendix-a/a.26.1.c: New test.
15213         * testsuite/libgomp.dg/appendix-a/a.29.1.c: New test.
15214         * testsuite/libgomp.dg/appendix-a/a.3.1.c: New test.
15215         * testsuite/libgomp.dg/appendix-a/a.39.1.c: New test.
15216         * testsuite/libgomp.dg/appendix-a/a.4.1.c: New test.
15217         * testsuite/libgomp.dg/appendix-a/a.5.1.c: New test.
15218         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: New file.
15219
15220 2005-10-15  Jakub Jelinek  <jakub@redhat.com>
15221
15222         * testsuite/libgomp.dg/vla-1.c: New test.
15223
15224         * testsuite/libgomp.fortran/reference2.f90: New test.
15225
15226         * testsuite/libgomp.fortran/character2.f90: Remove explicit
15227         declaration of omp_get_thread_num.
15228         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.  Add
15229         use omp_lib.
15230
15231         * testsuite/libgomp.fortran/reduction1.f90: New test.
15232         * testsuite/libgomp.fortran/reduction2.f90: New test.
15233         * testsuite/libgomp.fortran/reduction3.f90: New test.
15234         * testsuite/libgomp.fortran/reduction4.f90: New test.
15235
15236 2005-10-13  Richard Henderson  <rth@redhat.com>
15237
15238         * Makefile.am (libgomp_la_SOURCES): Add bar.c.
15239         * Makefile.in: Regenerate.
15240         * barrier.c (GOMP_barrier): Use gomp_barrier_wait.
15241         * libgomp.h: Include bar.h.
15242         (struct gomp_barrier): Remove.
15243         (struct gomp_team): Add barrier.  Replace master_barrier with
15244         master_release.  Replace threads with ordered_release.
15245         (struct gomp_thread): Replace barrier with release.
15246         * ordered.c (gomp_ordered_first): Update for ordered_release change.
15247         (gomp_ordered_last, gomp_ordered_next, gomp_ordered_static_init,
15248         gomp_ordered_static_next, gomp_ordered_sync): Likewise.
15249         * single.c (GOMP_single_copy_start): Use gomp_barrier_wait.
15250         (GOMP_single_copy_end): Likewise.
15251         * team.c (gomp_threads_dock): New.
15252         (gomp_barrier_init, gomp_barrier_destroy): Remove.
15253         (gomp_thread_start): Use gomp_barrier_wait.
15254         (new_team, free_team): Update for gomp_team changes.
15255         (gomp_team_start): Use gomp_barrier_wait and gomp_barrier_reinit.
15256         (gomp_team_end): Use gomp_barrier_wait.
15257         (initialize_team): Update for gomp_thread changes.
15258         * work.c (gomp_work_share_end): Use gomp_barrier_wait_start.
15259         (gomp_work_share_end_nowait): Use atomic ops when available.
15260         * config/linux/bar.c, config/linux/bar.h: New files.
15261         * config/posix/bar.c, config/posix/bar.h: New files.
15262
15263 2005-10-13  Jakub Jelinek  <jakub@redhat.com>
15264
15265         * single.c (GOMP_single_copy_end): Don't segfault if team is NULL.
15266         * testsuite/libgomp.dg/single-2.c: New test.
15267
15268         * testsuite/libgomp.dg/dg.exp (lang_library_path, lang_test_file,
15269         lang_link_flags): Unset, so that they aren't inherited from previously
15270         sourced *.exp.
15271
15272         * testsuite/libgomp.fortran/threadprivate1.f90: New test.
15273
15274 2005-10-12  Richard Henderson  <rth@redhat.com>
15275
15276         * testsuite/lib/libgomp-dg.exp: Set blddir at toplevel.
15277         (libgomp_init): Use lang_test_file, lang_library_path, and
15278         lang_link_flags, set by the subdirectory files.  Add -fopenmp here.
15279
15280         * testsuite/libgomp.fortran/fortran.exp (lang_library_path): New.
15281         (lang_test_file, lang_link_flags): New.
15282         (DEFAULT_FFLAGS, ALWAYS_CFLAGS, multilibs, blddir): Remove.
15283
15284         * testsuite/libgomp.c++/c++.exp, testsuite/libgomp.c++/loop-1.C,
15285         testsuite/libgomp.c++/loop-2.C, testsuite/libgomp.c++/loop-3.C,
15286         testsuite/libgomp.c++/loop-4.C, testsuite/libgomp.c++/nested-1.C,
15287         testsuite/libgomp.c++/parallel-1.C,
15288         testsuite/libgomp.c++/reduction-1.C,
15289         testsuite/libgomp.c++/reduction-2.C,
15290         testsuite/libgomp.c++/reduction-3.C,
15291         testsuite/libgomp.c++/sections-1.C, testsuite/libgomp.c++/shared-1.C,
15292         testsuite/libgomp.c++/shared-2.C, testsuite/libgomp.c++/single-1.C,
15293         testsuite/libgomp.c++/single-2.C, testsuite/libgomp.c++/single-3.C:
15294         New files, largely cribbed from the C testsuite.
15295
15296 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
15297
15298         * testsuite/libgomp.fortran/character1.f90: New test.
15299         * testsuite/libgomp.fortran/character2.f90: New test.
15300
15301         * testsuite/libgomp.dg/nested-1.c: New test.
15302         * testsuite/libgomp.dg/nested-2.c: New test.
15303         * testsuite/libgomp.fortran/do1.f90: New test.
15304         * testsuite/libgomp.fortran/do2.f90: New test.
15305
15306         * testsuite/libgomp.fortran/reference1.f90: New test.
15307
15308 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
15309
15310         * testsuite/libgomp.dg/reduction-1.c: New test.
15311         * testsuite/libgomp.dg/reduction-2.c: New test.
15312         * testsuite/libgomp.dg/reduction-3.c: New test.
15313
15314 2005-10-10  Jakub Jelinek  <jakub@redhat.com>
15315
15316         * testsuite/libgomp.dg/atomic-1.c: New test.
15317         * testsuite/libgomp.dg/atomic-2.c: New test.
15318
15319 2005-10-09  Richard Henderson  <rth@redhat.com>
15320
15321         * critical.c (atomic_lock): New.
15322         (initialize_critical): Initialize it.
15323         (GOMP_atomic_start, GOMP_atomic_end): New.
15324         * libgomp.map: Export them.
15325         * libgomp_g.h: Declare them.
15326
15327         * testsuite/libgomp.dg/atomic-10.c: Move from gcc testsuite.
15328
15329 2005-10-02  Richard Henderson  <rth@redhat.com>
15330
15331         * configure.ac: Move save_CFLAGS hack earlier.  Append -Wall/-Werror
15332         to XCFLAGS instead of CFLAGS.
15333
15334 2005-09-30  Richard Henderson  <rth@redhat.com>
15335
15336         * configure.ac: Determine whether -pthread or -lpthread is needed.
15337         * Makefile.am (libgomp_la_LDFLAGS): Remove explicit -lpthread.
15338         * Makefile.in, configure: Rebuild.
15339
15340 2005-09-28  Richard Henderson  <rth@redhat.com>
15341
15342         * testsuite/libgomp.dg/omp-loop03.c: Fix return code.
15343         * testsuite/libgomp.dg/omp-single-3.c: New test.
15344
15345 2005-09-28  Diego Novillo  <dnovillo@redhat.com>
15346
15347         * testsuite/libgomp.dg/omp-single-2.c: New test.
15348         * testsuite/libgomp.dg/shared-2.c: Fix return code.
15349
15350 2005-09-27  Richard Henderson  <rth@redhat.com>
15351
15352         * testsuite/libgomp.dg/omp-loop03.c: Add initial barrier.
15353         * testsuite/libgomp.dg/omp-parallel-for.c: Specify static schedule.
15354
15355 2005-09-27  Jakub Jelinek  <jakub@redhat.com>
15356
15357         * testsuite/libgomp.dg/omp-loop03.c: New test.
15358
15359 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
15360
15361         * testsuite/libgomp.dg/omp-parallel-for.c: New test.
15362
15363 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
15364
15365         * testsuite/libgomp.dg/omp-single-1.c: New test.
15366         * testsuite/libgomp.dg/shared-1.c: Return 0.
15367         Add prototype for abort.
15368         * testsuite/libgomp.dg/shared-2.c: Likewise.
15369
15370 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
15371
15372         * testsuite/libgomp.fortran/omp_parse3.f90: Fix non-conforming
15373         constructs.
15374
15375 2005-09-26  Diego Novillo  <dnovillo@redhat.com>
15376
15377         * testsuite/libgomp.dg/shared-1.c: New test.
15378         * testsuite/libgomp.dg/shared-2.c: New test.
15379
15380 2005-09-24  Richard Henderson  <rth@redhat.com>
15381
15382         * testsuite/libgomp.dg/omp_workshare3.c: Mark dg-error.
15383
15384 2005-09-24  Richard Henderson  <rth@redhat.com>
15385
15386         * iter.c (gomp_iter_static_next): Round up when computing number
15387         of iterations.  Don't bother distributing a remainder equally.
15388
15389         * testsuite/libgomp.dg/omp-loop01.c (main1): Rename from main.
15390         Don't call srand.  Zero b before testing.
15391         (main): New.
15392
15393 2005-09-24  Jakub Jelinek  <jakub@redhat.com>
15394
15395         * testsuite/libgomp.fortran/omp_atomic1.f90: New test.
15396         * testsuite/libgomp.fortran/omp_atomic2.f90: New test.
15397
15398 2005-09-23  Jakub Jelinek  <jakub@redhat.com>
15399
15400         * testsuite/libgomp.fortran/omp_parse1.f90: Add a test for !$omp do
15401         without !$omp end do, followed immediately by subroutine end.
15402
15403 2005-09-23  Diego Novillo  <dnovillo@redhat.com>
15404
15405         * testsuite/libgomp.dg/omp-parallel-if.c: New test.
15406
15407 2005-09-22  Richard Henderson  <rth@redhat.com>
15408
15409         * critical.c (GOMP_critical_name_start): Change argument to void**.
15410         Reuse the pointer space if the mutex fits.
15411         (GOMP_critical_name_end): Likewise.
15412         (initialize_critical): Don't define if GOMP_MUTEX_INIT_0.
15413         * libgomp_g.h (GOMP_critical_name_start): Update decl.
15414         (GOMP_critical_name_end): Likewise.
15415         * config/linux/mutex.h (GOMP_MUTEX_INIT_0): New.
15416         * config/posix/mutex.h (GOMP_MUTEX_INIT_0): New.
15417
15418 2005-09-20  Richard Henderson  <rth@redhat.com>
15419
15420         * critical.c (GOMP_critical_name_start, GOMP_critical_name_end): New.
15421         (create_lock_lock): New.
15422         (initialize_critical): Initialize it.
15423         * libgomp.map (GOMP_critical_name_start, GOMP_critical_name_end): New.
15424         * libgomp_g.h (GOMP_ordered_start, GOMP_ordered_end): Declare.
15425
15426 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
15427
15428         * testsuite/libgom.dg/omp-loop01.c: Include stdio.h.
15429
15430 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
15431
15432         * testsuite/libgomp.dg/omp-loop01.c: New test.
15433         * testsuite/libgomp.dg/omp-loop02.c: New test.
15434
15435 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
15436
15437         * configure.ac (AC_PROG_FC): Add.
15438         (USE_FORTRAN): New automake conditional.
15439         * configure: Rebuilt.
15440         * Makefile.am (libgomp_la_SOURCES): Add fortran.c.
15441         (nodist_include_HEADERS): Add omp_lib.h, omp_lib.f90 and libgomp_f.h.
15442         If USE_FORTRAN, add also omp_lib.mod and omp_lib_kinds.mod.
15443         Add rules to build them.
15444         * Makefile.in: Rebuilt.
15445         * mkomp_h.pl: Compute and replace also OMP_LOCK_KIND and
15446         OMP_NEST_LOCK_KIND.
15447         * libgomp.map: Add Fortran wrappers.
15448         * libgomp_f.h.in: New file.
15449         * omp_lib.h.in: New file.
15450         * omp_lib.f90.in: New file.
15451         * fortran.c: New file.
15452         * testsuite/lib/libgomp-dg.exp: Load a few more .exp files.
15453         Append libgfortran directory to LD_LIBRARY_PATH if it exists.
15454         Add -Lpath_to_libgfortran and -lgfortran -lgfortranbegin if
15455         libgfortran has been built.
15456         * testsuite/libgomp.fortran/fortran.exp: New file.
15457         * testsuite/libgomp.fortran/omp_cond1.f: New test.
15458         * testsuite/libgomp.fortran/omp_cond2.f: New test.
15459         * testsuite/libgomp.fortran/omp_cond3.F90: New test.
15460         * testsuite/libgomp.fortran/omp_cond4.F90: New test.
15461         * testsuite/libgomp.fortran/omp_hello.f: New test.
15462         * testsuite/libgomp.fortran/omp_orphan.f: New test.
15463         * testsuite/libgomp.fortran/omp_parse1.f90: New test.
15464         * testsuite/libgomp.fortran/omp_parse2.f90: New test.
15465         * testsuite/libgomp.fortran/omp_parse3.f90: New test.
15466         * testsuite/libgomp.fortran/omp_parse4.f90: New test.
15467         * testsuite/libgomp.fortran/omp_reduction.f: New test.
15468         * testsuite/libgomp.fortran/omp_workshare1.f: New test.
15469         * testsuite/libgomp.fortran/omp_workshare2.f: New test.
15470
15471 2005-08-30  Richard Henderson  <rth@redhat.com>
15472
15473         * loop.c (GOMP_loop_static_start): Provide fallback wrapper
15474         function for when aliases are not usable.
15475         (GOMP_loop_dynamic_start, GOMP_loop_guided_start,
15476         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
15477         GOMP_loop_ordered_guided_start, GOMP_loop_static_next,
15478         GOMP_loop_dynamic_next, GOMP_loop_guided_next,
15479         GOMP_loop_ordered_static_next, GOMP_loop_ordered_dynamic_next,
15480         GOMP_loop_ordered_guided_next): Likewise.
15481         * ordered.c (GOMP_ordered_start): Likewise.
15482
15483 2005-08-01  Diego Novillo  <dnovillo@redhat.com>
15484
15485         * testsuite/libgomp.dg/dg.exp: Use -O2 for now.
15486         * testsuite/libgomp.dg/omp_hello.c: Fix return code
15487         * testsuite/libgomp.dg/omp_matvec.c: Likewise.
15488         * testsuite/libgomp.dg/omp_orphan.c: Likewise
15489         * testsuite/libgomp.dg/omp_reduction.c: Likewise
15490         * testsuite/libgomp.dg/omp_workshare1.c: Likewise
15491         * testsuite/libgomp.dg/omp_workshare2.c: Likewise
15492         * testsuite/libgomp.dg/omp_workshare3.c: Likewise
15493         * testsuite/libgomp.dg/omp_workshare4.c: Likewise
15494
15495 2005-07-07  Eric Christopher  <echristo@redhat.com>
15496             Diego Novillo  <dnovillo@redhat.com>
15497
15498         * testsuite/libgomp.dg/dg.exp: Add -fopenmp to DEFAULT_CFLAGS.
15499         * testsuite/libgomp.dg/omp_hello.c: Add standard includes, fix
15500         up code.
15501         * testsuite/libgomp.dg/omp_matvec.c: Ditto.
15502         * testsuite/libgomp.dg/omp_orphan.c: Ditto.
15503         * testsuite/libgomp.dg/omp_reduction.c: Ditto.
15504         * testsuite/libgomp.dg/omp_workshare1.c: Ditto.
15505         * testsuite/libgomp.dg/omp_workshare2.c: Ditto.
15506         * testsuite/libgomp.dg/omp_workshare3.c: Ditto.
15507         * testsuite/libgomp.dg/omp_workshare4.c: Ditto.
15508
15509 2005-06-13  Diego Novillo  <dnovillo@redhat.com>
15510
15511         * TOPLEVEL.patch: Remove.
15512
15513 2005-05-16  Richard Henderson  <rth@redhat.com>
15514
15515         * configure.ac: Test for clock_gettime.
15516         * config.h.in, configure: Rebuild.
15517         * config/posix/time.c: Use recommended TIME_WITH_SYS_TIME pattern.
15518         (omp_get_wtime): Use clock_gettime if available.
15519         (omp_get_wtick): Use clock_getres if available.
15520
15521 2005-05-11  Richard Henderson  <rth@redhat.com>
15522
15523         * config/linux/ia64/futex.h: New file.
15524         * configure.tgt: Use it.
15525
15526         * team.c (gomp_barrier_init, gomp_barrier_destroy): Mark inline.
15527
15528 2005-05-07  Richard Henderson  <rth@redhat.com>
15529
15530         * config/linux/powerpc/futex.h: New file.
15531         * configure.tgt: Use it.
15532
15533         * config/linux/i486/futex.h: Merge ...
15534         * config/linux/x86_64/futex.h: ... into ...
15535         * config/linux/x86/futex.h: ... here.
15536         * configure.tgt: Update to match.
15537
15538 2005-05-06  Richard Henderson  <rth@redhat.com>
15539
15540         * config/linux/alpha/futex.h: Conditionally define SYS_futex.
15541         * config/linux/i486/futex.h: Likewise.
15542         * config/linux/x86_64/futex.h: Likewise.
15543
15544         * config/linux/lock.c: New file.
15545         * config/linux/omp-lock.h: New file.
15546
15547         * critical.c, env.h: Don't include omp.h
15548         * config/posix/lock.c: Include libgomp.h instead of omp.h.
15549         * config/posix/time.c: Likewise.
15550         * config/posix/omp-lock.h: New file.
15551         * libgomp.h: Include omp-lock.h and omp.h.
15552         * Makefile.am (nodist_include_HEADERS): New.
15553         (omp.h): New rule.
15554         * configure.ac (PERL): New.
15555         * mkomp_h.pl: New file.
15556         * omp.h.in: Rename from omp.h; replace omp_lock_t and omp_nest_lock_t
15557         with templates.
15558         * Makefile.in, configure, testsuite/Makefile.in: Rebuild.
15559
15560         * testsuite/lib/libgomp-dg.exp (libgomp_init): Add include into
15561         build directory.  Re-add -march=i486 hack.
15562
15563         * testsuite/lib/libgomp-dg.exp (libgomp_compile_flags): Remove.
15564         (libgomp_link_flags): Remove.
15565         (libgomp_initialized): Remove.
15566         (libgomp_init): Don't protect from reinitialization.  Copy code
15567         from libstdc++ for getting the multilib set correctly.
15568
15569 2005-05-05  Richard Henderson  <rth@redhat.com>
15570
15571         * config/linux/alpha/futex.h: New file.
15572         * configure.tgt (alpha*-*-linux*): Use it.
15573
15574         * config/posix/mutex.c: New file.
15575         * config/posix/sem.c: Use libgomp.h.
15576
15577         * configure.tgt (x86_64-linux): Also test CC for -m32.
15578         * config/linux/x86_64/futex.h (futex_wait): Fix r10 usage.
15579
15580         * testsuite/lib/libgomp-dg.exp (libgomp_link_flags): Add /
15581         after $gccpath.
15582
15583         * Makefile.am (SUBDIRS): New.
15584         (libgomp_la_LDFLAGS): Add -lpthread.
15585         * configure.ac (AM_INIT_AUTOMAKE): Enable dependencies.
15586         * Makefile.in, aclocal.m4, config.h.in, configure: Rebuild.
15587
15588         * libgomp_g.h: New file.
15589         * libgomp.h: Split out all public declarations to libgomp_g.h.
15590         Use pragma GCC visibility instead of ATTRIBUTE_HIDDEN.
15591         * config/linux/mutex.h: Remove ATTRIBUTE_HIDDEN.
15592         * config/linux/sem.h: Likewise.
15593         * config/posix/sem.h: Likewise.
15594
15595         * Makefile.am (AM_LDFLAGS): New.
15596         (libgomp_version_script): Split out from ...
15597         (libgomp_la_LDFLAGS): ... here.
15598         (libgomp_version_info): New.
15599         * acinclude.m4 (LIBGOMP_CHECK_TLS): Use LIBGOMP_ENABLE.
15600         (LIBGOMP_ENABLE): New.
15601         (LIBGOMP_CHECK_LINKER_FEATURES): New.
15602         (LIBGOMP_ENABLE_SYMVERS): New.
15603         * configure.ac (AC_INIT): Version 1.0.
15604         (enable-version-specific-runtime-libs): Use LIBGOMP_ENABLE.
15605         (enable-linux-futex): Likewise.  Rename from enable-futex.
15606         (libtool_VERSION): New.
15607         (LIBGOMP_ENABLE_SYMVERS): Use it.
15608         * configure.tgt: Check with_gnu_ld wrt have_tls optimizations.
15609         * Makefile.in, aclocal.m4, configure: Rebuild.
15610
15611         * config/linux/mutex.c: Include libgomp.h instead of mutex.h.
15612         (gomp_mutex_unlock_slow): Fix typo.
15613         * config/linux/sem.c: Similarly.
15614         (gomp_sem_post_slow): Fix typo.
15615         * config/linux/sem.h (gomp_sem_post_slow): Fix typo.
15616         * config/linux/i486/futex.h: Remove USE_LINUX_SYSENTER code.
15617         [__PIC__] (sys_futex0): Don't use tmp output in asm.
15618
15619         * Makefile.am (AM_CFLAGS): Expand with XCFLAGS.
15620         (libgomp_la_LDFLAGS): Add top_srcdir to path.
15621         * acinclude.m4: Copy libtool.m4 stuff from libgfortran.
15622         * configure.ac: Check for getloadavg.  Substitute XCFLAGS and
15623         XLDFLAGS.  Add XCFLAGS to CFLAGS around LIBGOMP_CHECK_SYNC_BUILTINS.
15624         * configure.tgt: Set XCFLAGS and XLDFLAGS instead of CFLAGS and
15625         LDFLAGS.  Pull enable_futex check to top-level.
15626         * libgomp.h: Fix sem.h and mutex.h includes.  Define ATTRIBUTE_HIDDEN.
15627         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
15628
15629         First attempt at real configury.
15630         * Makefile, config.h: Remove file.
15631         * Makefile.am, Makefile.in: New file.
15632         * acinclude.m4 aclocal.m4: New file.
15633         * configure.ac, configure.tgt, configure: New file.
15634
15635         * config/posix/lock.c: Rename from sys-lock.c.
15636         * config/posix/mutex.h: Rename from sys-mutex.h.
15637         * config/posix/sem.c: Rename from sys-sem.c.
15638         * config/posix/sem.h: Rename from sys-sem.h.
15639         * config/posix/proc.c: Rename from sys-proc.c.
15640         * config/posix/time.c: Rename from sys-proc.c.
15641
15642         * config/linux/mutex.c: New file.
15643         * config/linux/mutex.h: New file.
15644         * config/linux/sem.c: New file.
15645         * config/linux/sem.h: New file.
15646         * config/linux/i486/futex.h: New file.
15647         * config/linux/x86_64/futex.h: New file.
15648
15649 2005-05-04  Richard Henderson  <rth@redhat.com>
15650
15651         * iter.c (gomp_iter_dynamic_next, gomp_iter_guided_next): New.
15652         * libgomp.h: Declare them.
15653         * loop.c (gomp_loop_dynamic_start, gomp_loop_guided_start,
15654         gomp_loop_dynamic_next, gomp_loop_guided_next): Use them.
15655
15656 2005-05-04  Richard Henderson  <rth@redhat.com>
15657
15658         * libgomp-1 code drop
15659
15660 2005-05-04  Richard Henderson  <rth@redhat.com>
15661
15662         * iter.c (gomp_iter_static_next): Return tri-state on 0.
15663         * ordered.c (gomp_ordered_static_next): Remove not_last argument.
15664         * libgomp.h (struct gomp_team_state): Make static_trip unsigned.
15665         (gomp_iter_static_next): Update.
15666         (gomp_ordered_static_next): Update.
15667         * loop.c (gomp_loop_static_start): Update for gomp_iter_static_next.
15668         (gomp_loop_ordered_static_start): Likewise.  Exit early for a
15669         totally empty range.
15670         (gomp_loop_ordered_static_next): Refine test for calling
15671         gomp_ordered_static_next.
15672         * testsuite/ordered-1.c: Add case for more threads than iterations.
15673
15674         * iter.c (gomp_iter_runtime_next_locked): Remove.
15675         * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start,
15676         gomp_loop_guided_start, gomp_loop_ordered_static_start,
15677         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
15678         gomp_loop_static_next, gomp_loop_dynamic_next, gomp_loop_guided_next,
15679         gomp_loop_ordered_static_next, gomp_loop_ordered_dynamic_next,
15680         gomp_loop_ordered_guided_next): Downcase name, make static, add
15681         an external alias with the old name.
15682         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
15683         GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Use a
15684         switch and call one of the above static functions.
15685         * libgomp.h: Update.
15686
15687         * work.c (gomp_work_share_start): Lock the mutex for !first too.
15688         * loop.c (GOMP_loop_static_start, GOMP_loop_dynamic_start,
15689         GOMP_loop_guided_start, GOMP_loop_runtime_start,
15690         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
15691         GOMP_loop_ordered_guided_start): Update to match.
15692         * sections.c (GOMP_sections_start): Likewise.
15693         * single.c (GOMP_single_start, GOMP_single_copy_start): Likewise.
15694
15695         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
15696         gomp_ordered_static_init, gomp_ordered_static_next): Rename s/_loop//.
15697         Use bounds check instead of modulus.
15698         (gomp_ordered_sync): Split out of GOMP_ordered_start.
15699         (gomp_ordered_last): Don't sync with ordered_owner here.
15700         (gomp_ordered_next): Likewise.
15701         (gomp_ordered_static_loop_next): Likewise.
15702         * loop.c, libgomp.h: Update to match.
15703
15704         * libgomp.h (GOMP_barrier): Declare.
15705
15706         * testsuite/barrier-1.c: New file.
15707         * testsuite/critical-1.c: New file.
15708         * testsuite/ordered-2.c: New file.
15709         * testsuite/ordered-1.c: New file.
15710         * testsuite/sections-1.c: New file.
15711         * testsuite/single-1.c: New file.
15712         * testsuite/Makefile (TESTS): Add them.
15713
15714 2005-05-04  Richard Henderson  <rth@redhat.com>
15715
15716         * libgomp.h (struct gomp_work_share): Add ordered_owner.
15717         * loop.c (GOMP_loop_static_start): If not the startup thread,
15718         acquire the mutex to wait for initialization complete.
15719         (GOMP_loop_ordered_static_start): Likewise.
15720         (GOMP_loop_ordered_runtime_start): Likewise.
15721         (GOMP_loop_ordered_static_first): Remove.
15722         (GOMP_loop_ordered_dynamic_first): Remove.
15723         (GOMP_loop_ordered_guided_first): Remove.
15724         (GOMP_loop_ordered_runtime_first): Remove.
15725         * ordered.c (gomp_ordered_loop_first): Post to own release when
15726         we're the first thread.
15727         (gomp_ordered_loop_last): Wait on release if not owner.
15728         (gomp_ordered_loop_next): Likewise.
15729         (gomp_ordered_static_loop_init): New.
15730         (gomp_ordered_static_loop_next): Use ordered_owner.
15731         (GOMP_ordered_start): Likewise.
15732         * work.c (gomp_new_work_share): Initialize ordered_owner.
15733
15734 2005-05-03  Richard Henderson  <rth@redhat.com>
15735
15736         * Makefile (OPT): New.
15737         (CFLAGS): Use it.
15738
15739         * loop.c (GOMP_loop_end, GOMP_loop_end_nowait): New.
15740         * sections.c (GOMP_sections_end, GOMP_sections_end_nowait): New.
15741         * libgomp.h, libgomp.map, NOTES: Update to match.
15742
15743         * team.c (struct gomp_thread_start_data): Remove ts, fn, data.
15744         Add initialized and thr members.
15745         (gomp_thread_start): Pause when initially spawned to wait for
15746         the whole team to be created.
15747         (gomp_team_start): Release team members at the end.
15748
15749         * testsuite/loop-1.c (N): New.  Use it instead of hardcoded 100.
15750         (f_foo_1): Use GOMP_loop_end.
15751         (f_foo_2): Use GOMP_loop_end_nowait.
15752
15753         * testsuite/loop-2.c: New file.
15754         * testsuite/Makefile (TESTS): Add it.
15755
15756 2005-05-03  Richard Henderson  <rth@redhat.com>
15757
15758         * iter.c (gomp_iter_static_next): Fix overflow check typo.
15759         (gomp_iter_dynamic_next_locked): Fix overflow check thinko.
15760         * team.c (new_team): Initialize oldest_live_gen to 1 if no
15761         initial work_share.
15762
15763         * testsuite/Makefile: New file.
15764         * testsuite/loop-1.c: New file.
15765
15766 2005-05-03  Richard Henderson  <rth@redhat.com>
15767
15768         Initial implementation and checkin.
15769 \f
15770 Copyright (C) 2005-2021 Free Software Foundation, Inc.
15771
15772 Copying and distribution of this file, with or without modification,
15773 are permitted in any medium without royalty provided the copyright
15774 notice and this notice are preserved.