openacc: Fortran derived-type mapping fix
[platform/upstream/gcc.git] / libgomp / ChangeLog
1 2020-07-03  Thomas Schwinge  <thomas@codesourcery.com>
2
3         * oacc-mem.c (goacc_exit_data_internal): Revert always-copyfrom
4         behavior for 'GOMP_MAP_FORCE_FROM'.
5         * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: Adjust XFAIL.
6
7 2020-07-03  Thomas Schwinge  <thomas@codesourcery.com>
8
9         * oacc-mem.c (goacc_exit_data_internal): Remove
10         'GOMP_MAP_ALWAYS_FROM' handling.
11
12 2020-06-30  Thomas Schwinge  <thomas@codesourcery.com>
13
14         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Replace fragile
15         'scan-assembler' with 'scan-offload-rtl'.
16         * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Likewise.
17         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Likewise.
18         * testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: Likewise.
19         * testsuite/libgomp.oacc-c-c++-common/pr85381.c: Likewise.
20
21 2020-06-30  Thomas Schwinge  <thomas@codesourcery.com>
22
23         * target.c (gomp_map_vars_existing): Assert 'kind !=
24         GOMP_MAP_ATTACH'.
25         (gomp_map_vars_internal): Clean up.
26
27 2020-06-27  Jakub Jelinek  <jakub@redhat.com>
28
29         * testsuite/libgomp.c/loop-17.c: New test.
30         * testsuite/libgomp.c/loop-18.c: New test.
31
32 2020-06-26  Marek Polacek  <polacek@redhat.com>
33
34         * testsuite/libgomp.c++/atomic-3.C: Use -std=gnu++14.
35
36 2020-06-23  Alexandre Oliva  <oliva@adacore.com>
37
38         * testsuite/lib/libgomp.exp: Load gcc lib scanoffload.exp.
39         * testsuite/lib/libgomp-dg.exp: Drop now-obsolete -save-temps.
40
41 2020-06-22  David Edelsohn  <dje.gcc@gmail.com>
42
43         * Makefile.am: Use -include.
44         * Makefile.in: Regenerate.
45
46 2020-06-21  David Edelsohn  <dje.gcc@gmail.com>
47
48         * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
49         * Makefile.in: Regenerate
50         * configure.ac (tmake_file): Substitute.
51         * configure: Regenerate.
52         * configure.tgt (powerpc-ibm-aix*): Define tmake_file.
53         * config/t-aix: New file.
54
55 2020-06-17  Thomas Schwinge  <thomas@codesourcery.com>
56
57         PR lto/94848
58         * testsuite/libgomp.fortran/use_device_ptr-optional-3.f90: Add
59         'dg-do run'.
60
61 2020-06-17  Andrew Stubbs  <ams@codesourcery.com>
62
63         * plugin/plugin-gcn.c (init_environment_variables): Use ".so.1"
64         variant for HSA_RUNTIME_LIB name.
65         (find_executable_symbol_1): Delete.
66         (find_executable_symbol): Delete.
67         (init_kernel_properties): Add ".kd" suffix to symbol names.
68         (find_load_offset): Delete.
69         (create_and_finalize_hsa_program): Remove relocation handling.
70
71 2020-06-16  Tobias Burnus  <tobias@codesourcery.com>
72
73         * testsuite/libgomp.oacc-fortran/routine-10.f90: New test.
74
75 2020-06-08  Tobias Burnus  <tobias@codesourcery.com>
76
77         PR lto/94848
78         PR middle-end/95551
79         * testsuite/libgomp.fortran/target-var.f90: New test.
80
81 2020-06-05  Thomas Schwinge  <thomas@codesourcery.com>
82             Julian Brown  <julian@codesourcery.com>
83
84         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>: Explain
85         special handling.
86
87 2020-06-05  Thomas Schwinge  <thomas@codesourcery.com>
88             Julian Brown  <julian@codesourcery.com>
89
90         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>:
91         Simplify.
92
93 2020-06-05  Julian Brown  <julian@codesourcery.com>
94
95         * testsuite/libgomp.oacc-c-c++-common/struct-copyout-1.c: New test.
96         * testsuite/libgomp.oacc-c-c++-common/struct-copyout-2.c: New test.
97
98 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
99
100         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>:
101         Evaluate 'copyfrom' individually for each entry.
102         * testsuite/libgomp.oacc-c-c++-common/struct-1.c: Update.
103
104 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
105
106         * oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>:
107         Evaluate 'finalize' individually for each entry.
108         * testsuite/libgomp.oacc-c-c++-common/struct-1.c: New file.
109         * testsuite/libgomp.oacc-c-c++-common/struct-refcount-1.c: Remove
110         file.
111
112 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
113
114         * testsuite/libgomp.oacc-c-c++-common/deep-copy-7.c: Fix 'sizeof'
115         usage.
116         * testsuite/libgomp.oacc-c-c++-common/deep-copy-8.c: Likewise.
117
118 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
119             Julian Brown  <julian@codesourcery.com>
120
121         * oacc-mem.c (goacc_exit_datum): Repair 'is_tgt_unmapped'
122         checking.
123         (acc_unmap_data, goacc_exit_data_internal): Restore
124         'is_tgt_unmapped' checking.
125         * testsuite/libgomp.oacc-c-c++-common/struct-refcount-1.c: New
126         file.
127         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: Adjust.
128         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-1.f90: Likewise.
129         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-1.f90: Likewise.
130         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-2.f90: Likewise.
131         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-1.f90: Likewise.
132         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-1.f90: Likewise.
133
134 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
135             Julian Brown  <julian@codesourcery.com>
136
137         * oacc-mem.c (acc_unmap_data): Don't open-code 'gomp_remove_var'.
138
139 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
140
141         PR libgomp/92854
142         * oacc-mem.c (acc_unmap_data): Remove 'tgt' reference counting.
143
144 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
145
146         PR libgomp/92854
147         * testsuite/libgomp.oacc-c-c++-common/pr92854-1.c: Extend some
148         more.
149
150 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
151             Julian Brown  <julian@codesourcery.com>
152
153         * oacc-mem.c (goacc_enter_datum): Use 'tgt' returned from
154         'gomp_map_vars'.
155          (acc_map_data): Clean up accordingly.
156
157 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
158
159         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: XFAIL behavior
160         of over-eager 'finalize' clause.
161         * testsuite/libgomp.oacc-fortran/deep-copy-6-no_finalize.F90: New
162         file.
163         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-1.f90: Likewise.
164         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-2.F90: Likewise.
165         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-1.f90: Likewise.
166         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-2.f90: Likewise.
167         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-1.f90: Likewise.
168         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-2.f90: Likewise.
169         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-1.f90: Likewise.
170         * testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-2.f90: Likewise.
171
172 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
173
174         * oacc-mem.c (goacc_exit_data_internal): Unlock on error path.
175
176 2020-06-04  Julian Brown  <julian@codesourcery.com>
177
178         * oacc-mem.c (acc_attach_async): Add missing gomp_mutex_unlock on
179         error path.
180         (goacc_detach_internal): Likewise.
181
182 2020-06-04  Thomas Schwinge  <thomas@codesourcery.com>
183
184         * testsuite/libgomp.oacc-fortran/error_stop-1.f: Initialize before
185         the checkpoint.
186         * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
187         * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
188         * testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
189         * testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
190         * testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.
191
192 2020-06-02  Jakub Jelinek  <jakub@redhat.com>
193
194         * allocator.c (omp_free): Fix up build if HAVE_SYNC_BUILTINS is not
195         defined.
196
197 2020-05-30  Jakub Jelinek  <jakub@redhat.com>
198
199         * testsuite/libgomp.c-c++-common/alloc-4.c: New test.
200
201 2020-05-30  Jakub Jelinek  <jakub@redhat.com>
202
203         * allocator.c (omp_alloc): For size == 0, return NULL early.
204
205 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
206
207         PR bootstrap/95413
208         * configure: Regenerated.
209
210 2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
211
212         PR libfortran/95191
213         * testsuite/libgomp.fortran/async_io_9.f90: New test.
214
215 2020-05-19  Jakub Jelinek  <jakub@redhat.com>
216
217         * omp.h.in (omp_uintptr_t): New typedef.
218         (__GOMP_UINTPTR_T_ENUM): Define.
219         (omp_memspace_handle_t, omp_allocator_handle_t, omp_alloctrait_key_t,
220         omp_alloctrait_value_t, omp_alloctrait_t): New typedefs.
221         (__GOMP_DEFAULT_NULL_ALLOCATOR): Define.
222         (omp_init_allocator, omp_destroy_allocator, omp_set_default_allocator,
223         omp_get_default_allocator, omp_alloc, omp_free): Declare.
224         * libgomp.h (struct gomp_team_state): Add def_allocator field.
225         (gomp_def_allocator): Declare.
226         * libgomp.map (OMP_5.0.1): Export omp_set_default_allocator,
227         omp_get_default_allocator, omp_init_allocator, omp_destroy_allocator,
228         omp_alloc and omp_free.
229         * team.c (gomp_team_start): Copy over ts.def_allocator.
230         * env.c (gomp_def_allocator): New variable.
231         (parse_wait_policy): Adjust function comment.
232         (parse_allocator): New function.
233         (handle_omp_display_env): Print OMP_ALLOCATOR.
234         (initialize_env): Call parse_allocator.
235         * Makefile.am (libgomp_la_SOURCES): Add allocator.c.
236         * allocator.c: New file.
237         * icv.c (omp_set_default_allocator, omp_get_default_allocator): New
238         functions.
239         * testsuite/libgomp.c-c++-common/alloc-1.c: New test.
240         * testsuite/libgomp.c-c++-common/alloc-2.c: New test.
241         * testsuite/libgomp.c-c++-common/alloc-3.c: New test.
242         * Makefile.in: Regenerated.
243
244 2020-05-15  H.J. Lu  <hongjiu.lu@intel.com>
245
246         PR bootstrap/95147
247         * configure: Regenerated.
248
249 2020-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
250
251         PR libfortran/95119
252         * testsuite/libgomp.fortran/close_errors_1.f90: New test.
253
254 2020-05-14  H.J. Lu  <hongjiu.lu@intel.com>
255
256         * configure: Regenerated.
257
258 2020-05-14  Jakub Jelinek  <jakub@redhat.com>
259
260         * testsuite/libgomp.c-c++-common/target-40.c: New test.
261
262 2020-05-13  Tobias Burnus  <tobias@codesourcery.com>
263
264         PR fortran/94690
265         * testsuite/libgomp.fortran/pr66199-3.f90: New.
266         * testsuite/libgomp.fortran/pr66199-4.f90: New.
267         * testsuite/libgomp.fortran/pr66199-5.f90: New.
268         * testsuite/libgomp.fortran/pr66199-6.f90: New.
269         * testsuite/libgomp.fortran/pr66199-7.f90: New.
270         * testsuite/libgomp.fortran/pr66199-8.f90: New.
271         * testsuite/libgomp.fortran/pr66199-9.f90: New.
272
273 2020-05-12  Jakub Jelinek  <jakub@redhat.com>
274
275         * testsuite/libgomp.c/target-39.c: New test.
276
277 2020-04-29  Thomas Schwinge  <thomas@codesourcery.com>
278
279         * config/accel/openacc.f90 (acc_device_current): Set to '-1'.
280         * openacc.f90 (acc_device_current): Likewise.
281         * openacc.h (acc_device_current): Likewise.
282         * openacc_lib.h (acc_device_current): Likewise.
283
284         PR target/94282
285         * testsuite/libgomp.c-c++-common/function-not-offloaded.c: Remove
286         'dg-allow-blank-lines-in-output'.
287
288         * oacc-init.c (get_openacc_name): Handle 'gcn'.
289         * testsuite/lib/libgomp.exp
290         (offload_target_to_openacc_device_type) [amdgcn*]: Return
291         'radeon'.  Adjust all users.
292         (check_effective_target_openacc_amdgcn_accel_present): Rename
293         to...
294         (check_effective_target_openacc_radeon_accel_present): ... this.
295         Adjust all users.
296         (check_effective_target_openacc_amdgcn_accel_selected): Rename to...
297         (check_effective_target_openacc_radeon_accel_selected): ... this.
298         Adjust all users.
299
300         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Add
301         'dg-do run'.
302
303 2020-04-23  Andrew Stubbs  <ams@codesourcery.com>
304
305         PR other/94629
306
307         * plugin/plugin-gcn.c (init_hsa_context): Check return value from
308         hsa_iterate_agents.
309         (GOMP_OFFLOAD_init_device): Check return values from both calls to
310         hsa_agent_iterate_regions.
311
312 2020-04-20  Thomas Schwinge  <thomas@codesourcery.com>
313
314         PR middle-end/94635
315         * testsuite/libgomp.fortran/target-enter-data-2.F90: Add 'dg-do
316         run'.
317
318 2020-04-20  Tobias Burnus  <tobias@codesourcery.com>
319
320         PR middle-end/94120
321         * testsuite/libgomp.oacc-c++/declare-pr94120.C: Fix 'declare copy(out)'
322         test case.
323
324 2020-04-17  Tobias Burnus  <tobias@codesourcery.com>
325
326         PR middle-end/94635
327         * testsuite/libgomp.fortran/target-enter-data-2.F90: New.
328
329 2020-04-13  Thomas Schwinge  <thomas@codesourcery.com>
330
331         PR libgomp/92843
332         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
333         Rename to...
334         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1-lib.c:
335         ... this.
336         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
337         Rename to...
338         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1.c:
339         ... this.
340         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
341         Rename to...
342         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2-lib.c:
343         ... this.
344         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
345         Rename to...
346         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2.c:
347         ... this.
348         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
349         Rename to...
350         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3-lib.c:
351         ... this.
352         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
353         Rename to...
354         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3.c:
355         ... this.
356         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
357         Rename to...
358         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4-lib.c:
359         ... this.
360         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
361         Rename to...
362         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4.c:
363         ... this.
364         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
365         Rename to...
366         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5-lib.c:
367         ... this.
368         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
369         Rename to...
370         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5.c:
371         ... this.
372         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
373         Rename to...
374         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6-lib.c:
375         ... this.
376         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
377         Rename to...
378         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6.c:
379         ... this.
380         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
381         Rename to...
382         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7-lib.c:
383         ... this.
384         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
385         Rename to...
386         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7.c:
387         ... this.
388         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
389         Rename to...
390         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8-lib.c:
391         ... this.
392         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c::
393         Rename to...
394         * testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8.c:
395         ... this.
396
397 2020-04-10  Julian Brown  <julian@codesourcery.com>
398             Thomas Schwinge  <thomas@codesourcery.com>
399
400         PR libgomp/92843
401         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
402         New file.
403         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
404         Likewise.
405         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
406         Likewise.
407         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
408         Likewise.
409         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
410         Likewise.
411         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
412         Likewise.
413         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
414         Likewise.
415         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
416         Likewise.
417         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
418         Likewise.
419         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
420         Likewise.
421         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
422         Likewise.
423         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
424         Likewise.
425         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
426         Likewise.
427         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
428         Likewise.
429         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
430         Likewise.
431         * testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c:
432         Likewise.
433
434 2020-04-10  Thomas Schwinge  <thomas@codesourcery.com>
435
436         * testsuite/libgomp.fortran/target-enter-data-1.f90: Add 'dg-do
437         run'.
438
439 2020-04-08  Tobias Burnus  <tobias@codesourcery.com>
440
441         PR middle-end/94120
442         * libgomp.oacc-c++/declare-pr94120.C: New.
443
444 2020-04-06  Maciej W. Rozycki  <macro@wdc.com>
445
446         * configure.ac: Add testsuite/libgomp-site-extra.exp to output
447         files.
448         * configure: Regenerate.
449         * testsuite/libgomp-site-extra.exp.in: New file.
450         * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): Remove
451         variable.
452         * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New
453         variable.
454         * testsuite/Makefile.in: Regenerate.
455
456 2020-04-03  Thomas Schwinge  <thomas@codesourcery.com>
457
458         PR tree-optimization/89713
459         PR c/94392
460         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Again expect
461         'bar.sync'.
462         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Likewise.
463
464 2020-03-31  Tobias Burnus  <tobias@codesourcery.com>
465
466         * target.c (GOMP_target_enter_exit_data): Handle PSET/MAP_POINTER.
467         * testsuite/libgomp.fortran/target-enter-data-1.f90: New.
468
469 2020-03-24  Tobias Burnus  <tobias@codesourcery.com>
470
471         PR libgomp/81689
472         * testsuite/libgomp.c/target-link-1.c: Remove xfail.
473
474 2020-03-20  Tobias Burnus  <tobias@codesourcery.com>
475
476         PR libgomp/94251
477         * target.c (gomp_load_image_to_device): Fix link
478         variable handling.
479
480 2020-03-19  Jakub Jelinek  <jakub@redhat.com>
481
482         PR c++/93931
483         * testsuite/libgomp.c++/pr93931.C: New test.
484
485 2020-03-19  Tobias Burnus  <tobias@codesourcery.com>
486
487         * testsuite/libgomp.c-c++-common/function-not-offloaded.c: Add
488         dg-allow-blank-lines-in-output.
489
490 2020-03-18  Julian Brown <julian@codesourcery.com>
491             Tobias Burnus  <tobias@codesourcery.com>
492
493         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Really make
494         it work concurrently.
495
496 2020-03-18  Tobias Burnus  <tobias@codesourcery.com>
497
498         * testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C: Add
499         #define DO_LONG_DOUBLE; set to 1, except for nvidia + gcn.
500         * libgomp.oacc-c-c++-common/firstprivate-mappings-1.c: Likewise.
501
502 2020-03-14  Jakub Jelinek  <jakub@redhat.com>
503
504         PR middle-end/93566
505         * testsuite/libgomp.c/pr93566.c: New test.
506
507 2020-02-21  Frederik Harwath  <frederik@codesourcery.com>
508
509         * testsuite/libgomp.oacc-fortran/acc_get_property.f90: Adapt to
510         changes from 2020-02-19, i.e. use integer(c_size_t) instead of
511         integer(acc_device_property) for the type of the return value of
512         acc_get_property.
513
514 2020-02-19  Tobias Burnus  <tobias@codesourcery.com>
515
516         * .gitattributes: New; whitespace handling for Fortran's openacc_lib.h.
517         * config/accel/openacc.f90 (openacc_kinds): Add acc_device_current.
518         (openacc_internal, acc_on_device_h): Fix argument name; minor cleanup.
519         * libgomp.texi (Enabling OpenACC): No longer mark as experimental.
520         (acc_set_device_num): Fix Fortran argument name, use same name for C.
521         (acc_get_property): Update Fortran interface to post-OpenACC 3.0
522         corrections; add note about the previous interface and named constant.
523         (OpenACC library and environment variables): Fix two typos.
524         * openacc.f90: Use for all procedures the argument names from the spec
525         as for â€¦_h they are user visible.
526         (openacc_kinds): Rename acc_device_property to
527         acc_device_property_kinds and change value to int32 ; and update users.
528         Re-add acc_device_property for for backward compatibility.
529         (acc_get_property_string_h): Clean up as acc_device_property_kind
530         changed.
531         (acc_get_property_h): Likewise and return c_size_t instead of
532         acc_device_property.
533         (openacc): Also export acc_device_property_kinds.
534         (acc_async_test_h, acc_async_test_all_h, acc_on_device_h,
535         acc_is_present_32_h, acc_is_present_64_h): Simplify logical-return-value
536         handling; check against /= 0 instead of == 1 to match C.
537         * openacc_lib.h: Use for all procedures the argument names from the spec
538         as for â€¦_h they are user visible. Place !GCC$ into the first column to
539         be active also for fixed-form souce form.
540         (acc_device_current, acc_device_property_kind, acc_device_property,
541         acc_property_memory, acc_property_free_memory, acc_property_name,
542         acc_property_vendor, acc_property_driver): New named constants.
543         (acc_get_property, acc_get_property_string): New generic interface.
544
545 2020-02-13  Frederik Harwath  <frederik@codesourcery.com>
546
547         PR libgomp/93481
548         * plugin/plugin-nvptx.c: Remove GOMP_OFFLOAD_async_run stub.
549         * target.c (gomp_load_plugin_for_device): Make "async_run" loading
550         optional.
551         (gomp_target_task_fn): Assert "devicep->async_run_func".
552         (clear_unsupported_flags): New function to remove unsupported flags
553         (right now only GOMP_TARGET_FLAG_NOWAIT) that can be be ignored.
554         (GOMP_target_ext): Apply clear_unsupported_flags to flags.
555         * testsuite/libgomp.c/target-33.c:
556         Remove xfail for offload_target_nvptx.
557         * testsuite/libgomp.c/target-34.c: Likewise.
558
559 2020-02-10  Frederik Harwath  <frederik@codesourcery.com>
560
561         * testsuite/libgomp.c/target-33.c: Add xfail for execution on
562         offload_target_nvptx, cf. https://gcc.gnu.org/PR81688.
563         * testsuite/libgomp.c/target-34.c: Likewise.
564         * testsuite/libgomp.c/target-link-1.c: Add xfail for
565         offload_target_nvptx, cf. https://gcc.gnu.org/PR81689.
566
567 2020-02-09  Jakub Jelinek  <jakub@redhat.com>
568
569         * testsuite/libgomp.c/target-38.c: New test.
570
571 2020-02-06  Jakub Jelinek  <jakub@redhat.com>
572
573         PR libgomp/93515
574         * testsuite/libgomp.c-c++-common/pr93515.c: New test.
575
576 2020-02-05  Tobias Burnus  <tobias@codesourcery.com>
577
578         * testsuite/lib/libgomp.exp
579         (check_effective_target_offload_target_nvptx): Pass flags as 'options'
580         and not as 'source' argument to libgomp_target_compile.
581
582 2020-02-03  Andrew Stubbs  <ams@codesourcery.com>
583
584         * plugin/plugin-gcn.c (EF_AMDGPU_MACH_AMDGCN_GFX801): Remove.
585         (gcn_gfx801_s): Remove.
586         (isa_hsa_name): Remove gfx801.
587         (isa_gcc_name): Remove gfx801/carizzo.
588         (isa_code): Remove gfx801.
589
590 2020-02-03  Julian Brown  <julian@codesourcery.com>
591             Tobias Burnus  <tobias@codesourcery.com>
592
593         * libgomp.texi (OpenACC Runtime Library Routines): Document *_async
594         and *_finalize variants; document acc_attach and acc_detach; update
595         references from OpenACC 2.0 to 2.6.
596         * openacc.f90 (openacc_version): Update to 201711.
597         * openacc_lib.h (openacc_version): Update to 201711.
598         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update expected
599         openacc_version to 201711.
600         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
601
602 2020-01-31  Kwok Cheung Yeung  <kcy@codesourcery.com>
603
604         * plugin/plugin-gcn.c (struct hsa_kernel_description): Add sgpr_count
605         and vgpr_count fields.
606         (struct kernel_info): Add a field for a hsa_kernel_description.
607         (run_kernel): Reduce the number of threads/workers if the requested
608         number would require too many VGPRs.
609         (init_basic_kernel_info): Initialize description field with
610         the hsa_kernel_description entry for the kernel.
611
612 2020-01-29  Tobias Burnus  <tobias@codesourcery.com>
613
614         PR bootstrap/93409
615         * plugin/configfrag.ac (enable_offload_targets): Skip
616         HSA and GCN plugin besides -m32 also for -mx32.
617         * configure: Regenerate.
618
619 2020-01-29  Frederik Harwath  <frederik@codesourcery.com>
620
621         * oacc-init.c (name_of_acc_device_t): Handle acc_device_radeon.
622
623 2020-01-29  Frederik Harwath  <frederik@codesourcery.com>
624
625         * plugin-gcn.c (struct agent_info): Add fields "name" and
626         "vendor_name" ...
627         (GOMP_OFFLOAD_init_device): ... and init from here.
628         (struct hsa_context_info): Add field "driver_version_s" ...
629         (init_hsa_contest): ... and init from here.
630         (GOMP_OFFLOAD_openacc_get_property): Replace stub with a proper
631         implementation.
632         * testsuite/libgomp.oacc-c-c++-common/acc_get_property.c:
633         Enable test execution for amdgcn and host offloading targets.
634         * testsuite/libgomp.oacc-fortran/acc_get_property.f90: Likewise.
635         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c
636         (expect_device_properties): Split function into ...
637         (expect_device_string_properties): ... this new function ...
638         (expect_device_memory): ... and this new function.
639         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-gcn.c:
640         Add test.
641
642 2020-01-28  Julian Brown  <julian@codesourcery.com>
643
644         * testsuite/libgomp.oacc-fortran/deep-copy-2.f90: Remove test from here.
645         * testsuite/libgomp.oacc-fortran/deep-copy-3.f90: Don't use mixed
646         component/non-component variable refs in a single directive.
647         * testsuite/libgomp.oacc-fortran/classtypes-1.f95: Likewise.
648
649 2020-01-24  Maciej W. Rozycki  <macro@wdc.com>
650
651         * configure.ac: Handle `--with-toolexeclibdir='.
652         * Makefile.in: Regenerate.
653         * aclocal.m4: Regenerate.
654         * configure: Regenerate.
655         * testsuite/Makefile.in: Regenerate.
656
657 2020-01-24  Frederik Harwath  <frederik@codesourcery.com>
658
659         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c
660         (expect_device_properties): Remove "expected_free_mem" argument,
661         change "expected_total_mem" argument type to size_t;
662         change types of acc_get_property results to size_t,
663         adapt format strings.
664         * testsuite/libgomp.oacc-c-c++-common/acc_get_property.c:
665         Use %zu instead of %zd to print size_t values.
666         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-2.c: Adapt and
667         rename to ...
668         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-nvptx.c: ... this.
669         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-3.c: Adapt and
670         rename to ...
671         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-host.c: ... this.
672
673 2020-01-23  Andrew Stubbs  <ams@codesourcery.com>
674
675         * plugin/plugin-gcn.c (parse_target_attributes): Use correct mask for
676         the device id.
677
678 2020-01-20  Andrew Stubbs  <ams@codesourcery.com>
679
680         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Skip test on gcn.
681         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (main):
682         Adjust test dimensions for amdgcn.
683         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c (main): Adjust
684         gang/worker/vector expectations dynamically.
685         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c
686         (main): Likewise.
687         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c (main): Likewise.
688         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c (main): Likewise.
689         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c (main): Likewise.
690         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c (main): Likewise.
691         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c (main): Likewise.
692         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c (main): Likewise.
693         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c (main): Likewise.
694         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c (main): Likewise.
695         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
696         (acc_gang): Recognise acc_device_radeon.
697         (acc_worker): Likewise.
698         (acc_vector): Likewise.
699         (main): Set expectations for amdgcn.
700         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c
701         (main): Adjust gang/worker/vector expectations dynamically.
702         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c (main): Likewise.
703         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c (main): Likewise.
704         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c (main): Likewise.
705         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Set expectations
706         for amdgcn.
707
708 2020-01-17  Andrew Stubbs  <ams@codesourcery.com>
709
710         * config/accel/openacc.f90 (openacc_kinds): Rename acc_device_gcn to
711         acc_device_radeon.
712         (openacc): Likewise.
713         * openacc.f90 (openacc_kinds): Likewise.
714         (openacc): Likewise.
715         * openacc.h (acc_device_t): Likewise.
716         * openacc_lib.h: Likewise.
717         * testsuite/lib/libgomp.exp
718         (check_effective_target_openacc_amdgcn_accel_present): Likewise.
719         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c
720         (cb_compute_construct_end): Likewise.
721         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c
722         (cb_enqueue_launch_start): Likewise.
723         * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c
724         (cb_enter_data_end): Likewise.
725         (cb_exit_data_start): Likewise.
726         (cb_exit_data_end): Likewise.
727         (cb_compute_construct_end): Likewise.
728         (cb_enqueue_launch_start): Likewise.
729         (cb_enqueue_launch_end): Likewise.
730         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c
731         (main): Likewise.
732
733 2020-01-10  Thomas Schwinge  <thomas@codesourcery.com>
734
735         * libgomp-plugin.h (enum goacc_property): New.  Adjust all users
736         to use this instead of 'enum gomp_device_property'.
737         (GOMP_OFFLOAD_get_property): Rename to...
738         (GOMP_OFFLOAD_openacc_get_property): ... this.  Adjust all users.
739         * libgomp.h (struct gomp_device_descr): Move
740         'GOMP_OFFLOAD_openacc_get_property'...
741         (struct acc_dispatch_t): ... here.  Adjust all users.
742         * plugin/plugin-hsa.c (GOMP_OFFLOAD_get_property): Remove.
743
744         * target.c (gomp_map_vars_internal)
745         <GOMP_MAP_USE_DEVICE_PTR_IF_PRESENT>: Clean up/elaborate code
746         paths.
747
748 2020-01-10  Jakub Jelinek  <jakub@redhat.com>
749
750         PR libgomp/93219
751         * libgomp.h (gomp_print_string): Change return type from void to int.
752         * affinity-fmt.c (gomp_print_string): Likewise.  Return true if
753         not all characters have been written.
754
755 2020-01-08  Tobias Burnus  <tobias@codesourcery.com>
756
757         * libgomp.texi: Fix typos, use https.
758
759 2020-01-03  Tobias Burnus  <tobias@codesourcery.com>
760
761         * testsuite/libgomp.fortran/optional-map.f90: Add test for
762         unallocated/disassociated actual arguments to nonallocatable/nonpointer
763         dummy arguments; those are/shall be regarded as absent arguments.
764         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto.
765         * testsuite/libgomp.fortran/use_device_ptr-optional-3.f90: New.
766
767 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
768
769         Update copyright years.
770
771         * libgomp.texi: Bump @copying's copyright year.
772
773 2019-12-31  Ayush Mittal  <ayush.m@samsung.com>
774
775         PR libgomp/93065
776         * oacc-init.c (goacc_runtime_deinitialize): New function.
777
778 2019-12-28  Jakub Jelinek  <jakub@redhat.com>
779
780         PR bootstrap/93074
781         * plugin/cuda/cuda.h (cuDeviceGetName, cuDriverGetVersion): Declare.
782         (cuDeviceTotalMem, cuMemGetInfo): Likewise.  Define to *_v2.
783
784 2019-12-22  Maciej W. Rozycki  <macro@codesourcery.com>
785             Frederik Harwath  <frederik@codesourcery.com>
786             Thomas Schwinge  <tschwinge@codesourcery.com>
787
788         * libgomp.h (gomp_device_descr): Add `get_property_func' member.
789         * libgomp-plugin.h (gomp_device_property_value): New union.
790         (gomp_device_property_value): New prototype.
791         * openacc.h (acc_device_t): Add `acc_device_current' enumeration
792         constant.
793         (acc_device_property_t): New enum.
794         (acc_get_property, acc_get_property_string): New prototypes.
795         * oacc-init.c (acc_get_device_type): Also assert that result
796         is not `acc_device_current'.
797         (get_property_any, acc_get_property, acc_get_property_string):
798         New functions.
799         * openacc.f90 (openacc_kinds): Add `acc_device_current' and
800         `acc_property_memory', `acc_property_free_memory',
801         `acc_property_name', `acc_property_vendor' and
802         `acc_property_driver' constants.  Add `acc_device_property' data
803         type.
804         (openacc_internal): Add `acc_get_property' and
805         `acc_get_property_string' interfaces.  Add `acc_get_property_h',
806         `acc_get_property_string_h', `acc_get_property_l' and
807         `acc_get_property_string_l'.
808         * oacc-host.c (host_get_property): New function.
809         (host_dispatch): Wire it.
810         * target.c (gomp_load_plugin_for_device): Handle `get_property'.
811         * libgomp.map (OACC_2.6): Add `acc_get_property', `acc_get_property_h_',
812         `acc_get_property_string' and `acc_get_property_string_h_' symbols.
813         * libgomp.texi (OpenACC Runtime Library Routines): Add
814         `acc_get_property'.
815         (acc_get_property): New node.
816         * plugin/plugin-gcn.c (GOMP_OFFLOAD_get_property): New
817         function (stub).
818         * plugin/plugin-hsa.c (GOMP_OFFLOAD_get_property): New function.
819         * plugin/plugin-nvptx.c (CUDA_CALLS): Add `cuDeviceGetName',
820         `cuDeviceTotalMem', `cuDriverGetVersion' and `cuMemGetInfo'
821         calls.
822         (GOMP_OFFLOAD_get_property): New function.
823         (struct ptx_device): Add new field "name".
824         (cuda_driver_version_s): Add new static variable ...
825         (nvptx_init): ... and init from here.
826
827         * testsuite/libgomp.oacc-c-c++-common/acc_get_property.c: New test.
828         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-2.c: New test.
829         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-3.c: New test.
830         * testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c: New file
831         with test helper functions.
832
833         * testsuite/libgomp.oacc-fortran/acc_get_property.f90: New test.
834
835 2019-12-22  Maciej W. Rozycki  <macro@wdc.com>
836
837         * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): New
838         variable.
839
840 2019-12-21  Thomas Schwinge  <thomas@codesourcery.com>
841
842         * target.c (gomp_map_vars_internal): Restore 'omp declare target
843         link' handling.
844
845 2019-12-19  Julian Brown  <julian@codesourcery.com>
846
847         * testsuite/libgomp.oacc-fortran/class-ptr-param.f95: New test.
848         * testsuite/libgomp.oacc-fortran/classtypes-1.f95: New test.
849         * testsuite/libgomp.oacc-fortran/classtypes-2.f95: New test.
850
851 2019-12-19  Julian Brown  <julian@codesourcery.com>
852             Cesar Philippidis  <cesar@codesourcery.com>
853
854         * testsuite/libgomp.oacc-fortran/deep-copy-1.f90: New test.
855         * testsuite/libgomp.oacc-fortran/deep-copy-2.f90: New test.
856         * testsuite/libgomp.oacc-fortran/deep-copy-3.f90: New test.
857         * testsuite/libgomp.oacc-fortran/deep-copy-4.f90: New test.
858         * testsuite/libgomp.oacc-fortran/deep-copy-5.f90: New test.
859         * testsuite/libgomp.oacc-fortran/deep-copy-6.f90: New test.
860         * testsuite/libgomp.oacc-fortran/deep-copy-7.f90: New test.
861         * testsuite/libgomp.oacc-fortran/deep-copy-8.f90: New test.
862         * testsuite/libgomp.oacc-fortran/derived-type-1.f90: New test.
863         * testsuite/libgomp.oacc-fortran/derivedtype-1.f95: New test.
864         * testsuite/libgomp.oacc-fortran/derivedtype-2.f95: New test.
865         * testsuite/libgomp.oacc-fortran/multidim-slice.f95: New test.
866         * testsuite/libgomp.oacc-fortran/update-2.f90: New test.
867
868 2019-12-19  Julian Brown  <julian@codesourcery.com>
869
870         * testsuite/libgomp.oacc-c-c++-common/deep-copy-1.c: New test.
871         * testsuite/libgomp.oacc-c-c++-common/deep-copy-2.c: New test.
872         * testsuite/libgomp.oacc-c-c++-common/deep-copy-4.c: New test.
873         * testsuite/libgomp.oacc-c-c++-common/deep-copy-6.c: New test.
874         * testsuite/libgomp.oacc-c-c++-common/deep-copy-7.c: New test.
875         * testsuite/libgomp.oacc-c-c++-common/deep-copy-8.c: New test.
876         * testsuite/libgomp.oacc-c-c++-common/deep-copy-9.c: New test.
877         * testsuite/libgomp.oacc-c-c++-common/deep-copy-10.c: New test.
878         * testsuite/libgomp.oacc-c-c++-common/deep-copy-11.c: New test.
879         * testsuite/libgomp.oacc-c-c++-common/deep-copy-14.c: New test.
880         * testsuite/libgomp.oacc-c++/deep-copy-12.C: New test.
881         * testsuite/libgomp.oacc-c++/deep-copy-13.C: New test.
882
883 2019-12-19  Julian Brown  <julian@codesourcery.com>
884
885         * libgomp.h (struct target_var_desc): Add do_detach flag.
886         * oacc-init.c (acc_shutdown_1): Free aux block if present.
887         * oacc-mem.c (find_group_last): Add SIZES parameter. Support
888         struct components.  Tidy up and add some new checks.
889         (goacc_enter_data_internal): Update call to find_group_last.
890         (goacc_exit_data_internal): Support detach operations and
891         GOMP_MAP_STRUCT.
892         (GOACC_enter_exit_data): Handle initial GOMP_MAP_STRUCT or
893         GOMP_MAP_FORCE_PRESENT in finalization detection code.  Handle
894         attach/detach in enter/exit data detection code.
895         * target.c (gomp_map_vars_existing): Initialise do_detach field of
896         tgt_var_desc.
897         (gomp_map_vars_internal): Support attach.
898         (gomp_unmap_vars_internal): Support detach.
899
900 2019-12-19  Julian Brown  <julian@codesourcery.com>
901             Thomas Schwinge  <thomas@codesourcery.com>
902
903         * libgomp.h (struct splay_tree_aux): Add attach_count field.
904         (gomp_attach_pointer, gomp_detach_pointer): Add prototypes.
905         * libgomp.map (OACC_2.6): New section. Add acc_attach,
906         acc_attach_async, acc_detach, acc_detach_async, acc_detach_finalize,
907         acc_detach_finalize_async.
908         * oacc-mem.c (acc_attach_async, acc_attach, goacc_detach_internal,
909         acc_detach, acc_detach_async, acc_detach_finalize,
910         acc_detach_finalize_async): New functions.
911         * openacc.h (acc_attach, acc_attach_async, acc_detach,
912         (acc_detach_async, acc_detach_finalize, acc_detach_finalize_async): Add
913         prototypes.
914         * target.c (gomp_attach_pointer, gomp_detach_pointer): New functions.
915         (gomp_remove_var_internal): Free attachment counts if present.
916         * testsuite/libgomp.oacc-c-c++-common/deep-copy-3.c: New test.
917         * testsuite/libgomp.oacc-c-c++-common/deep-copy-5.c: New test.
918
919 2019-12-19  Julian Brown  <julian@codesourcery.com>
920             Cesar Philippidis  <cesar@codesourcery.com>
921
922         * libgomp.h (gomp_map_val): Add prototype.
923         * oacc-parallel.c (GOACC_parallel_keyed): Use gomp_map_val instead of
924         open-coding device-address calculation.
925         * target.c (gomp_map_val): Make global. Use OFFSET_POINTER in
926         non-present case.
927
928 2019-12-19  Julian Brown  <julian@codesourcery.com>
929
930         * libgomp.h (struct splay_tree_key_s): Substitute dynamic_refcount
931         field for virtual_refcount.
932         (enum gomp_map_vars_kind): Add GOMP_MAP_VARS_OPENACC_ENTER_DATA.
933         (gomp_free_memmap): Remove prototype.
934         * oacc-init.c (acc_shutdown_1): Iteratively call gomp_remove_var
935         instead of calling gomp_free_memmap.
936         * oacc-mem.c (acc_map_data): Use virtual_refcount instead of
937         dynamic_refcount.
938         (acc_unmap_data): Open code instead of forcing target_mem_desc's
939         to_free field to NULL then calling gomp_unmap_vars.  Handle
940         REFCOUNT_INFINITY on target blocks.
941         (goacc_enter_data): Rename to...
942         (goacc_enter_datum): ...this.  Remove MAPNUM parameter and special
943         handling for mapping groups.  Use virtual_refcount instead of
944         dynamic_refcount.  Use GOMP_MAP_VARS_OPENACC_ENTER_DATA for
945         map_map_vars_async call.  Re-do lookup for target pointer return value.
946         (acc_create, acc_create_async, acc_copyin, acc_copyin_async): Call
947         renamed goacc_enter_datum function.
948         (goacc_exit_data): Rename to...
949         (goacc_exit_datum): ...this.  Update for virtual_refcount semantics.
950         (acc_delete, acc_delete_async, acc_delete_finalize,
951         acc_delete_finalize_async, acc_copyout, acc_copyout_async,
952         acc_copyout_finalize, acc_copyout_finalize_async): Call renamed
953         goacc_exit_datum function.
954         (gomp_acc_remove_pointer, find_pointer): Remove functions.
955         (find_group_last, goacc_enter_data_internal, goacc_exit_data_internal):
956         New functions.
957         (GOACC_enter_exit_data): Use goacc_enter_data_internal and
958         goacc_exit_data_internal helper functions.
959         * target.c (gomp_map_vars_internal): Handle
960         GOMP_MAP_VARS_OPENACC_ENTER_DATA.  Update for virtual_refcount
961         semantics.
962         (gomp_unmap_vars_internal): Update for virtual_refcount semantics.
963         (gomp_load_image_to_device, omp_target_associate_ptr): Zero-initialise
964         virtual_refcount field instead of dynamic_refcount.
965         (gomp_free_memmap): Remove function.
966         * testsuite/libgomp.oacc-c-c++-common/unmap-infinity-1.c: New test.
967         * testsuite/libgomp.c-c++-common/unmap-infinity-2.c: New test.
968         * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: Add XFAIL.
969
970 2019-12-19  Julian Brown  <julian@codesourcery.com>
971             Thomas Schwinge  <thomas@codesourcery.com>
972
973         * libgomp.h (struct splay_tree_aux): New.
974         (struct splay_tree_key_s): Replace link_key field with aux pointer.
975         * target.c (gomp_map_vars_internal): Adjust for link_key being moved
976         to aux struct.
977         (gomp_remove_var_internal): Free aux block if present.
978         (gomp_load_image_to_device): Zero-initialise aux field instead of
979         link_key field.
980         (omp_target_associate_pointer): Zero-initialise aux field.
981
982 2019-12-18  Jakub Jelinek  <jakub@redhat.com>
983
984         PR middle-end/86416
985         * testsuite/libgomp.c/pr86416-1.c (main): Use L suffixes rather than
986         q or none.
987         * testsuite/libgomp.c/pr86416-2.c (main): Use Q suffixes rather than
988         L or none.
989
990 2019-12-19  Julian Brown  <julian@codesourcery.com>
991             Maciej W. Rozycki  <macro@codesourcery.com>
992             Tobias Burnus  <tobias@codesourcery.com>
993             Thomas Schwinge  <thomas@codesourcery.com>
994
995         * target.c (gomp_map_vars_async): Support GOMP_MAP_NO_ALLOC.
996         * testsuite/libgomp.oacc-c-c++-common/no_create-1.c: New test.
997         * testsuite/libgomp.oacc-c-c++-common/no_create-2.c: New test.
998         * testsuite/libgomp.oacc-c-c++-common/no_create-3.c: New test.
999         * testsuite/libgomp.oacc-c-c++-common/no_create-4.c: New test.
1000         * testsuite/libgomp.oacc-c-c++-common/no_create-5.c: New test.
1001         * testsuite/libgomp.oacc-fortran/no_create-1.f90: New test.
1002         * testsuite/libgomp.oacc-fortran/no_create-2.f90: New test.
1003         * testsuite/libgomp.oacc-fortran/no_create-3.F90: New test.
1004
1005 2019-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1006
1007         * oacc-mem.c (goacc_enter_data): Refactor, so that it can be
1008         called...
1009         (goacc_insert_pointer): ... from here, "present" case.
1010         (goacc_insert_pointer): Inline function into...
1011         (GOACC_enter_exit_data): ... here, and simplify.
1012
1013         * oacc-mem.c (goacc_enter_data): Refactor, so that it can be
1014         called...
1015         (goacc_insert_pointer): ... from here, "not present" case.
1016
1017         * oacc-mem.c (goacc_remove_pointer): Refactor interface.  Adjust
1018         all users.
1019
1020         * oacc-mem.c (GOACC_enter_exit_data): Refactor code to call
1021         'goacc_enter_data', 'goacc_exit_data'.
1022
1023         * oacc-mem.c (delete_copyout): Refactor into...
1024         (goacc_exit_data): ... this.  Adjust all users.
1025
1026         * oacc-mem.c (present_create_copy): Refactor into...
1027         (goacc_enter_data): ... this.  Adjust all users.
1028
1029         * target.c (gomp_unmap_vars_internal): Add a safeguard to
1030         'gomp_remove_var'.
1031
1032         * target.c (gomp_to_device_kind_p): Handle 'GOMP_MAP_FORCE_FROM'
1033         like 'GOMP_MAP_FROM'.
1034
1035         PR libgomp/92726
1036         PR libgomp/92970
1037         PR libgomp/92984
1038         * oacc-mem.c (delete_copyout): No-op behavior if 'lookup_host'
1039         fails.
1040         (GOACC_enter_exit_data): Simplify accordingly.
1041         * testsuite/libgomp.oacc-c-c++-common/pr92970-1.c: New file,
1042         subsuming...
1043         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: ... this file...
1044         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: ..., and this
1045         file.
1046         * testsuite/libgomp.oacc-c-c++-common/pr92984-1.c: New file,
1047         subsuming...
1048         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: ... this file...
1049         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: ..., and this
1050         file.
1051         * testsuite/libgomp.oacc-c-c++-common/pr92726-1.c: New file,
1052         subsuming...
1053         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: ... this file.
1054
1055         * oacc-mem.c (GOACC_enter_exit_data): Simplify 'exit data'
1056         'finalize' handling.
1057
1058         PR libgomp/92848
1059         * oacc-mem.c (acc_map_data, present_create_copy)
1060         (goacc_insert_pointer): Use 'GOMP_MAP_VARS_ENTER_DATA'.
1061         (acc_unmap_data, delete_copyout, goacc_remove_pointer): Adjust.
1062         * testsuite/libgomp.oacc-c-c++-common/lib-50.c: Remove.
1063         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-d-a.c: New file
1064         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-d-p.c: Likewise.
1065         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-r-a.c: Likewise.
1066         * testsuite/libgomp.oacc-c-c++-common/pr92848-1-r-p.c: Likewise.
1067         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-r-p.c:
1068         Remove "XFAIL"s.
1069
1070         * target.c (gomp_unmap_tgt): Make it 'static'.
1071         * libgomp.h (gomp_unmap_tgt): Remove.
1072
1073 2019-12-18  Tobias Burnus  <tobias@codesourcery.com>
1074
1075         PR middle-end/86416
1076         * testsuite/libgomp.c/pr86416-1.c: New.
1077         * testsuite/libgomp.c/pr86416-2.c: New.
1078
1079 2019-12-17  Tobias Burnus  <tobias@codesourcery.com>
1080
1081         * config/accel/openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark
1082         all symbols as public except for the 'use â€¦, only' imported symbol,
1083         which is private.
1084         (module openacc): Default to 'PRIVATE' to exclude openacc_internal; mark
1085         all symbols from module openacc_kinds as PUBLIC
1086         * openacc.f90: Add comment with crossref to that file and openmp_lib.h;
1087         fix comment typo.
1088         * openacc_lib.h (acc_device_gcn): Add this PARAMETER.
1089
1090 2019-12-13  Julian Brown  <julian@codesourcery.com>
1091
1092         PR libgomp/92881
1093
1094         * libgomp.h (gomp_remove_var_async): Add prototype.
1095         * oacc-mem.c (delete_copyout): Call gomp_remove_var_async instead of
1096         gomp_remove_var.
1097         * target.c (gomp_unref_tgt): Change return type to bool, indicating
1098         whether target_mem_desc was unmapped.
1099         (gomp_unref_tgt_void): New.
1100         (gomp_remove_var): Reimplement in terms of...
1101         (gomp_remove_var_internal): ...this new helper function.
1102         (gomp_remove_var_async): New, implemented using above helper function.
1103         (gomp_unmap_vars_internal): Use gomp_unref_tgt_void instead of
1104         gomp_unref_tgt.
1105
1106 2019-12-13  Andrew Stubbs  <ams@codesourcery.com>
1107
1108         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Handle gcn.
1109         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise.
1110         * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise.
1111         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: Likewise.
1112         * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c:
1113         Likewise.
1114         * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Disable on GCN.
1115         * testsuite/libgomp.oacc-c-c++-common/tile-1.c: Likewise.
1116
1117 2019-12-13  Tobias Burnus  <tobias@codesourcery.com>
1118
1119         * openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark all symbols
1120         as public except for the 'use â€¦, only' imported symbol, which is
1121         private.
1122         (module openacc): Default to 'PRIVATE' to exclude openacc_internal; mark
1123         all symbols from module openacc_kinds as PUBLIC; add missing PUBLIC
1124         attributes for acc_copyout_finalize and acc_delete_finalize.
1125
1126 2019-12-11  Jakub Jelinek  <jakub@redhat.com>
1127
1128         PR fortran/92899
1129         * testsuite/libgomp.fortran/atomic1.f90: New test.
1130
1131 2019-12-11  Thomas Schwinge  <thomas@codesourcery.com>
1132
1133         PR libgomp/92843
1134         * oacc-mem.c (present_create_copy, delete_copyout): Fix dynamic
1135         reference counting for structured 'REFCOUNT_INFINITY'.  Add some
1136         assertions.
1137         (goacc_insert_pointer, goacc_remove_pointer): Adjust accordingly.
1138         * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: New file.
1139         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Fix OpenACC.
1140         * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
1141         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
1142
1143         * oacc-parallel.c (find_pointer, GOACC_enter_exit_data): Move...
1144         * oacc-mem.c: ... here.
1145         (gomp_acc_insert_pointer, gomp_acc_remove_pointer): Rename to
1146         'goacc_insert_pointer', 'goacc_remove_pointer', and make 'static'.
1147         * libgomp.h (gomp_acc_insert_pointer, gomp_acc_remove_pointer):
1148         Remove.
1149         * libgomp_g.h: Update.
1150
1151         * oacc-parallel.c (GOACC_wait, goacc_wait): Move...
1152         * oacc-async.c: ... here.
1153         * oacc-int.h (goacc_wait): Declare.
1154         * libgomp_g.h: Update
1155
1156         PR libgomp/92854
1157         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-device_already-1.c:
1158         New file.
1159         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-device_already-2.c:
1160         Likewise.
1161         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-device_already-3.c:
1162         Likewise.
1163         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-host_already-1.c:
1164         Likewise.
1165         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-host_already-2.c:
1166         Likewise.
1167         * testsuite/libgomp.oacc-c-c++-common/acc_map_data-host_already-3.c:
1168         Likewise.
1169
1170 2019-12-11  Thomas Schwinge  <thomas@codesourcery.com>
1171             Julian Brown  <julian@codesourcery.com>
1172
1173         * target.c (gomp_load_image_to_device, omp_target_associate_ptr):
1174         Initialize 'dynamic_refcount' whenever we initialize 'refcount'.
1175
1176 2019-12-11  Tobias Burnus  <tobias@codesourcery.com>
1177
1178         * omp_lib.h.in: Fix spelling of function declaration
1179         omp_get_cancell(l)ation.
1180         * libgomp.texi (acc_is_present, acc_async_test, acc_async_test_all):
1181         Fix typos.
1182         * env.c: Fix comment typos.
1183         * oacc-host.c: Likewise.
1184         * ordered.c: Likewise.
1185         * task.c: Likewise.
1186         * team.c: Likewise.
1187         * config/gcn/task.c: Likewise.
1188         * config/gcn/team.c: Likewise.
1189         * config/nvptx/task.c: Likewise.
1190         * config/nvptx/team.c: Likewise.
1191         * plugin/plugin-gcn.c: Likewise.
1192         * testsuite/libgomp.fortran/jacobi.f: Likewise.
1193         * testsuite/libgomp.hsa.c/tiling-2.c: Likewise.
1194         * testsuite/libgomp.oacc-c-c++-common/enter_exit-lib.c: Likewise.
1195
1196 2019-12-11  Tobias Burnus  <tobias@codesourcery.com>
1197
1198         * testsuite/libgomp.oacc-fortran/optional-cache.f95: Add 'dg-do run'.
1199         * testsuite/libgomp.oacc-fortran/optional-reduction.f90: Remove
1200         unnecessary 'dg-additional-options "-w"'.
1201
1202 2019-12-09  Thomas Schwinge  <thomas@codesourcery.com>
1203             Julian Brown  <julian@codesourcery.com>
1204
1205         PR libgomp/92116
1206         PR libgomp/92877
1207
1208         * oacc-mem.c (lookup_dev): Reimplement.  Adjust all users.
1209         * libgomp.h (struct acc_dispatch_t): Remove 'data_environ' member.
1210         Adjust all users.
1211         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4-2.c:
1212         Remove XFAIL.
1213         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4.c:
1214         Likewise.
1215         * testsuite/libgomp.oacc-c-c++-common/pr92877-1.c: New file.
1216
1217 2019-12-09  Thomas Schwinge  <thomas@codesourcery.com>
1218
1219         PR libgomp/92503
1220         * oacc-mem.c (acc_free): Error out instead of 'acc_unmap_data'.
1221         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-1.c: New
1222         file.
1223         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-2.c:
1224         Likewise.
1225         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-3-2.c:
1226         Likewise.
1227         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-3.c:
1228         Likewise.
1229         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4-2.c:
1230         Likewise.
1231         * testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4.c:
1232         Likewise.
1233         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Adjust.
1234         * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
1235         * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
1236         * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
1237         * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
1238         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
1239         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
1240         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
1241         * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
1242         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
1243
1244         PR libgomp/92840
1245         * oacc-mem.c (acc_map_data): Clarify reference counting behavior.
1246         (acc_unmap_data): Add error case for 'REFCOUNT_INFINITY'.
1247         * testsuite/libgomp.oacc-c-c++-common/acc_unmap_data-pr92840-1.c:
1248         New file.
1249         * testsuite/libgomp.oacc-c-c++-common/acc_unmap_data-pr92840-2.c:
1250         Likewise.
1251         * testsuite/libgomp.oacc-c-c++-common/acc_unmap_data-pr92840-3.c:
1252         Likewise.
1253         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Adjust.
1254         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Adjust.
1255
1256         PR libgomp/92511
1257         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-1.c: Remove
1258         this file...
1259         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-2.c: ..., and
1260         this file...
1261         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: ..., and this
1262         file...
1263         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: ..., and this
1264         file...
1265         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-r-p.c:
1266         ... with their content moved into, and extended in this new file.
1267         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-d-a.c:
1268         New file.
1269         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-d-p.c:
1270         Likewise.
1271         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-1-r-a.c:
1272         Likewise.
1273         * testsuite/libgomp.oacc-c-c++-common/subset-subarray-mappings-2.c:
1274         Likewise.
1275
1276         * testsuite/libgomp.oacc-c-c++-common/map-data-1.c: New file.
1277
1278         PR libgomp/92854
1279         * testsuite/libgomp.oacc-c-c++-common/pr92854-1.c: New file.
1280
1281         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: New file.
1282
1283         * target.c (gomp_exit_data): Use 'gomp_remove_var'.
1284
1285 2019-12-09  Tobias Burnus  <tobias@codesourcery.com>
1286
1287         * testsuite/libgomp.fortran/use_device_addr-3.f90: Make 'stop' codes
1288         unique.
1289         * testsuite/libgomp.fortran/use_device_addr-4.f90: Ditto.
1290         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto.
1291         * testsuite/libgomp.oacc-fortran/declare-5.f90: Ditto.
1292         * testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90:
1293         Ditto.
1294         * testsuite/libgomp.oacc-fortran/optional-firstprivate.f90: Ditto.
1295         * testsuite/libgomp.oacc-fortran/optional-update-host.f90: Ditto.
1296
1297 2019-12-06  Kwok Cheung Yeung  <kcy@codesourcery.com>
1298
1299         * config/accel/proc.c (omp_get_num_procs): Apply ialias macro.
1300
1301 2019-12-06  Tobias Burnus  <tobias@codesourcery.com>
1302             Kwok Cheung Yeung <kcy@codesourcery.com>
1303
1304         * oacc-mem.c (update_dev_host, gomp_acc_insert_pointer): Just return
1305         if input it a NULL pointer.
1306         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Remove; dependent on
1307         diagnostic of NULL pointer.
1308         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Ditto.
1309         * testsuite/libgomp.fortran/optional-map.f90: New.
1310         * testsuite/libgomp.fortran/use_device_addr-1.f90
1311         (test_dummy_opt_callee_1_absent): New.
1312         (test_dummy_opt_call_1): Call it.
1313         * testsuite/libgomp.fortran/use_device_addr-2.f90: Likewise.
1314         * testsuite/libgomp.fortran/use_device_addr-3.f90: Likewise.
1315         * testsuite/libgomp.fortran/use_device_addr-4.f90: Likewise.
1316         * testsuite/libgomp.oacc-fortran/optional-cache.f95: New.
1317         * testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90: New.
1318         * testsuite/libgomp.oacc-fortran/optional-data-copyin.f90: New.
1319         * testsuite/libgomp.oacc-fortran/optional-data-copyout.f90: New.
1320         * testsuite/libgomp.oacc-fortran/optional-data-enter-exit.f90: New.
1321         * testsuite/libgomp.oacc-fortran/optional-declare.f90: New.
1322         * testsuite/libgomp.oacc-fortran/optional-firstprivate.f90: New.
1323         * testsuite/libgomp.oacc-fortran/optional-host_data.f90: New.
1324         * testsuite/libgomp.oacc-fortran/optional-nested-calls.f90: New.
1325         * testsuite/libgomp.oacc-fortran/optional-private.f90: New.
1326         * testsuite/libgomp.oacc-fortran/optional-reduction.f90: New.
1327         * testsuite/libgomp.oacc-fortran/optional-update-device.f90: New.
1328         * testsuite/libgomp.oacc-fortran/optional-update-host.f90: New.
1329
1330 2019-12-05  Tobias Burnus  <tobias@codesourcery.com>
1331
1332         * testsuite/libgomp.oacc-fortran/error_stop-1.f: Also don't
1333         expect dg-output of 'Error termination.' for GCN.
1334         * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
1335         * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
1336
1337 2019-12-04  Jakub Jelinek  <jakub@redhat.com>
1338
1339         PR fortran/92756
1340         * testsuite/libgomp.fortran/teams1.f90: New test.
1341         * testsuite/libgomp.fortran/teams2.f90: New test.
1342
1343 2019-12-03  Frederik Harwath  <frederik@codesourcery.com>
1344
1345         * oacc-init.c (acc_known_device_type): Add function.
1346         (unknown_device_type_error): Add function.
1347         (name_of_acc_device_t): Change to call unknown_device_type_error
1348         on unknown type.
1349         (resolve_device): Use acc_known_device_type.
1350         (acc_init): Fail if acc_device_t argument is not valid.
1351         (acc_shutdown): Likewise.
1352         (acc_get_num_devices): Likewise.
1353         (acc_set_device_type): Likewise.
1354         (acc_get_device_num): Likewise.
1355         (acc_set_device_num): Likewise.
1356         (acc_on_device): Add comment that argument validity is not checked.
1357
1358 2019-12-03  Andrew Stubbs  <ams@codesourcery.com>
1359
1360         * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type):
1361         Recognize amdgcn.
1362         (check_effective_target_openacc_amdgcn_accel_present): New proc.
1363         (check_effective_target_openacc_amdgcn_accel_selected): New proc.
1364         * testsuite/libgomp.oacc-c++/c++.exp: Add support for amdgcn.
1365         * testsuite/libgomp.oacc-c/c.exp: Likewise.
1366         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
1367
1368 2019-12-03  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1369
1370         PR libgomp/91938
1371         * configure.tgt: Avoid IE tls on *-*-musl*.
1372
1373 2019-11-29  Tobias Burnus  <tobias@codesourcery.com>
1374
1375         * testsuite/libgomp.oacc-fortran/declare-5.f90: Extend by
1376         adding a common-block test case.
1377
1378 2019-11-29  Jakub Jelinek  <jakub@redhat.com>
1379
1380         PR c++/60228
1381         * testsuite/libgomp.c++/udr-20.C: New test.
1382         * testsuite/libgomp.c++/udr-21.C: New test.
1383
1384 2019-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1385
1386         * testsuite/lib/libgomp.exp
1387         (check_effective_target_offload_target_nvptx): New proc.
1388         * testsuite/libgomp.fortran/target-print-1.f90: Use it with
1389         'dg-skip-if'.
1390         * testsuite/libgomp.oacc-fortran/print-1.f90: Likewise.
1391         * testsuite/libgomp.fortran/target-print-1-nvptx.f90: New file.
1392         * testsuite/libgomp.oacc-fortran/print-1-nvptx.f90: Likewise.
1393
1394 2019-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1395
1396         * testsuite/libgomp.c/pr39591-1.c: Rename err to e.
1397         * testsuite/libgomp.c/pr39591-2.c: Likewise.
1398         * testsuite/libgomp.c/pr39591-3.c: Likewise.
1399         * testsuite/libgomp.c/private-1.c: Likewise.
1400         * testsuite/libgomp.c/task-1.c: Likewise.
1401         * testsuite/libgomp.c/task-5.c: Renamed err to serr.
1402
1403 2019-11-20  Julian Brown  <julian@codesourcery.com>
1404
1405         * plugin/plugin-gcn.c (wait_for_queue_nonfull): Don't lock/unlock
1406         aq->mutex here.
1407         (queue_push_launch): Lock aq->mutex before calling
1408         wait_for_queue_nonfull.
1409         (queue_push_callback): Likewise.
1410         (queue_push_asyncwait): Likewise.
1411         (queue_push_placeholder): Likewise.
1412
1413 2019-11-20  Julian Brown  <julian@codesourcery.com>
1414
1415         * plugin/plugin-gcn.c (hsa_memory_copy_wrapper): New.
1416         (copy_data, GOMP_OFFLOAD_host2dev): Use above function.
1417         (GOMP_OFFLOAD_dev2host, GOMP_OFFLOAD_dev2dev): Check hsa_memory_copy
1418         return code.
1419
1420 2019-11-20  Julian Brown  <julian@codesourcery.com>
1421
1422         PR libgomp/92511
1423
1424         * oacc-mem.c (present_create_copy): Fix device pointer return value in
1425         case of "present" subarray.  Use tgt->tgt_start instead of tgt->to_free
1426         in non-present/create case.
1427         (delete_copyout): Change error condition to fail only on copies outside
1428         of mapped block.  Adjust error message accordingly.
1429         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-1.c: New test.
1430         * testsuite/libgomp.oacc-c-c++-common/copyin-devptr-2.c: New test.
1431         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Adjust expected error
1432         message.
1433         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
1434         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Allow test to pass now.
1435         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
1436
1437 2019-11-20  Maciej W. Rozycki  <macro@wdc.com>
1438
1439         * testsuite/lib/libgomp.exp (libgomp_init): Add flags to find
1440         libatomic in build-tree testing.
1441
1442 2019-11-18  Maciej W. Rozycki  <macro@wdc.com>
1443
1444         * testsuite/Makefile.in: Regenerate.
1445
1446 2019-11-15  Andrew Stubbs  <ams@codesourcery.com>
1447
1448         * testsuite/libgomp.c/target-print-1.c: New file.
1449         * testsuite/libgomp.fortran/target-print-1.f90: New file.
1450         * testsuite/libgomp.oacc-c/print-1.c: New file.
1451         * testsuite/libgomp.oacc-fortran/print-1.f90: New file.
1452
1453 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
1454             Kwok Cheung Yeung  <kcy@codesourcery.com>
1455             Julian Brown  <julian@codesourcery.com>
1456             Tom de Vries  <tom@codesourcery.com>
1457
1458         * plugin/Makefrag.am: Add amdgcn plugin support.
1459         * plugin/configfrag.ac: Likewise.
1460         * plugin/plugin-gcn.c: New file.
1461         * configure: Regenerate.
1462         * Makefile.in: Regenerate.
1463         * testsuite/Makefile.in: Regenerate.
1464
1465 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
1466
1467         * config/gcn/team.c (gomp_gcn_enter_kernel): Set up the team arena
1468         and use team_malloc variants.
1469         (gomp_gcn_exit_kernel): Use team_free.
1470         * libgomp.h (TEAM_ARENA_SIZE): Define.
1471         (TEAM_ARENA_START): Define.
1472         (TEAM_ARENA_FREE): Define.
1473         (TEAM_ARENA_END): Define.
1474         (team_malloc): New function.
1475         (team_malloc_cleared): New function.
1476         (team_free): New function.
1477         * team.c (gomp_new_team): Initialize and use team_malloc.
1478         (free_team): Use team_free.
1479         (gomp_free_thread): Use team_free.
1480         (gomp_pause_host): Use team_free.
1481         * work.c (gomp_init_work_share): Use team_malloc.
1482         (gomp_fini_work_share): Use team_free.
1483
1484 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
1485             Kwok Cheung Yeung  <kcy@codesourcery.com>
1486             Julian Brown  <julian@codesourcery.com>
1487             Tom de Vries  <tom@codesourcery.com>
1488
1489         * Makefile.am (libgomp_la_SOURCES): Add oacc-target.c.
1490         * Makefile.in: Regenerate.
1491         * config.h.in (PLUGIN_GCN): Add new undef.
1492         * config/accel/openacc.f90 (acc_device_gcn): New parameter.
1493         * config/gcn/affinity-fmt.c: New file.
1494         * config/gcn/bar.c: New file.
1495         * config/gcn/bar.h: New file.
1496         * config/gcn/doacross.h: New file.
1497         * config/gcn/icv-device.c: New file.
1498         * config/gcn/oacc-target.c: New file.
1499         * config/gcn/simple-bar.h: New file.
1500         * config/gcn/target.c: New file.
1501         * config/gcn/task.c: New file.
1502         * config/gcn/team.c: New file.
1503         * config/gcn/time.c: New file.
1504         * configure.ac: Add amdgcn*-*-*.
1505         * configure: Regenerate.
1506         * configure.tgt: Add amdgcn*-*-*.
1507         * libgomp-plugin.h (offload_target_type): Add OFFLOAD_TARGET_TYPE_GCN.
1508         * libgomp.h (gcn_thrs): Add amdgcn variant.
1509         (set_gcn_thrs): Likewise.
1510         (gomp_thread): Likewise.
1511         * oacc-int.h (goacc_thread): Likewise.
1512         * oacc-target.c: New file.
1513         * openacc.f90 (acc_device_gcn): New parameter.
1514         * openacc.h (acc_device_t): Add acc_device_gcn.
1515         * team.c (gomp_free_pool_helper): Add amdgcn support.
1516
1517 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
1518             Julian Brown  <julian@codesourcery.com>
1519
1520         * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_construct): Add int
1521         parameter.
1522         * oacc-async.c (lookup_goacc_asyncqueue): Pass device number to the
1523         queue constructor.
1524         * oacc-host.c (host_openacc_async_construct): Add device parameter.
1525         * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add
1526         device parameter.
1527
1528 2019-11-13  Andrew Stubbs  <ams@codesourcery.com>
1529
1530         * configure.tgt (nvptx*-*-*): Add "accel" directory.
1531         * config/nvptx/libgomp-plugin.c: Move ...
1532         * config/accel/libgomp-plugin.c: ... to here.
1533         * config/nvptx/lock.c: Move ...
1534         * config/accel/lock.c: ... to here.
1535         * config/nvptx/mutex.c: Move ...
1536         * config/accel/mutex.c: ... to here.
1537         * config/nvptx/mutex.h: Move ...
1538         * config/accel/mutex.h: ... to here.
1539         * config/nvptx/oacc-async.c: Move ...
1540         * config/accel/oacc-async.c: ... to here.
1541         * config/nvptx/oacc-cuda.c: Move ...
1542         * config/accel/oacc-cuda.c: ... to here.
1543         * config/nvptx/oacc-host.c: Move ...
1544         * config/accel/oacc-host.c: ... to here.
1545         * config/nvptx/oacc-init.c: Move ...
1546         * config/accel/oacc-init.c: ... to here.
1547         * config/nvptx/oacc-mem.c: Move ...
1548         * config/accel/oacc-mem.c: ... to here.
1549         * config/nvptx/oacc-plugin.c: Move ...
1550         * config/accel/oacc-plugin.c: ... to here.
1551         * config/nvptx/omp-lock.h: Move ...
1552         * config/accel/omp-lock.h: ... to here.
1553         * config/nvptx/openacc.f90: Move ...
1554         * config/accel/openacc.f90: ... to here.
1555         * config/nvptx/pool.h: Move ...
1556         * config/accel/pool.h: ... to here.
1557         * config/nvptx/proc.c: Move ...
1558         * config/accel/proc.c: ... to here.
1559         * config/nvptx/ptrlock.c: Move ...
1560         * config/accel/ptrlock.c: ... to here.
1561         * config/nvptx/ptrlock.h: Move ...
1562         * config/accel/ptrlock.h: ... to here.
1563         * config/nvptx/sem.c: Move ...
1564         * config/accel/sem.c: ... to here.
1565         * config/nvptx/sem.h: Move ...
1566         * config/accel/sem.h: ... to here.
1567         * config/nvptx/thread-stacksize.h: Move ...
1568         * config/accel/thread-stacksize.h: ... to here.
1569
1570 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
1571             Tobias Burnus  <tobias@codesourcery.com>
1572             Frederik Harwath  <frederik@codesourcery.com>
1573             Thomas Schwinge  <thomas@codesourcery.com>
1574
1575         libgomp/
1576         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: New test.
1577         * testsuite/libgomp.oacc-fortran/parallel-dims-aux.c: New test.
1578         * testsuite/libgomp.oacc-fortran/parallel-dims.f89: New test.
1579
1580 2019-11-11  Tobias Burnus  <tobias@codesourcery.com>
1581             Kwok Cheung Yeung  <kcy@codesourcery.com>
1582
1583         * testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: Extend.
1584         * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: New.
1585
1586 2019-11-11  Thomas Schwinge  <thomas@codesourcery.com>
1587
1588         * testsuite/libgomp.fortran/target9.f90: Specify 'dg-do run'.
1589
1590         * testsuite/libgomp.fortran/use_device_addr-3.f90: Specify 'dg-do
1591         run'.
1592         * testsuite/libgomp.fortran/use_device_addr-4.f90: Likewise.
1593         * testsuite/libgomp.fortran/use_device_ptr-1.f90: Likewise.
1594
1595 2019-11-06  Thomas Schwinge  <thomas@codesourcery.com>
1596
1597         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c:
1598         Add expected warnings about missing reduction clauses.
1599         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c:
1600         Likewise.
1601         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c:
1602         Likewise.
1603         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c:
1604         Likewise.
1605
1606 2019-11-04  Tobias Burnus  <tobias@codesourcery.com>
1607
1608         * testsuite/libgomp.fortran/pr66199-1.f90: Remove
1609         'dg-do run' (implies torture test) as 'dg-options "O2"' is used.
1610         * testsuite/libgomp.fortran/pr66199-2.f90: Ditto.
1611         * testsuite/libgomp.fortran/taskloop2.f90: Ditto.
1612         * testsuite/libgomp.fortran/taskloop3.f90: Ditto.
1613         * testsuite/libgomp.fortran/taskloop4.f90: Ditto.
1614
1615 2019-11-04  Tobias Burnus  <tobias@codesourcery.com>
1616
1617         PR fortran/92305
1618         * testsuite/libgomp.fortran/allocatable2.f90: Use
1619         unique numbers with 'stop'.
1620         * testsuite/libgomp.fortran/use_device_addr-1.f90: Ditto.
1621         * testsuite/libgomp.fortran/use_device_addr-2.f90: Ditto.
1622         * testsuite/libgomp.fortran/use_device_ptr-1.f90: Ditto.
1623         * testsuite/libgomp.oacc-fortran/lib-15.f90: Ditto.
1624         * testsuite/libgomp.oacc-fortran/pset-1.f90: Ditto.
1625
1626 2019-11-01  Tobias Burnus  <tobias@codesourcery.com>
1627
1628         * testsuite/libgomp.fortran/use_device_addr-1.f90 (test_nullptr_1,
1629         test_dummy_opt_nullptr_callee_1): Add present but unallocated test.
1630         * testsuite/libgomp.fortran/use_device_addr-2.f90: Likewise.
1631         * testsuite/libgomp.fortran/use_device_addr-3.f90: New.
1632         * testsuite/libgomp.fortran/use_device_addr-4.f90: New.
1633         * testsuite/testsuite/libgomp.fortran/use_device_ptr-1.f90: New.
1634
1635 2019-10-30  Tobias Burnus  <tobias@codesourcery.com>
1636
1637         * testsuite/libgomp.fortran/target9.f90: New.
1638
1639 2019-10-30  Tobias Burnus  <tobias@codesourcery.com>
1640
1641         * testsuite/libgomp.fortran/aligned1.f03: Replace 'STOP' by 'stop'.
1642         * testsuite/libgomp.fortran/alloc-comp-1.f90: Ditto.
1643         * testsuite/libgomp.fortran/alloc-comp-2.f90: Ditto.
1644         * testsuite/libgomp.fortran/alloc-comp-3.f90: Ditto.
1645         * testsuite/libgomp.fortran/allocatable1.f90: Ditto.
1646         * testsuite/libgomp.fortran/allocatable10.f90: Ditto.
1647         * testsuite/libgomp.fortran/allocatable11.f90: Ditto.
1648         * testsuite/libgomp.fortran/allocatable12.f90: Ditto.
1649         * testsuite/libgomp.fortran/allocatable2.f90: Ditto.
1650         * testsuite/libgomp.fortran/allocatable3.f90: Ditto.
1651         * testsuite/libgomp.fortran/allocatable4.f90: Ditto.
1652         * testsuite/libgomp.fortran/allocatable5.f90: Ditto.
1653         * testsuite/libgomp.fortran/allocatable6.f90: Ditto.
1654         * testsuite/libgomp.fortran/allocatable7.f90: Ditto.
1655         * testsuite/libgomp.fortran/allocatable8.f90: Ditto.
1656         * testsuite/libgomp.fortran/allocatable9.f90: Ditto.
1657         * testsuite/libgomp.fortran/associate1.f90: Ditto.
1658         * testsuite/libgomp.fortran/associate2.f90: Ditto.
1659         * testsuite/libgomp.fortran/associate3.f90: Ditto.
1660         * testsuite/libgomp.fortran/async_io_4.f90: Ditto.
1661         * testsuite/libgomp.fortran/async_io_5.f90: Ditto.
1662         * testsuite/libgomp.fortran/async_io_6.f90: Ditto.
1663         * testsuite/libgomp.fortran/async_io_7.f90: Ditto.
1664         * testsuite/libgomp.fortran/cancel-do-1.f90: Ditto.
1665         * testsuite/libgomp.fortran/cancel-do-2.f90: Ditto.
1666         * testsuite/libgomp.fortran/cancel-parallel-1.f90: Ditto.
1667         * testsuite/libgomp.fortran/cancel-sections-1.f90: Ditto.
1668         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: Ditto.
1669         * testsuite/libgomp.fortran/character1.f90: Ditto.
1670         * testsuite/libgomp.fortran/character2.f90: Ditto.
1671         * testsuite/libgomp.fortran/collapse1.f90: Ditto.
1672         * testsuite/libgomp.fortran/collapse2.f90: Ditto.
1673         * testsuite/libgomp.fortran/collapse3.f90: Ditto.
1674         * testsuite/libgomp.fortran/collapse4.f90: Ditto.
1675         * testsuite/libgomp.fortran/crayptr1.f90: Ditto.
1676         * testsuite/libgomp.fortran/crayptr2.f90: Ditto.
1677         * testsuite/libgomp.fortran/crayptr3.f90: Ditto.
1678         * testsuite/libgomp.fortran/declare-simd-1.f90: Ditto.
1679         * testsuite/libgomp.fortran/declare-simd-3.f90: Ditto.
1680         * testsuite/libgomp.fortran/declare-target-2.f90: Ditto.
1681         * testsuite/libgomp.fortran/depend-1.f90: Ditto.
1682         * testsuite/libgomp.fortran/depend-2.f90: Ditto.
1683         * testsuite/libgomp.fortran/depend-3.f90: Ditto.
1684         * testsuite/libgomp.fortran/do1.f90: Ditto.
1685         * testsuite/libgomp.fortran/do2.f90: Ditto.
1686         * testsuite/libgomp.fortran/do_concurrent_5.f90: Ditto.
1687         * testsuite/libgomp.fortran/doacross1.f90: Ditto.
1688         * testsuite/libgomp.fortran/doacross2.f90: Ditto.
1689         * testsuite/libgomp.fortran/doacross3.f90: Ditto.
1690         * testsuite/libgomp.fortran/examples-4/array_sections-3.f90: Ditto.
1691         * testsuite/libgomp.fortran/examples-4/array_sections-4.f90: Ditto.
1692         * testsuite/libgomp.fortran/examples-4/async_target-1.f90: Ditto.
1693         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: Ditto.
1694         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Ditto.
1695         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Ditto.
1696         * testsuite/libgomp.fortran/examples-4/declare_target-3.f90: Ditto.
1697         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90: Ditto.
1698         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90: Ditto.
1699         * testsuite/libgomp.fortran/examples-4/device-1.f90: Ditto.
1700         * testsuite/libgomp.fortran/examples-4/device-2.f90: Ditto.
1701         * testsuite/libgomp.fortran/examples-4/device-3.f90: Ditto.
1702         * testsuite/libgomp.fortran/examples-4/simd-1.f90: Ditto.
1703         * testsuite/libgomp.fortran/examples-4/simd-2.f90: Ditto.
1704         * testsuite/libgomp.fortran/examples-4/simd-3.f90: Ditto.
1705         * testsuite/libgomp.fortran/examples-4/simd-4.f90: Ditto.
1706         * testsuite/libgomp.fortran/examples-4/simd-5.f90: Ditto.
1707         * testsuite/libgomp.fortran/examples-4/simd-6.f90: Ditto.
1708         * testsuite/libgomp.fortran/examples-4/simd-7.f90: Ditto.
1709         * testsuite/libgomp.fortran/examples-4/simd-8.f90: Ditto.
1710         * testsuite/libgomp.fortran/examples-4/target-1.f90: Ditto.
1711         * testsuite/libgomp.fortran/examples-4/target-2.f90: Ditto.
1712         * testsuite/libgomp.fortran/examples-4/target-3.f90: Ditto.
1713         * testsuite/libgomp.fortran/examples-4/target-4.f90: Ditto.
1714         * testsuite/libgomp.fortran/examples-4/target-5.f90: Ditto.
1715         * testsuite/libgomp.fortran/examples-4/target_data-1.f90: Ditto.
1716         * testsuite/libgomp.fortran/examples-4/target_data-2.f90: Ditto.
1717         * testsuite/libgomp.fortran/examples-4/target_data-3.f90: Ditto.
1718         * testsuite/libgomp.fortran/examples-4/target_data-4.f90: Ditto.
1719         * testsuite/libgomp.fortran/examples-4/target_data-5.f90: Ditto.
1720         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: Ditto.
1721         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: Ditto.
1722         * testsuite/libgomp.fortran/examples-4/target_update-1.f90: Ditto.
1723         * testsuite/libgomp.fortran/examples-4/target_update-2.f90: Ditto.
1724         * testsuite/libgomp.fortran/examples-4/task_dep-1.f90: Ditto.
1725         * testsuite/libgomp.fortran/examples-4/task_dep-2.f90: Ditto.
1726         * testsuite/libgomp.fortran/examples-4/task_dep-3.f90: Ditto.
1727         * testsuite/libgomp.fortran/examples-4/task_dep-4.f90: Ditto.
1728         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: Ditto.
1729         * testsuite/libgomp.fortran/examples-4/teams-2.f90: Ditto.
1730         * testsuite/libgomp.fortran/examples-4/teams-3.f90: Ditto.
1731         * testsuite/libgomp.fortran/examples-4/teams-4.f90: Ditto.
1732         * testsuite/libgomp.fortran/examples-4/teams-5.f90: Ditto.
1733         * testsuite/libgomp.fortran/examples-4/teams-6.f90: Ditto.
1734         * testsuite/libgomp.fortran/lastprivate1.f90: Ditto.
1735         * testsuite/libgomp.fortran/lastprivate2.f90: Ditto.
1736         * testsuite/libgomp.fortran/lib1.f90: Ditto.
1737         * testsuite/libgomp.fortran/lib4.f90: Ditto.
1738         * testsuite/libgomp.fortran/lock-1.f90: Ditto.
1739         * testsuite/libgomp.fortran/lock-2.f90: Ditto.
1740         * testsuite/libgomp.fortran/nested1.f90: Ditto.
1741         * testsuite/libgomp.fortran/nestedfn1.f90: Ditto.
1742         * testsuite/libgomp.fortran/nestedfn2.f90: Ditto.
1743         * testsuite/libgomp.fortran/nestedfn3.f90: Ditto.
1744         * testsuite/libgomp.fortran/nestedfn4.f90: Ditto.
1745         * testsuite/libgomp.fortran/nestedfn5.f90: Ditto.
1746         * testsuite/libgomp.fortran/omp_atomic1.f90: Ditto.
1747         * testsuite/libgomp.fortran/omp_atomic2.f90: Ditto.
1748         * testsuite/libgomp.fortran/omp_atomic3.f90: Ditto.
1749         * testsuite/libgomp.fortran/omp_atomic4.f90: Ditto.
1750         * testsuite/libgomp.fortran/omp_atomic5.f90: Ditto.
1751         * testsuite/libgomp.fortran/omp_cond1.f: Ditto.
1752         * testsuite/libgomp.fortran/omp_cond2.f: Ditto.
1753         * testsuite/libgomp.fortran/omp_cond3.F90: Ditto.
1754         * testsuite/libgomp.fortran/omp_cond4.F90: Ditto.
1755         * testsuite/libgomp.fortran/omp_parse1.f90: Ditto.
1756         * testsuite/libgomp.fortran/omp_parse2.f90: Ditto.
1757         * testsuite/libgomp.fortran/omp_parse3.f90: Ditto.
1758         * testsuite/libgomp.fortran/omp_parse4.f90: Ditto.
1759         * testsuite/libgomp.fortran/openmp_version-1.f: Ditto.
1760         * testsuite/libgomp.fortran/openmp_version-2.f90: Ditto.
1761         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: Ditto.
1762         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: Ditto.
1763         * testsuite/libgomp.fortran/pointer1.f90: Ditto.
1764         * testsuite/libgomp.fortran/pointer2.f90: Ditto.
1765         * testsuite/libgomp.fortran/pr25219.f90: Ditto.
1766         * testsuite/libgomp.fortran/pr27395-1.f90: Ditto.
1767         * testsuite/libgomp.fortran/pr27395-2.f90: Ditto.
1768         * testsuite/libgomp.fortran/pr27416-1.f90: Ditto.
1769         * testsuite/libgomp.fortran/pr27916-1.f90: Ditto.
1770         * testsuite/libgomp.fortran/pr27916-2.f90: Ditto.
1771         * testsuite/libgomp.fortran/pr28390.f: Ditto.
1772         * testsuite/libgomp.fortran/pr29629.f90: Ditto.
1773         * testsuite/libgomp.fortran/pr32550.f90: Ditto.
1774         * testsuite/libgomp.fortran/pr33880.f90: Ditto.
1775         * testsuite/libgomp.fortran/pr34020.f90: Ditto.
1776         * testsuite/libgomp.fortran/pr35130.f90: Ditto.
1777         * testsuite/libgomp.fortran/pr42162.f90: Ditto.
1778         * testsuite/libgomp.fortran/pr46753.f90: Ditto.
1779         * testsuite/libgomp.fortran/pr48894.f90: Ditto.
1780         * testsuite/libgomp.fortran/pr49792-1.f90: Ditto.
1781         * testsuite/libgomp.fortran/pr49792-2.f90: Ditto.
1782         * testsuite/libgomp.fortran/pr63938-1.f90: Ditto.
1783         * testsuite/libgomp.fortran/pr63938-2.f90: Ditto.
1784         * testsuite/libgomp.fortran/pr65597.f90: Ditto.
1785         * testsuite/libgomp.fortran/pr66199-1.f90: Ditto.
1786         * testsuite/libgomp.fortran/pr71014.f90: Ditto.
1787         * testsuite/libgomp.fortran/pr81304.f90: Ditto.
1788         * testsuite/libgomp.fortran/pr81841.f90: Ditto.
1789         * testsuite/libgomp.fortran/pr84418-1.f90: Ditto.
1790         * testsuite/libgomp.fortran/pr84418-2.f90: Ditto.
1791         * testsuite/libgomp.fortran/procptr1.f90: Ditto.
1792         * testsuite/libgomp.fortran/recursion1.f90: Ditto.
1793         * testsuite/libgomp.fortran/reduction1.f90: Ditto.
1794         * testsuite/libgomp.fortran/reduction2.f90: Ditto.
1795         * testsuite/libgomp.fortran/reduction3.f90: Ditto.
1796         * testsuite/libgomp.fortran/reduction4.f90: Ditto.
1797         * testsuite/libgomp.fortran/reduction5.f90: Ditto.
1798         * testsuite/libgomp.fortran/reduction6.f90: Ditto.
1799         * testsuite/libgomp.fortran/reference1.f90: Ditto.
1800         * testsuite/libgomp.fortran/reference2.f90: Ditto.
1801         * testsuite/libgomp.fortran/retval1.f90: Ditto.
1802         * testsuite/libgomp.fortran/retval2.f90: Ditto.
1803         * testsuite/libgomp.fortran/sharing1.f90: Ditto.
1804         * testsuite/libgomp.fortran/sharing2.f90: Ditto.
1805         * testsuite/libgomp.fortran/simd1.f90: Ditto.
1806         * testsuite/libgomp.fortran/simd2.f90: Ditto.
1807         * testsuite/libgomp.fortran/simd3.f90: Ditto.
1808         * testsuite/libgomp.fortran/simd4.f90: Ditto.
1809         * testsuite/libgomp.fortran/simd5.f90: Ditto.
1810         * testsuite/libgomp.fortran/simd6.f90: Ditto.
1811         * testsuite/libgomp.fortran/simd7.f90: Ditto.
1812         * testsuite/libgomp.fortran/stack.f90: Ditto.
1813         * testsuite/libgomp.fortran/strassen.f90: Ditto.
1814         * testsuite/libgomp.fortran/tabs1.f90: Ditto.
1815         * testsuite/libgomp.fortran/tabs2.f: Ditto.
1816         * testsuite/libgomp.fortran/target1.f90: Ditto.
1817         * testsuite/libgomp.fortran/target2.f90: Ditto.
1818         * testsuite/libgomp.fortran/target3.f90: Ditto.
1819         * testsuite/libgomp.fortran/target4.f90: Ditto.
1820         * testsuite/libgomp.fortran/target5.f90: Ditto.
1821         * testsuite/libgomp.fortran/target6.f90: Ditto.
1822         * testsuite/libgomp.fortran/target7.f90: Ditto.
1823         * testsuite/libgomp.fortran/target8.f90: Ditto.
1824         * testsuite/libgomp.fortran/task1.f90: Ditto.
1825         * testsuite/libgomp.fortran/task2.f90: Ditto.
1826         * testsuite/libgomp.fortran/task3.f90: Ditto.
1827         * testsuite/libgomp.fortran/task4.f90: Ditto.
1828         * testsuite/libgomp.fortran/taskgroup1.f90: Ditto.
1829         * testsuite/libgomp.fortran/taskloop1.f90: Ditto.
1830         * testsuite/libgomp.fortran/taskloop2.f90: Ditto.
1831         * testsuite/libgomp.fortran/taskloop3.f90: Ditto.
1832         * testsuite/libgomp.fortran/taskloop4.f90: Ditto.
1833         * testsuite/libgomp.fortran/threadprivate1.f90: Ditto.
1834         * testsuite/libgomp.fortran/threadprivate2.f90: Ditto.
1835         * testsuite/libgomp.fortran/threadprivate3.f90: Ditto.
1836         * testsuite/libgomp.fortran/threadprivate4.f90: Ditto.
1837         * testsuite/libgomp.fortran/udr1.f90: Ditto.
1838         * testsuite/libgomp.fortran/udr10.f90: Ditto.
1839         * testsuite/libgomp.fortran/udr11.f90: Ditto.
1840         * testsuite/libgomp.fortran/udr12.f90: Ditto.
1841         * testsuite/libgomp.fortran/udr13.f90: Ditto.
1842         * testsuite/libgomp.fortran/udr14.f90: Ditto.
1843         * testsuite/libgomp.fortran/udr15.f90: Ditto.
1844         * testsuite/libgomp.fortran/udr2.f90: Ditto.
1845         * testsuite/libgomp.fortran/udr3.f90: Ditto.
1846         * testsuite/libgomp.fortran/udr4.f90: Ditto.
1847         * testsuite/libgomp.fortran/udr5.f90: Ditto.
1848         * testsuite/libgomp.fortran/udr6.f90: Ditto.
1849         * testsuite/libgomp.fortran/udr7.f90: Ditto.
1850         * testsuite/libgomp.fortran/udr8.f90: Ditto.
1851         * testsuite/libgomp.fortran/udr9.f90: Ditto.
1852         * testsuite/libgomp.fortran/vla1.f90: Ditto.
1853         * testsuite/libgomp.fortran/vla2.f90: Ditto.
1854         * testsuite/libgomp.fortran/vla3.f90: Ditto.
1855         * testsuite/libgomp.fortran/vla4.f90: Ditto.
1856         * testsuite/libgomp.fortran/vla5.f90: Ditto.
1857         * testsuite/libgomp.fortran/vla6.f90: Ditto.
1858         * testsuite/libgomp.fortran/vla7.f90: Ditto.
1859         * testsuite/libgomp.fortran/vla8.f90: Ditto.
1860         * testsuite/libgomp.fortran/workshare1.f90: Ditto.
1861         * testsuite/libgomp.fortran/workshare2.f90: Ditto.
1862
1863 2019-10-30  Tobias Burnus  <tobias@codesourcery.com>
1864
1865         * testsuite/libgomp.fortran/target-simd.f90: Use stop not abort.
1866         * testsuite/libgomp.fortran/use_device_ptr-optional-1.f90:
1867         Ditto; add 'dg-do run' for torture testing.
1868         * testsuite/libgomp.fortran/lastprivate1.f90:  Add 'dg-do run'.
1869         * testsuite/libgomp.fortran/lastprivate2.f90: Ditto.
1870         * testsuite/libgomp.fortran/nestedfn4.f90: Ditto.
1871         * testsuite/libgomp.fortran/pr25219.f90: Ditto.
1872         * testsuite/libgomp.fortran/pr28390.f: Ditto.
1873         * testsuite/libgomp.fortran/pr35130.f90: Ditto.
1874         * testsuite/libgomp.fortran/pr90779.f90: Ditto.
1875         * testsuite/libgomp.fortran/task2.f90: Ditto.
1876         * testsuite/libgomp.fortran/taskgroup1.f90: Ditto.
1877         * testsuite/libgomp.fortran/taskloop1.f90: Ditto.
1878         * testsuite/libgomp.fortran/use_device_addr-1.f90: Ditto.
1879         * testsuite/libgomp.fortran/use_device_addr-2.f90: Ditto.
1880         * testsuite/libgomp.fortran/workshare1.f90: Ditto.
1881         * testsuite/libgomp.fortran/workshare2.f90: Ditto.
1882
1883 2019-10-28  Tobias Burnus  <tobias@codesourcery.com>
1884
1885         * testsuite/libgomp.oacc-fortran/abort-1.f90: Add 'dg-do run'.
1886         * testsuite/libgomp.oacc-fortran/abort-2.f90: Ditto.
1887         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Ditto.
1888         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f90: Ditto.
1889         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f90: Ditto.
1890         * testsuite/libgomp.oacc-fortran/lib-1.f90: Ditto.
1891         * testsuite/libgomp.oacc-fortran/common-block-1.f90:
1892         Use 'stop' not abort().
1893         * testsuite/libgomp.oacc-fortran/common-block-2.f90: Ditto.
1894         * testsuite/libgomp.oacc-fortran/common-block-3.f90: Ditto.
1895         * testsuite/libgomp.oacc-fortran/data-1.f90: Ditto.
1896         * testsuite/libgomp.oacc-fortran/data-2.f90: Ditto.
1897         * testsuite/libgomp.oacc-fortran/data-5.f90: Ditto.
1898         * testsuite/libgomp.oacc-fortran/dummy-array.f90: Ditto.
1899         * testsuite/libgomp.oacc-fortran/gemm-2.f90: Ditto.
1900         * testsuite/libgomp.oacc-fortran/gemm.f90: Ditto.
1901         * testsuite/libgomp.oacc-fortran/host_data-2.f90: Ditto.
1902         * testsuite/libgomp.oacc-fortran/host_data-3.f90: Ditto.
1903         * testsuite/libgomp.oacc-fortran/host_data-4.f90: Ditto.
1904         * testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Ditto.
1905         * testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Ditto.
1906         * testsuite/libgomp.oacc-fortran/kernels-independent.f90: Ditto.
1907         * testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Ditto.
1908         * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Ditto.
1909         * testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95:
1910         Ditto.
1911         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
1912         Ditto.
1913         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
1914         Ditto.
1915         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
1916         Ditto.
1917         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
1918         Ditto.
1919         * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-1.f90:
1920         Ditto.
1921         * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-2.f90:
1922         Ditto.
1923         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-1.f90:
1924         Ditto.
1925         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-2.f90:
1926         Ditto.
1927         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-3.f90:
1928         Ditto.
1929         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-4.f90:
1930         Ditto.
1931         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-5.f90:
1932         Ditto.
1933         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-6.f90:
1934         Ditto.
1935         * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-7.f90:
1936         Ditto.
1937         * testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90: Ditto.
1938         * testsuite/libgomp.oacc-fortran/lib-12.f90: Ditto.
1939         * testsuite/libgomp.oacc-fortran/lib-13.f90: Ditto.
1940         * testsuite/libgomp.oacc-fortran/lib-14.f90: Ditto.
1941         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90:
1942         Likewise and also add 'dg-do run'.
1943         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90:
1944         Ditto.
1945
1946 2019-10-25  Cesar Philippidis <cesar@codesourcery.com>
1947             Tobias Burnus  <tobias@codesourcery.com>
1948
1949         * testsuite/libgomp.oacc-fortran/common-block-1.f90: New test.
1950         * testsuite/libgomp.oacc-fortran/common-block-2.f90: New test.
1951         * testsuite/libgomp.oacc-fortran/common-block-3.f90: New test.
1952
1953 2019-10-14  Jakub Jelinek  <jakub@redhat.com>
1954
1955         PR libgomp/92081
1956         * testsuite/libgomp.fortran/target-simd.f90: Iterate from 1 rather
1957         than 0.
1958
1959 2019-10-11  Tobias Burnus  <tobias@codesourcery.com>
1960
1961         * testsuite/libgomp.fortran/use_device_addr-1.f90: New.
1962         * testsuite/libgomp.fortran/use_device_addr-2.f90: New.
1963
1964 2019-10-09  Thomas Schwinge  <thomas@codesourcery.com>
1965
1966         PR middle-end/92036
1967         * testsuite/libgomp.oacc-c-c++-common/data-firstprivate-1.c: New
1968         file.
1969
1970 2019-10-09  Tobias Burnus  <tobias@codesourcery.com>
1971
1972         PR testsuite/91884
1973         * testsuite/libgomp.fortran/fortran.exp: Conditionally
1974         add -lquadmath.
1975         * testsuite/libgomp.oacc-fortran/fortran.exp: Ditto.
1976
1977 2019-10-09  Jakub Jelinek  <jakub@redhat.com>
1978
1979         PR libgomp/92028
1980         * target.c (gomp_map_vars_internal): Readd the previous
1981         GOMP_MAP_USE_DEVICE_PTR handling code in the first loop,
1982         though do that just in the !not_found_cnt case.
1983
1984 2019-10-08  Tobias Burnus  <tobias@codesourcery.com>
1985
1986         * gfortran.dg/gomp/target-simd.f90: New.
1987
1988 2019-10-02  Julian Brown  <julian@codesourcery.com>
1989             Cesar Philippidis  <cesar@codesourcery.com>
1990
1991         * libgomp.h (OFFSET_INLINED, OFFSET_POINTER, OFFSET_STRUCT): Define.
1992         * target.c (FIELD_TGT_EMPTY): Define.
1993         (gomp_map_val): Use OFFSET_* macros instead of magic constants.  Write
1994         as switch instead of list of ifs.
1995         (gomp_map_vars_internal): Use OFFSET_* and FIELD_TGT_EMPTY macros.
1996
1997 2019-10-02  Andreas Tobler  <andreast@gcc.gnu.org>
1998
1999         * testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h
2000         include. Replace alloca () with __builtin_alloca ().
2001         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise.
2002
2003 2019-10-01  Jakub Jelinek  <jakub@redhat.com>
2004
2005         * configure.ac: Remove GCC_HEADER_STDINT(gstdint.h).
2006         * libgomp.h: Include <stdint.h> instead of "gstdint.h".
2007         * oacc-parallel.c: Don't include "libgomp_g.h".
2008         * plugin/plugin-hsa.c: Include <stdint.h> instead of "gstdint.h".
2009         * plugin/plugin-nvptx.c: Don't include "gstdint.h".
2010         * aclocal.m4: Regenerated.
2011         * config.h.in: Regenerated.
2012         * configure: Regenerated.
2013         * Makefile.in: Regenerated.
2014
2015 2019-09-30  Kwok Cheung Yeung  <kcy@codesourcery.com>
2016
2017         * libgomp_g.h: Include stdint.h instead of gstdint.h.
2018
2019 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
2020
2021         * configure: Regenerate.
2022
2023 2019-09-13  Tobias Burnus  <tobias@codesourcery.com>
2024
2025         * plugin/plugin-hsa.c (hsa_warn, hsa_fatal, hsa_error): Ensure
2026         string is initialized.
2027
2028 2019-09-06  Florian Weimer  <fweimer@redhat.com>
2029
2030         * configure: Regenerate.
2031
2032 2019-09-03  Chung-Lin Tang  <cltang@codesourcery.com>
2033
2034         PR other/79543
2035         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version
2036         scanning to conform to the GNU Coding Standards.
2037         * configure: Regenerate.
2038
2039 2019-08-28  Jakub Jelinek  <jakub@redhat.com>
2040
2041         PR libgomp/91530
2042         * testsuite/libgomp.c/scan-21.c: New test.
2043         * testsuite/libgomp.c/scan-22.c: New test.
2044
2045 2019-08-27  Jakub Jelinek  <jakub@redhat.com>
2046
2047         PR libgomp/91530
2048         * testsuite/libgomp.c/scan-11.c: Add -msse2 option for sse2_runtime
2049         targets.
2050         * testsuite/libgomp.c/scan-12.c: Likewise.
2051         * testsuite/libgomp.c/scan-13.c: Likewise.
2052         * testsuite/libgomp.c/scan-14.c: Likewise.
2053         * testsuite/libgomp.c/scan-15.c: Likewise.
2054         * testsuite/libgomp.c/scan-16.c: Likewise.
2055         * testsuite/libgomp.c/scan-17.c: Likewise.
2056         * testsuite/libgomp.c/scan-18.c: Likewise.
2057         * testsuite/libgomp.c/scan-19.c: Likewise.
2058         * testsuite/libgomp.c/scan-20.c: Likewise.
2059         * testsuite/libgomp.c++/scan-9.C: Likewise.
2060         * testsuite/libgomp.c++/scan-10.C: Likewise.
2061         * testsuite/libgomp.c++/scan-11.C: Likewise.
2062         * testsuite/libgomp.c++/scan-12.C: Likewise.
2063         * testsuite/libgomp.c++/scan-14.C: Likewise.
2064         * testsuite/libgomp.c++/scan-15.C: Likewise.
2065         * testsuite/libgomp.c++/scan-13.C: Likewise.  Use sse2_runtime
2066         instead of i?86-*-* x86_64-*-* as target for scan-tree-dump-times.
2067         * testsuite/libgomp.c++/scan-16.C: Likewise.
2068
2069 2019-08-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
2070
2071         PR fortran/91473
2072         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add
2073         -std=legacy so invalid code in the test case is accepted.
2074
2075 2019-08-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
2076
2077         PR fortran/91422
2078         * testsuite/libgomp.oacc-fortran/routine-7.f90: Correct array
2079         dimension.
2080
2081 2019-08-08  Jakub Jelinek  <jakub@redhat.com>
2082
2083         * target.c (gomp_map_vars_internal): For GOMP_MAP_USE_DEVICE_PTR
2084         perform the lookup in the first loop only if !not_found_cnt, otherwise
2085         perform lookups for it in the second loop guarded with
2086         if (not_found_cnt || has_firstprivate).
2087         * testsuite/libgomp.c/target-37.c: New test.
2088         * testsuite/libgomp.c++/target-22.C: New test.
2089
2090 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
2091
2092         * testsuite/libgomp.c/target-18.c (struct S): New type.
2093         (foo): Use use_device_addr clause instead of use_device_ptr clause
2094         where required by OpenMP 5.0, add further tests for both use_device_ptr
2095         and use_device_addr clauses.
2096         * testsuite/libgomp.c++/target-9.C (struct S): New type.
2097         (foo): Use use_device_addr clause instead of use_device_ptr clause
2098         where required by OpenMP 5.0, add further tests for both use_device_ptr
2099         and use_device_addr clauses.  Add t and u arguments.
2100         (main): Adjust caller.
2101
2102 2019-08-06  Jakub Jelinek  <jakub@redhat.com>
2103
2104         * testsuite/libgomp.c++/loop-13.C: New test.
2105         * testsuite/libgomp.c++/loop-14.C: New test.
2106         * testsuite/libgomp.c++/loop-15.C: New test.
2107
2108 2019-07-31  Jakub Jelinek  <jakub@redhat.com>
2109
2110         PR middle-end/91301
2111         * testsuite/libgomp.c++/for-27.C: New test.
2112
2113 2019-07-23  Steven G. Kargl  <kargl@gcc.gnu.org>
2114
2115         * testsuite/libgomp.fortran/reduction4.f90: Update BOZ usage.
2116         * testsuite/libgomp.fortran/reduction5.f90: Ditto.
2117
2118 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
2119
2120         * testsuite/libgomp.c-c++-common/loop-1.c: New test.
2121
2122 2019-07-08  Jakub Jelinek  <jakub@redhat.com>
2123
2124         * testsuite/libgomp.c++/scan-13.C: Replace xfail with target x86.
2125         * testsuite/libgomp.c++/scan-16.C: Likewise.
2126
2127 2019-07-06  Jakub Jelinek  <jakub@redhat.com>
2128
2129         * testsuite/libgomp.c/scan-19.c: New test.
2130         * testsuite/libgomp.c/scan-20.c: New test.
2131
2132         * testsuite/libgomp.c/scan-11.c: New test.
2133         * testsuite/libgomp.c/scan-12.c: New test.
2134         * testsuite/libgomp.c/scan-13.c: New test.
2135         * testsuite/libgomp.c/scan-14.c: New test.
2136         * testsuite/libgomp.c/scan-15.c: New test.
2137         * testsuite/libgomp.c/scan-16.c: New test.
2138         * testsuite/libgomp.c/scan-17.c: New test.
2139         * testsuite/libgomp.c/scan-18.c: New test.
2140         * testsuite/libgomp.c++/scan-9.C: New test.
2141         * testsuite/libgomp.c++/scan-10.C: New test.
2142         * testsuite/libgomp.c++/scan-11.C: New test.
2143         * testsuite/libgomp.c++/scan-12.C: New test.
2144         * testsuite/libgomp.c++/scan-13.C: New test.
2145         * testsuite/libgomp.c++/scan-14.C: New test.
2146         * testsuite/libgomp.c++/scan-15.C: New test.
2147         * testsuite/libgomp.c++/scan-16.C: New test.
2148
2149 2019-07-04  Jakub Jelinek  <jakub@redhat.com>
2150
2151         * testsuite/libgomp.c/scan-9.c: New test.
2152         * testsuite/libgomp.c/scan-10.c: New test.
2153
2154 2019-07-03  Jakub Jelinek  <jakub@redhat.com>
2155
2156         * testsuite/libgomp.c++/scan-1.C: New test.
2157         * testsuite/libgomp.c++/scan-2.C: New test.
2158         * testsuite/libgomp.c++/scan-3.C: New test.
2159         * testsuite/libgomp.c++/scan-4.C: New test.
2160         * testsuite/libgomp.c++/scan-5.C: New test.
2161         * testsuite/libgomp.c++/scan-6.C: New test.
2162         * testsuite/libgomp.c++/scan-7.C: New test.
2163         * testsuite/libgomp.c++/scan-8.C: New test.
2164         * testsuite/libgomp.c/scan-1.c: New test.
2165         * testsuite/libgomp.c/scan-2.c: New test.
2166         * testsuite/libgomp.c/scan-3.c: New test.
2167         * testsuite/libgomp.c/scan-4.c: New test.
2168         * testsuite/libgomp.c/scan-5.c: New test.
2169         * testsuite/libgomp.c/scan-6.c: New test.
2170         * testsuite/libgomp.c/scan-7.c: New test.
2171         * testsuite/libgomp.c/scan-8.c: New test.
2172
2173 2019-06-18  Thomas Schwinge  <thomas@codesourcery.com>
2174
2175         * testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C: New file.
2176         * testsuite/libgomp.oacc-c-c++-common/firstprivate-mappings-1.c:
2177         Likewise.
2178
2179         * testsuite/libgomp.fortran/allocatable3.f90: Add missing results
2180         check.
2181
2182 2019-06-18  Cesar Philippidis  <cesar@codesourcery.com>
2183
2184         * testsuite/libgomp.oacc-fortran/allocatable-array-1.f90: New
2185         file.
2186
2187 2019-06-18  Thomas Schwinge  <thomas@codesourcery.com>
2188
2189         PR fortran/90743
2190         * oacc-parallel.c (GOACC_parallel_keyed): Handle NULL mapping
2191         case.
2192         * testsuite/libgomp.fortran/target-allocatable-1-1.f90: New file.
2193         * testsuite/libgomp.fortran/target-allocatable-1-2.f90: Likewise.
2194         * testsuite/libgomp.oacc-fortran/allocatable-1-1.f90: Likewise.
2195         * testsuite/libgomp.oacc-fortran/allocatable-1-2.f90: Likewise.
2196
2197         PR testsuite/90861
2198         * testsuite/libgomp.oacc-c-c++-common/declare-vla.c: Update.
2199
2200         PR middle-end/90862
2201         * testsuite/libgomp.oacc-c-c++-common/declare-1.c: Update.
2202
2203 2019-06-16  Tom de Vries  <tdevries@suse.de>
2204
2205         PR tree-optimization/89376
2206         * testsuite/libgomp.oacc-c-c++-common/pr89376.c: New test.
2207
2208 2019-06-15  Tom de Vries  <tdevries@suse.de>
2209
2210         PR tree-optimization/89713
2211         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Expect no bar.sync.
2212         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Same.
2213
2214 2019-06-15  Jakub Jelinek  <jakub@redhat.com>
2215
2216         PR middle-end/90779
2217         * testsuite/libgomp.c/pr90779.c: New test.
2218         * testsuite/libgomp.fortran/pr90779.f90: New test.
2219
2220 2019-06-15  Tom de Vries  <tdevries@suse.de>
2221
2222         PR tree-optimization/90009
2223         * testsuite/libgomp.oacc-c-c++-common/pr90009.c: New test.
2224
2225 2019-06-13  Feng Xue  <fxue@os.amperecomputing.com>
2226
2227         PR tree-optimization/89713
2228         * testsuite/libgomp.oacc-c-c++-common/pr84955-1.c: New test.
2229
2230 2019-06-11  Jakub Jelinek  <jakub@redhat.com>
2231
2232         PR target/90811
2233         * testsuite/libgomp.c/pr90811.c: New test.
2234
2235 2019-06-05  Jakub Jelinek  <jakub@redhat.com>
2236
2237         * testsuite/libgomp.c++/lastprivate-conditional-1.C: New test.
2238         * testsuite/libgomp.c++/lastprivate-conditional-2.C: New test.
2239
2240 2019-06-04  Jakub Jelinek  <jakub@redhat.com>
2241
2242         * testsuite/libgomp.c-c++-common/lastprivate-conditional-7.c: New test.
2243         * testsuite/libgomp.c-c++-common/lastprivate-conditional-8.c: New test.
2244         * testsuite/libgomp.c-c++-common/lastprivate-conditional-9.c: New test.
2245         * testsuite/libgomp.c-c++-common/lastprivate-conditional-10.c: New test.
2246
2247 2019-05-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2248
2249         * configure.ac: Call AX_COUNT_CPUS.
2250         Substitute CPU_COUNT.
2251         * testsuite/Makefile.am (check-am): Use CPU_COUNT as processor
2252         count fallback.
2253         * aclocal.m4: Regenerate.
2254         * configure: Regenerate.
2255         * Makefile.in, testsuite/Makefile.in: Regenerate.
2256
2257 2019-05-29  Jakub Jelinek  <jakub@redhat.com>
2258
2259         * testsuite/libgomp.c-c++-common/lastprivate_conditional_4.c: Rename
2260         to ...
2261         * testsuite/libgomp.c-c++-common/lastprivate-conditional-4.c: ... this.
2262         * testsuite/libgomp.c-c++-common/lastprivate-conditional-5.c: New test.
2263         * testsuite/libgomp.c-c++-common/lastprivate-conditional-6.c: New test.
2264
2265 2019-05-27  Jakub Jelinek  <jakub@redhat.com>
2266
2267         * testsuite/libgomp.c-c++-common/lastprivate_conditional_4.c: New test.
2268
2269         * testsuite/libgomp.c-c++-common/lastprivate-conditional-3.c: New test.
2270
2271         PR libgomp/90641
2272         * work.c (gomp_init_work_share): Instead of aligning final ordered
2273         value to multiples of long long alignment, align to that the
2274         first part (ordered team ids) and if inline_ordered_team_ids
2275         is not on a long long alignment boundary within the structure,
2276         use __alignof__ (long long) - 1 pad size always.
2277         * loop.c (GOMP_loop_start): Fix *mem computation if
2278         inline_ordered_team_ids is not aligned on long long alignment boundary
2279         within the structure.
2280         * loop-ull.c (GOMP_loop_ull_start): Likewise.
2281         * sections.c (GOMP_sections2_start): Likewise.
2282
2283 2019-05-24  Jakub Jelinek  <jakub@redhat.com>
2284
2285         * testsuite/libgomp.c-c++-common/lastprivate-conditional-1.c: New test.
2286         * testsuite/libgomp.c-c++-common/lastprivate-conditional-2.c: New test.
2287
2288         PR libgomp/90585
2289         * plugin/plugin-hsa.c: Include gstdint.h.  Include inttypes.h only if
2290         HAVE_INTTYPES_H is defined.
2291         (print_uint64_t): New typedef.
2292         (PRIu64): Define if HAVE_INTTYPES_H is not defined.
2293         (print_kernel_dispatch, run_kernel): Use PRIu64 macro instead of
2294         "lu", cast uint64_t HSA_DEBUG and fprintf arguments to print_uint64_t.
2295         (release_kernel_dispatch): Likewise.  Cast shadow->debug to uintptr_t
2296         before casting to void *.
2297         * plugin/plugin-nvptx.c: Include gstdint.h instead of stdint.h.
2298         * oacc-mem.c: Don't include config.h nor stdint.h.
2299         * target.c: Don't include config.h.
2300         * oacc-cuda.c: Likewise.
2301         * oacc-host.c: Don't include stdint.h.
2302
2303 2019-05-20  Jakub Jelinek  <jakub@redhat.com>
2304
2305         PR libgomp/90527
2306         * alloc.c (_GNU_SOURCE): Define.
2307
2308 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
2309
2310         * acc_prof.h: New file.
2311         * oacc-profiling.c: Likewise.
2312         * Makefile.am (nodist_libsubinclude_HEADERS, libgomp_la_SOURCES):
2313         Add these, respectively.
2314         * Makefile.in: Regenerate.
2315         * env.c (initialize_env): Call goacc_profiling_initialize.
2316         * oacc-plugin.c (GOMP_PLUGIN_goacc_thread)
2317         (GOMP_PLUGIN_goacc_profiling_dispatch): New functions.
2318         * oacc-plugin.h (GOMP_PLUGIN_goacc_thread)
2319         (GOMP_PLUGIN_goacc_profiling_dispatch): Declare.
2320         * libgomp.map (OACC_2.5.1): Add acc_prof_lookup,
2321         acc_prof_register, acc_prof_unregister, and acc_register_library.
2322         (GOMP_PLUGIN_1.3): Add GOMP_PLUGIN_goacc_profiling_dispatch, and
2323         GOMP_PLUGIN_goacc_thread.
2324         * oacc-int.h (struct goacc_thread): Add prof_info, api_info,
2325         prof_callbacks_enabled members.
2326         (goacc_prof_enabled, goacc_profiling_initialize)
2327         (_goacc_profiling_dispatch_p, _goacc_profiling_setup_p)
2328         (goacc_profiling_dispatch): Declare.
2329         (GOACC_PROF_ENABLED, GOACC_PROFILING_DISPATCH_P)
2330         (GOACC_PROFILING_SETUP_P): Define.
2331         * oacc-async.c (acc_async_test, acc_async_test_all, acc_wait)
2332         (acc_wait_async, acc_wait_all, acc_wait_all_async): Update for
2333         OpenACC Profiling Interface.
2334         * oacc-cuda.c (acc_get_current_cuda_device)
2335         (acc_get_current_cuda_context, acc_get_cuda_stream)
2336         (acc_set_cuda_stream): Likewise.
2337         * oacc-init.c (acc_init_1, goacc_attach_host_thread_to_device)
2338         (acc_init, acc_set_device_type, acc_get_device_type)
2339         (acc_get_device_num, goacc_lazy_initialize): Likewise.
2340         * oacc-mem.c (acc_malloc, acc_free, memcpy_tofrom_device)
2341         (acc_deviceptr, acc_hostptr, acc_is_present, acc_map_data)
2342         (acc_unmap_data, present_create_copy, delete_copyout)
2343         (update_dev_host): Likewise.
2344         * oacc-parallel.c (GOACC_parallel_keyed, GOACC_data_start)
2345         (GOACC_data_end, GOACC_enter_exit_data, GOACC_update, GOACC_wait):
2346         Likewise.
2347         * plugin/plugin-nvptx.c (nvptx_exec, nvptx_alloc, nvptx_free)
2348         (GOMP_OFFLOAD_openacc_exec, GOMP_OFFLOAD_openacc_async_exec):
2349         Likewise.
2350         * libgomp.texi: Update.
2351         * testsuite/libgomp.oacc-c-c++-common/acc_prof-dispatch-1.c: New
2352         file.
2353         * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Likewise.
2354         * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c:
2355         Likewise.
2356         * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c:
2357         Likewise.
2358         * testsuite/libgomp.oacc-c-c++-common/acc_prof-valid_bytes-1.c:
2359         Likewise.
2360         * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c:
2361         Likewise.
2362
2363 2019-05-13  Chung-Lin Tang <cltang@codesourcery.com>
2364
2365         * libgomp-plugin.h (struct goacc_asyncqueue): Declare.
2366         (struct goacc_asyncqueue_list): Likewise.
2367         (goacc_aq): Likewise.
2368         (goacc_aq_list): Likewise.
2369         (GOMP_OFFLOAD_openacc_register_async_cleanup): Remove.
2370         (GOMP_OFFLOAD_openacc_async_test): Remove.
2371         (GOMP_OFFLOAD_openacc_async_test_all): Remove.
2372         (GOMP_OFFLOAD_openacc_async_wait): Remove.
2373         (GOMP_OFFLOAD_openacc_async_wait_async): Remove.
2374         (GOMP_OFFLOAD_openacc_async_wait_all): Remove.
2375         (GOMP_OFFLOAD_openacc_async_wait_all_async): Remove.
2376         (GOMP_OFFLOAD_openacc_async_set_async): Remove.
2377         (GOMP_OFFLOAD_openacc_exec): Adjust declaration.
2378         (GOMP_OFFLOAD_openacc_cuda_get_stream): Likewise.
2379         (GOMP_OFFLOAD_openacc_cuda_set_stream): Likewise.
2380         (GOMP_OFFLOAD_openacc_async_exec): Declare.
2381         (GOMP_OFFLOAD_openacc_async_construct): Declare.
2382         (GOMP_OFFLOAD_openacc_async_destruct): Declare.
2383         (GOMP_OFFLOAD_openacc_async_test): Declare.
2384         (GOMP_OFFLOAD_openacc_async_synchronize): Declare.
2385         (GOMP_OFFLOAD_openacc_async_serialize): Declare.
2386         (GOMP_OFFLOAD_openacc_async_queue_callback): Declare.
2387         (GOMP_OFFLOAD_openacc_async_host2dev): Declare.
2388         (GOMP_OFFLOAD_openacc_async_dev2host): Declare.
2389
2390         * libgomp.h (struct acc_dispatch_t): Define 'async' sub-struct.
2391         (gomp_acc_insert_pointer): Adjust declaration.
2392         (gomp_copy_host2dev): New declaration.
2393         (gomp_copy_dev2host): Likewise.
2394         (gomp_map_vars_async): Likewise.
2395         (gomp_unmap_tgt): Likewise.
2396         (gomp_unmap_vars_async): Likewise.
2397         (gomp_fini_device): Likewise.
2398
2399         * oacc-async.c (get_goacc_thread): New function.
2400         (get_goacc_thread_device): New function.
2401         (lookup_goacc_asyncqueue): New function.
2402         (get_goacc_asyncqueue): New function.
2403         (acc_async_test): Adjust code to use new async design.
2404         (acc_async_test_all): Likewise.
2405         (acc_wait): Likewise.
2406         (acc_wait_async): Likewise.
2407         (acc_wait_all): Likewise.
2408         (acc_wait_all_async): Likewise.
2409         (goacc_async_free): New function.
2410         (goacc_init_asyncqueues): Likewise.
2411         (goacc_fini_asyncqueues): Likewise.
2412         * oacc-cuda.c (acc_get_cuda_stream): Adjust code to use new async
2413         design.
2414         (acc_set_cuda_stream): Likewise.
2415         * oacc-host.c (host_openacc_exec): Adjust parameters, remove 'async'.
2416         (host_openacc_register_async_cleanup): Remove.
2417         (host_openacc_async_exec): New function.
2418         (host_openacc_async_test): Adjust parameters.
2419         (host_openacc_async_test_all): Remove.
2420         (host_openacc_async_wait): Remove.
2421         (host_openacc_async_wait_async): Remove.
2422         (host_openacc_async_wait_all): Remove.
2423         (host_openacc_async_wait_all_async): Remove.
2424         (host_openacc_async_set_async): Remove.
2425         (host_openacc_async_synchronize): New function.
2426         (host_openacc_async_serialize): New function.
2427         (host_openacc_async_host2dev): New function.
2428         (host_openacc_async_dev2host): New function.
2429         (host_openacc_async_queue_callback): New function.
2430         (host_openacc_async_construct): New function.
2431         (host_openacc_async_destruct): New function.
2432         (struct gomp_device_descr host_dispatch): Remove initialization of old
2433         interface, add initialization of new async sub-struct.
2434         * oacc-init.c (acc_shutdown_1): Adjust to use gomp_fini_device.
2435         (goacc_attach_host_thread_to_device): Remove old async code usage.
2436         * oacc-int.h (goacc_init_asyncqueues): New declaration.
2437         (goacc_fini_asyncqueues): Likewise.
2438         (goacc_async_copyout_unmap_vars): Likewise.
2439         (goacc_async_free): Likewise.
2440         (get_goacc_asyncqueue): Likewise.
2441         (lookup_goacc_asyncqueue): Likewise.
2442         * oacc-mem.c (memcpy_tofrom_device): Adjust code to use new async
2443         design.
2444         (present_create_copy): Adjust code to use new async design.
2445         (delete_copyout): Likewise.
2446         (update_dev_host): Likewise.
2447         (gomp_acc_insert_pointer): Add async parameter, adjust code to use new
2448         async design.
2449         (gomp_acc_remove_pointer): Adjust code to use new async design.
2450         * oacc-parallel.c (GOACC_parallel_keyed): Adjust code to use new async
2451         design.
2452         (GOACC_enter_exit_data): Likewise.
2453         (goacc_wait): Likewise.
2454         (GOACC_update): Likewise.
2455         * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Change to assert fail
2456         when called, warn as obsolete in comment.
2457         * target.c (goacc_device_copy_async): New function.
2458         (gomp_copy_host2dev): Remove 'static', add goacc_asyncqueue parameter,
2459         add goacc_device_copy_async case.
2460         (gomp_copy_dev2host): Likewise.
2461         (gomp_map_vars_existing): Add goacc_asyncqueue parameter, adjust code.
2462         (gomp_map_pointer): Likewise.
2463         (gomp_map_fields_existing): Likewise.
2464         (gomp_map_vars_internal): New always_inline function, renamed from
2465         gomp_map_vars.
2466         (gomp_map_vars): Implement by calling gomp_map_vars_internal.
2467         (gomp_map_vars_async): Implement by calling gomp_map_vars_internal,
2468         passing goacc_asyncqueue argument.
2469         (gomp_unmap_tgt): Remove static, add attribute_hidden.
2470         (gomp_unref_tgt): New function.
2471         (gomp_unmap_vars_internal): New always_inline function, renamed from
2472         gomp_unmap_vars.
2473         (gomp_unmap_vars): Implement by calling gomp_unmap_vars_internal.
2474         (gomp_unmap_vars_async): Implement by calling
2475         gomp_unmap_vars_internal, passing goacc_asyncqueue argument.
2476         (gomp_fini_device): New function.
2477         (gomp_exit_data): Adjust gomp_copy_dev2host call.
2478         (gomp_load_plugin_for_device): Remove old interface, adjust to load
2479         new async interface.
2480         (gomp_target_fini): Adjust code to call gomp_fini_device.
2481
2482         * plugin/plugin-nvptx.c (struct cuda_map): Remove.
2483         (struct ptx_stream): Remove.
2484         (struct nvptx_thread): Remove current_stream field.
2485         (cuda_map_create): Remove.
2486         (cuda_map_destroy): Remove.
2487         (map_init): Remove.
2488         (map_fini): Remove.
2489         (map_pop): Remove.
2490         (map_push): Remove.
2491         (struct goacc_asyncqueue): Define.
2492         (struct nvptx_callback): Define.
2493         (struct ptx_free_block): Define.
2494         (struct ptx_device): Remove null_stream, active_streams, async_streams,
2495         stream_lock, and next fields.
2496         (enum ptx_event_type): Remove.
2497         (struct ptx_event): Remove.
2498         (ptx_event_lock): Remove.
2499         (ptx_events): Remove.
2500         (init_streams_for_device): Remove.
2501         (fini_streams_for_device): Remove.
2502         (select_stream_for_async): Remove.
2503         (nvptx_init): Remove ptx_events and ptx_event_lock references.
2504         (nvptx_attach_host_thread_to_device): Remove CUDA_ERROR_NOT_PERMITTED
2505         case.
2506         (nvptx_open_device): Add free_blocks initialization, remove
2507         init_streams_for_device call.
2508         (nvptx_close_device): Remove fini_streams_for_device call, add
2509         free_blocks destruct code.
2510         (event_gc): Remove.
2511         (event_add): Remove.
2512         (nvptx_exec): Adjust parameters and code.
2513         (nvptx_free): Likewise.
2514         (nvptx_host2dev): Remove.
2515         (nvptx_dev2host): Remove.
2516         (nvptx_set_async): Remove.
2517         (nvptx_async_test): Remove.
2518         (nvptx_async_test_all): Remove.
2519         (nvptx_wait): Remove.
2520         (nvptx_wait_async): Remove.
2521         (nvptx_wait_all): Remove.
2522         (nvptx_wait_all_async): Remove.
2523         (nvptx_get_cuda_stream): Remove.
2524         (nvptx_set_cuda_stream): Remove.
2525         (GOMP_OFFLOAD_alloc): Adjust code.
2526         (GOMP_OFFLOAD_free): Likewise.
2527         (GOMP_OFFLOAD_openacc_register_async_cleanup): Remove.
2528         (GOMP_OFFLOAD_openacc_exec): Adjust parameters and code.
2529         (GOMP_OFFLOAD_openacc_async_test_all): Remove.
2530         (GOMP_OFFLOAD_openacc_async_wait): Remove.
2531         (GOMP_OFFLOAD_openacc_async_wait_async): Remove.
2532         (GOMP_OFFLOAD_openacc_async_wait_all): Remove.
2533         (GOMP_OFFLOAD_openacc_async_wait_all_async): Remove.
2534         (GOMP_OFFLOAD_openacc_async_set_async): Remove.
2535         (cuda_free_argmem): New function.
2536         (GOMP_OFFLOAD_openacc_async_exec): New plugin hook function.
2537         (GOMP_OFFLOAD_openacc_create_thread_data): Adjust code.
2538         (GOMP_OFFLOAD_openacc_cuda_get_stream): Adjust code.
2539         (GOMP_OFFLOAD_openacc_cuda_set_stream): Adjust code.
2540         (GOMP_OFFLOAD_openacc_async_construct): New plugin hook function.
2541         (GOMP_OFFLOAD_openacc_async_destruct): New plugin hook function.
2542         (GOMP_OFFLOAD_openacc_async_test): Remove and re-implement.
2543         (GOMP_OFFLOAD_openacc_async_synchronize): New plugin hook function.
2544         (GOMP_OFFLOAD_openacc_async_serialize): New plugin hook function.
2545         (GOMP_OFFLOAD_openacc_async_queue_callback): New plugin hook function.
2546         (cuda_callback_wrapper): New function.
2547         (cuda_memcpy_sanity_check): New function.
2548         (GOMP_OFFLOAD_host2dev): Remove and re-implement.
2549         (GOMP_OFFLOAD_dev2host): Remove and re-implement.
2550         (GOMP_OFFLOAD_openacc_async_host2dev): New plugin hook function.
2551         (GOMP_OFFLOAD_openacc_async_dev2host): New plugin hook function.
2552
2553 2019-05-07  Thomas Schwinge  <thomas@codesourcery.com>
2554
2555         PR target/87835
2556         * testsuite/libgomp.oacc-c-c++-common/pr87835.c: Update.
2557
2558 2019-05-06  Thomas Schwinge  <thomas@codesourcery.com>
2559
2560         * oacc-parallel.c: Add comments to legacy entry points (GCC 5).
2561
2562 2019-03-27  Kevin Buettner  <kevinb@redhat.com>
2563
2564         * team.c (gomp_team_start): Initialize pool->threads[0].
2565
2566 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
2567
2568         * testsuite/libgomp.oacc-c++/c++.exp: Specify
2569         "-foffload=$offload_target".
2570         * testsuite/libgomp.oacc-c/c.exp: Likewise.
2571         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
2572         * testsuite/lib/libgomp.exp
2573         (check_effective_target_openacc_nvidia_accel_configured): Remove,
2574         as (conceptually) merged into
2575         check_effective_target_openacc_nvidia_accel_selected.  Adjust all
2576         users.
2577
2578         * plugin/configfrag.ac: Populate and AC_SUBST offload_targets.
2579         * testsuite/libgomp-test-support.exp.in: Adjust.
2580         * testsuite/lib/libgomp.exp: Likewise.  Don't populate
2581         openacc_device_types_s.
2582         (offload_target_to_openacc_device_type): New proc.
2583         * testsuite/libgomp.oacc-c++/c++.exp: Adjust.
2584         * testsuite/libgomp.oacc-c/c.exp: Likewise.
2585         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
2586         * Makefile.in: Regenerate.
2587         * configure: Likewise.
2588         * testsuite/Makefile.in: Likewise.
2589
2590         * plugin/configfrag.ac: Populate and AC_SUBST offload_plugins
2591         instead of offload_targets, and AC_DEFINE_UNQUOTED OFFLOAD_PLUGINS
2592         instead of OFFLOAD_TARGETS.
2593         * target.c (gomp_target_init): Adjust.
2594         * testsuite/libgomp-test-support.exp.in: Likewise.
2595         * testsuite/lib/libgomp.exp: Likewise.  Populate
2596         openacc_device_types_s instead of offload_targets_s_openacc.
2597         (check_effective_target_openacc_nvidia_accel_selected)
2598         (check_effective_target_openacc_host_selected): Adjust.
2599         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
2600         * testsuite/libgomp.oacc-c/c.exp: Likewise.
2601         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
2602         * Makefile.in: Regenerate.
2603         * config.h.in: Likewise.
2604         * configure: Likewise.
2605         * testsuite/Makefile.in: Likewise.
2606
2607         * testsuite/lib/libgomp.exp: Error out for unknown offload target.
2608         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.  Report if
2609         "offloading: supported, but hardware not accessible".
2610         * testsuite/libgomp.oacc-c/c.exp: Likewise.
2611         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
2612
2613 2019-02-19  Chung-Lin Tang <cltang@codesourcery.com>
2614
2615         PR c/87924
2616         * oacc-parallel.c (GOACC_parallel_keyed): Remove condition on call to
2617         goacc_wait().
2618         (goacc_wait): Handle ACC_ASYNC_NOVAL case, remove goacc_thread() call
2619         and related adjustment.
2620
2621 2019-01-30  Jakub Jelinek  <jakub@redhat.com>
2622
2623         PR c++/88988
2624         * testsuite/libgomp.c++/pr88988.C: New test.
2625
2626 2019-01-28  Jakub Jelinek  <jakub@redhat.com>
2627
2628         PR middle-end/89002
2629         * testsuite/libgomp.c/pr89002.c: New test.
2630
2631 2019-01-28  Richard Biener  <rguenther@suse.de>
2632
2633         PR testsuite/89064
2634         PR tree-optimization/86865
2635         * testsuite/libgomp.graphite/force-parallel-5.c: XFAIL.
2636
2637 2019-01-24  Tom de Vries  <tdevries@suse.de>
2638
2639         * plugin/plugin-nvptx.c (GOMP_OFFLOAD_fini_device): Free ptx_devices
2640         once instantiated_devices drops to 0.
2641
2642 2019-01-23  Tom de Vries  <tdevries@suse.de>
2643
2644         PR target/PR88946
2645         * plugin/plugin-nvptx.c (cuda_map_destroy): Use CUDA_CALL_NOCHECK for
2646         cuMemFree.
2647         (nvptx_exec): Don't call map_push if mapnum == 0.
2648         * testsuite/libgomp.oacc-c-c++-common/pr88946.c: New test.
2649
2650 2019-01-23  Tom de Vries  <tdevries@suse.de>
2651
2652         PR target/88941
2653         PR target/88939
2654         * plugin/plugin-nvptx.c (cuda_map_destroy): Handle map->active case.
2655         (map_fini): Remove "assert (!s->map->active)".
2656         * testsuite/libgomp.oacc-c-c++-common/pr88941.c: New test.
2657
2658 2019-01-23  Tom de Vries  <tdevries@suse.de>
2659
2660         PR target/87835
2661         * plugin/plugin-nvptx.c (map_push): Fix adding of allocated element.
2662         * testsuite/libgomp.oacc-c-c++-common/pr87835.c: New test.
2663
2664 2019-01-15  Tom de Vries  <tdevries@suse.de>
2665
2666         PR target/80547
2667         * testsuite/libgomp.oacc-c-c++-common/gang-reduction-var-assignment.c:
2668         New test.
2669
2670 2019-01-12  Tom de Vries  <tdevries@suse.de>
2671
2672         * testsuite/libgomp.oacc-c-c++-common/pr85486-2.c: New test.
2673         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-2.c: New test.
2674         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-5.c: New test.
2675         * testsuite/libgomp.oacc-fortran/gemm-2.f90: New test.
2676
2677 2019-01-12  Tom de Vries  <tdevries@suse.de>
2678
2679         * plugin/plugin-nvptx.c (nvptx_exec): Update error message.
2680
2681 2019-01-12  Tom de Vries  <tdevries@suse.de>
2682
2683         * testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c: New test.
2684         * testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c: New test.
2685         * testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c: New test.
2686
2687 2019-01-12  Tom de Vries  <tdevries@suse.de>
2688
2689         PR target/85486
2690         * testsuite/libgomp.oacc-c-c++-common/pr85486-3.c: New test.
2691         * testsuite/libgomp.oacc-c-c++-common/pr85486.c: New test.
2692
2693 2019-01-12  Tom de Vries  <tdevries@suse.de>
2694
2695         PR target/85381
2696         * testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: New test.
2697         * testsuite/libgomp.oacc-c-c++-common/pr85381.c: New test.
2698
2699 2019-01-12  Tom de Vries  <tdevries@suse.de>
2700
2701         * testsuite/libgomp.oacc-c-c++-common/vred2d-128.c: New test.
2702         * testsuite/libgomp.oacc-fortran/gemm.f90: New test.
2703         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-10.c: New test.
2704
2705 2019-01-12  Tom de Vries  <tdevries@suse.de>
2706
2707         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-7.c: New test.
2708         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-4.c: New test.
2709         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-6.c: New test.
2710
2711 2019-01-12  Tom de Vries  <tdevries@suse.de>
2712
2713         * plugin/plugin-nvptx.c (nvptx_exec): Update insufficient hardware
2714         resources diagnostic.
2715
2716 2019-01-12  Tom de Vries  <tdevries@suse.de>
2717
2718         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: Expect
2719         vector length to be 128.
2720         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Expect vector
2721         length 2097152 to be reduced to 1024 instead of 32.
2722
2723 2019-01-11  Thomas Schwinge  <thomas@codesourcery.com>
2724             James Norris  <jnorris@codesourcery.com>
2725
2726         * libgomp.texi: Better distinguish OpenACC and OpenMP "Runtime
2727         Library Routines", and "Environment Variables".
2728
2729 2019-01-11  Tom de Vries  <tdevries@suse.de>
2730
2731         * plugin/plugin-nvptx.c (nvptx_exec): Prevent vector_length 64 and
2732         num_workers 16.
2733
2734 2019-01-11  Tom de Vries  <tdevries@suse.de>
2735
2736         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Remove
2737         -foffload=-w.
2738         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Same.
2739         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Same.
2740         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Same.
2741         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Same.
2742
2743 2019-01-11  Tom de Vries  <tdevries@suse.de>
2744
2745         * testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c: New
2746         test.
2747
2748 2019-01-10  Nathan Sidwell  <nathan@acm.org>
2749             Julian Brown  <julian@codesourcery.com>
2750
2751         PR lto/71959
2752         * testsuite/libgomp.oacc-c++/pr71959-aux.cc: New.
2753         * testsuite/libgomp.oacc-c++/pr71959.C: New.
2754
2755 2019-01-09  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2756
2757         * config/rtems/bar.c: Include "../linux/bar.c" and delete copy
2758         and paste code.
2759
2760 2019-01-09  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2761
2762         * config/rtems/affinity-fmt.c: New file.  Include affinity-fmt.c,
2763         undefining HAVE_GETPID and HAVE_GETHOSTNAME, and mapping fwrite to
2764         write.
2765
2766 2019-01-09  Tom de Vries  <tdevries@suse.de>
2767
2768         PR target/88756
2769         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (ng, nw, vl): Use
2770         #define instead of "const int".
2771         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c (ng, nw, vl): Same.
2772         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c (ng, nw, vl): Same.
2773         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c (ng, nw, vl): Same.
2774         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c (ng, nw, vl): Same.
2775
2776 2019-01-09  Tom de Vries  <tdevries@suse.de>
2777
2778         * plugin/plugin-nvptx.c (nvptx_exec): Make sure to launch with at least
2779         one worker.
2780
2781 2019-01-07  Tom de Vries  <tdevries@suse.de>
2782
2783         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c: Fix
2784         GOMP_OPENACC_DIM argument.
2785
2786 2019-01-03  Tom de Vries  <tdevries@suse.de>
2787
2788         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: New test.
2789         * testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c: New test.
2790
2791 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
2792
2793         Update copyright years.
2794
2795 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
2796
2797         * libgomp.texi: Bump @copying's copyright year.
2798
2799 2018-12-28  Thomas Schwinge  <thomas@codesourcery.com>
2800
2801         * oacc-parallel.c (GOACC_parallel_keyed, GOACC_parallel)
2802         (GOACC_data_start, GOACC_enter_exit_data, GOACC_update)
2803         (GOACC_declare): Redefine the "device" argument to "flags".
2804
2805 2018-12-28  Thomas Schwinge  <thomas@codesourcery.com>
2806             Cesar Philippidis  <cesar@codesourcery.com>
2807
2808         * target.c (struct gomp_coalesce_chunk): New structure.
2809         (struct gomp_coalesce_buf): Update the chunks member to use that
2810         type.  Adjust all users.
2811
2812 2018-12-19  Tom de Vries  <tdevries@suse.de>
2813
2814         * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: New test.
2815         * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: New test.
2816         * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: New test.
2817
2818 2018-12-19  Tom de Vries  <tdevries@suse.de>
2819
2820         * testsuite/lib/libgomp.exp: Add load_lib of scanoffloadrtl.exp.
2821         * testsuite/libgomp.oacc-c-c++-common/nvptx-merged-loop.c: Move from
2822         gcc/testsuite/gcc.dg/goacc.
2823         * testsuite/libgomp.oacc-c-c++-common/nvptx-sese-1.c: Same.
2824
2825 2018-12-14  Thomas Schwinge  <thomas@codesourcery.com>
2826             Chung-Lin Tang  <cltang@codesourcery.com>
2827
2828         * oacc-mem.c (acc_present_or_create): Remove definition and change
2829         to alias of acc_create.
2830         (acc_present_or_copyin): Remove definition and change to alias of
2831         acc_copyin.
2832         * oacc-parallel.c (GOACC_enter_exit_data): Call acc_create instead
2833         of acc_present_or_create.
2834         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Remove.
2835         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
2836         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
2837         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
2838         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
2839         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
2840         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
2841         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
2842         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
2843         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
2844         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
2845         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
2846         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
2847         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
2848         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
2849         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
2850
2851 2018-12-14  Thomas Schwinge  <thomas@codesourcery.com>
2852
2853         PR libgomp/88495
2854         * plugin/plugin-nvptx.c (nvptx_wait_async): Don't refuse
2855         "identical parameters".
2856         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: Update.
2857         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Remove.
2858
2859         PR libgomp/88484
2860         * oacc-parallel.c (GOACC_wait): Correct handling for "async >= 0".
2861         * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: New file.
2862
2863         PR libgomp/88407
2864         * plugin/plugin-nvptx.c (nvptx_async_test, nvptx_wait)
2865         (nvptx_wait_async): Unseen async-argument is a no-op.
2866         * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Update.
2867         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Likewise.
2868         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
2869         * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
2870         * testsuite/libgomp.oacc-fortran/lib-12.f90: Likewise.
2871         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Merge into...
2872         * testsuite/libgomp.oacc-c-c++-common/lib-69.c: ... this.  Update.
2873         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Merge into...
2874         * testsuite/libgomp.oacc-c-c++-common/lib-74.c: ... this.  Update
2875
2876         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Revise.
2877         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
2878
2879 2018-12-14  Chung-Lin Tang  <cltang@codesourcery.com>
2880
2881         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Adjust.
2882         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
2883         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
2884
2885 2018-12-14  Thomas Schwinge  <thomas@codesourcery.com>
2886
2887         PR libgomp/88370
2888         * libgomp.texi (acc_get_current_cuda_context, acc_get_cuda_stream)
2889         (acc_set_cuda_stream): Clarify.
2890         * oacc-cuda.c (acc_get_cuda_stream, acc_set_cuda_stream): Use
2891         "async_valid_p".
2892         * plugin/plugin-nvptx.c (nvptx_set_cuda_stream): Refuse "async ==
2893         acc_async_sync".
2894         * testsuite/libgomp.oacc-c-c++-common/acc_set_cuda_stream-1.c: New file.
2895         * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Likewise.
2896         * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Update.
2897         * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
2898
2899 2018-12-14  Tom de Vries  <tdevries@suse.de>
2900
2901         * testsuite/libgomp.c-c++-common/function-not-offloaded-aux.c: New test.
2902         * testsuite/libgomp.c-c++-common/function-not-offloaded.c: New test.
2903         * testsuite/libgomp.c-c++-common/variable-not-offloaded.c: New test.
2904         * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: New test.
2905         * testsuite/libgomp.oacc-c-c++-common/variable-not-offloaded.c: New test.
2906
2907 2018-12-13  Tom de Vries  <tdevries@suse.de>
2908
2909         * affinity-fmt.c (gomp_print_string): New function, factored out of ...
2910         (omp_display_affinity, gomp_display_affinity_thread): ... here, and ...
2911         * fortran.c (omp_display_affinity_): ... here.
2912         * libgomp.h (gomp_print_string): Declare.
2913         * config/nvptx/affinity-fmt.c: New file.  Include affinity-fmt.c,
2914         undefining HAVE_GETPID and HAVE_GETHOSTNAME, and mapping fwrite to
2915         write.
2916
2917 2018-12-13  Jakub Jelinek  <jakub@redhat.com>
2918
2919         PR libgomp/88460
2920         * testsuite/libgomp.c++/for-24.C (results): Include it in
2921         omp declare target region.
2922         (main): Use map (always, tofrom: results) instead of
2923         map (tofrom: results).
2924
2925 2018-12-12  Jakub Jelinek  <jakub@redhat.com>
2926
2927         PR fortran/88463
2928         * testsuite/libgomp.fortran/pr88463-1.f90: New test.
2929         * testsuite/libgomp.fortran/pr88463-2.f90: New test.
2930
2931         * testsuite/libgomp.c-c++-common/for-16.c: New test.
2932
2933 2018-12-12  Andreas Schwab  <schwab@suse.de>
2934
2935         * config/linux/ia64/futex.h (sys_futex0): Don't mark r12 as
2936         clobbered.
2937
2938 2018-12-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
2939
2940         PR fortran/88411
2941         * testsuite/libgomp.fortran/async_io_8.f90: New test.
2942
2943 2018-12-09  Thomas Schwinge  <thomas@codesourcery.com>
2944             Jakub Jelinek  <jakub@redhat.com>
2945
2946         * target.c (gomp_map_vars): Call gomp_copy_host2dev instead of
2947         devicep->host2dev_func.
2948
2949 2018-12-08  Jakub Jelinek  <jakub@redhat.com>
2950
2951         PR libgomp/87995
2952         * testsuite/libgomp.c-c++-common/cancel-taskgroup-3.c: Require
2953         tls_runtime effective target.
2954         (t): New threadprivate variable.
2955         (main): Set t in threads which execute iterations of the worksharing
2956         loop.  Propagate that to the task after the loop and don't abort
2957         if the current taskgroup hasn't been cancelled.
2958
2959 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
2960
2961         * testsuite/libgomp.c/task-reduction-3.c: New test.
2962
2963         * testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c: New test.
2964
2965 2018-11-30  Cesar Philippidis  <cesar@codesourcery.com>
2966
2967         PR libgomp/88288
2968         * oacc-parallel.c (GOACC_parallel_keyed): Add offset to devaddrs.
2969         * testsuite/libgomp.oacc-c-c++-common/pr88288.c: New test.
2970
2971 2018-11-30  Thomas Schwinge  <thomas@codesourcery.com>
2972
2973         * testsuite/libgomp.oacc-fortran/lib-16-2.f90: New file.
2974
2975 2018-10-19  Richard Biener  <rguenther@suse.de>
2976
2977         PR tree-optimization/88182
2978         * testsuite/libgomp.c++/pr88182.C: Move to g++.dg/gomp.
2979
2980 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
2981
2982         * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Drop dejagnu.
2983         (RUNTEST): Don't define.
2984         (RUNTESTDEFAULTFLAGS): Add.
2985         (check-DEJAGNU, site.exp, distclean-DEJAGNU): New goals.
2986         (distclean-am): Depend on distclean-DEJAGNU.
2987         (check-am): If -j% option is present in MFLAGS and if
2988         `getconf _NPROCESSORS_ONLN` is more than 8, export OMP_NUM_THREADS=8.
2989         (.PHONY): Add check-DEJAGNU and distclean-DEJAGNU.
2990         * testsuite/Makefile.in: Regenerated.
2991
2992 2018-11-26  Richard Biener  <rguenther@suse.de>
2993
2994         PR tree-optimization/88182
2995         * testsuite/libgomp.c++/pr88182.C: New testcase.
2996
2997 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
2998
2999         PR bootstrap/88106
3000         * config/mingw32/affinity-fmt.c: New file.
3001
3002 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
3003
3004         * affinity-fmt.c: Include inttypes.h if HAVE_INTTYPES_H.
3005         (gomp_display_affinity): Use __builtin_choose_expr to handle
3006         properly handle argument having integral, or pointer or some other
3007         type.  If inttypes.h is available and PRIx64 is defined, use PRIx64
3008         with uint64_t type instead of %llx and unsigned long long.
3009
3010         * testsuite/libgomp.c-c++-common/task-reduction-13.c: New test.
3011         * testsuite/libgomp.c-c++-common/task-reduction-14.c: New test.
3012
3013 2018-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3014
3015         * affinity.c: Include <string.h>, <stdio.h>.
3016         (gomp_display_affinity_place): Remove cpusetp.
3017         * teams.c: Include <limits.h>.
3018
3019 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
3020
3021         * testsuite/libgomp.c-c++-common/task-reduction-8.c (bar): Add
3022         in_reduction clause for s[0].
3023
3024         * affinity.c (gomp_display_affinity_place): New function.
3025         * affinity-fmt.c: New file.
3026         * alloc.c (gomp_aligned_alloc, gomp_aligned_free): New functions.
3027         * config/linux/affinity.c (gomp_display_affinity_place): New function.
3028         * config/nvptx/icv-device.c (omp_get_num_teams, omp_get_team_num):
3029         Move these functions to ...
3030         * config/nvptx/teams.c: ... here.  New file.
3031         * config/nvptx/target.c (omp_pause_resource, omp_pause_resource_all):
3032         New functions.
3033         * config/nvptx/team.c (gomp_team_start, gomp_pause_host): New
3034         functions.
3035         * configure.ac: Check for aligned_alloc, posix_memalign, memalign
3036         and _aligned_malloc.
3037         (HAVE_UNAME, HAVE_GETHOSTNAME, HAVE_GETPID): Add new tests.
3038         * configure.tgt: Add -DUSING_INITIAL_EXEC_TLS to XCFLAGS for Linux.
3039         * env.c (gomp_display_affinity_var, gomp_affinity_format_var,
3040         gomp_affinity_format_len): New variables.
3041         (parse_schedule): Parse monotonic and nonmonotonic modifiers in
3042         OMP_SCHEDULE variable.  Set GFS_MONOTONIC for monotonic schedules.
3043         (handle_omp_display_env): Display monotonic/nonmonotonic schedule
3044         modifiers.  Display (non-default) chunk sizes.  Print
3045         OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT.
3046         (initialize_env): Don't call pthread_attr_setdetachstate.  Handle
3047         OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT env vars.
3048         * fortran.c: Include stdio.h and string.h.
3049         (omp_pause_resource, omp_pause_resource_all): Add ialias_redirect.
3050         (omp_get_schedule_, omp_get_schedule_8_): Mask off GFS_MONOTONIC bit.
3051         (omp_set_affinity_format_, omp_get_affinity_format_,
3052         omp_display_affinity_, omp_capture_affinity_, omp_pause_resource_,
3053         omp_pause_resource_all_): New functions.
3054         * icv.c (omp_set_schedule): Mask off omp_sched_monotonic bit in
3055         switch.
3056         * icv-device.c (omp_get_num_teams, omp_get_team_num): Move these
3057         functions to ...
3058         * teams.c: ... here.  New file.
3059         * libgomp_g.h: Include gstdint.h.
3060         (GOMP_loop_nonmonotonic_runtime_start,
3061         GOMP_loop_maybe_nonmonotonic_runtime_start, GOMP_loop_start,
3062         GOMP_loop_ordered_start, GOMP_loop_nonmonotonic_runtime_next,
3063         GOMP_loop_maybe_nonmonotonic_runtime_next, GOMP_loop_doacross_start,
3064         GOMP_parallel_loop_nonmonotonic_runtime,
3065         GOMP_parallel_loop_maybe_nonmonotonic_runtime,
3066         GOMP_loop_ull_nonmonotonic_runtime_start,
3067         GOMP_loop_ull_maybe_nonmonotonic_runtime_start, GOMP_loop_ull_start,
3068         GOMP_loop_ull_ordered_start, GOMP_loop_ull_nonmonotonic_runtime_next,
3069         GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
3070         GOMP_loop_ull_doacross_start, GOMP_parallel_reductions,
3071         GOMP_taskwait_depend, GOMP_taskgroup_reduction_register,
3072         GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
3073         GOMP_workshare_task_reduction_unregister, GOMP_sections2_start,
3074         GOMP_teams_reg): Declare.
3075         * libgomp.h (GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC): Define unless
3076         gomp_aligned_alloc uses fallback implementation.
3077         (gomp_aligned_alloc, gomp_aligned_free): Declare.
3078         (enum gomp_schedule_type): Add GFS_MONOTONIC.
3079         (struct gomp_doacross_work_share): Add extra field.
3080         (struct gomp_work_share): Add task_reductions field.
3081         (struct gomp_taskgroup): Add workshare and reductions fields.
3082         (GOMP_NEEDS_THREAD_HANDLE): Define if needed.
3083         (gomp_thread_handle): New typedef.
3084         (gomp_display_affinity_place, gomp_set_affinity_format,
3085         gomp_display_string, gomp_display_affinity,
3086         gomp_display_affinity_thread): Declare.
3087         (gomp_doacross_init, gomp_doacross_ull_init): Add size_t argument.
3088         (gomp_parallel_reduction_register, gomp_workshare_taskgroup_start,
3089         gomp_workshare_task_reduction_register): Declare.
3090         (gomp_team_start): Add taskgroup argument.
3091         (gomp_pause_host): Declare.
3092         (gomp_init_work_share, gomp_work_share_start): Change bool argument
3093         to size_t.
3094         (gomp_thread_self, gomp_thread_to_pthread_t): New inline functions.
3095         * libgomp.map (GOMP_5.0): Export GOMP_loop_start,
3096         GOMP_loop_ordered_start, GOMP_loop_doacross_start,
3097         GOMP_loop_ull_start, GOMP_loop_ull_ordered_start,
3098         GOMP_loop_ull_doacross_start,
3099         GOMP_workshare_task_reduction_unregister, GOMP_sections2_start,
3100         GOMP_loop_maybe_nonmonotonic_runtime_next,
3101         GOMP_loop_maybe_nonmonotonic_runtime_start,
3102         GOMP_loop_nonmonotonic_runtime_next,
3103         GOMP_loop_nonmonotonic_runtime_start,
3104         GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
3105         GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
3106         GOMP_loop_ull_nonmonotonic_runtime_next,
3107         GOMP_loop_ull_nonmonotonic_runtime_start,
3108         GOMP_parallel_loop_maybe_nonmonotonic_runtime,
3109         GOMP_parallel_loop_nonmonotonic_runtime, GOMP_parallel_reductions,
3110         GOMP_taskgroup_reduction_register,
3111         GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
3112         GOMP_teams_reg and GOMP_taskwait_depend.
3113         (OMP_5.0): Export omp_pause_resource{,_all}{,_},
3114         omp_{capture,display}_affinity{,_}, and
3115         omp_[gs]et_affinity_format{,_}.
3116         * loop.c: Include string.h.
3117         (GOMP_loop_runtime_next): Add ialias.
3118         (GOMP_taskgroup_reduction_register): Add ialias_redirect.
3119         (gomp_loop_static_start, gomp_loop_dynamic_start,
3120         gomp_loop_guided_start, gomp_loop_ordered_static_start,
3121         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
3122         gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start,
3123         gomp_loop_doacross_guided_start): Adjust gomp_work_share_start
3124         or gomp_doacross_init callers.
3125         (gomp_adjust_sched, GOMP_loop_start, GOMP_loop_ordered_start,
3126         GOMP_loop_doacross_start): New functions.
3127         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
3128         GOMP_loop_doacross_runtime_start, GOMP_parallel_loop_runtime_start):
3129         Mask off GFS_MONOTONIC bit.
3130         (GOMP_loop_maybe_nonmonotonic_runtime_next,
3131         GOMP_loop_maybe_nonmonotonic_runtime_start,
3132         GOMP_loop_nonmonotonic_runtime_next,
3133         GOMP_loop_nonmonotonic_runtime_start,
3134         GOMP_parallel_loop_maybe_nonmonotonic_runtime,
3135         GOMP_parallel_loop_nonmonotonic_runtime): New aliases or wrapper
3136         functions.
3137         (gomp_parallel_loop_start): Pass NULL as taskgroup to
3138         gomp_team_start.
3139         * loop_ull.c: Include string.h.
3140         (GOMP_loop_ull_runtime_next): Add ialias.
3141         (GOMP_taskgroup_reduction_register): Add ialias_redirect.
3142         (gomp_loop_ull_static_start, gomp_loop_ull_dynamic_start,
3143         gomp_loop_ull_guided_start, gomp_loop_ull_ordered_static_start,
3144         gomp_loop_ull_ordered_dynamic_start,
3145         gomp_loop_ull_ordered_guided_start,
3146         gomp_loop_ull_doacross_static_start,
3147         gomp_loop_ull_doacross_dynamic_start,
3148         gomp_loop_ull_doacross_guided_start): Adjust gomp_work_share_start
3149         and gomp_doacross_ull_init callers.
3150         (gomp_adjust_sched, GOMP_loop_ull_start, GOMP_loop_ull_ordered_start,
3151         GOMP_loop_ull_doacross_start): New functions.
3152         (GOMP_loop_ull_runtime_start,
3153         GOMP_loop_ull_ordered_runtime_start,
3154         GOMP_loop_ull_doacross_runtime_start): Mask off GFS_MONOTONIC bit.
3155         (GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
3156         GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
3157         GOMP_loop_ull_nonmonotonic_runtime_next,
3158         GOMP_loop_ull_nonmonotonic_runtime_start): Likewise.
3159         * Makefile.am (libgomp_la_SOURCES): Add teams.c and affinity-fmt.c.
3160         * omp.h.in (enum omp_sched_t): Add omp_sched_monotonic.
3161         (omp_pause_resource_t, omp_depend_t): New typedefs.
3162         (enum omp_lock_hint_t): Renamed to ...
3163         (enum omp_sync_hint_t): ... this.  Define omp_sync_hint_*
3164         enumerators using numbers and omp_lock_hint_* as their aliases.
3165         (omp_lock_hint_t): New typedef.  Rename to ...
3166         (omp_sync_hint_t): ... this.
3167         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint): Use
3168         omp_sync_hint_t instead of omp_lock_hint_t.
3169         (omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
3170         omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
3171         Declare.
3172         (omp_target_is_present, omp_target_disassociate_ptr):
3173         Change first argument from void * to const void *.
3174         (omp_target_memcpy, omp_target_memcpy_rect): Change second argument
3175         from void * to const void *.
3176         (omp_target_associate_ptr): Change first and second arguments from
3177         void * to const void *.
3178         * omp_lib.f90.in (omp_pause_resource_kind, omp_pause_soft,
3179         omp_pause_hard): New parameters.
3180         (omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
3181         omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
3182         New interfaces.
3183         * omp_lib.h.in (omp_pause_resource_kind, omp_pause_soft,
3184         omp_pause_hard): New parameters.
3185         (omp_pause_resource, omp_pause_resource_all, omp_set_affinity_format,
3186         omp_get_affinity_format, omp_display_affinity, omp_capture_affinity):
3187         New externals.
3188         * ordered.c (gomp_doacross_init, gomp_doacross_ull_init): Add
3189         EXTRA argument.  If not needed to prepare array, if extra is 0,
3190         clear ws->doacross, otherwise allocate just doacross structure and
3191         extra payload.  If array is needed, allocate also extra payload.
3192         (GOMP_doacross_post, GOMP_doacross_wait, GOMP_doacross_ull_post,
3193         GOMP_doacross_ull_wait): Handle doacross->array == NULL like
3194         doacross == NULL.
3195         * parallel.c (GOMP_parallel_start): Pass NULL as taskgroup to
3196         gomp_team_start.
3197         (GOMP_parallel): Likewise.  Formatting fix.
3198         (GOMP_parallel_reductions): New function.
3199         (GOMP_cancellation_point): If taskgroup has workshare
3200         flag set, check cancelled of prev taskgroup if any.
3201         (GOMP_cancel): If taskgroup has workshare flag set, set cancelled
3202         on prev taskgroup if any.
3203         * sections.c: Include string.h.
3204         (GOMP_taskgroup_reduction_register): Add ialias_redirect.
3205         (GOMP_sections_start): Adjust gomp_work_share_start caller.
3206         (GOMP_sections2_start): New function.
3207         (GOMP_parallel_sections_start, GOMP_parallel_sections):
3208         Pass NULL as taskgroup to gomp_team_start.
3209         * single.c (GOMP_single_start, GOMP_single_copy_start): Adjust
3210         gomp_work_share_start callers.
3211         * target.c (GOMP_target_update_ext, GOMP_target_enter_exit_data):
3212         If taskgroup has workshare flag set, check cancelled on prev
3213         taskgroup if any.  Guard all cancellation tests with
3214         gomp_cancel_var test.
3215         (omp_target_is_present, omp_target_disassociate_ptr):
3216         Change ptr argument from void * to const void *.
3217         (omp_target_memcpy): Change src argument from void * to const void *.
3218         (omp_target_memcpy_rect): Likewise.
3219         (omp_target_memcpy_rect_worker): Likewise.  Use const char * casts
3220         instead of char * where needed.
3221         (omp_target_associate_ptr): Change host_ptr and device_ptr arguments
3222         from void * to const void *.
3223         (omp_pause_resource, omp_pause_resource_all): New functions.
3224         * task.c (gomp_task_handle_depend): Handle new depend array format
3225         in addition to the old.  Handle mutexinoutset kinds the same as
3226         inout for now, handle unspecified kinds.
3227         (gomp_create_target_task): If taskgroup has workshare flag set, check
3228         cancelled on prev taskgroup if any.  Guard all cancellation tests with
3229         gomp_cancel_var test.  Handle new depend array format count in
3230         addition to the old.
3231         (GOMP_task): Likewise.  Adjust function comment.
3232         (gomp_task_run_pre): If taskgroup has workshare flag set, check
3233         cancelled on prev taskgroup if any.  Guard all cancellation tests with
3234         gomp_cancel_var test.
3235         (GOMP_taskwait_depend): New function.
3236         (gomp_task_maybe_wait_for_dependencies): Handle new depend array
3237         format in addition to the old.  Handle mutexinoutset kinds the same as
3238         inout for now, handle unspecified kinds.  Fix a function comment typo.
3239         (gomp_taskgroup_init): New function.
3240         (GOMP_taskgroup_start): Use it.
3241         (gomp_reduction_register, gomp_create_artificial_team,
3242         GOMP_taskgroup_reduction_register,
3243         GOMP_taskgroup_reduction_unregister, GOMP_task_reduction_remap,
3244         gomp_parallel_reduction_register,
3245         gomp_workshare_task_reduction_register,
3246         gomp_workshare_taskgroup_start,
3247         GOMP_workshare_task_reduction_unregister): New functions.
3248         * taskloop.c (GOMP_taskloop): If taskgroup has workshare flag set,
3249         check cancelled on prev taskgroup if any.  Guard all cancellation
3250         tests with gomp_cancel_var test.  Handle GOMP_TASK_FLAG_REDUCTION flag
3251         by calling GOMP_taskgroup_reduction_register.
3252         * team.c (gomp_thread_attr): Remove comment.
3253         (struct gomp_thread_start_data): Add handle field.
3254         (gomp_thread_start): Call pthread_detach.
3255         (gomp_new_team): Adjust gomp_init_work_share caller.
3256         (gomp_free_pool_helper): Call pthread_detach.
3257         (gomp_team_start): Add taskgroup argument, initialize implicit
3258         tasks' taskgroup field to that.  Don't call
3259         pthread_attr_setdetachstate.  Handle OMP_DISPLAY_AFFINITY env var.
3260         (gomp_team_end): Determine nesting by thr->ts.level != 0
3261         rather than thr->ts.team != NULL.
3262         (gomp_pause_pool_helper, gomp_pause_host): New functions.
3263         * work.c (alloc_work_share): Use gomp_aligned_alloc instead of
3264         gomp_malloc if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined.
3265         (gomp_init_work_share): Change ORDERED argument from bool to size_t,
3266         if more than 1 allocate also extra payload at the end of array.  Never
3267         keep ordered_team_ids NULL, set it to inline_ordered_team_ids instead.
3268         (gomp_work_share_start): Change ORDERED argument from bool to size_t,
3269         return true instead of ws.
3270         * Makefile.in: Regenerated.
3271         * configure: Regenerated.
3272         * config.h.in: Regenerated.
3273         * testsuite/libgomp.c/cancel-for-2.c (foo): Use cancel modifier
3274         in some cases.
3275         * testsuite/libgomp.c-c++-common/cancel-parallel-1.c: New test.
3276         * testsuite/libgomp.c-c++-common/cancel-taskgroup-3.c: New test.
3277         * testsuite/libgomp.c-c++-common/depend-iterator-1.c: New test.
3278         * testsuite/libgomp.c-c++-common/depend-iterator-2.c: New test.
3279         * testsuite/libgomp.c-c++-common/depend-mutexinout-1.c: New test.
3280         * testsuite/libgomp.c-c++-common/depend-mutexinout-2.c: New test.
3281         * testsuite/libgomp.c-c++-common/depobj-1.c: New test.
3282         * testsuite/libgomp.c-c++-common/display-affinity-1.c: New test.
3283         * testsuite/libgomp.c-c++-common/for-10.c: New test.
3284         * testsuite/libgomp.c-c++-common/for-11.c: New test.
3285         * testsuite/libgomp.c-c++-common/for-12.c: New test.
3286         * testsuite/libgomp.c-c++-common/for-13.c: New test.
3287         * testsuite/libgomp.c-c++-common/for-14.c: New test.
3288         * testsuite/libgomp.c-c++-common/for-15.c: New test.
3289         * testsuite/libgomp.c-c++-common/for-2.h: If CONDNE macro is defined,
3290         define a different N(test), don't define N(f0) to N(f14), but instead
3291         define N(f20) to N(f34) using != comparisons.
3292         * testsuite/libgomp.c-c++-common/for-7.c: New test.
3293         * testsuite/libgomp.c-c++-common/for-8.c: New test.
3294         * testsuite/libgomp.c-c++-common/for-9.c: New test.
3295         * testsuite/libgomp.c-c++-common/master-combined-1.c: New test.
3296         * testsuite/libgomp.c-c++-common/pause-1.c: New test.
3297         * testsuite/libgomp.c-c++-common/pause-2.c: New test.
3298         * testsuite/libgomp.c-c++-common/pr66199-10.c: New test.
3299         * testsuite/libgomp.c-c++-common/pr66199-11.c: New test.
3300         * testsuite/libgomp.c-c++-common/pr66199-12.c: New test.
3301         * testsuite/libgomp.c-c++-common/pr66199-13.c: New test.
3302         * testsuite/libgomp.c-c++-common/pr66199-14.c: New test.
3303         * testsuite/libgomp.c-c++-common/simd-1.c: New test.
3304         * testsuite/libgomp.c-c++-common/taskloop-reduction-1.c: New test.
3305         * testsuite/libgomp.c-c++-common/taskloop-reduction-2.c: New test.
3306         * testsuite/libgomp.c-c++-common/taskloop-reduction-3.c: New test.
3307         * testsuite/libgomp.c-c++-common/taskloop-reduction-4.c: New test.
3308         * testsuite/libgomp.c-c++-common/task-reduction-11.c: New test.
3309         * testsuite/libgomp.c-c++-common/task-reduction-12.c: New test.
3310         * testsuite/libgomp.c-c++-common/task-reduction-1.c: New test.
3311         * testsuite/libgomp.c-c++-common/task-reduction-2.c: New test.
3312         * testsuite/libgomp.c-c++-common/task-reduction-3.c: New test.
3313         * testsuite/libgomp.c-c++-common/task-reduction-4.c: New test.
3314         * testsuite/libgomp.c-c++-common/task-reduction-5.c: New test.
3315         * testsuite/libgomp.c-c++-common/task-reduction-6.c: New test.
3316         * testsuite/libgomp.c-c++-common/task-reduction-7.c: New test.
3317         * testsuite/libgomp.c-c++-common/task-reduction-8.c: New test.
3318         * testsuite/libgomp.c-c++-common/task-reduction-9.c: New test.
3319         * testsuite/libgomp.c-c++-common/taskwait-depend-1.c: New test.
3320         * testsuite/libgomp.c++/depend-1.C: New test.
3321         * testsuite/libgomp.c++/depend-iterator-1.C: New test.
3322         * testsuite/libgomp.c++/depobj-1.C: New test.
3323         * testsuite/libgomp.c++/for-16.C: New test.
3324         * testsuite/libgomp.c++/for-21.C: New test.
3325         * testsuite/libgomp.c++/for-22.C: New test.
3326         * testsuite/libgomp.c++/for-23.C: New test.
3327         * testsuite/libgomp.c++/for-24.C: New test.
3328         * testsuite/libgomp.c++/for-25.C: New test.
3329         * testsuite/libgomp.c++/for-26.C: New test.
3330         * testsuite/libgomp.c++/taskloop-reduction-1.C: New test.
3331         * testsuite/libgomp.c++/taskloop-reduction-2.C: New test.
3332         * testsuite/libgomp.c++/taskloop-reduction-3.C: New test.
3333         * testsuite/libgomp.c++/taskloop-reduction-4.C: New test.
3334         * testsuite/libgomp.c++/task-reduction-10.C: New test.
3335         * testsuite/libgomp.c++/task-reduction-11.C: New test.
3336         * testsuite/libgomp.c++/task-reduction-12.C: New test.
3337         * testsuite/libgomp.c++/task-reduction-13.C: New test.
3338         * testsuite/libgomp.c++/task-reduction-14.C: New test.
3339         * testsuite/libgomp.c++/task-reduction-15.C: New test.
3340         * testsuite/libgomp.c++/task-reduction-16.C: New test.
3341         * testsuite/libgomp.c++/task-reduction-17.C: New test.
3342         * testsuite/libgomp.c++/task-reduction-18.C: New test.
3343         * testsuite/libgomp.c++/task-reduction-19.C: New test.
3344         * testsuite/libgomp.c/task-reduction-1.c: New test.
3345         * testsuite/libgomp.c++/task-reduction-1.C: New test.
3346         * testsuite/libgomp.c/task-reduction-2.c: New test.
3347         * testsuite/libgomp.c++/task-reduction-2.C: New test.
3348         * testsuite/libgomp.c++/task-reduction-3.C: New test.
3349         * testsuite/libgomp.c++/task-reduction-4.C: New test.
3350         * testsuite/libgomp.c++/task-reduction-5.C: New test.
3351         * testsuite/libgomp.c++/task-reduction-6.C: New test.
3352         * testsuite/libgomp.c++/task-reduction-7.C: New test.
3353         * testsuite/libgomp.c++/task-reduction-8.C: New test.
3354         * testsuite/libgomp.c++/task-reduction-9.C: New test.
3355         * testsuite/libgomp.c/teams-1.c: New test.
3356         * testsuite/libgomp.c/teams-2.c: New test.
3357         * testsuite/libgomp.c/thread-limit-4.c: New test.
3358         * testsuite/libgomp.c/thread-limit-5.c: New test.
3359         * testsuite/libgomp.fortran/display-affinity-1.f90: New test.
3360
3361 2018-11-06  Chung-Lin Tang <cltang@codesourcery.com>
3362
3363         * oacc-mem.c (memcpy_tofrom_device): New function, combined from
3364         acc_memcpy_to/from_device functions, now with async parameter.
3365         (acc_memcpy_to_device): Modify to use memcpy_tofrom_device.
3366         (acc_memcpy_from_device): Likewise.
3367         (acc_memcpy_to_device_async): New API function.
3368         (acc_memcpy_from_device_async): Likewise.
3369         (present_create_copy): Add async parameter and async setting/unsetting.
3370         (acc_create): Adjust present_create_copy call.
3371         (acc_copyin): Likewise.
3372         (acc_present_or_create): Likewise.
3373         (acc_present_or_copyin): Likewise.
3374         (acc_create_async): New API function.
3375         (acc_copyin_async): New API function.
3376         (delete_copyout): Add async parameter and async setting/unsetting.
3377         (acc_delete): Adjust delete_copyout call.
3378         (acc_copyout): Likewise.
3379         (acc_delete_async): New API function.
3380         (acc_copyout_async): Likewise.
3381         (update_dev_host): Add async parameter and async setting/unsetting.
3382         (acc_update_device): Adjust update_dev_host call.
3383         (acc_update_self): Likewise.
3384         (acc_update_device_async): New API function.
3385         (acc_update_self_async): Likewise.
3386         * openacc.h (acc_copyin_async): Declare new API function.
3387         (acc_create_async): Likewise.
3388         (acc_copyout_async): Likewise.
3389         (acc_delete_async): Likewise.
3390         (acc_update_device_async): Likewise.
3391         (acc_update_self_async): Likewise.
3392         (acc_memcpy_to_device_async): Likewise.
3393         (acc_memcpy_from_device_async): Likewise.
3394         * openacc_lib.h (acc_copyin_async_32_h): New subroutine.
3395         (acc_copyin_async_64_h): New subroutine.
3396         (acc_copyin_async_array_h): New subroutine.
3397         (acc_create_async_32_h): New subroutine.
3398         (acc_create_async_64_h): New subroutine.
3399         (acc_create_async_array_h): New subroutine.
3400         (acc_copyout_async_32_h): New subroutine.
3401         (acc_copyout_async_64_h): New subroutine.
3402         (acc_copyout_async_array_h): New subroutine.
3403         (acc_delete_async_32_h): New subroutine.
3404         (acc_delete_async_64_h): New subroutine.
3405         (acc_delete_async_array_h): New subroutine.
3406         (acc_update_device_async_32_h): New subroutine.
3407         (acc_update_device_async_64_h): New subroutine.
3408         (acc_update_device_async_array_h): New subroutine.
3409         (acc_update_self_async_32_h): New subroutine.
3410         (acc_update_self_async_64_h): New subroutine.
3411         (acc_update_self_async_array_h): New subroutine.
3412         * openacc.f90 (acc_copyin_async_32_h): New subroutine.
3413         (acc_copyin_async_64_h): New subroutine.
3414         (acc_copyin_async_array_h): New subroutine.
3415         (acc_create_async_32_h): New subroutine.
3416         (acc_create_async_64_h): New subroutine.
3417         (acc_create_async_array_h): New subroutine.
3418         (acc_copyout_async_32_h): New subroutine.
3419         (acc_copyout_async_64_h): New subroutine.
3420         (acc_copyout_async_array_h): New subroutine.
3421         (acc_delete_async_32_h): New subroutine.
3422         (acc_delete_async_64_h): New subroutine.
3423         (acc_delete_async_array_h): New subroutine.
3424         (acc_update_device_async_32_h): New subroutine.
3425         (acc_update_device_async_64_h): New subroutine.
3426         (acc_update_device_async_array_h): New subroutine.
3427         (acc_update_self_async_32_h): New subroutine.
3428         (acc_update_self_async_64_h): New subroutine.
3429         (acc_update_self_async_array_h): New subroutine.
3430         * libgomp.map (OACC_2.5): Add acc_copyin_async*, acc_copyout_async*,
3431         acc_copyout_finalize_async*, acc_create_async*, acc_delete_async*,
3432         acc_delete_finalize_async*, acc_memcpy_from_device_async*,
3433         acc_memcpy_to_device_async*, acc_update_device_async*, and
3434         acc_update_self_async* entries.
3435         * testsuite/libgomp.oacc-c-c++-common/lib-94.c: New test.
3436         * testsuite/libgomp.oacc-c-c++-common/lib-95.c: New test.
3437         * testsuite/libgomp.oacc-fortran/lib-16.f90: New test.
3438
3439 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
3440
3441         PR bootstrap/82856
3442         * Makefile.am: Include multilib.am
3443         (AUTOMAKE_OPTIONS): Add info-in-builddir.
3444         (CLEANFILES): Remove libgomp.info.
3445         * configure.ac: Remove AC_PREREQ.
3446         * testsuite/Makefile.am (RUNTEST): Remove quotes.
3447         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
3448         Regenerate.
3449
3450 2018-10-29  Joseph Myers  <joseph@codesourcery.com>
3451             Julian Brown  <julian@codesourcery.com>
3452
3453         * testsuite/libgomp.oacc-c++/this.C: New.
3454
3455 2018-09-18  Cesar Philippidis  <cesar@codesourcery.com>
3456
3457         * plugin/plugin-nvptx.c (struct cuda_map): New.
3458         (struct ptx_stream): Replace d, h, h_begin, h_end, h_next, h_prev,
3459         h_tail with (cuda_map *) map.
3460         (cuda_map_create): New function.
3461         (cuda_map_destroy): New function.
3462         (map_init): Update to use a linked list of cuda_map objects.
3463         (map_fini): Likewise.
3464         (map_pop): Likewise.
3465         (map_push): Likewise.  Return CUdeviceptr instead of void.
3466         (init_streams_for_device): Remove stales references to ptx_stream
3467         members.
3468         (select_stream_for_async): Likewise.
3469         (nvptx_exec): Update call to map_init.
3470
3471 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
3472             Julian Brown  <julian@codesourcery.com>
3473
3474         PR middle-end/86336
3475         * testsuite/libgomp.oacc-c++/non-scalar-data.C: Remove XFAIL.
3476
3477 2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
3478         Thomas Koenig <tkoenig@gcc.gnu.org>
3479
3480         PR fortran/25829
3481         * testsuite/libgomp.fortran/async_io_1.f90: New test.
3482         * testsuite/libgomp.fortran/async_io_2.f90: New test.
3483         * testsuite/libgomp.fortran/async_io_3.f90: New test.
3484         * testsuite/libgomp.fortran/async_io_4.f90: New test.
3485         * testsuite/libgomp.fortran/async_io_5.f90: New test.
3486         * testsuite/libgomp.fortran/async_io_6.f90: New test.
3487         * testsuite/libgomp.fortran/async_io_7.f90: New test.
3488
3489 2018-08-13  Cesar Philippidis  <cesar@codesourcery.com>
3490             Tom de Vries  <tdevries@suse.de>
3491
3492         PR target/85590
3493         * plugin/cuda/cuda.h (CUoccupancyB2DSize): New typedef.
3494         (cuOccupancyMaxPotentialBlockSize): Declare.
3495         * plugin/cuda-lib.def (cuOccupancyMaxPotentialBlockSize): New
3496         CUDA_ONE_CALL_MAYBE_NULL.
3497         * plugin/plugin-nvptx.c (CUDA_VERSION < 6050): Define
3498         CUoccupancyB2DSize and declare
3499         cuOccupancyMaxPotentialBlockSize.
3500         (nvptx_exec): Use cuOccupancyMaxPotentialBlockSize to set the
3501         default num_gangs and num_workers when the driver supports it.
3502
3503 2018-08-08  Tom de Vries  <tdevries@suse.de>
3504
3505         * plugin/cuda-lib.def (cuLinkAddData_v2, cuLinkCreate_v2): Declare using
3506         CUDA_ONE_CALL_MAYBE_NULL.
3507         * plugin/plugin-nvptx.c (cuLinkAddData, cuLinkCreate): Undef and declare.
3508         (cuLinkAddData_v2, cuLinkCreate_v2): Declare.
3509         (link_ptx): Fall back to cuLinkAddData/cuLinkCreate if the _v2 versions
3510         are not found.
3511
3512 2018-08-08  Tom de Vries  <tdevries@suse.de>
3513
3514         * plugin/cuda-lib.def (cuGetErrorString): Use CUDA_ONE_CALL_MAYBE_NULL.
3515         * plugin/plugin-nvptx.c (cuda_error): Handle if cuGetErrorString is not
3516         present.
3517
3518 2018-08-08  Tom de Vries  <tdevries@suse.de>
3519
3520         * plugin/plugin-nvptx.c
3521         (CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR): Define.
3522         (nvptx_open_device): Use
3523         CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR.
3524
3525 2018-08-08  Tom de Vries  <tdevries@suse.de>
3526
3527         * plugin/plugin-nvptx.c (cuda_error): Move declaration of cuGetErrorString ...
3528         (cuGetErrorString): ... here.  Guard with CUDA_VERSION < 6000.
3529
3530 2018-08-07  Tom de Vries  <tdevries@suse.de>
3531
3532         * plugin/plugin-nvptx.c (DO_PRAGMA): Define.
3533         (struct cuda_lib_s): Add def/undef of CUDA_ONE_CALL_MAYBE_NULL.
3534         (init_cuda_lib): Add new param to CUDA_ONE_CALL_1.  Add arg to
3535         corresponding call in CUDA_ONE_CALL.  Add def/undef of
3536         CUDA_ONE_CALL_MAYBE_NULL.
3537         (CUDA_CALL_EXISTS): Define.
3538
3539 2018-08-07  Tom de Vries  <tdevries@suse.de>
3540
3541         * plugin/plugin-nvptx.c (struct cuda_lib_s, init_cuda_lib): Put
3542         CUDA_ONE_CALL defines right before the cuda-lib.def include, and the
3543         corresponding undefs right after.
3544
3545 2018-08-04  Tom de Vries  <tdevries@suse.de>
3546
3547         * plugin/configfrag.ac: For --without-cuda-driver, set
3548         CUDA_DRIVER_INCLUDE and CUDA_DRIVER_LIB to no.  Handle
3549         CUDA_DRIVER_INCLUDE == no and CUDA_DRIVER_LIB == no.
3550         * configure: Regenerate.
3551
3552 2018-08-02  Tom de Vries  <tdevries@suse.de>
3553
3554         PR target/86660
3555         * testsuite/libgomp.oacc-c++/routine-1-auto.C: Remove -fno-exceptions.
3556         * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Same.
3557         * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
3558         Same.
3559         * testsuite/libgomp.oacc-c++/routine-1-template.C: Same.
3560         * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: Same.
3561         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Same.
3562
3563 2018-08-01  Cesar Philippidis  <cesar@codesourcery.com>
3564             Thomas Schwinge <thomas@codesourcery.com>
3565
3566         * config/nvptx/oacc-parallel.c: Truncate.
3567
3568 2018-08-01  Cesar Philippidis  <cesar@codesourcery.com>
3569             James Norris <jnorris@codesourcery.com>
3570
3571         * plugin/plugin-nvptx.c (struct map): Removed.
3572         (map_init, map_pop): Remove use of struct map.
3573         (map_push): Likewise and change argument list.
3574         * testsuite/libgomp.oacc-c-c++-common/mapping-1.c: New
3575
3576 2018-08-01  Tom de Vries  <tdevries@suse.de>
3577
3578         * plugin/cuda-lib.def: New file.  Factor out of ...
3579         * plugin/plugin-nvptx.c (CUDA_CALLS): ... here.
3580         (struct cuda_lib_s, init_cuda_lib): Include cuda-lib.def instead of
3581         using CUDA_CALLS.
3582
3583 2018-07-31  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3584
3585         Revert 'AsyncI/O patch committed'.
3586         2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
3587                 Thomas Koenig <tkoenig@gcc.gnu.org>
3588
3589         PR fortran/25829
3590         * testsuite/libgomp.fortran/async_io_1.f90: New test.
3591         * testsuite/libgomp.fortran/async_io_2.f90: New test.
3592         * testsuite/libgomp.fortran/async_io_3.f90: New test.
3593         * testsuite/libgomp.fortran/async_io_4.f90: New test.
3594         * testsuite/libgomp.fortran/async_io_5.f90: New test.
3595         * testsuite/libgomp.fortran/async_io_6.f90: New test.
3596         * testsuite/libgomp.fortran/async_io_7.f90: New test.
3597
3598 2018-07-30  Tom de Vries  <tdevries@suse.de>
3599
3600         * plugin/plugin-nvptx.c (MIN, MAX): Redefine.
3601         (nvptx_exec): Ensure worker and vector default dims don't exceed
3602         targ_fn->max_threads_per_block.
3603
3604 2018-07-30  Tom de Vries  <tdevries@suse.de>
3605
3606         * plugin/plugin-nvptx.c (struct ptx_device): Add default_dims field.
3607         (nvptx_open_device): Init default_dims for device.
3608         (nvptx_exec): Use default_dims from device.
3609
3610 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
3611
3612         PR testsuite/86660
3613         * testsuite/libgomp.c++/for-15.C (results): Include it in
3614         omp declare target region.
3615         (main): Use map (always, tofrom: results) instead of
3616         map (tofrom: results).
3617
3618         PR middle-end/86660
3619         * testsuite/libgomp.c/pr86660.c: New test.
3620
3621 2018-07-26  Cesar Philippidis  <cesar@codesourcery.com>
3622             Tom de Vries  <tdevries@suse.de>
3623
3624         * plugin/plugin-nvptx.c (nvptx_exec): Error if the hardware doesn't have
3625         sufficient resources to launch a kernel, and give a hint on how to fix
3626         it.
3627
3628 2018-07-26  Cesar Philippidis  <cesar@codesourcery.com>
3629             Tom de Vries  <tdevries@suse.de>
3630
3631         * plugin/plugin-nvptx.c (struct ptx_device): Add warp_size,
3632         max_threads_per_block and max_threads_per_multiprocessor fields.
3633         (nvptx_open_device): Initialize new fields.
3634         (nvptx_exec): Use num_sms, and new fields.
3635
3636 2018-07-26  Tom de Vries  <tdevries@suse.de>
3637
3638         * testsuite/libgomp.oacc-fortran/lib-12.f90: Move acc_async_test calls
3639         to correct locations.  Remove xfail.
3640
3641 2018-07-26  Tom de Vries  <tdevries@suse.de>
3642
3643         * testsuite/libgomp.oacc-fortran/lib-13.f90: Replace acc_wait_all with
3644         acc_wait.  Move acc_async_test calls to correct locations.  Remove
3645         xfail.
3646
3647 2018-07-25  Nicolas Koenig  <koenigni@gcc.gnu.org>
3648         Thomas Koenig <tkoenig@gcc.gnu.org>
3649
3650         PR fortran/25829
3651         * testsuite/libgomp.fortran/async_io_1.f90: New test.
3652         * testsuite/libgomp.fortran/async_io_2.f90: New test.
3653         * testsuite/libgomp.fortran/async_io_3.f90: New test.
3654         * testsuite/libgomp.fortran/async_io_4.f90: New test.
3655         * testsuite/libgomp.fortran/async_io_5.f90: New test.
3656         * testsuite/libgomp.fortran/async_io_6.f90: New test.
3657         * testsuite/libgomp.fortran/async_io_7.f90: New test.
3658
3659 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3660
3661         PR middle-end/86542
3662         * testsuite/libgomp.c++/pr86542.C: New test.
3663
3664         PR middle-end/86539
3665         * testsuite/libgomp.c++/pr86539.C: New test.
3666
3667 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3668
3669         PR c++/86443
3670         * testsuite/libgomp.c++/for-15.C (a): Remove unused variable.
3671         (results): Make sure the variable is not inside declare target region.
3672         (qux): Remove unused function.
3673
3674 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3675
3676         PR c++/86443
3677         * testsuite/libgomp.c++/for-15.C: New test.
3678
3679 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
3680
3681         PR c++/86291
3682         * testsuite/libgomp.c++/pr86291.C: New test.
3683
3684 2018-06-24  Gerald Pfeifer  <gerald@pfeifer.com>
3685
3686         * libgomp.texi (Top): Move www.openmp.org to https.
3687         (Enabling OpenMP): Ditto.
3688         (omp_get_active_level): Ditto.
3689         (omp_get_ancestor_thread_num): Ditto.
3690         (omp_get_cancellation): Ditto.
3691         (omp_get_default_device): Ditto.
3692         (omp_get_dynamic): Ditto.
3693         (omp_get_level): Ditto.
3694         (omp_get_max_active_levels): Ditto.
3695         (omp_get_max_task_priority): Ditto.
3696         (omp_get_max_threads): Ditto.
3697         (omp_get_nested): Ditto.
3698         (omp_get_num_devices): Ditto.
3699         (omp_get_num_procs): Ditto.
3700         (omp_get_num_teams): Ditto.
3701         (omp_get_num_threads): Ditto.
3702         (omp_get_proc_bind): Ditto.
3703         (omp_get_schedule): Ditto.
3704         (omp_get_team_num): Ditto.
3705         (omp_get_team_size): Ditto.
3706         (omp_get_thread_limit): Ditto.
3707         (omp_get_thread_num): Ditto.
3708         (omp_in_parallel): Ditto.
3709         (omp_in_final): Ditto.
3710         (omp_is_initial_device): Ditto.
3711         (omp_set_default_device): Ditto.
3712         (omp_set_dynamic): Ditto.
3713         (omp_set_max_active_levels): Ditto.
3714         (omp_set_nested): Ditto.
3715         (omp_set_num_threads): Ditto.
3716         (omp_set_schedule): Ditto.
3717         (omp_init_lock): Ditto.
3718         (omp_set_lock): Ditto.
3719         (omp_test_lock): Ditto.
3720         (omp_unset_lock): Ditto.
3721         (omp_destroy_lock): Ditto.
3722         (omp_init_nest_lock): Ditto.
3723         (omp_set_nest_lock): Ditto.
3724         (omp_test_nest_lock): Ditto.
3725         (omp_unset_nest_lock): Ditto.
3726         (omp_destroy_nest_lock): Ditto.
3727         (omp_get_wtick): Ditto.
3728         (omp_get_wtime): Ditto.
3729         (OMP_CANCELLATION): Ditto.
3730         (OMP_DISPLAY_ENV): Ditto.
3731         (OMP_DEFAULT_DEVICE): Ditto.
3732         (OMP_DYNAMIC): Ditto.
3733         (OMP_MAX_ACTIVE_LEVELS): Ditto.
3734         (OMP_MAX_TASK_PRIORITY): Ditto.
3735         (OMP_NESTED): Ditto.
3736         (OMP_NUM_THREADS): Ditto.
3737         (OMP_PROC_BIND): Ditto.
3738         (OMP_PLACES): Ditto.
3739         (OMP_STACKSIZE): Ditto.
3740         (OMP_SCHEDULE): Ditto.
3741         (OMP_THREAD_LIMIT): Ditto.
3742         (OMP_WAIT_POLICY): Ditto.
3743
3744 2018-06-22  Cesar Philippidis  <cesar@codesourcery.com>
3745             James Norris  <jnorris@codesourcery.com>
3746             Julian Brown  <julian@codesourcery.com>
3747             Thomas Schwinge  <thomas@codesourcery.com>
3748             Tom de Vries  <tom@codesourcery.com>
3749
3750         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Don't force "-O2".
3751         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Update.
3752         * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: Likewise.
3753         * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: Likewise.
3754         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
3755         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
3756         * testsuite/libgomp.oacc-c++/non-scalar-data.C: New file.
3757         * testsuite/libgomp.oacc-c-c++-common/declare-3.c: Likewise.
3758         * testsuite/libgomp.oacc-c-c++-common/enter-data.c: Likewise.
3759         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-2.c:
3760         Likewise.
3761         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit-2.c:
3762         Likewise.
3763         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit.c:
3764         Likewise.
3765         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-update.c:
3766         Likewise.
3767         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data.c:
3768         Likewise.
3769         * testsuite/libgomp.oacc-c-c++-common/kernels-parallel-loop-data-enter-exit.c:
3770         Likewise.
3771         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c:
3772         Likewise.
3773         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c:
3774         Likewise.
3775         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c:
3776         Likewise.
3777         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c:
3778         Likewise.
3779         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c:
3780         Likewise.
3781         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c:
3782         Likewise.
3783         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c:
3784         Likewise.
3785         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c:
3786         Likewise.
3787         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c:
3788         Likewise.
3789         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c:
3790         Likewise.
3791         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c:
3792         Likewise.
3793         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c:
3794         Likewise.
3795         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c:
3796         Likewise.
3797         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c:
3798         Likewise.
3799         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c:
3800         Likewise.
3801         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c:
3802         Likewise.
3803         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c:
3804         Likewise.
3805         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c:
3806         Likewise.
3807         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c:
3808         Likewise.
3809         * testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c:
3810         Likewise.
3811         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction-1.c:
3812         Likewise.
3813         * testsuite/libgomp.oacc-c-c++-common/parallel-loop-1.c: Likewise.
3814         * testsuite/libgomp.oacc-c-c++-common/parallel-loop-1.h: Likewise.
3815         * testsuite/libgomp.oacc-c-c++-common/parallel-loop-2.h: Likewise.
3816         * testsuite/libgomp.oacc-fortran/cublas-fixed.h: Likewise.
3817         * testsuite/libgomp.oacc-fortran/dummy-array.f90: Likewise.
3818         * testsuite/libgomp.oacc-fortran/host_data-2.f90: Likewise.
3819         * testsuite/libgomp.oacc-fortran/host_data-3.f: Likewise.
3820         * testsuite/libgomp.oacc-fortran/host_data-4.f90: Likewise.
3821         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90:
3822         Likewise.
3823         * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90:
3824         Likewise.
3825         * testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Likewise.
3826         * testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Likewise.
3827         * testsuite/libgomp.oacc-fortran/kernels-independent.f90:
3828         Likewise.
3829         * testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Likewise.
3830         * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Likewise.
3831         * testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95:
3832         Likewise.
3833         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
3834         Likewise.
3835         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
3836         Likewise.
3837         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
3838         Likewise.
3839         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
3840         Likewise.
3841         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90:
3842         Likewise.
3843         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90:
3844         Likewise.
3845         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90:
3846         Likewise.
3847         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90:
3848         Likewise.
3849         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90:
3850         Likewise.
3851         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90:
3852         Likewise.
3853         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90:
3854         Likewise.
3855         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90:
3856         Likewise.
3857         * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90:
3858         Likewise.
3859         * testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90:
3860         Likewise.
3861         * testsuite/libgomp.oacc-fortran/lib-12.f90: Likewise.
3862         * testsuite/libgomp.oacc-fortran/lib-13.f90: Likewise.
3863         * testsuite/libgomp.oacc-fortran/lib-14.f90: Likewise.
3864         * testsuite/libgomp.oacc-fortran/lib-15.f90: Likewise.
3865         * testsuite/libgomp.oacc-fortran/parallel-loop-1.f90: Likewise.
3866         * testsuite/libgomp.oacc-fortran/reference-reductions.f90: Likewise.
3867         * testsuite/libgomp.oacc-fortran/vector-routine.f90: Likewise.
3868
3869 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
3870             Thomas Schwinge <thomas@codesourcery.com>
3871             Cesar Philippidis  <cesar@codesourcery.com>
3872
3873         * libgomp.h (struct splay_tree_key_s): Add dynamic_refcount member.
3874         (gomp_acc_remove_pointer): Update declaration.
3875         (gomp_acc_declare_allocate): Declare.
3876         (gomp_remove_var): Declare.
3877         * libgomp.map (OACC_2.5): Define.
3878         * oacc-mem.c (acc_map_data): Update refcount.
3879         (acc_unmap_data): Likewise.
3880         (present_create_copy): Likewise.
3881         (acc_create): Add FLAG_PRESENT when calling present_create_copy.
3882         (acc_copyin): Likewise.
3883         (FLAG_FINALIZE): Define.
3884         (delete_copyout): Update dynamic refcounts, add support for FINALIZE.
3885         (acc_delete_finalize): New function.
3886         (acc_delete_finalize_async): New function.
3887         (acc_copyout_finalize): New function.
3888         (acc_copyout_finalize_async): New function.
3889         (gomp_acc_insert_pointer): Update refcounts.
3890         (gomp_acc_remove_pointer): Return if data is not present on the
3891         accelerator.
3892         * oacc-parallel.c (find_pset): Rename to find_pointer.
3893         (find_pointer): Add support for GOMP_MAP_POINTER.
3894         (handle_ftn_pointers): New function.
3895         (GOACC_parallel_keyed): Update refcounts of variables.
3896         (GOACC_enter_exit_data): Add support for finalized data mappings.
3897         Add support for GOMP_MAP_{TO,ALLOC,RELESE,FROM}. Update handling
3898         of fortran arrays.
3899         (GOACC_update): Add support for GOMP_MAP_{ALWAYS_POINTER,TO,FROM}.
3900         (GOACC_declare): Add support for GOMP_MAP_RELEASE, remove support
3901         for GOMP_MAP_FORCE_FROM.
3902         * openacc.f90 (module openacc_internal): Add
3903         acc_copyout_finalize_{32_h,64_h,array_h,_l}, and
3904         acc_delete_finalize_{32_h,64_h,array_h,_l}. Add interfaces for
3905         acc_copyout_finalize and acc_delete_finalize.
3906         (acc_copyout_finalize_32_h): New subroutine.
3907         (acc_copyout_finalize_64_h): New subroutine.
3908         (acc_copyout_finalize_array_h): New subroutine.
3909         (acc_delete_finalize_32_h): New subroutine.
3910         (acc_delete_finalize_64_h): New subroutine.
3911         (acc_delete_finalize_array_h): New subroutine.
3912         * openacc.h (acc_copyout_finalize): Declare.
3913         (acc_copyout_finalize_async): Declare.
3914         (acc_delete_finalize): Declare.
3915         (acc_delete_finalize_async): Declare.
3916         * openacc_lib.h (acc_copyout_finalize): New interface.
3917         (acc_delete_finalize): New interface.
3918         * target.c (gomp_map_vars): Update dynamic_refcount.
3919         (gomp_remove_var): New function.
3920         (gomp_unmap_vars): Use it.
3921         (gomp_unload_image_from_device): Likewise.
3922         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Update test
3923         case to utilize OpenACC 2.5 data clause semantics.
3924         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
3925         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
3926         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
3927         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
3928         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
3929         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
3930         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
3931         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
3932         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
3933         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
3934         * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
3935         * testsuite/libgomp.oacc-fortran/data-5.f90: New test.
3936         * testsuite/libgomp.oacc-fortran/data-already-1.f: Update test case to
3937         utilize OpenACC 2.5 data clause semantics.
3938         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
3939         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
3940         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
3941         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
3942         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
3943         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
3944         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
3945         * testsuite/libgomp.oacc-fortran/lib-32-1.f: Likewise.
3946         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
3947
3948 2018-05-21  Janus Weil  <janus@gcc.gnu.org>
3949
3950         PR fortran/85841
3951         PR testsuite/85865
3952         * testsuite/libgomp.fortran/collapse2.f90: Add option "-std=legacy".
3953         * testsuite/libgomp.fortran/omp_atomic2.f90: Ditto.
3954         * testsuite/libgomp.fortran/omp_parse1.f90: Ditto.
3955         * testsuite/libgomp.fortran/omp_parse3.f90: Ditto.
3956         * testsuite/libgomp.fortran/task2.f90: Ditto.
3957         * testsuite/libgomp.fortran/vla1.f90: Ditto.
3958         * testsuite/libgomp.fortran/vla2.f90: Ditto.
3959         * testsuite/libgomp.fortran/vla3.f90: Ditto.
3960         * testsuite/libgomp.fortran/vla4.f90: Ditto.
3961         * testsuite/libgomp.fortran/vla5.f90: Ditto.
3962         * testsuite/libgomp.fortran/vla6.f90: Ditto.
3963         * testsuite/libgomp.fortran/vla8.f90: Ditto.
3964         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Ditto.
3965         * testsuite/libgomp.oacc-fortran/nested-function-1.f90: Ditto.
3966
3967 2018-05-18  Cesar Philippidis  <cesar@codesourcery.com>
3968
3969         PR c++/85782
3970         * testsuite/libgomp.oacc-c-c++-common/pr85782.c: New test.
3971
3972 2018-05-09  Tom de Vries  <tom@codesourcery.com>
3973
3974         PR libgomp/82901
3975         * oacc-parallel.c (GOACC_declare): Use GOMP_ASYNC_SYNC as async argument
3976         to GOACC_enter_exit_data.
3977
3978 2018-05-09  Tom de Vries  <tom@codesourcery.com>
3979
3980         PR libgomp/83792
3981         * oacc-int.h (async_valid_stream_id_p, async_valid_p)
3982         (async_synchronous_p): New function.
3983         * oacc-async.c (acc_async_test, acc_wait, acc_wait_all_async): Use
3984         async_valid_p.
3985         * oacc-cuda.c (acc_get_cuda_stream, acc_set_cuda_stream): Use
3986         async_valid_stream_id_p.
3987         * oacc-mem.c (gomp_acc_remove_pointer): Use async_synchronous_p.
3988         * oacc-parallel.c (GOACC_parallel_keyed): Same.
3989
3990 2018-05-07  Tom de Vries  <tom@codesourcery.com>
3991
3992         PR testsuite/85677
3993         * testsuite/lib/libgomp.exp (libgomp_init): Move inclusion of top-level
3994         include directory in ALWAYS_CFLAGS out of $blddir != "" condition.
3995
3996 2018-05-03  Tom de Vries  <tom@codesourcery.com>
3997
3998         PR testsuite/85106
3999         * testsuite/lib/libgomp-dg.exp (libgomp-dg-test): Add save-temps to
4000         extra_tool_flags if it contains an -foffload=-fdump-* flag.
4001         * testsuite/lib/libgomp.exp: Include scanoffloadtree.exp.
4002         * testsuite/libgomp.oacc-c/vec.c: Use scan-offload-tree-dump.
4003
4004 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4005
4006         PR libgomp/85411
4007         * plugin/plugin-nvptx.c (nvptx_exec): Move parsing of
4008         GOMP_OPENACC_DIM ...
4009         * env.c (parse_gomp_openacc_dim): ... here.  New function.
4010         (initialize_env): Call parse_gomp_openacc_dim.
4011         (goacc_default_dims): Define.
4012         * libgomp.h (goacc_default_dims): Declare.
4013         * oacc-plugin.c (GOMP_PLUGIN_acc_default_dim): New function.
4014         * oacc-plugin.h (GOMP_PLUGIN_acc_default_dim): Declare.
4015         * libgomp.map: New version "GOMP_PLUGIN_1.2". Add
4016         GOMP_PLUGIN_acc_default_dim.
4017         * testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c: New test.
4018         * testsuite/libgomp.oacc-c-c++-common/loop-default.h: New test.
4019
4020 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4021
4022         PR testsuite/83791
4023         * testsuite/libgomp.c++/udr-9.C: Update.
4024         * testsuite/libgomp.c++/atomic-16.C: Remove.
4025         * testsuite/libgomp.c++/cancel-taskgroup-2.C: Remove.
4026         * testsuite/libgomp.c++/loop-13.C: Remove.
4027         * testsuite/libgomp.c++/loop-14.C: Remove.
4028         * testsuite/libgomp.c++/loop-15.C: Remove.
4029         * testsuite/libgomp.c++/monotonic-1.C: Remove.
4030         * testsuite/libgomp.c++/monotonic-2.C: Remove.
4031         * testsuite/libgomp.c++/nonmonotonic-1.C: Remove.
4032         * testsuite/libgomp.c++/nonmonotonic-2.C: Remove.
4033         * testsuite/libgomp.c++/ordered-1.C: Remove.
4034         * testsuite/libgomp.c++/pr45784.C: Remove.
4035         * testsuite/libgomp.c++/pr64824.C: Remove.
4036         * testsuite/libgomp.c++/pr64868.C: Remove.
4037         * testsuite/libgomp.c++/pr66199-1.C: Remove.
4038         * testsuite/libgomp.c++/pr66199-2.C: Remove.
4039         * testsuite/libgomp.c++/pr66199-3.C: Remove.
4040         * testsuite/libgomp.c++/pr66199-4.C: Remove.
4041         * testsuite/libgomp.c++/pr66199-5.C: Remove.
4042         * testsuite/libgomp.c++/pr66199-6.C: Remove.
4043         * testsuite/libgomp.c++/pr66199-7.C: Remove.
4044         * testsuite/libgomp.c++/pr66199-8.C: Remove.
4045         * testsuite/libgomp.c++/pr66199-9.C: Remove.
4046         * testsuite/libgomp.c++/pr69389.C: Remove.
4047         * testsuite/libgomp.c++/simd10.C: Remove.
4048         * testsuite/libgomp.c++/simd11.C: Remove.
4049         * testsuite/libgomp.c++/simd12.C: Remove.
4050         * testsuite/libgomp.c++/simd13.C: Remove.
4051         * testsuite/libgomp.c++/target-1.C: Remove.
4052         * testsuite/libgomp.c++/target-3.C: Remove.
4053         * testsuite/libgomp.c++/target-4.C: Remove.
4054         * testsuite/libgomp.c++/target-5.C: Remove.
4055         * testsuite/libgomp.c++/taskgroup-1.C: Remove.
4056         * testsuite/libgomp.c++/taskloop-1.C: Remove.
4057         * testsuite/libgomp.c++/taskloop-2.C: Remove.
4058         * testsuite/libgomp.c++/taskloop-3.C: Remove.
4059         * testsuite/libgomp.c++/taskloop-4.C: Remove.
4060         * testsuite/libgomp.c++/udr-9.C: Remove.
4061         * testsuite/libgomp.c++/for-10.C: Remove.
4062         * testsuite/libgomp.c++/for-11.C: Remove.
4063         * testsuite/libgomp.c++/for-12.C: Remove.
4064         * testsuite/libgomp.c++/for-13.C: Remove.
4065         * testsuite/libgomp.c++/for-14.C: Remove.
4066         * testsuite/libgomp.c++/for-9.C: Remove.
4067         * testsuite/libgomp.c/atomic-18.c: Move ...
4068         * testsuite/libgomp.c-c++-common/atomic-18.c: ... here.
4069         * testsuite/libgomp.c/cancel-taskgroup-2.c: Move ...
4070         * testsuite/libgomp.c-c++-common/cancel-taskgroup-2.c: here.
4071         * testsuite/libgomp.c/loop-13.c: Move ...
4072         * testsuite/libgomp.c-c++-common/loop-13.c: ... here.
4073         * testsuite/libgomp.c/loop-14.c: Move ...
4074         * testsuite/libgomp.c-c++-common/loop-14.c: ... here.
4075         * testsuite/libgomp.c/loop-15.c: Remove.
4076         * testsuite/libgomp.c-c++-common/loop-15.c: New test.
4077         * testsuite/libgomp.c/monotonic-1.c: Move ...
4078         * testsuite/libgomp.c-c++-common/monotonic-1.c: ... here.
4079         * testsuite/libgomp.c/monotonic-2.c: Move ...
4080         * testsuite/libgomp.c-c++-common/monotonic-2.c: ... here.
4081         * testsuite/libgomp.c/nonmonotonic-1.c: Move ...
4082         * testsuite/libgomp.c-c++-common/nonmonotonic-1.c: ... here.
4083         * testsuite/libgomp.c/nonmonotonic-2.c: Move ...
4084         * testsuite/libgomp.c-c++-common/nonmonotonic-2.c: ... here.
4085         * testsuite/libgomp.c/ordered-4.c: Move ...
4086         * testsuite/libgomp.c-c++-common/ordered-4.c: ... here.
4087         * testsuite/libgomp.c/pr45784.c: Move ...
4088         * testsuite/libgomp.c-c++-common/pr45784.c: ... here.
4089         * testsuite/libgomp.c/pr64824.c: Move ...
4090         * testsuite/libgomp.c-c++-common/pr64824.c: ... here.
4091         * testsuite/libgomp.c/pr64868.c: Move ...
4092         * testsuite/libgomp.c-c++-common/pr64868.c: ... here.
4093         * testsuite/libgomp.c/pr66199-1.c: Move ...
4094         * testsuite/libgomp.c-c++-common/pr66199-1.c: ... here.
4095         * testsuite/libgomp.c/pr66199-2.c: Move ...
4096         * testsuite/libgomp.c-c++-common/pr66199-2.c: ... here.
4097         * testsuite/libgomp.c/pr66199-3.c: Move ...
4098         * testsuite/libgomp.c-c++-common/pr66199-3.c: ... here.
4099         * testsuite/libgomp.c/pr66199-4.c: Move ...
4100         * testsuite/libgomp.c-c++-common/pr66199-4.c: ... here.
4101         * testsuite/libgomp.c/pr66199-5.c: Move ...
4102         * testsuite/libgomp.c-c++-common/pr66199-5.c: ... here.
4103         * testsuite/libgomp.c/pr66199-6.c: Move ...
4104         * testsuite/libgomp.c-c++-common/pr66199-6.c: ... here.
4105         * testsuite/libgomp.c/pr66199-7.c: Move ...
4106         * testsuite/libgomp.c-c++-common/pr66199-7.c: ... here.
4107         * testsuite/libgomp.c/pr66199-8.c: Move ...
4108         * testsuite/libgomp.c-c++-common/pr66199-8.c: ... here.
4109         * testsuite/libgomp.c/pr66199-9.c: Move ...
4110         * testsuite/libgomp.c-c++-common/pr66199-9.c: ... here.
4111         * testsuite/libgomp.c/pr69389.c: Move ...
4112         * testsuite/libgomp.c-c++-common/pr69389.c: ... here.
4113         * testsuite/libgomp.c/simd-14.c: Move ...
4114         * testsuite/libgomp.c-c++-common/simd-14.c: ... here.
4115         * testsuite/libgomp.c/simd-15.c: Move ...
4116         * testsuite/libgomp.c-c++-common/simd-15.c: ... here.
4117         * testsuite/libgomp.c/simd-16.c: Move ...
4118         * testsuite/libgomp.c-c++-common/simd-16.c: ... here.
4119         * testsuite/libgomp.c/simd-17.c: Move ...
4120         * testsuite/libgomp.c-c++-common/simd-17.c: ... here.
4121         * testsuite/libgomp.c/target-1.c: Move ...
4122         * testsuite/libgomp.c-c++-common/target-1.c: ... here.
4123         * testsuite/libgomp.c/target-10.c: Move ...
4124         * testsuite/libgomp.c-c++-common/target-10.c: ... here.
4125         * testsuite/libgomp.c/target-13.c: Move ...
4126         * testsuite/libgomp.c-c++-common/target-13.c: ... here.
4127         * testsuite/libgomp.c/target-2.c: Move ...
4128         * testsuite/libgomp.c-c++-common/target-2.c: ... here.
4129         * testsuite/libgomp.c/taskgroup-1.c: Move ...
4130         * testsuite/libgomp.c-c++-common/taskgroup-1.c: ... here.
4131         * testsuite/libgomp.c/taskloop-1.c: Move ...
4132         * testsuite/libgomp.c-c++-common/taskloop-1.c: ... here.
4133         * testsuite/libgomp.c/taskloop-2.c: Move ...
4134         * testsuite/libgomp.c-c++-common/taskloop-2.c: ... here.
4135         * testsuite/libgomp.c/taskloop-3.c: Move ...
4136         * testsuite/libgomp.c-c++-common/taskloop-3.c: ... here.
4137         * testsuite/libgomp.c/taskloop-4.c: Move ...
4138         * testsuite/libgomp.c-c++-common/taskloop-4.c: ... here.
4139         * testsuite/libgomp.c/udr-1.c: Move ...
4140         * testsuite/libgomp.c-c++-common/udr-1.c: ... here.
4141         * testsuite/libgomp.c/for-1.c: Move ...
4142         * testsuite/libgomp.c-c++-common/for-1.c: ... here.
4143         * testsuite/libgomp.c/for-1.h: Move ...
4144         * testsuite/libgomp.c-c++-common/for-1.h: ... here.
4145         * testsuite/libgomp.c/for-2.c: Move ...
4146         * testsuite/libgomp.c-c++-common/for-2.c: ... here.
4147         * testsuite/libgomp.c/for-2.h: Move ...
4148         * testsuite/libgomp.c-c++-common/for-2.h: ... here.
4149         * testsuite/libgomp.c/for-3.c: Move ...
4150         * testsuite/libgomp.c-c++-common/for-3.c: ... here.
4151         * testsuite/libgomp.c/for-4.c: Move ...
4152         * testsuite/libgomp.c-c++-common/for-4.c: ... here.
4153         * testsuite/libgomp.c/for-5.c: Move ...
4154         * testsuite/libgomp.c-c++-common/for-5.c: ... here.
4155         * testsuite/libgomp.c/for-6.c: Move ...
4156         * testsuite/libgomp.c-c++-common/for-6.c: ... here.
4157
4158 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4159
4160         PR libgomp/82428
4161         * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Use
4162         __builtin_goacc_parlevel_{id,size}.
4163         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Same.
4164         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Same.
4165         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Same.
4166         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Same.
4167         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Same.
4168         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Same.
4169         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Same.
4170         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Same.
4171         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Same.
4172         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Same.
4173         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Same.
4174         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Same.
4175         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Same.
4176         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Same.
4177         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Same.
4178         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Same.
4179         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Same.
4180         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Same.
4181         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Same.
4182         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Same.
4183         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Same.
4184         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Same.
4185         * testsuite/libgomp.oacc-c-c++-common/tile-1.c: Same.
4186
4187 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4188
4189         PR testsuite/85106
4190         * testsuite/lib/libgomp.exp: Include scanltranstree.exp.
4191
4192 2018-05-02  Tom de Vries  <tom@codesourcery.com>
4193
4194         PR testsuite/85106
4195         * testsuite/lib/libgomp.exp: Include scanwpaipa.exp.
4196
4197 2018-04-29  Julian Brown  <julian@codesourcery.com>
4198             Tom de Vries  <tom@codesourcery.com>
4199
4200         PR testsuite/85527
4201         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-1.c: Allow
4202         arbitrary order for iterations of atomic subtract check.
4203
4204 2018-04-28  Tom de Vries  <tom@codesourcery.com>
4205
4206         PR testsuite/85527
4207         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90 (main): Store
4208         atomic capture results obtained in parallel loop to an array, instead of
4209         to a scalar.
4210
4211 2018-04-26  Tom de Vries  <tom@codesourcery.com>
4212
4213         PR libgomp/84020
4214         * plugin/cuda/cuda.h (CUjit_option): Add CU_JIT_OPTIMIZATION_LEVEL.
4215         * plugin/plugin-nvptx.c (_GNU_SOURCE): Define.
4216         (process_GOMP_NVPTX_JIT): New function.
4217         (link_ptx): Use process_GOMP_NVPTX_JIT.
4218
4219 2018-04-26  Richard Biener <rguenther@suse.de>
4220             Tom de Vries  <tom@codesourcery.com>
4221
4222         PR lto/85422
4223         * testsuite/libgomp.oacc-c-c++-common/pr85422.c: New test.
4224
4225 2018-04-26  Tom de Vries  <tom@codesourcery.com>
4226
4227         PR target/85519
4228         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Reduce
4229         recursion depth from 25 to 23.
4230         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same.
4231
4232 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
4233
4234         * configure: Regenerated.
4235
4236 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4237             Tom de Vries  <tom@codesourcery.com>
4238
4239         PR target/85445
4240         * testsuite/libgomp.oacc-c++/ref-1.C: New.
4241
4242 2018-04-19  Thomas Schwinge  <thomas@codesourcery.com>
4243
4244         PR libgomp/85463
4245         * testsuite/libgomp.oacc-fortran/error_stop-1.f: New file.
4246         * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
4247         * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
4248         * testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
4249         * testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
4250         * testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.
4251
4252         PR libfortran/85166
4253         * testsuite/libgomp.oacc-fortran/abort-1.f90: Switch back to "call
4254         abort".
4255         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
4256
4257 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
4258
4259         * configure: Regenerated.
4260
4261 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
4262
4263         PR jit/85384
4264         * configure: Regenerate.
4265
4266 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
4267             Tom de Vries  <tom@codesourcery.com>
4268
4269         PR middle-end/84955
4270         * testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test.
4271         * testsuite/libgomp.oacc-fortran/pr84955.f90: New test.
4272
4273 2018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
4274
4275         PR fortran/83064
4276         PR testsuite/85346
4277         * testsuite/libgomp.fortran/do_concurrent_5.f90: Move modified
4278         test from gfortran.dg to here.
4279
4280 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4281
4282         * testsuite/libgomp.oacc-c-c++-common/pr84955.c: Revert 259346.
4283         * testsuite/libgomp.oacc-fortran/pr84955.f90: Likewise.
4284
4285 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4286
4287         PR middle-end/84955
4288         * testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test.
4289         * testsuite/libgomp.oacc-fortran/pr84955.f90: New test.
4290
4291 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4292
4293         PR target/85204
4294         * testsuite/libgomp.oacc-c-c++-common/broadcast-1.c: New test.
4295
4296 2018-03-26  Tom de Vries  <tom@codesourcery.com>
4297
4298         PR tree-optimization/85063
4299         * testsuite/libgomp.c/switch-conversion-2.c: New test.
4300         * testsuite/libgomp.c/switch-conversion.c: New test.
4301         * testsuite/libgomp.oacc-c-c++-common/switch-conversion-2.c: New test.
4302         * testsuite/libgomp.oacc-c-c++-common/switch-conversion.c: New test.
4303
4304 2018-03-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
4305
4306         PR fortran/84381
4307         * testsuite/libgomp.fortran/aligned1.f03: Replace non-standard
4308         call abort by STOP n.
4309         * testsuite/libgomp.fortran/alloc-comp-1.f90: Likewise.
4310         * testsuite/libgomp.fortran/alloc-comp-2.f90: Likewise.
4311         * testsuite/libgomp.fortran/alloc-comp-3.f90: Likewise.
4312         * testsuite/libgomp.fortran/allocatable1.f90: Likewise.
4313         * testsuite/libgomp.fortran/allocatable10.f90: Likewise.
4314         * testsuite/libgomp.fortran/allocatable11.f90: Likewise.
4315         * testsuite/libgomp.fortran/allocatable12.f90: Likewise.
4316         * testsuite/libgomp.fortran/allocatable2.f90: Likewise.
4317         * testsuite/libgomp.fortran/allocatable3.f90: Likewise.
4318         * testsuite/libgomp.fortran/allocatable4.f90: Likewise.
4319         * testsuite/libgomp.fortran/allocatable5.f90: Likewise.
4320         * testsuite/libgomp.fortran/allocatable6.f90: Likewise.
4321         * testsuite/libgomp.fortran/allocatable7.f90: Likewise.
4322         * testsuite/libgomp.fortran/allocatable8.f90: Likewise.
4323         * testsuite/libgomp.fortran/allocatable9.f90: Likewise.
4324         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.
4325         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Likewise.
4326         * testsuite/libgomp.fortran/associate1.f90: Likewise.
4327         * testsuite/libgomp.fortran/associate2.f90: Likewise.
4328         * testsuite/libgomp.fortran/associate3.f90: Likewise.
4329         * testsuite/libgomp.fortran/cancel-do-1.f90: Likewise.
4330         * testsuite/libgomp.fortran/cancel-do-2.f90: Likewise.
4331         * testsuite/libgomp.fortran/cancel-parallel-1.f90: Likewise.
4332         * testsuite/libgomp.fortran/cancel-sections-1.f90: Likewise.
4333         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: Likewise.
4334         * testsuite/libgomp.fortran/character1.f90: Likewise.
4335         * testsuite/libgomp.fortran/character2.f90: Likewise.
4336         * testsuite/libgomp.fortran/collapse1.f90: Likewise.
4337         * testsuite/libgomp.fortran/collapse2.f90: Likewise.
4338         * testsuite/libgomp.fortran/collapse3.f90: Likewise.
4339         * testsuite/libgomp.fortran/collapse4.f90: Likewise.
4340         * testsuite/libgomp.fortran/crayptr1.f90: Likewise.
4341         * testsuite/libgomp.fortran/crayptr2.f90: Likewise.
4342         * testsuite/libgomp.fortran/crayptr3.f90: Likewise.
4343         * testsuite/libgomp.fortran/declare-simd-1.f90: Likewise.
4344         * testsuite/libgomp.fortran/declare-simd-3.f90: Likewise.
4345         * testsuite/libgomp.fortran/declare-target-2.f90: Likewise.
4346         * testsuite/libgomp.fortran/depend-1.f90: Likewise.
4347         * testsuite/libgomp.fortran/depend-2.f90: Likewise.
4348         * testsuite/libgomp.fortran/depend-3.f90: Likewise.
4349         * testsuite/libgomp.fortran/do1.f90: Likewise.
4350         * testsuite/libgomp.fortran/do2.f90: Likewise.
4351         * testsuite/libgomp.fortran/doacross1.f90: Likewise.
4352         * testsuite/libgomp.fortran/doacross2.f90: Likewise.
4353         * testsuite/libgomp.fortran/doacross3.f90: Likewise.
4354         * testsuite/libgomp.fortran/examples-4/array_sections-3.f90: Likewise.
4355         * testsuite/libgomp.fortran/examples-4/array_sections-4.f90: Likewise.
4356         * testsuite/libgomp.fortran/examples-4/async_target-1.f90: Likewise.
4357         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: Likewise.
4358         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Likewise.
4359         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Likewise.
4360         * testsuite/libgomp.fortran/examples-4/declare_target-3.f90: Likewise.
4361         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90: Likewise.
4362         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90: Likewise.
4363         * testsuite/libgomp.fortran/examples-4/device-1.f90: Likewise.
4364         * testsuite/libgomp.fortran/examples-4/device-2.f90: Likewise.
4365         * testsuite/libgomp.fortran/examples-4/device-3.f90: Likewise.
4366         * testsuite/libgomp.fortran/examples-4/simd-1.f90: Likewise.
4367         * testsuite/libgomp.fortran/examples-4/simd-2.f90: Likewise.
4368         * testsuite/libgomp.fortran/examples-4/simd-3.f90: Likewise.
4369         * testsuite/libgomp.fortran/examples-4/simd-4.f90: Likewise.
4370         * testsuite/libgomp.fortran/examples-4/simd-5.f90: Likewise.
4371         * testsuite/libgomp.fortran/examples-4/simd-6.f90: Likewise.
4372         * testsuite/libgomp.fortran/examples-4/simd-7.f90: Likewise.
4373         * testsuite/libgomp.fortran/examples-4/simd-8.f90: Likewise.
4374         * testsuite/libgomp.fortran/examples-4/target-1.f90: Likewise.
4375         * testsuite/libgomp.fortran/examples-4/target-2.f90: Likewise.
4376         * testsuite/libgomp.fortran/examples-4/target-3.f90: Likewise.
4377         * testsuite/libgomp.fortran/examples-4/target-4.f90: Likewise.
4378         * testsuite/libgomp.fortran/examples-4/target-5.f90: Likewise.
4379         * testsuite/libgomp.fortran/examples-4/target_data-1.f90: Likewise.
4380         * testsuite/libgomp.fortran/examples-4/target_data-2.f90: Likewise.
4381         * testsuite/libgomp.fortran/examples-4/target_data-3.f90: Likewise.
4382         * testsuite/libgomp.fortran/examples-4/target_data-4.f90: Likewise.
4383         * testsuite/libgomp.fortran/examples-4/target_data-5.f90: Likewise.
4384         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: Likewise.
4385         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: Likewise.
4386         * testsuite/libgomp.fortran/examples-4/target_update-1.f90: Likewise.
4387         * testsuite/libgomp.fortran/examples-4/target_update-2.f90: Likewise.
4388         * testsuite/libgomp.fortran/examples-4/task_dep-1.f90: Likewise.
4389         * testsuite/libgomp.fortran/examples-4/task_dep-2.f90: Likewise.
4390         * testsuite/libgomp.fortran/examples-4/task_dep-3.f90: Likewise.
4391         * testsuite/libgomp.fortran/examples-4/task_dep-4.f90: Likewise.
4392         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: Likewise.
4393         * testsuite/libgomp.fortran/examples-4/teams-2.f90: Likewise.
4394         * testsuite/libgomp.fortran/examples-4/teams-3.f90: Likewise.
4395         * testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise.
4396         * testsuite/libgomp.fortran/examples-4/teams-5.f90: Likewise.
4397         * testsuite/libgomp.fortran/examples-4/teams-6.f90: Likewise.
4398         * testsuite/libgomp.fortran/lastprivate1.f90: Likewise.
4399         * testsuite/libgomp.fortran/lastprivate2.f90: Likewise.
4400         * testsuite/libgomp.fortran/lib1.f90: Likewise.
4401         * testsuite/libgomp.fortran/lib2.f: Likewise.
4402         * testsuite/libgomp.fortran/lib3.f: Likewise.
4403         * testsuite/libgomp.fortran/lib4.f90: Likewise.
4404         * testsuite/libgomp.fortran/lock-1.f90: Likewise.
4405         * testsuite/libgomp.fortran/lock-2.f90: Likewise.
4406         * testsuite/libgomp.fortran/nested1.f90: Likewise.
4407         * testsuite/libgomp.fortran/nestedfn1.f90: Likewise.
4408         * testsuite/libgomp.fortran/nestedfn2.f90: Likewise.
4409         * testsuite/libgomp.fortran/nestedfn3.f90: Likewise.
4410         * testsuite/libgomp.fortran/nestedfn4.f90: Likewise.
4411         * testsuite/libgomp.fortran/nestedfn5.f90: Likewise.
4412         * testsuite/libgomp.fortran/omp_atomic1.f90: Likewise.
4413         * testsuite/libgomp.fortran/omp_atomic2.f90: Likewise.
4414         * testsuite/libgomp.fortran/omp_atomic3.f90: Likewise.
4415         * testsuite/libgomp.fortran/omp_atomic4.f90: Likewise.
4416         * testsuite/libgomp.fortran/omp_atomic5.f90: Likewise.
4417         * testsuite/libgomp.fortran/omp_cond1.f: Likewise.
4418         * testsuite/libgomp.fortran/omp_cond2.f: Likewise.
4419         * testsuite/libgomp.fortran/omp_cond3.F90: Likewise.
4420         * testsuite/libgomp.fortran/omp_cond4.F90: Likewise.
4421         * testsuite/libgomp.fortran/omp_parse1.f90: Likewise.
4422         * testsuite/libgomp.fortran/omp_parse2.f90: Likewise.
4423         * testsuite/libgomp.fortran/omp_parse3.f90: Likewise.
4424         * testsuite/libgomp.fortran/omp_parse4.f90: Likewise.
4425         * testsuite/libgomp.fortran/openmp_version-1.f: Likewise.
4426         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
4427         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: Likewise.
4428         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: Likewise.
4429         * testsuite/libgomp.fortran/pointer1.f90: Likewise.
4430         * testsuite/libgomp.fortran/pointer2.f90: Likewise.
4431         * testsuite/libgomp.fortran/pr25162.f: Likewise.
4432         * testsuite/libgomp.fortran/pr25219.f90: Likewise.
4433         * testsuite/libgomp.fortran/pr27395-1.f90: Likewise.
4434         * testsuite/libgomp.fortran/pr27395-2.f90: Likewise.
4435         * testsuite/libgomp.fortran/pr27416-1.f90: Likewise.
4436         * testsuite/libgomp.fortran/pr27916-1.f90: Likewise.
4437         * testsuite/libgomp.fortran/pr27916-2.f90: Likewise.
4438         * testsuite/libgomp.fortran/pr28390.f: Likewise.
4439         * testsuite/libgomp.fortran/pr29629.f90: Likewise.
4440         * testsuite/libgomp.fortran/pr32550.f90: Likewise.
4441         * testsuite/libgomp.fortran/pr33880.f90: Likewise.
4442         * testsuite/libgomp.fortran/pr34020.f90: Likewise.
4443         * testsuite/libgomp.fortran/pr35130.f90: Likewise.
4444         * testsuite/libgomp.fortran/pr42162.f90: Likewise.
4445         * testsuite/libgomp.fortran/pr46753.f90: Likewise.
4446         * testsuite/libgomp.fortran/pr48894.f90: Likewise.
4447         * testsuite/libgomp.fortran/pr49792-1.f90: Likewise.
4448         * testsuite/libgomp.fortran/pr49792-2.f90: Likewise.
4449         * testsuite/libgomp.fortran/pr63938-1.f90: Likewise.
4450         * testsuite/libgomp.fortran/pr63938-2.f90: Likewise.
4451         * testsuite/libgomp.fortran/pr65597.f90: Likewise.
4452         * testsuite/libgomp.fortran/pr66199-1.f90: Likewise.
4453         * testsuite/libgomp.fortran/pr71014.f90: Likewise.
4454         * testsuite/libgomp.fortran/pr81304.f90: Likewise.
4455         * testsuite/libgomp.fortran/pr81841.f90: Likewise.
4456         * testsuite/libgomp.fortran/pr84418-1.f90: Likewise.
4457         * testsuite/libgomp.fortran/pr84418-2.f90: Likewise.
4458         * testsuite/libgomp.fortran/procptr1.f90: Likewise.
4459         * testsuite/libgomp.fortran/recursion1.f90: Likewise.
4460         * testsuite/libgomp.fortran/reduction1.f90: Likewise.
4461         * testsuite/libgomp.fortran/reduction2.f90: Likewise.
4462         * testsuite/libgomp.fortran/reduction3.f90: Likewise.
4463         * testsuite/libgomp.fortran/reduction4.f90: Likewise.
4464         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
4465         * testsuite/libgomp.fortran/reduction6.f90: Likewise.
4466         * testsuite/libgomp.fortran/reference1.f90: Likewise.
4467         * testsuite/libgomp.fortran/reference2.f90: Likewise.
4468         * testsuite/libgomp.fortran/retval1.f90: Likewise.
4469         * testsuite/libgomp.fortran/retval2.f90: Likewise.
4470         * testsuite/libgomp.fortran/sharing1.f90: Likewise.
4471         * testsuite/libgomp.fortran/sharing2.f90: Likewise.
4472         * testsuite/libgomp.fortran/simd1.f90: Likewise.
4473         * testsuite/libgomp.fortran/simd2.f90: Likewise.
4474         * testsuite/libgomp.fortran/simd3.f90: Likewise.
4475         * testsuite/libgomp.fortran/simd4.f90: Likewise.
4476         * testsuite/libgomp.fortran/simd5.f90: Likewise.
4477         * testsuite/libgomp.fortran/simd6.f90: Likewise.
4478         * testsuite/libgomp.fortran/simd7.f90: Likewise.
4479         * testsuite/libgomp.fortran/stack.f90: Likewise.
4480         * testsuite/libgomp.fortran/strassen.f90: Likewise.
4481         * testsuite/libgomp.fortran/tabs1.f90: Likewise.
4482         * testsuite/libgomp.fortran/tabs2.f: Likewise.
4483         * testsuite/libgomp.fortran/target1.f90: Likewise.
4484         * testsuite/libgomp.fortran/target2.f90: Likewise.
4485         * testsuite/libgomp.fortran/target3.f90: Likewise.
4486         * testsuite/libgomp.fortran/target4.f90: Likewise.
4487         * testsuite/libgomp.fortran/target5.f90: Likewise.
4488         * testsuite/libgomp.fortran/target6.f90: Likewise.
4489         * testsuite/libgomp.fortran/target7.f90: Likewise.
4490         * testsuite/libgomp.fortran/target8.f90: Likewise.
4491         * testsuite/libgomp.fortran/task1.f90: Likewise.
4492         * testsuite/libgomp.fortran/task2.f90: Likewise.
4493         * testsuite/libgomp.fortran/task3.f90: Likewise.
4494         * testsuite/libgomp.fortran/task4.f90: Likewise.
4495         * testsuite/libgomp.fortran/taskgroup1.f90: Likewise.
4496         * testsuite/libgomp.fortran/taskloop1.f90: Likewise.
4497         * testsuite/libgomp.fortran/taskloop2.f90: Likewise.
4498         * testsuite/libgomp.fortran/taskloop3.f90: Likewise.
4499         * testsuite/libgomp.fortran/taskloop4.f90: Likewise.
4500         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
4501         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
4502         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
4503         * testsuite/libgomp.fortran/threadprivate4.f90: Likewise.
4504         * testsuite/libgomp.fortran/udr1.f90: Likewise.
4505         * testsuite/libgomp.fortran/udr10.f90: Likewise.
4506         * testsuite/libgomp.fortran/udr11.f90: Likewise.
4507         * testsuite/libgomp.fortran/udr12.f90: Likewise.
4508         * testsuite/libgomp.fortran/udr13.f90: Likewise.
4509         * testsuite/libgomp.fortran/udr14.f90: Likewise.
4510         * testsuite/libgomp.fortran/udr15.f90: Likewise.
4511         * testsuite/libgomp.fortran/udr2.f90: Likewise.
4512         * testsuite/libgomp.fortran/udr3.f90: Likewise.
4513         * testsuite/libgomp.fortran/udr4.f90: Likewise.
4514         * testsuite/libgomp.fortran/udr5.f90: Likewise.
4515         * testsuite/libgomp.fortran/udr6.f90: Likewise.
4516         * testsuite/libgomp.fortran/udr7.f90: Likewise.
4517         * testsuite/libgomp.fortran/udr8.f90: Likewise.
4518         * testsuite/libgomp.fortran/udr9.f90: Likewise.
4519         * testsuite/libgomp.fortran/vla1.f90: Likewise.
4520         * testsuite/libgomp.fortran/vla2.f90: Likewise.
4521         * testsuite/libgomp.fortran/vla3.f90: Likewise.
4522         * testsuite/libgomp.fortran/vla4.f90: Likewise.
4523         * testsuite/libgomp.fortran/vla5.f90: Likewise.
4524         * testsuite/libgomp.fortran/vla6.f90: Likewise.
4525         * testsuite/libgomp.fortran/vla7.f90: Likewise.
4526         * testsuite/libgomp.fortran/vla8.f90: Likewise.
4527         * testsuite/libgomp.fortran/workshare1.f90: Likewise.
4528         * testsuite/libgomp.fortran/workshare2.f90: Likewise.
4529         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
4530         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
4531         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
4532         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
4533         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
4534         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
4535         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
4536         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
4537         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Likewise.
4538         * testsuite/libgomp.oacc-fortran/atomic_rw-1.f90: Likewise.
4539         * testsuite/libgomp.oacc-fortran/atomic_update-1.f90: Likewise.
4540         * testsuite/libgomp.oacc-fortran/c2.pl: Likewise.
4541         * testsuite/libgomp.oacc-fortran/clauses-1.f90: Likewise.
4542         * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
4543         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
4544         * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
4545         * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
4546         * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
4547         * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
4548         * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
4549         * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
4550         * testsuite/libgomp.oacc-fortran/combined-directives-1.f90: Likewise.
4551         * testsuite/libgomp.oacc-fortran/combined-reduction.f90: Likewise.
4552         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
4553         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
4554         * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
4555         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
4556         * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
4557         * testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise.
4558         * testsuite/libgomp.oacc-fortran/declare-2.f90: Likewise.
4559         * testsuite/libgomp.oacc-fortran/declare-3.f90: Likewise.
4560         * testsuite/libgomp.oacc-fortran/declare-4.f90: Likewise.
4561         * testsuite/libgomp.oacc-fortran/declare-5.f90: Likewise.
4562         * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
4563         * testsuite/libgomp.oacc-fortran/firstprivate-1.f90: Likewise.
4564         * testsuite/libgomp.oacc-fortran/gang-static-1.f90: Likewise.
4565         * testsuite/libgomp.oacc-fortran/host_data-1.f90: Likewise.
4566         * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
4567         * testsuite/libgomp.oacc-fortran/implicit-firstprivate-ref.f90: Likewise.
4568         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Likewise.
4569         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95: Likewise.
4570         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95: Likewise.
4571         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95: Likewise.
4572         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95: Likewise.
4573         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Likewise.
4574         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Likewise.
4575         * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
4576         * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
4577         * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
4578         * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
4579         * testsuite/libgomp.oacc-fortran/lib-32-1.f: Likewise.
4580         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
4581         * testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
4582         * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
4583         * testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
4584         * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
4585         * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
4586         * testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
4587         * testsuite/libgomp.oacc-fortran/nested-function-1.f90: Likewise.
4588         * testsuite/libgomp.oacc-fortran/nested-function-2.f90: Likewise.
4589         * testsuite/libgomp.oacc-fortran/nested-function-3.f90: Likewise.
4590         * testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Likewise.
4591         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
4592         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
4593         * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: Likewise.
4594         * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
4595         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise.
4596         * testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
4597         * testsuite/libgomp.oacc-fortran/pr70643.f90: Likewise.
4598         * testsuite/libgomp.oacc-fortran/pr81352.f90: Likewise.
4599         * testsuite/libgomp.oacc-fortran/pr83920.f90: Likewise.
4600         * testsuite/libgomp.oacc-fortran/pr84028.f90: Likewise.
4601         * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
4602         * testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
4603         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
4604         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
4605         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
4606         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
4607         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
4608         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
4609         * testsuite/libgomp.oacc-fortran/reduction-7.f90: Likewise.
4610         * testsuite/libgomp.oacc-fortran/reduction-8.f90: Likewise.
4611         * testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
4612         * testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
4613         * testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
4614         * testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
4615         * testsuite/libgomp.oacc-fortran/routine-5.f90: Likewise.
4616         * testsuite/libgomp.oacc-fortran/routine-7.f90: Likewise.
4617         * testsuite/libgomp.oacc-fortran/routine-9.f90: Likewise.
4618         * testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
4619         * testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
4620         * testsuite/libgomp.oacc-fortran/update-1.f90: Likewise.
4621
4622 2018-03-20  Richard Biener  <rguenther@suse.de>
4623
4624         * testsuite/libgomp.graphite/force-parallel-4.c: XFAIL one
4625         parallelizable loop.
4626
4627 2018-02-19  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
4628
4629         PR target/84148
4630         * configure: Regenerate.
4631
4632 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
4633
4634         PR fortran/84418
4635         * libgomp.fortran/pr84418-1.f90: New test.
4636         * libgomp.fortran/pr84418-2.f90: New test.
4637
4638 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
4639
4640         PR fortran/84313
4641         * testsuite/libgomp.fortran/threadprivate4.f90: Add
4642         -std=f2003 -fall-intrinsics into dg-additional-options.
4643
4644 2018-02-08  Martin Jambor  <mjambor@suse.cz>
4645
4646         * testsuite/libgomp.hsa.c/pr82416.c: Make the function with target
4647         clonable.
4648
4649 2018-02-08  Martin Jambor  <mjambor@suse.cz>
4650
4651         * testsuite/libgomp.hsa.c/staticvar.c: New test.
4652
4653 2018-02-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4654
4655         * testsuite/libgomp.oacc-c-c++-common/pr84217.c (abort)
4656         [__cplusplus]: Declare extern "C".
4657
4658 2018-02-07  Tom de Vries  <tom@codesourcery.com>
4659
4660         PR libgomp/84217
4661         * testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test.
4662
4663 2018-01-29  Christoph Spiel  <cspiel@freenet.de>
4664             Jakub Jelinek  <jakub@redhat.com>
4665
4666         PR libgomp/84096
4667         * omp.h.in (omp_init_nest_lock_with_hint): Use omp_nest_lock_t
4668         instead of omp_lock_t.
4669
4670 2018-01-25  Tom de Vries  <tom@codesourcery.com>
4671
4672         PR target/84028
4673         * testsuite/libgomp.oacc-fortran/pr84028.f90: New test.
4674
4675 2018-01-24  Tom de Vries  <tom@codesourcery.com>
4676
4677         PR target/83589
4678         * testsuite/libgomp.oacc-c-c++-common/pr83589.c: New test.
4679
4680 2018-01-24  Tom de Vries  <tom@codesourcery.com>
4681
4682         PR target/81352
4683         * testsuite/libgomp.oacc-fortran/pr81352.f90: New test.
4684
4685 2018-01-19  Tom de Vries  <tom@codesourcery.com>
4686             Cesar Philippidis  <cesar@codesourcery.com>
4687
4688         PR target/83920
4689         * testsuite/libgomp.oacc-c-c++-common/pr83920.c: New test.
4690         * testsuite/libgomp.oacc-fortran/pr83920.f90: New test.
4691
4692 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
4693
4694         Update copyright years.
4695
4696         * libgomp.texi: Bump @copying's copyright year.
4697
4698 2017-12-30  Tom de Vries  <tom@codesourcery.com>
4699
4700         PR libgomp/83046
4701         * testsuite/libgomp.oacc-c-c++-common/pr83046.c: New test.
4702         * testsuite/libgomp.c-c++-common/pr83046.c: New test.
4703
4704 2017-12-27  Tom de Vries  <tom@codesourcery.com>
4705
4706         PR c++/83046
4707         * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c (test_static)
4708         (test_nonstatic): Fix return type to workaround PR83046.
4709
4710 2017-12-05  Jakub Jelinek  <jakub@redhat.com>
4711
4712         PR testsuite/83281
4713         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c (main): Use
4714         j suffix instead of i.
4715         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c (main):
4716         Likewise.
4717
4718 2017-12-01  Cesar Philippidis  <cesar@codesourcery.com>
4719
4720         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Add missing
4721         call to acc_wait (1).
4722
4723 2017-11-24  Jakub Jelinek  <jakub@redhat.com>
4724
4725         PR fortran/81304
4726         * testsuite/libgomp.fortran/pr81304.f90: New test.
4727
4728 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
4729
4730         PR fortran/81841
4731         * libgomp.fortran/pr81841.f90: New test.
4732
4733 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
4734
4735         PR libgomp/83106
4736         * target.c (gomp_target_init): Compute lengths just once and
4737         use them in both malloc size and subsequent copying.
4738
4739 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
4740
4741         * configure.ac: Set CET_FLAGS, update XCFLAGS and FCFLAGS.
4742         * acinclude.m4: Add cet.m4.
4743         * configure: Regenerate.
4744         * Makefile.in: Likewise.
4745         * testsuite/Makefile.in: Likewise.
4746
4747 2017-11-15  Tom de Vries  <tom@codesourcery.com>
4748
4749         * testsuite/libgomp.oacc-c-c++-common/f-asyncwait-1.c: New test, copied
4750         from asyncwait-1.f90.  Rewrite into C.  Rewrite from float to int.
4751         * testsuite/libgomp.oacc-c-c++-common/f-asyncwait-2.c: New test, copied
4752         from asyncwait-2.f90.  Rewrite into C.  Rewrite from float to int.
4753         * testsuite/libgomp.oacc-c-c++-common/f-asyncwait-3.c: New test, copied
4754         from asyncwait-3.f90.  Rewrite into C.  Rewrite from float to int.
4755
4756 2017-11-14  Tom de Vries  <tom@codesourcery.com>
4757
4758         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Allow to run for
4759         non-nvidia devices.
4760
4761 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
4762
4763         PR c++/82835
4764         * testsuite/libgomp.c++/pr82835.C: New test.
4765
4766 2017-11-06  Martin Liska  <mliska@suse.cz>
4767
4768         * testsuite/libgomp.c++/loop-2.C: Return a value
4769         for functions with non-void return type, or change type to void,
4770         or add -Wno-return-type for test.
4771         * testsuite/libgomp.c++/loop-4.C: Likewise.
4772         * testsuite/libgomp.c++/parallel-1.C: Likewise.
4773         * testsuite/libgomp.c++/shared-1.C: Likewise.
4774         * testsuite/libgomp.c++/single-1.C: Likewise.
4775         * testsuite/libgomp.c++/single-2.C: Likewise.
4776
4777 2017-10-31  Tom de Vries  <tom@codesourcery.com>
4778
4779         * plugin/plugin-hsa.c (HSA_LOG): Remove semicolon after
4780         "do {} while (false)".
4781         (init_single_kernel, GOMP_OFFLOAD_async_run): Add missing semicolon
4782         after HSA_DEBUG call.
4783
4784 2017-10-28  Jakub Jelinek  <jakub@redhat.com>
4785
4786         * target.c (struct gomp_coalesce_buf): New type.
4787         (MAX_COALESCE_BUF_SIZE, MAX_COALESCE_BUF_GAP): Define.
4788         (gomp_coalesce_buf_add, gomp_to_device_kind_p): New functions.
4789         (gomp_copy_host2dev): Add CBUF argument, if copying into
4790         the cached ranges, memcpy into buffer instead of copying
4791         into device.
4792         (gomp_map_vars_existing, gomp_map_pointer, gomp_map_fields_existing):
4793         Add CBUF argument, pass it through to other calls.
4794         (gomp_map_vars): Aggregate copies from host to device if small enough
4795         and with small enough gaps in between into memcpy into a buffer and
4796         fewer host to device copies from the buffer.
4797         (gomp_update): Adjust gomp_copy_host2dev caller.
4798
4799 2017-10-17  Thomas Schwinge  <thomas@codesourcery.com>
4800
4801         * testsuite/libgomp.oacc-fortran/declare-1.f90: Restore "dg-do
4802         run" directive.
4803         * testsuite/libgomp.oacc-fortran/declare-2.f90: Likewise.
4804         * testsuite/libgomp.oacc-fortran/declare-3.f90: Likewise.
4805         * testsuite/libgomp.oacc-fortran/declare-4.f90: Likewise.
4806         * testsuite/libgomp.oacc-fortran/declare-5.f90: Likewise.
4807
4808 2017-10-16  Tom de Vries  <tom@codesourcery.com>
4809
4810         * testsuite/libgomp.oacc-c-c++-common/declare-1.c: Don't require
4811         openacc_nvidia_accel_selected.
4812         * testsuite/libgomp.oacc-c-c++-common/declare-2.c: Same.
4813         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Same.
4814         * testsuite/libgomp.oacc-fortran/declare-2.f90: Same.
4815         * testsuite/libgomp.oacc-fortran/declare-4.f90: Same
4816         * testsuite/libgomp.oacc-fortran/declare-5.f90: Same.
4817         * testsuite/libgomp.oacc-c-c++-common/declare-5.c: Don't require
4818         openacc_nvidia_accel_selected. Skip for shared memory device.
4819         * testsuite/libgomp.oacc-fortran/declare-1.f90: Same.
4820         * testsuite/libgomp.oacc-fortran/declare-3.f90: Same.
4821
4822 2017-10-09  Martin Jambor  <mjambor@suse.cz>
4823
4824         PR hsa/82416
4825         * testsuite/libgomp.hsa.c/pr82416.c: New test.
4826
4827 2017-10-07  Tom de Vries  <tom@codesourcery.com>
4828
4829         * testsuite/libgomp.oacc-fortran/firstprivate-1.f90 (firstprivate):
4830         Remove acc_device_nvidia references.
4831         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90 (reduction):
4832         Same.
4833
4834 2017-10-05  Tom de Vries  <tom@codesourcery.com>
4835
4836         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c (main): Remove
4837         vector_length(32) clause from acc parallel directive.
4838         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c (main): Same.
4839
4840 2017-10-04  Tom de Vries  <tom@codesourcery.com>
4841
4842         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c
4843         (main): Reduce sum of arr elements.  Assert that hres is exactly
4844         representable in 32-bit floating point.
4845         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c
4846         (main): Reduce sum of arr elements.  Assert that hres and hmres are
4847         exactly representable in 32-bit floating point.
4848         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c (gwv_np_4): Same.
4849
4850 2017-09-28  Tom de Vries  <tom@codesourcery.com>
4851
4852         * testsuite/libgomp.c++/for-12.C: Remove superfluous -fopenmp option
4853         setting.
4854         * testsuite/libgomp.c++/pr69393.C: Same.
4855         * testsuite/libgomp.c++/taskloop-1.C: Same.
4856         * testsuite/libgomp.c++/taskloop-3.C: Same.
4857         * testsuite/libgomp.c++/taskloop-4.C: Same.
4858         * testsuite/libgomp.c/for-4.c: Same.
4859         * testsuite/libgomp.c/pr66199-3.c: Same.
4860         * testsuite/libgomp.c/pr66199-4.c: Same.
4861         * testsuite/libgomp.c/pr66199-6.c: Same.
4862         * testsuite/libgomp.c/taskloop-1.c: Same.
4863         * testsuite/libgomp.c/taskloop-3.c: Same.
4864         * testsuite/libgomp.c/taskloop-4.c: Same.
4865         * testsuite/libgomp.fortran/aligned1.f03: Same.
4866         * testsuite/libgomp.fortran/condinc1.f: Same.
4867         * testsuite/libgomp.fortran/condinc3.f90: Same.
4868         * testsuite/libgomp.fortran/crayptr1.f90: Same.
4869         * testsuite/libgomp.fortran/crayptr2.f90: Same.
4870         * testsuite/libgomp.fortran/crayptr3.f90: Same.
4871         * testsuite/libgomp.fortran/omp_cond1.f: Same.
4872         * testsuite/libgomp.fortran/omp_cond3.F90: Same.
4873         * testsuite/libgomp.fortran/pr66199-1.f90: Same.
4874         * testsuite/libgomp.fortran/pr66199-2.f90: Same.
4875         * testsuite/libgomp.fortran/recursion1.f90: Same.
4876         * testsuite/libgomp.fortran/target2.f90: Same.
4877         * testsuite/libgomp.fortran/target5.f90: Same.
4878         * testsuite/libgomp.fortran/task3.f90: Same.
4879
4880 2017-09-28  Tom de Vries  <tom@codesourcery.com>
4881
4882         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c (main): Remove
4883         vector_length(32) clause from acc parallel directive.
4884         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c (main): Same.
4885
4886 2017-09-27  Tom de Vries  <tom@codesourcery.com>
4887
4888         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c (main):
4889         Remove acc_device_nvidia references.
4890
4891 2017-09-16  Tom de Vries  <tom@codesourcery.com>
4892
4893         PR c/81875
4894         * testsuite/libgomp.c-c++-common/pr81875.c: New test.
4895
4896 2017-09-14  Tom de Vries  <tom@codesourcery.com>
4897
4898         * testsuite/libgomp.c++/cancel-taskgroup-1.C: Remove.
4899         * testsuite/libgomp.c/cancel-taskgroup-1.c: Move to ...
4900         * testsuite/libgomp.c-c++-common/cancel-taskgroup-1.c: ... here.
4901         * testsuite/libgomp.c/c.exp: Include test-cases from
4902         libgomp.c-c++-common.
4903         * testsuite/libgomp.c++/c++.exp: Same.  Force c++-mode compilation of .c
4904         files.
4905
4906 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
4907
4908         PR c++/81314
4909         * testsuite/libgomp.c++/pr81314.C: New test.
4910
4911 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
4912
4913         * libgomp.texi (Top): www.openacc.org now uses https.
4914         (Enabling OpenACC): Ditto.
4915         (acc_get_num_devices): Ditto.
4916         (acc_set_device_type): Ditto.
4917         (acc_get_device_type): Ditto.
4918         (acc_set_device_num): Ditto.
4919         (acc_get_device_num): Ditto.
4920         (acc_async_test): Ditto.
4921         (acc_async_test_all): Ditto.
4922         (acc_wait): Ditto.
4923         (acc_wait_all): Ditto.
4924         (acc_wait_all_async): Ditto.
4925         (acc_wait_async): Ditto.
4926         (acc_init): Ditto.
4927         (acc_shutdown): Ditto.
4928         (acc_on_device): Ditto.
4929         (acc_malloc): Ditto.
4930         (acc_free): Ditto.
4931         (acc_copyin): Ditto.
4932         (acc_present_or_copyin): Ditto.
4933         (acc_create): Ditto.
4934         (acc_present_or_create): Ditto.
4935         (acc_copyout): Ditto.
4936         (acc_delete): Ditto.
4937         (acc_update_device): Ditto.
4938         (acc_update_self): Ditto.
4939         (acc_map_data): Ditto.
4940         (acc_unmap_data): Ditto.
4941         (acc_deviceptr): Ditto.
4942         (acc_hostptr): Ditto.
4943         (acc_is_present): Ditto.
4944         (acc_memcpy_to_device): Ditto.
4945         (acc_memcpy_from_device): Ditto.
4946         (acc_get_current_cuda_device): Ditto.
4947         (acc_get_current_cuda_context): Ditto.
4948         (acc_get_cuda_stream): Ditto.
4949         (acc_set_cuda_stream): Ditto.
4950         (ACC_DEVICE_TYPE): Ditto.
4951         (ACC_DEVICE_NUM): Ditto.
4952         (OpenACC Library Interoperability): Ditto.
4953
4954 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
4955
4956         PR c/81687
4957         * testsuite/libgomp.c/pr81687-1.c: New test.
4958         * testsuite/libgomp.c/pr81687-2.c: New test.
4959
4960 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
4961
4962         PR c/69389
4963         * testsuite/libgomp.c/pr69389.c: New test.
4964         * testsuite/libgomp.c++/pr69389.C: New test.
4965
4966 2017-08-07  Tom de Vries  <tom@codesourcery.com>
4967
4968         PR middle-end/78266
4969         * testsuite/libgomp.oacc-c-c++-common/vprop-2.c: New test.
4970         * testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove xfail.
4971
4972 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
4973
4974         PR c/45784
4975         * testsuite/libgomp.c/pr45784.c: New test.
4976         * testsuite/libgomp.c++/pr45784.C: New test.
4977
4978 2017-07-19  Tom de Vries  <tom@codesourcery.com>
4979
4980         * testsuite/libgomp.oacc-c/vec.c: New test.
4981
4982 2017-07-03  Tom de Vries  <tom@codesourcery.com>
4983
4984         * plugin/plugin-hsa.c: Fix secure_getenv.h include.
4985
4986 2017-06-27  Tom de Vries  <tom@codesourcery.com>
4987
4988         * plugin/plugin-nvptx.c (notify_var): New function.
4989         (nvptx_exec): Use notify_var for GOMP_OPENACC_DIM.
4990
4991 2017-06-27  Tom de Vries  <tom@codesourcery.com>
4992
4993         * env.c (parse_unsigned_long_1): Factor out of ...
4994         (parse_unsigned_long): ... here.
4995         (parse_int_1): Factor out of ...
4996         (parse_int): ... here.
4997         (parse_int_secure): New function.
4998         (initialize_env): Use parse_int_secure for GOMP_DEBUG.
4999         * secure_getenv.h: Factor out of ...
5000         * plugin/plugin-hsa.c: ... here.
5001         * testsuite/libgomp.oacc-c-c++-common/gomp-debug-env.c: New test.
5002
5003 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
5004
5005         PR c++/81130
5006         * testsuite/libgomp.c++/pr81130.C: New test.
5007
5008 2017-06-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5009
5010         * testsuite/libgomp.fortran/strassen.f90: Remove dg-skip-if
5011         default args.
5012         * testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove
5013         dg-xfail-run-if default args.
5014
5015 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5016
5017         * testsuite/libgomp.c/pr39591-2.c: Fix test case.
5018         * testsuite/libgomp.c/pr39591-3.c: Likewise.
5019
5020 2017-05-30  Jakub Jelinek  <jakub@redhat.com>
5021
5022         PR libgomp/80822
5023         * config/linux/affinity.c (gomp_affinity_init_level_1): New function.
5024         (gomp_affinity_init_level): Use it.  Always analyze the core and thread
5025         sibling lists, depending on level just pick up what CPUs to put
5026         together into a place vs. whether add multiple ordered places.
5027
5028 2017-05-24  Thomas Schwinge  <thomas@codesourcery.com>
5029
5030         * openacc.h (acc_async_wait, acc_async_wait_all): New prototypes.
5031         * libgomp.map (OACC_2.0.1): Add these.
5032         * oacc-async.c (acc_async_wait, acc_async_wait_all): New aliases
5033         for "acc_wait", and "acc_wait_all", respectively.
5034         * openacc.f90 (acc_async_wait, acc_async_wait_all): New interfaces
5035         for "acc_wait", and "acc_wait_all", respectively.
5036         * openacc_lib.h (acc_async_wait, acc_async_wait_all): Likewise.
5037         * libgomp.texi (acc_wait, acc_wait_all): Update.
5038         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Update.
5039         * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f: New file.
5040         * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
5041
5042         * openacc_lib.h (acc_pcopyin, acc_pcreate): Route to
5043         acc_present_or_copyin and acc_present_or_create procedures,
5044         respectively.
5045         * testsuite/libgomp.oacc-fortran/lib-32-1.f: Exercise these, and
5046         generally different variants of OpenACC Runtime Library functions.
5047         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
5048
5049         * testsuite/libgomp.oacc-fortran/lib-32-1.f: New file.
5050         * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
5051
5052         * openacc.h (acc_pcopyin, acc_pcreate): Provide prototypes instead
5053         of preprocessor definitions.
5054         * libgomp.h (strong_alias): Guard by "#ifdef
5055         HAVE_ATTRIBUTE_ALIAS".
5056         * oacc-mem.c: Provide "acc_pcreate" as alias for
5057         "acc_present_or_create", and "acc_pcopyin" as alias for
5058         "acc_present_or_copyin".
5059         * libgomp.map: New version "OACC_2.0.1".
5060         (OACC_2.0.1): Add "acc_pcopyin", and "acc_pcreate".
5061         * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Remove, merging
5062         its content into...
5063         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: ... this file.
5064         Extend testing.
5065
5066         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Debugging output
5067         when disabling nvptx offloading.
5068
5069 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
5070
5071         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Update.
5072         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
5073         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Likewise.
5074
5075         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Rewrite.
5076         * testsuite/lib/libgomp.exp
5077         (check_effective_target_openacc_nvidia_accel_configured): New
5078         proc.
5079         * testsuite/libgomp.oacc-c++/c++.exp (check_effective_target_c)
5080         (check_effective_target_c++): New procs.
5081         * testsuite/libgomp.oacc-c/c.exp (check_effective_target_c)
5082         (check_effective_target_c++): Likewise.
5083
5084 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
5085
5086         PR middle-end/80809
5087         * testsuite/libgomp.c/pr80809-2.c: New test.
5088         * testsuite/libgomp.c/pr80809-3.c: New test.
5089
5090         PR middle-end/80809
5091         * testsuite/libgomp.c/pr80809-1.c: New test.
5092
5093         PR middle-end/80853
5094         * testsuite/libgomp.c/pr80853.c: New test.
5095
5096 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
5097
5098         * testsuite/libgomp.oacc-c++/template-reduction.C: Update.
5099         * testsuite/libgomp.oacc-c-c++-common/nested-2.c: Update.
5100         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
5101         * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
5102         * testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Likewise.
5103
5104         * plugin/plugin-hsa.c (DLSYM_FN, init_hsa_runtime_functions):
5105         Debug output for failure.
5106
5107 2017-05-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5108
5109         * testsuite/lib/libgomp.exp: Load scanlang.exp.
5110
5111 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
5112
5113         PR bootstrap/80531
5114         * configure.tgt (*-*-aix*): Add -frandom-seed=$@ to XCFLAGS to avoid
5115         bootstrap compare failures.
5116
5117 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
5118
5119         * testsuite/libgomp.c/target-36.c: New testcase.
5120
5121 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
5122
5123         * plugin/plugin-nvptx.c (cuda_lib_inited): Use signed char type
5124         instead of char.
5125
5126 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
5127
5128         PR libgomp/80394
5129         * testsuite/libgomp.c/pr80394.c: New test.
5130
5131 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
5132
5133         PR libgomp/79876
5134         * config/posix/thread-stacksize.h: New file.
5135         * config/darwin/thread-stacksize.h: New file.
5136         * config/nvptx/thread-stacksize.h: New file.
5137         * env.c: Include thread-stacksize.h.
5138         (initialize_env): Initialize stacksize to GOMP_DEFAULT_STACKSIZE
5139         instead of 0.  Call pthread_attr_setstacksize even if
5140         GOMP_DEFAULT_STACKSIZE is non-zero.
5141
5142 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
5143
5144         * env.c (initialize_env): Initialize stacksize to 0.
5145
5146 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
5147
5148         PR c++/80029
5149         * testsuite/libgomp.oacc-c-c++-common/declare-vla.c: New test.
5150
5151 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
5152
5153         PR c/79940
5154         * testsuite/libgomp.c/pr79940.c: New test.
5155
5156 2017-02-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5157
5158         * testsuite/libgomp.c/pr48591.c: Enable on all __float128
5159         targets.
5160         Add __float128 options.
5161
5162 2017-02-11  John David Anglin  <danglin@gcc.gnu.org>
5163
5164         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Remove
5165         hppa*-*-* dg-skip-if directive.
5166
5167 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
5168
5169         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Move
5170         dg-skip-if directive into a comment.
5171
5172 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
5173             Chung-Lin Tang  <cltang@codesourcery.com>
5174
5175         * testsuite/libgomp.oacc-c-c++-common/tile-1.c: New.
5176         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust and
5177         add additional case.
5178         * testsuite/libgomp.oacc-c-c++-common/vprop.c: XFAIL under
5179         "openacc_nvidia_accel_selected".
5180         * libgomp.oacc-fortran/nested-function-1.f90 (test2):
5181         Add num_workers(8) clause.
5182
5183 2017-02-08  John David Anglin  <danglin@gcc.gnu.org>
5184
5185         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Skip on
5186         hppa*-*-*.
5187         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Don't
5188         include complex.h on hppa*-*-hpux*.
5189         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise.
5190
5191 2017-02-02  Thomas Schwinge  <thomas@codesourcery.com>
5192
5193         * plugin/plugin-nvptx.c (nvptx_exec): Make it static.
5194
5195         * libgomp-plugin.h (GOMP_OFFLOAD_openacc_parallel): Rename to
5196         GOMP_OFFLOAD_openacc_exec.  Adjust all users.
5197         (GOMP_OFFLOAD_openacc_get_current_cuda_device): Rename to
5198         GOMP_OFFLOAD_openacc_cuda_get_current_device.  Adjust all users.
5199         (GOMP_OFFLOAD_openacc_get_current_cuda_context): Rename to
5200         GOMP_OFFLOAD_openacc_cuda_get_current_context.  Adjust all users.
5201         (GOMP_OFFLOAD_openacc_get_cuda_stream): Rename to
5202         GOMP_OFFLOAD_openacc_cuda_get_stream.  Adjust all users.
5203         (GOMP_OFFLOAD_openacc_set_cuda_stream): Rename to
5204         GOMP_OFFLOAD_openacc_cuda_set_stream.  Adjust all users.
5205
5206 2017-01-31  Thomas Schwinge  <thomas@codesourcery.com>
5207
5208         * libgomp-plugin.h: #include <stdbool.h>.
5209         (GOMP_OFFLOAD_get_name, GOMP_OFFLOAD_get_caps)
5210         (GOMP_OFFLOAD_get_type, GOMP_OFFLOAD_get_num_devices)
5211         (GOMP_OFFLOAD_init_device, GOMP_OFFLOAD_fini_device)
5212         (GOMP_OFFLOAD_version, GOMP_OFFLOAD_load_image)
5213         (GOMP_OFFLOAD_unload_image, GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free)
5214         (GOMP_OFFLOAD_dev2host, GOMP_OFFLOAD_host2dev)
5215         (GOMP_OFFLOAD_dev2dev, GOMP_OFFLOAD_can_run, GOMP_OFFLOAD_run)
5216         (GOMP_OFFLOAD_async_run, GOMP_OFFLOAD_openacc_parallel)
5217         (GOMP_OFFLOAD_openacc_register_async_cleanup)
5218         (GOMP_OFFLOAD_openacc_async_test)
5219         (GOMP_OFFLOAD_openacc_async_test_all)
5220         (GOMP_OFFLOAD_openacc_async_wait)
5221         (GOMP_OFFLOAD_openacc_async_wait_async)
5222         (GOMP_OFFLOAD_openacc_async_wait_all)
5223         (GOMP_OFFLOAD_openacc_async_wait_all_async)
5224         (GOMP_OFFLOAD_openacc_async_set_async)
5225         (GOMP_OFFLOAD_openacc_create_thread_data)
5226         (GOMP_OFFLOAD_openacc_destroy_thread_data)
5227         (GOMP_OFFLOAD_openacc_get_current_cuda_device)
5228         (GOMP_OFFLOAD_openacc_get_current_cuda_context)
5229         (GOMP_OFFLOAD_openacc_get_cuda_stream)
5230         (GOMP_OFFLOAD_openacc_set_cuda_stream): New prototypes.
5231         * libgomp.h (struct acc_dispatch_t, struct gomp_device_descr): Use
5232         these.
5233         * plugin/plugin-hsa.c (GOMP_OFFLOAD_load_image)
5234         (GOMP_OFFLOAD_unload_image): Fix argument types.
5235
5236 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
5237
5238         * testsuite/lib/libgomp.exp
5239         (check_effective_target_hsa_offloading_selected_nocache): Fix up
5240         check_compile invocation.  Fix up removal of executable.  Drop
5241         bogus "2>&1" argument.
5242
5243         * testsuite/libgomp.fortran/declare-simd-4.f90: Add cleanup-modules
5244         directive.
5245
5246 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
5247             Martin Jambor  <mjambor@suse.cz>
5248
5249         * plugin/hsa.h: Moved to top level include.
5250         * plugin/plugin-hsa.c: Chanfgd include of hsa.h accordingly.
5251
5252 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
5253
5254         PR other/79046
5255         * testsuite/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
5256         of cat to get version from BASE-VER file.
5257         * testsuite/Makefile.in: Regenerated.
5258
5259 2017-01-19  Jakub Jelinek  <jakub@redhat.com>
5260
5261         * plugin/cuda/cuda.h (CUdeviceptr): Typedef to unsigned long long even
5262         for _WIN64.
5263
5264 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
5265
5266         * plugin/hsa.h: Add GCC runtime library exception.
5267         * plugin/hsa_ext_finalize.h: Likewise.
5268
5269         * plugin/configfrag.ac: For --without-cuda-driver don't initialize
5270         CUDA_DRIVER_INCLUDE nor CUDA_DRIVER_LIB.  If both
5271         CUDA_DRIVER_INCLUDE and CUDA_DRIVER_LIB are empty and linking small
5272         cuda program fails, define PLUGIN_NVPTX_DYNAMIC to 1 and use
5273         plugin/include/cuda as include dir and -ldl instead of -lcuda as
5274         library to link ptx plugin against.
5275         * plugin/plugin-nvptx.c: Include dlfcn.h if PLUGIN_NVPTX_DYNAMIC.
5276         (CUDA_CALLS): Define.
5277         (cuda_lib, cuda_lib_inited): New variables.
5278         (init_cuda_lib): New function.
5279         (CUDA_CALL_PREFIX): Define.
5280         (CUDA_CALL_ERET, CUDA_CALL_ASSERT): Use CUDA_CALL_PREFIX.
5281         (CUDA_CALL): Use FN instead of (FN).
5282         (CUDA_CALL_NOCHECK): Define.
5283         (cuda_error, fini_streams_for_device, select_stream_for_async,
5284         nvptx_attach_host_thread_to_device, nvptx_open_device, link_ptx,
5285         event_gc, nvptx_exec, nvptx_async_test, nvptx_async_test_all,
5286         nvptx_wait_all, nvptx_set_clocktick, GOMP_OFFLOAD_unload_image,
5287         nvptx_stacks_alloc, nvptx_stacks_free, GOMP_OFFLOAD_run): Use
5288         CUDA_CALL_NOCHECK.
5289         (nvptx_init): Call init_cuda_lib, if it fails, return false.  Use
5290         CUDA_CALL_NOCHECK.
5291         (nvptx_get_num_devices): Call init_cuda_lib, if it fails, return 0.
5292         Use CUDA_CALL_NOCHECK.
5293         * plugin/cuda/cuda.h: New file.
5294         * config.h.in: Regenerated.
5295         * configure: Regenerated.
5296
5297         PR other/79046
5298         * configure.ac: Add GCC_BASE_VER.
5299         * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
5300         get version from BASE-VER file.
5301         * testsuite/Makefile.in: Regenerated.
5302         * configure: Regenerated.
5303         * Makefile.in: Regenerated.
5304
5305 2017-01-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
5306
5307         PR libgomp/60670
5308         * Makefile.am: Make fincludedir multilib-aware.
5309         * Makefile.in: Regenerate.
5310
5311 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
5312
5313         Update copyright years.
5314
5315         * libgomp.texi: Bump @copying's copyright year.
5316
5317 2016-12-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5318
5319         * libgomp/config/rtems/pool.h (gomp_thread_pool_reservoir): Use
5320         pthread_spinlock_t instead of gomp_mutex_t lock.
5321         (gomp_get_thread_pool): Likewise.
5322         (gomp_release_thread_pool): Likewise.
5323         * libgomp/config/rtems/proc.c (allocate_thread_pool_reservoir):
5324         Likewise.
5325
5326 2016-12-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5327
5328         * config/rtems/pool.h (gomp_get_thread_pool): Return proper
5329         thread pool in case nthreads == 1.
5330
5331 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
5332
5333         * config/nvptx/env.c: Delete.
5334         * icv.c: Move definitions of ICV variables back ...
5335         * env.c: ...here.  Do not compile environment-related functionality if
5336         LIBGOMP_OFFLOADED_ONLY is set.
5337
5338 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
5339
5340         * configure.ac [nvptx*-*-*] (libgomp_offloaded_only): Set and use it...
5341         (LIBGOMP_OFFLOADED_ONLY): ...here; new define.
5342         * configure: Regenerate.
5343         * config.h.in: Likewise.
5344
5345 2016-11-30  Alexander Monakov  <amonakov@ispras.ru>
5346
5347         * Makefile.in: Regenerate with automake-1.11.6.
5348         * aclocal.m4: Likewise.
5349         * configure: Likewise.
5350         * testsuite/Makefile.in: Likewise.
5351
5352 2016-11-28  Alexander Monakov  <amonakov@ispras.ru>
5353
5354         * config/nvptx/critical.c: Delete to use generic implementation.
5355
5356 2016-11-28  Jonas Hahnfeld  <Hahnfeld@itc.rwth-aachen.de>
5357
5358         * config/linux/affinity.c [!HAVE_PTHREAD_AFFINITY_NP]: Include
5359         ../../affinity.c as fallback.
5360         * config/nvptx/affinity.c: Delete to use fallback implementation.
5361
5362 2016-11-23  Alexander Monakov  <amonakov@ispras.ru>
5363             Jakub Jelinek  <jakub@redhat.com>
5364             Dmitry Melnik  <dm@ispras.ru>
5365
5366         * Makefile.am (libgomp_la_SOURCES): Add atomic.c, icv.c, icv-device.c.
5367         * Makefile.in. Regenerate.
5368         * configure.ac [nvptx*-*-*] (libgomp_use_pthreads): Set and use it...
5369         (LIBGOMP_USE_PTHREADS): ...here; new define.
5370         * configure: Regenerate.
5371         * config.h.in: Likewise.
5372         * config/posix/affinity.c: Move to...
5373         * affinity.c: ...here (new file).  Guard use of Pthreads-specific
5374         interface by LIBGOMP_USE_PTHREADS. 
5375         * critical.c: Split out GOMP_atomic_{start,end} into...
5376         * atomic.c: ...here (new file).
5377         * env.c: Split out ICV definitions into...
5378         * icv.c: ...here (new file) and...
5379         * icv-device.c: ...here. New file.
5380         * config/linux/lock.c (gomp_init_lock_30): Move to generic lock.c.
5381         (gomp_destroy_lock_30): Ditto.
5382         (gomp_set_lock_30): Ditto.
5383         (gomp_unset_lock_30): Ditto.
5384         (gomp_test_lock_30): Ditto.
5385         (gomp_init_nest_lock_30): Ditto.
5386         (gomp_destroy_nest_lock_30): Ditto.
5387         (gomp_set_nest_lock_30): Ditto.
5388         (gomp_unset_nest_lock_30): Ditto.
5389         (gomp_test_nest_lock_30): Ditto.
5390         * lock.c: New.
5391         * config/nvptx/lock.c: New.
5392         * config/nvptx/bar.c: New.
5393         * config/nvptx/bar.h: New.
5394         * config/nvptx/doacross.h: New.
5395         * config/nvptx/error.c: New.
5396         * config/nvptx/icv-device.c: New.
5397         * config/nvptx/mutex.h: New.
5398         * config/nvptx/pool.h: New.
5399         * config/nvptx/proc.c: New.
5400         * config/nvptx/ptrlock.h: New.
5401         * config/nvptx/sem.h: New.
5402         * config/nvptx/simple-bar.h: New.
5403         * config/nvptx/target.c: New.
5404         * config/nvptx/task.c: New.
5405         * config/nvptx/team.c: New.
5406         * config/nvptx/time.c: New.
5407         * config/posix/simple-bar.h: New.
5408         * libgomp.h: Guard pthread.h inclusion.  Include simple-bar.h.
5409         (gomp_num_teams_var): Declare.
5410         (struct gomp_thread_pool): Change threads_dock member to
5411         gomp_simple_barrier_t.
5412         [__nvptx__] (gomp_thread): New implementation.
5413         (gomp_thread_attr): Guard by LIBGOMP_USE_PTHREADS.
5414         (gomp_thread_destructor): Ditto.
5415         (gomp_init_thread_affinity): Ditto.
5416         * team.c: Guard uses of Pthreads-specific interfaces by
5417         LIBGOMP_USE_PTHREADS.  Adjust all uses of threads_dock.
5418         (gomp_free_thread) [__nvptx__]: Do not call 'free'.
5419         * config/nvptx/alloc.c: Delete.
5420         * config/nvptx/barrier.c: Ditto.
5421         * config/nvptx/fortran.c: Ditto.
5422         * config/nvptx/iter.c: Ditto.
5423         * config/nvptx/iter_ull.c: Ditto.
5424         * config/nvptx/loop.c: Ditto.
5425         * config/nvptx/loop_ull.c: Ditto.
5426         * config/nvptx/ordered.c: Ditto.
5427         * config/nvptx/parallel.c: Ditto.
5428         * config/nvptx/priority_queue.c: Ditto.
5429         * config/nvptx/sections.c: Ditto.
5430         * config/nvptx/single.c: Ditto.
5431         * config/nvptx/splay-tree.c: Ditto.
5432         * config/nvptx/work.c: Ditto.
5433         * testsuite/libgomp.fortran/fortran.exp (lang_link_flags): Pass
5434         -foffload=-lgfortran in addition to -lgfortran.
5435         * testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags): Ditto.
5436         * plugin/plugin-nvptx.c: Include <limits.h>.
5437         (struct targ_fn_descriptor): Add new fields.
5438         (struct ptx_device): Ditto.  Set them...
5439         (nvptx_open_device): ...here.
5440         (nvptx_adjust_launch_bounds): New.
5441         (nvptx_host2dev): Allow NULL 'nvthd'.
5442         (nvptx_dev2host): Ditto.
5443         (GOMP_OFFLOAD_get_caps): Add GOMP_OFFLOAD_CAP_OPENMP_400.
5444         (link_ptx): Adjust log sizes.
5445         (nvptx_host2dev): Allow NULL 'nvthd'.
5446         (nvptx_dev2host): Ditto.
5447         (nvptx_set_clocktick): New.  Use it...
5448         (GOMP_OFFLOAD_load_image): ...here.  Set new targ_fn_descriptor
5449         fields.
5450         (GOMP_OFFLOAD_dev2dev): New.
5451         (nvptx_adjust_launch_bounds): New.
5452         (nvptx_stacks_size): New.
5453         (nvptx_stacks_alloc): New.
5454         (nvptx_stacks_free): New.
5455         (GOMP_OFFLOAD_run): New.
5456         (GOMP_OFFLOAD_async_run): New (stub).
5457
5458 2016-11-23  Martin Jambor  <mjambor@suse.cz>
5459
5460         * testsuite/libgomp.hsa.c/bits-insns.c: New test.
5461         * testsuite/libgomp.hsa.c/tiling-1.c: Likewise.
5462         * testsuite/libgomp.hsa.c/tiling-2.c: Likewise.
5463
5464 2016-11-23  Martin Liska  <mliska@suse.cz>
5465             Martin Jambor  <mjambor@suse.cz>
5466
5467         * plugin/hsa.h: New file.
5468         * plugin/hsa_ext_finalize.h: New file.
5469         * plugin/configfrag.ac: Remove hsa-kmt-lib test.  Added checks for
5470         header file unistd.h, and functions secure_getenv, __secure_getenv,
5471         getuid, geteuid, getgid and getegid.
5472         * plugin/Makefrag.am (libgomp_plugin_hsa_la_CPPFLAGS): Added
5473         -D_GNU_SOURCE.
5474         * plugin/plugin-hsa.c: Include config.h, inttypes.h and stdbool.h.
5475         Handle various cases of secure_getenv presence, add an implementation
5476         when we can test effective UID and GID.
5477         (struct hsa_runtime_fn_info): New structure.
5478         (hsa_runtime_fn_info hsa_fns): New variable.
5479         (hsa_runtime_lib): Likewise.
5480         (support_cpu_devices): Likewise.
5481         (init_enviroment_variables): Load newly introduced ENV
5482         variables.
5483         (hsa_warn): Call hsa run-time functions via hsa_fns structure.
5484         (hsa_fatal): Likewise.
5485         (DLSYM_FN): New macro.
5486         (init_hsa_runtime_functions): New function.
5487         (suitable_hsa_agent_p): Call hsa run-time functions via hsa_fns
5488         structure.  Depending on environment, also allow CPU devices.
5489         (init_hsa_context): Call hsa run-time functions via hsa_fns structure.
5490         (get_kernarg_memory_region): Likewise.
5491         (GOMP_OFFLOAD_init_device): Likewise.
5492         (destroy_hsa_program): Likewise.
5493         (init_basic_kernel_info): New function.
5494         (GOMP_OFFLOAD_load_image): Use it.
5495         (create_and_finalize_hsa_program): Call hsa run-time functions via
5496         hsa_fns structure.
5497         (create_single_kernel_dispatch): Likewise.
5498         (release_kernel_dispatch): Likewise.
5499         (init_single_kernel): Likewise.
5500         (parse_target_attributes): Allow up multiple HSA grid dimensions.
5501         (get_group_size): New function.
5502         (run_kernel): Likewise.
5503         (GOMP_OFFLOAD_run): Outline most functionality to run_kernel.
5504         (GOMP_OFFLOAD_fini_device): Call hsa run-time functions via hsa_fns
5505         structure.
5506         * testsuite/lib/libgomp.exp: Remove hsa_kmt_lib support.
5507         * testsuite/libgomp-test-support.exp.in: Likewise.
5508         * Makefile.in: Regenerated.
5509         * aclocal.m4: Likewise.
5510         * config.h.in: Likewise.
5511         * configure: Likewise.
5512         * testsuite/Makefile.in: Likewise.
5513
5514 2016-11-15  Martin Jambor  <mjambor@suse.cz>
5515             Alexander Monakov  <amonakov@ispras.ru>
5516
5517         * testsuite/libgomp.fortran/examples-4/device-1.f90 (e_57_1): Add
5518         mapping clauses to target constructs.
5519         * testsuite/libgomp.fortran/examples-4/device-3.f90 (e_57_3): Ditto.
5520
5521 2016-11-15  Matthias Klose  <doko@ubuntu.com>
5522
5523         * configure: Regenerate.
5524
5525 2016-11-10  Jakub Jelinek  <jakub@redhat.com>
5526
5527         * omp_lib.f90.in (openmp_version): Change to 201511 from 201307.
5528         * omp_lib.h.in (openmp_version): Likewise.
5529         * testsuite/libgomp.fortran/openmp_version-1.f: Expect 201511 instead
5530         of 201307.
5531         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
5532
5533         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90
5534         (fib_wrapper): Add map(from: x) clause.
5535         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90
5536         (e_53_2): Likewise.
5537         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90
5538         (accum): Add map(tmp) clause.
5539         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90
5540         (accum): Add map(tofrom: tmp) clause.
5541         * testsuite/libgomp.fortran/examples-4/target_data-3.f90
5542         (gramSchmidt): Likewise.
5543         * testsuite/libgomp.fortran/examples-4/teams-2.f90 (dotprod): Add
5544         map(tofrom: sum) clause.
5545         * testsuite/libgomp.fortran/nestedfn5.f90 (foo): Add twice
5546         map (alloc: a, l) clause.  Add defaultmap(tofrom: scalar) clause.
5547         * testsuite/libgomp.fortran/pr66199-2.f90: Adjust for linear clause
5548         only allowed on the loop iterator.
5549         * testsuite/libgomp.fortran/target4.f90 (foo): Add map(t) clause.
5550         * testsuite/libgomp.fortran/taskloop2.f90: New test.
5551         * testsuite/libgomp.fortran/taskloop4.f90: New test.
5552         * testsuite/libgomp.fortran/doacross1.f90: New test.
5553         * testsuite/libgomp.fortran/doacross3.f90: New test.
5554         * testsuite/libgomp.fortran/taskloop1.f90: New test.
5555         * testsuite/libgomp.fortran/taskloop3.f90: New test.
5556         * testsuite/libgomp.fortran/doacross2.f90: New test.
5557         * testsuite/libgomp.c/doacross-1.c (main): Add missing
5558         #pragma omp atomic read.
5559         * testsuite/libgomp.c/doacross-2.c (main): Likewise.
5560         * testsuite/libgomp.c/doacross-3.c (main): Likewise.
5561
5562 2016-11-02  Cesar Philippidis  <cesar@codesourcery.com>
5563             Nathan Sidwell  <nathan@acm.org>
5564
5565         * plugin/plugin-nvptx.c (nvptx_exec): Interrogate board attributes
5566         to determine default geometry.
5567         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Set gang
5568         dimension.
5569
5570 2016-11-01  Jakub Jelinek  <jakub@redhat.com>
5571
5572         * hashtab.h: Use standard GPLv3 with runtime exception
5573         boilerplate.
5574
5575 2016-10-27  Aldy Hernandez  <aldyh@redhat.com>
5576
5577         * oacc-init.c (goacc_new_thread): Use sizeof of the appropriate
5578         size when allocating new thread.
5579
5580 2016-09-14  Marek Polacek  <polacek@redhat.com>
5581
5582         * testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated.
5583
5584 2016-08-19  Jakub Jelinek  <jakub@redhat.com>
5585
5586         PR fortran/71014
5587         * testsuite/libgomp.fortran/pr71014.f90: New test.
5588
5589 2016-08-18  Chung-Lin Tang  <cltang@codesourcery.com>
5590
5591         PR middle-end/70895
5592         * testsuite/libgomp.oacc-fortran/reduction-7.f90: Add explicit
5593         firstprivate clauses.
5594         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Remove explicit
5595         copy clauses.
5596         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
5597         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise.
5598         * testsuite/libgomp.oacc-c-c++-common/reduction-flt.c: Likewise.
5599         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
5600         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise.
5601         * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
5602         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
5603         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.
5604         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
5605         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
5606         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
5607         * testsuite/libgomp.oacc-c-c++-common/reduction-dbl.c: Likewise.
5608
5609 2016-08-14  Chung-Lin Tang  <cltang@codesourcery.com>
5610
5611         PR fortran/70598
5612         * testsuite/libgomp.oacc-fortran/host_data-1.f90: New test.
5613
5614 2016-08-08  Jakub Jelinek  <jakub@redhat.com>
5615
5616         PR c++/58706
5617         * testsuite/libgomp.c++/pr58706.C: New test.
5618
5619 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
5620
5621         * testsuite/libgomp.oacc-c++/routine-1-auto.C: New file.
5622         * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Likewise.
5623         * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
5624         Likewise.
5625         * testsuite/libgomp.oacc-c++/routine-1-template.C: Likewise.
5626         * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C:
5627         Likewise.
5628         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Adjust.
5629
5630         * testsuite/libgomp.oacc-c-c++-common/crash-1.c: Make it a "link"
5631         test, and don't hardcode -O0.
5632
5633 2016-08-03  Nathan Sidwell  <nathan@codesourcery.com>
5634
5635         * testsuite/libgomp.oacc-c-c++-common/crash-1.c: New.
5636
5637 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
5638
5639         * testsuite/libgomp.oacc-c-c++-common/zero_length_subarrays.c: New
5640         test.
5641
5642 2016-07-03  H.J. Lu  <hongjiu.lu@intel.com>
5643
5644         PR middle-end/71734
5645         * testsuite/libgomp.fortran/pr71734-1.f90: New test.
5646         * testsuite/libgomp.fortran/pr71734-2.f90: Likewise.
5647
5648 2016-07-01  Jakub Jelinek  <jakub@redhat.com>
5649
5650         PR fortran/71717
5651         * testsuite/libgomp.fortran/associate3.f90: New test.
5652
5653 2016-06-17  Jakub Jelinek  <jakub@redhat.com>
5654
5655         * testsuite/libgomp.c++/target-21.C: New test.
5656
5657 2016-06-16  Jakub Jelinek  <jakub@redhat.com>
5658
5659         * testsuite/libgomp.c++/target-20.C: New test.
5660
5661 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
5662             Cesar Philippidis  <cesar@codesourcery.com>
5663
5664         PR middle-end/71373
5665         * libgomp.oacc-c/nested-function-1.c: New file.
5666         * libgomp.oacc-c/nested-function-2.c: Likewise.
5667         * libgomp.oacc-fortran/nested-function-1.f90: Likewise.
5668         * libgomp.oacc-fortran/nested-function-2.f90: Likewise.
5669         * libgomp.oacc-fortran/nested-function-3.f90: Likewise.
5670
5671 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
5672
5673         PR c/71381
5674         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: #include
5675         "../../../gcc/testsuite/c-c++-common/goacc/cache-1.c".
5676         * testsuite/libgomp.oacc-fortran/cache-1.f95: New file.
5677
5678 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
5679
5680         * testsuite/libgomp.oacc-fortran/reduction-8.f90: New testcase.
5681         * testsuite/libgomp.oacc-c-c++-common/reduction-8.c: New testcase.
5682
5683 2016-06-01  Cesar Philippidis  <cesar@codesourcery.com>
5684
5685         PR c/70688
5686         * testsuite/libgomp.oacc-c-c++-common/pr70688.c: New file.
5687
5688 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
5689
5690         * testsuite/libgomp.c/doacross-1.c (main): Use schedule(static)
5691         instead of invalid schedule(static, 0).
5692         * testsuite/libgomp.c/doacross-2.c (main): Likewise.
5693
5694 2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>
5695
5696         * oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter.
5697         * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Add 'int async'
5698         parameter, use to set async stream around call to gomp_unmap_vars,
5699         call gomp_unmap_vars() with 'do_copyfrom' set to true.
5700         * plugin/plugin-nvptx.c (struct ptx_event): Add 'int val' field.
5701         (event_gc): Adjust event handling loop, collect PTX_EVT_ASYNC_CLEANUP
5702         events and call GOMP_PLUGIN_async_unmap_vars() for each of them.
5703         (event_add): Add int parameter, initialize 'val' field when
5704         adding new ptx_event struct.
5705         (nvptx_evec): Adjust event_add() call arguments.
5706         (nvptx_host2dev): Likewise.
5707         (nvptx_dev2host): Likewise.
5708         (nvptx_wait_async): Likewise.
5709         (nvptx_wait_all_async): Likewise.
5710         (GOMP_OFFLOAD_openacc_register_async_cleanup): Add async parameter,
5711         pass to event_add() call.
5712         * oacc-host.c (host_openacc_register_async_cleanup): Add 'int async'
5713         parameter.
5714         * oacc-mem.c (gomp_acc_remove_pointer): Adjust async case to
5715         call openacc.register_async_cleanup_func() hook.
5716         * oacc-parallel.c (GOACC_parallel_keyed): Likewise.
5717         * target.c (gomp_copy_from_async): Delete function.
5718         (gomp_map_vars): Remove async_refcount.
5719         (gomp_unmap_vars): Likewise.
5720         (gomp_load_image_to_device): Likewise.
5721         (omp_target_associate_ptr): Likewise.
5722         * libgomp.h (struct splay_tree_key_s): Remove async_refcount.
5723         (acc_dispatch_t.register_async_cleanup_func): Add int parameter.
5724         (gomp_copy_from_async): Remove.
5725
5726 2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>
5727
5728         * target.c (gomp_device_copy): New function.
5729         (gomp_copy_host2dev): Likewise.
5730         (gomp_copy_dev2host): Likewise.
5731         (gomp_free_device_memory): Likewise.
5732         (gomp_map_vars_existing): Adjust to call gomp_copy_host2dev.
5733         (gomp_map_pointer): Likewise.
5734         (gomp_map_vars): Adjust to call gomp_copy_host2dev, handle
5735         NULL value from alloc_func plugin hook.
5736         (gomp_unmap_tgt): Adjust to call gomp_free_device_memory.
5737         (gomp_copy_from_async): Adjust to call gomp_copy_dev2host.
5738         (gomp_unmap_vars): Likewise.
5739         (gomp_update): Adjust to call gomp_copy_dev2host and
5740         gomp_copy_host2dev functions.
5741         (gomp_unload_image_from_device): Handle false value from
5742         unload_image_func plugin hook.
5743         (gomp_init_device): Handle false value from init_device_func
5744         plugin hook.
5745         (gomp_exit_data): Adjust to call gomp_copy_dev2host.
5746         (omp_target_free): Adjust to call gomp_free_device_memory.
5747         (omp_target_memcpy): Handle return values from host2dev_func,
5748         dev2host_func, and dev2dev_func plugin hooks.
5749         (omp_target_memcpy_rect_worker): Likewise.
5750         (gomp_target_fini): Handle false value from fini_device_func
5751         plugin hook.
5752         * libgomp.h (struct gomp_device_descr): Adjust return type of
5753         init_device_func, fini_device_func, unload_image_func, free_func,
5754         dev2host_func,host2dev_func, and dev2dev_func plugin hooks to 'bool'.
5755         * oacc-init.c (acc_shutdown_1): Handle false value from
5756         fini_device_func plugin hook.
5757         * oacc-host.c (host_init_device): Change return type to bool.
5758         (host_fini_device): Likewise.
5759         (host_unload_image): Likewise.
5760         (host_free): Likewise.
5761         (host_dev2host): Likewise.
5762         (host_host2dev): Likewise.
5763         * oacc-mem.c (acc_free): Handle plugin hook fatal error case.
5764         (acc_memcpy_to_device): Likewise.
5765         (acc_memcpy_from_device): Likewise.
5766         (delete_copyout): Add libfnname parameter, handle free_func
5767         hook fatal error case.
5768         (acc_delete): Adjust delete_copyout call.
5769         (acc_copyout): Likewise.
5770         (update_dev_host): Move gomp_mutex_unlock to after
5771         host2dev/dev2host hook calls.
5772
5773         * plugin/plugin-hsa.c (hsa_warn): Adjust 'hsa_error' local variable
5774         to 'hsa_error_msg', for clarity.
5775         (hsa_fatal): Likewise.
5776         (hsa_error): New function.
5777         (init_hsa_context): Change return type to bool, adjust to return
5778         false on error.
5779         (GOMP_OFFLOAD_get_num_devices): Adjust to handle init_hsa_context
5780         return value.
5781         (GOMP_OFFLOAD_init_device): Change return type to bool, adjust to
5782         return false on error.
5783         (get_agent_info): Adjust to return NULL on error.
5784         (destroy_hsa_program): Change return type to bool, adjust to
5785         return false on error.
5786         (GOMP_OFFLOAD_load_image): Adjust to return -1 on error.
5787         (destroy_module): Change return type to bool, adjust to
5788         return false on error.
5789         (GOMP_OFFLOAD_unload_image): Likewise.
5790         (GOMP_OFFLOAD_fini_device): Likewise.
5791         (GOMP_OFFLOAD_alloc): Change to return NULL when called.
5792         (GOMP_OFFLOAD_free): Change to return false when called.
5793         (GOMP_OFFLOAD_dev2host): Likewise.
5794         (GOMP_OFFLOAD_host2dev): Likewise.
5795         (GOMP_OFFLOAD_dev2dev): Likewise.
5796
5797         * plugin/plugin-nvptx.c (CUDA_CALL_ERET): New convenience macro.
5798         (CUDA_CALL): Likewise.
5799         (CUDA_CALL_ASSERT): Likewise.
5800         (map_init): Change return type to bool, use CUDA_CALL* macros.
5801         (map_fini): Likewise.
5802         (init_streams_for_device): Change return type to bool, adjust
5803         call to map_init.
5804         (fini_streams_for_device): Change return type to bool, adjust
5805         call to map_fini.
5806         (select_stream_for_async): Release stream_lock before calls to
5807         GOMP_PLUGIN_fatal, adjust call to map_init.
5808         (nvptx_init): Use CUDA_CALL* macros.
5809         (nvptx_attach_host_thread_to_device): Change return type to bool,
5810         use CUDA_CALL* macros.
5811         (nvptx_open_device): Use CUDA_CALL* macros.
5812         (nvptx_close_device): Change return type to bool, use CUDA_CALL*
5813         macros.
5814         (nvptx_get_num_devices): Use CUDA_CALL* macros.
5815         (link_ptx): Change return type to bool, use CUDA_CALL* macros.
5816         (nvptx_exec): Use CUDA_CALL* macros.
5817         (nvptx_alloc): Use CUDA_CALL* macros.
5818         (nvptx_free): Change return type to bool, use CUDA_CALL* macros.
5819         (nvptx_host2dev): Likewise.
5820         (nvptx_dev2host): Likewise.
5821         (nvptx_wait): Use CUDA_CALL* macros.
5822         (nvptx_wait_async): Likewise.
5823         (nvptx_wait_all): Likewise.
5824         (nvptx_wait_all_async): Likewise.
5825         (nvptx_set_cuda_stream): Adjust order of stream_lock acquire,
5826         use CUDA_CALL* macros, adjust call to map_fini.
5827         (GOMP_OFFLOAD_init_device): Change return type to bool,
5828         adjust code accordingly.
5829         (GOMP_OFFLOAD_fini_device): Likewise.
5830         (GOMP_OFFLOAD_load_image): Adjust calls to
5831         nvptx_attach_host_thread_to_device/link_ptx to handle errors,
5832         use CUDA_CALL* macros.
5833         (GOMP_OFFLOAD_unload_image): Change return type to bool, adjust
5834         return code.
5835         (GOMP_OFFLOAD_alloc): Adjust calls to code to handle error return.
5836         (GOMP_OFFLOAD_free): Change return type to bool, adjust calls to
5837         handle error return.
5838         (GOMP_OFFLOAD_dev2host): Likewise.
5839         (GOMP_OFFLOAD_host2dev): Likewise.
5840         (GOMP_OFFLOAD_openacc_register_async_cleanup): Use CUDA_CALL* macros.
5841         (GOMP_OFFLOAD_openacc_create_thread_data): Likewise.
5842
5843 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
5844
5845         * oacc-mem.c (acc_malloc): Update handling of shared-memory targets.
5846         (acc_free): Likewise.
5847         (acc_memcpy_to_device): Likewise.
5848         (acc_memcpy_from_device): Likewise.
5849         (acc_deviceptr): Likewise.
5850         (acc_hostptr): Likewise.
5851         (acc_is_present): Likewise.
5852         (acc_map_data): Likewise.
5853         (acc_unmap_data): Likewise.
5854         (present_create_copy): Likewise.
5855         (delete_copyout): Likewise.
5856         (update_dev_host): Likewise.
5857         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Remove xfail.
5858         * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: New test.
5859         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Adjust test.
5860         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
5861         * testsuite/libgomp.oacc-c-c++-common/enter_exit-lib.c: New test.
5862         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Adjust test so that
5863         it only runs on nvptx targets.
5864         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
5865         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
5866         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
5867         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
5868         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
5869         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
5870         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
5871         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
5872         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
5873         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
5874         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
5875         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
5876         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
5877         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
5878         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
5879         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
5880         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
5881         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
5882         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
5883         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
5884         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
5885         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
5886         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
5887
5888 2016-05-23  Martin Jambor  <mjambor@suse.cz>
5889
5890         * testsuite/libgomp.hsa.c/switch-sbr-2.c: New test.
5891
5892 2016-05-17  Chung-Lin Tang  <cltang@codesourcery.com>
5893
5894         * oacc-init.c (acc_init): Remove !cached_base_dev condition on call
5895         to gomp_init_targets_once.
5896         (acc_set_device_type): Remove !cached_base_dev condition on call to
5897         gomp_init_targets_once, move call to before acc_device_lock acquire,
5898         to avoid deadlock.
5899         (acc_get_device_num): Remove !cached_base_dev condition on call to
5900         gomp_init_targets_once.
5901         (acc_set_device_num): Likewise.
5902
5903 2016-05-16  Martin Jambor  <mjambor@suse.cz>
5904
5905         * testsuite/libgomp.hsa.c/complex-align-2.c: New test.
5906
5907 2016-05-02  Nathan Sidwell  <nathan@codesourcery.com>
5908
5909         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust
5910         expected partitioning.
5911
5912 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
5913
5914         PR middle-end/70626
5915         * testsuite/libgomp.oacc-c++/template-reduction.C: Adjust test.
5916         * testsuite/libgomp.oacc-c-c++-common/combined-reduction.c: New test.
5917         * testsuite/libgomp.oacc-fortran/combined-reduction.f90: New test.
5918
5919 2016-04-21  Alexander Monakov  <amonakov@ispras.ru>
5920
5921         * plugin/plugin-nvptx.c (map_fini): Make cuMemFreeHost error
5922         non-fatal.
5923
5924 2016-04-19  Jakub Jelinek  <jakub@redhat.com>
5925
5926         PR middle-end/70680
5927         * testsuite/libgomp.c/pr70680-1.c: New test.
5928         * testsuite/libgomp.c/pr70680-2.c: New test.
5929
5930 2016-04-14  Cesar Philippidis  <cesar@codesourcery.com>
5931
5932         * testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Don't
5933         pass parameter variables to subroutines.
5934
5935 2016-04-14  Cesar Philippidis  <cesar@codesourcery.com>
5936
5937         PR middle-end/70643
5938         * testsuite/libgomp.oacc-fortran/pr70643.f90: New test.
5939
5940 2016-04-13  Cesar Philippidis  <cesar@codesourcery.com>
5941
5942         PR testsuite/68242
5943         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Adjust test.
5944         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
5945
5946 2016-04-12  Thomas Schwinge  <thomas@codesourcery.com>
5947
5948         * libgomp_g.h: Rename GOACC_parallel_keyd prototype to
5949         GOACC_parallel_keyed, restore GOACC_parallel prototype, new
5950         GOACC_declare prototype.
5951
5952         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c:
5953         Merge this file, and...
5954         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gv-np-1.c:
5955         ... this file, and...
5956         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c:
5957         ... this file, and...
5958         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c:
5959         ... this file, and...
5960         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c:
5961         ... this file, and...
5962         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c:
5963         ... this file, and...
5964         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c:
5965         ... this file, and...
5966         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c:
5967         ... this file, and...
5968         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c:
5969         ... this file, and...
5970         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c:
5971         ... this file, and...
5972         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c:
5973         ... this file, and...
5974         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c:
5975         ... this file, and...
5976         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c:
5977         ... this file into...
5978         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: ... this
5979         file.
5980
5981         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c:
5982         Make failure observable.
5983
5984 2016-04-12  Jakub Jelinek  <jakub@redhat.com>
5985
5986         * libgomp.h (struct gomp_target_task): Remove firstprivate_copies
5987         field.
5988         * target.c (gomp_target_fallback_firstprivate,
5989         gomp_target_unshare_firstprivate): Removed.
5990         (GOMP_target_ext): Copy firstprivate vars into gomp_allocaed memory
5991         before waiting for dependencies.
5992         (gomp_target_task_fn): Don't copy firstprivate vars here.
5993         * task.c (GOMP_PLUGIN_target_task_completion): Don't free
5994         firstprivate_copies here.
5995         (gomp_create_target_task): Don't initialize firstprivate_copies field.
5996         * testsuite/libgomp.c/target-25.c (main): Use map (to:) instead of
5997         explicit/implicit firstprivate.
5998
5999 2016-04-08  Cesar Philippidis  <cesar@codesourcery.com>
6000
6001         PR lto/70289
6002         PR ipa/70348
6003         PR tree-optimization/70373
6004         PR middle-end/70533
6005         PR middle-end/70534
6006         PR middle-end/70535
6007         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c: New
6008         test.
6009         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c: New
6010         test.
6011         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c: New
6012         test.
6013         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c: New
6014         test.
6015         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c: New
6016         test.
6017         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c: New
6018         test.
6019         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c: New
6020         test.
6021         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c: New
6022         test.
6023         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c: New
6024         test.
6025         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c: New test.
6026         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c: New test.
6027         * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c: New test.
6028         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c: New
6029         test.
6030         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c: New
6031         test.
6032         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c: New
6033         test.
6034         * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c: New
6035         test.
6036         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Add test
6037         coverage.
6038         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
6039         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
6040         * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: New test.
6041         * testsuite/libgomp.oacc-c-c++-common/pr70289.c: New test.
6042         * testsuite/libgomp.oacc-c-c++-common/pr70373.c: New test.
6043         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Add test
6044         coverage.
6045         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
6046         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
6047         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
6048         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
6049         * testsuite/libgomp.oacc-c-c++-common/reduction-6.c: New test.
6050         * testsuite/libgomp.oacc-c-c++-common/reduction.h: New test.
6051         * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: New test.
6052         * testsuite/libgomp.oacc-fortran/pr70289.f90: New test.
6053         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Add test coverage.
6054         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
6055         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
6056         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
6057         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
6058         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
6059         * testsuite/libgomp.oacc-fortran/reduction-7.f90: New test.
6060
6061 2016-03-30  Thomas Schwinge  <thomas@codesourcery.com>
6062             James Norris  <jnorris@codesourcery.com>
6063             Nathan Sidwell  <nathan@codesourcery.com>
6064             Julian Brown  <julian@codesourcery.com>
6065             Cesar Philippidis  <cesar@codesourcery.com>
6066             Chung-Lin Tang  <cltang@codesourcery.com>
6067             Tom de Vries  <tom@codesourcery.com>
6068
6069         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Update.
6070         * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
6071         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
6072         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Likewise.
6073         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
6074         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
6075         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
6076         * testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise.
6077         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
6078         XFAIL.
6079         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Update.
6080         Incorporate...
6081         * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: ... this
6082         file.
6083         * testsuite/libgomp.oacc-c++/template-reduction.C: New file.
6084         * testsuite/libgomp.oacc-c-c++-common/gang-static-1.c: Likewise.
6085         * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Likewise.
6086         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-clauses.c:
6087         Likewise.
6088         * testsuite/libgomp.oacc-c-c++-common/private-variables.c:
6089         Likewise.
6090         * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
6091         * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Likewise.
6092         * testsuite/libgomp.oacc-c-c++-common/routine-4.c: Likewise.
6093         * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise.
6094         * testsuite/libgomp.oacc-fortran/clauses-1.f90: Likewise.
6095         * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
6096         * testsuite/libgomp.oacc-fortran/firstprivate-1.f90: Likewise.
6097         * testsuite/libgomp.oacc-fortran/gang-static-1.f90: Likewise.
6098         * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
6099         * testsuite/libgomp.oacc-fortran/implicit-firstprivate-ref.f90:
6100         Likewise.
6101         * testsuite/libgomp.oacc-fortran/pr68813.f90: Likewise.
6102         * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
6103         * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Merge this
6104         file...
6105         * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: ..., and this
6106         file into...
6107         * testsuite/libgomp.oacc-c-c++-common/data-clauses.h: ... this new
6108         file.  Update.
6109         * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels.c: New
6110         file.
6111         * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel.c:
6112         Likewise.
6113         * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: Rename to...
6114         * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c:
6115         ... this new file.  Update.
6116         * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: Rename to...
6117         * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c:
6118         ... this new file.  Update.
6119         * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: New
6120         file.  Incorporate...
6121         * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c: ... this
6122         file, and...
6123         * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: ... this
6124         file, and...
6125         * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: ... this
6126         file.
6127         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Remove file.
6128
6129 2016-03-29  Thomas Schwinge  <thomas@codesourcery.com>
6130
6131         * testsuite/libgomp.oacc-c++/c++.exp [!lang_test_file_found]: Call
6132         set-torture-options.
6133
6134 2016-03-24  Thomas Schwinge  <thomas@codesourcery.com>
6135
6136         * testsuite/libgomp.oacc-c++/c++.exp: Set up torture testing, use
6137         gcc-dg-runtest.
6138         * testsuite/libgomp.oacc-c/c.exp: Likewise.
6139         * testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: Specify
6140         -fno-builtin-acc_on_device instead of -O0.
6141         * testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: Skip for
6142         -O0.
6143         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
6144         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c:
6145         Likewise.
6146         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
6147         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
6148         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
6149         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
6150         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
6151         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
6152         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
6153         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
6154         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
6155         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
6156         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
6157         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
6158         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
6159         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise.
6160         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise.
6161         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
6162         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise.
6163         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-2.c:
6164         Don't specify -O2.
6165         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-3.c:
6166         Likewise.
6167         * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta.c:
6168         Likewise.
6169
6170 2016-03-24  Martin Liska  <mliska@suse.cz>
6171
6172         * plugin/plugin-hsa.c (packet_store_release): New function
6173         that is taken from the HSA runtime manual.
6174         (GOMP_OFFLOAD_run): Use the function.
6175
6176 2016-03-23  Jakub Jelinek  <jakub@redhat.com>
6177
6178         PR c++/70376
6179         * testsuite/libgomp.c++/pr70376.C: New test.
6180
6181 2016-03-23  Tom de Vries  <tom@codesourcery.com>
6182
6183         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Add missing
6184         initialization of lresult and lvresult.
6185         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Same.
6186
6187 2016-03-23  James Norris  <jnorris@codesourcery.com>
6188             Daichi Fukuoka <dc-fukuoka@sgi.com>
6189
6190         PR libgomp/69414
6191         * oacc-mem.c (delete_copyout, update_dev_host): Fix device address.
6192         * testsuite/libgomp.oacc-c-c++-common/update-1.c: Additional tests.
6193         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
6194         * testsuite/libgomp.oacc-fortran/update-1.f90: New file.
6195
6196 2016-03-23  Martin Liska  <mliska@suse.cz>
6197
6198         PR hsa/70337
6199         * plugin/plugin-hsa.c (GOMP_OFFLOAD_run): Copy shadow
6200         argument just in case a dispatched kernel uses that argument.
6201
6202 2016-03-16  Thomas Schwinge  <thomas@codesourcery.com>
6203
6204         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Adjust to
6205         -ftree-parallelize-loops/-fopenacc changes.
6206         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95:
6207         Likewise.
6208         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95:
6209         Likewise.
6210         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95:
6211         Likewise.
6212         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95:
6213         Likewise.
6214         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Likewise.
6215         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Likewise.
6216
6217 2016-03-13  Thomas Schwinge  <thomas@codesourcery.com>
6218
6219         * testsuite/lib/libgomp.exp (libgomp_init): Potentially append to
6220         always_ld_library_path the path to libgcc_s.
6221
6222 2016-03-10  Cesar Philippidis  <cesar@codesourcery.com>
6223
6224         PR testsuite/70009
6225         * testsuite/libgomp.oacc-c-c++-common/vprop.c: Make test data signed.
6226
6227 2016-03-09  Tom de Vries  <tom@codesourcery.com>
6228
6229         * testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: New test.
6230         * testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95: Same.
6231         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95:
6232         Same.
6233         * testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95: Same.
6234         * testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95: Same.
6235         * testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Same.
6236         * testsuite/libgomp.oacc-fortran/kernels-loop.f95: Same.
6237
6238 2016-03-07  Martin Jambor  <mjambor@suse.cz>
6239
6240         * testsuite/lib/libgomp.exp
6241         (check_effective_target_hsa_offloading_selected_nocache): New.
6242         (check_effective_target_hsa_offloading_selected): Likewise.
6243         * testsuite/libgomp.hsa.c/c.exp: Likewise.
6244         * testsuite/libgomp.hsa.c/alloca-1.c: Likewise.
6245         * testsuite/libgomp.hsa.c/bitfield-1.c: Likewise.
6246         * testsuite/libgomp.hsa.c/builtins-1.c: Likewise.
6247         * testsuite/libgomp.hsa.c/complex-1.c: Likewise.
6248         * testsuite/libgomp.hsa.c/formal-actual-args-1.c: Likewise.
6249         * testsuite/libgomp.hsa.c/function-call-1.c: Likewise.
6250         * testsuite/libgomp.hsa.c/get-level-1.c: Likewise.
6251         * testsuite/libgomp.hsa.c/gridify-1.c: Likewise.
6252         * testsuite/libgomp.hsa.c/gridify-2.c: Likewise.
6253         * testsuite/libgomp.hsa.c/gridify-3.c: Likewise.
6254         * testsuite/libgomp.hsa.c/gridify-4.c: Likewise.
6255         * testsuite/libgomp.hsa.c/memory-operations-1.c: Likewise.
6256         * testsuite/libgomp.hsa.c/pr69568.c: Likewise.
6257         * testsuite/libgomp.hsa.c/rotate-1.c: Likewise.
6258         * testsuite/libgomp.hsa.c/switch-1.c: Likewise.
6259         * testsuite/libgomp.hsa.c/switch-branch-1.c: Likewise.
6260
6261 2016-03-07  Martin Jambor  <mjambor@suse.cz>
6262
6263         * testsuite/libgomp.c/examples-4/async_target-2.c: Only run on
6264         non-shared memory accelerators.
6265         * testsuite/libgomp.c/examples-4/device-1.c: Likewise.
6266         * testsuite/libgomp.c/examples-4/target-5.c: Likewise.
6267         * testsuite/libgomp.c/examples-4/target_data-6.c: Likewise.
6268         * testsuite/libgomp.c/examples-4/target_data-7.c: Likewise.
6269         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: Likewise.
6270         * testsuite/libgomp.fortran/examples-4/device-1.f90: Likewise.
6271         * testsuite/libgomp.fortran/examples-4/target-5.f90: Likewise.
6272         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: Likewise.
6273         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: Likewise.
6274
6275 2016-03-07  Martin Jambor  <mjambor@suse.cz>
6276
6277         * testsuite/lib/libgomp.exp (libgomp_init): Append -Wno-hsa to
6278         ALWAYS_CFLAGS.
6279
6280 2016-03-02  Jakub Jelinek  <jakub@redhat.com>
6281
6282         PR libgomp/69555
6283         * testsuite/libgomp.c++/pr69555-1.C: New test.
6284         * testsuite/libgomp.c++/pr69555-2.C: New test.
6285
6286 2016-02-26  Keith McDaniel <k.allen.mcdaniel@gmail.com>
6287             Martin Jambor  <mjambor@suse.cz>
6288
6289         * testsuite/lib/libgomp.exp
6290         (check_effective_target_offload_device_shared_as): New proc.
6291         * testsuite/libgomp.c++/declare_target-1.C: New test.
6292
6293 2016-02-25  Ilya Verbin  <ilya.verbin@intel.com>
6294
6295         PR driver/68463
6296         * testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: Remove.
6297
6298 2016-02-23  Thomas Schwinge  <thomas@codesourcery.com>
6299
6300         * oacc-parallel.c (GOACC_parallel_keyed): Initialize dims.
6301         * plugin/plugin-nvptx.c (nvptx_exec): Provide default values for
6302         dims.
6303         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Adjust to
6304         -ftree-parallelize-loops/-fopenacc changes.
6305         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Likewise.
6306         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c:
6307         Likewise.
6308         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c:
6309         Likewise.
6310         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c:
6311         Likewise.
6312         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c:
6313         Likewise.
6314         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c:
6315         Likewise.
6316         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c:
6317         Likewise.
6318         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c:
6319         Likewise.
6320         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Likewise.
6321         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c:
6322         Likewise.
6323         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Likewise.
6324         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c:
6325         Likewise.
6326         * testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Likewise.
6327         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c:
6328         Likewise.
6329
6330 2016-02-22  Cesar Philippidis  <cesar@codesourcery.com>
6331
6332         * testsuite/libgomp.oacc-c-c++-common/vprop.c: New test.
6333
6334 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
6335
6336         PR driver/69805
6337         * testsuite/libgomp.c/pr69805.c: New test.
6338
6339 2016-02-16  Tom de Vries  <tom@codesourcery.com>
6340
6341         PR lto/67709
6342         * testsuite/libgomp.fortran/declare-simd-4.f90: New test.
6343
6344 2016-02-09  Tom de Vries  <tom@codesourcery.com>
6345
6346         PR tree-optimization/69599
6347         * testsuite/libgomp.c/omp-nested-3.c: New test.
6348         * testsuite/libgomp.c/pr46032-2.c: New test.
6349         * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: New test.
6350         * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: New test.
6351
6352 2016-02-09  Tom de Vries  <tom@codesourcery.com>
6353
6354         PR lto/69707
6355         * testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: New test.
6356
6357 2016-02-02  Alexander Monakov  <amonakov@ispras.ru>
6358
6359         * testsuite/libgomp.c/target-31.c: Fix testcase.
6360
6361 2016-02-02  Alexander Monakov  <amonakov@ispras.ru>
6362
6363         * testsuite/libgomp.c/examples-4/teams-3.c: Add missing reduction
6364         clause.
6365         * testsuite/libgomp.c/examples-4/teams-4.c: Likewise.
6366         * testsuite/libgomp.fortran/examples-4/teams-3.f90: Add missing
6367         reduction and map clauses.
6368         * testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise.
6369
6370 2016-02-02  James Norris  <jnorris@codesourcery.com>
6371
6372         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Fix clause.
6373
6374 2016-02-02  Thomas Schwinge  <thomas@codesourcery.com>
6375
6376         * libgomp.map (GOACC_2.0): Remove GOACC_host_data.
6377         * oacc-parallel.c (GOACC_host_data): Remove function definition.
6378
6379         * testsuite/lib/libgomp.exp: Skip hsa offloading for OpenACC test
6380         cases.
6381
6382         * plugin/configfrag.ac (HSA_KMT_LIB, HSA_KMT_LDFLAGS): New
6383         variables.
6384         * testsuite/libgomp-test-support.exp.in (hsa_runtime_lib)
6385         (hsa_kmt_lib): Set variables.
6386         * testsuite/lib/libgomp.exp (libgomp_init): Use them to amend
6387         always_ld_library_path.
6388         * Makefile.in: Regenerate.
6389         * configure: Likewise.
6390         * testsuite/Makefile.in: Likewise.
6391
6392         * plugin/configfrag.ac (offload_additional_options)
6393         (offload_additional_lib_paths): Don't amend for hsa offloading.
6394         * configure: Regenerate.
6395
6396         * plugin/configfrag.ac: Don't configure for offloading target if
6397         we don't build the corresponding plugin.
6398         * configure: Regenerate.
6399
6400 2016-02-01  Nathan Sidwell  <nathan@codesourcery.com>
6401
6402         * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: New.
6403         * testsuite/libgomp.oacc-fortran/routine-7.f90: Serialize loop.
6404
6405 2016-01-26  Tom de Vries  <tom@codesourcery.com>
6406
6407         PR tree-optimization/69110
6408         * testsuite/libgomp.c/pr69110.c: New test.
6409
6410 2016-01-25  Richard Biener  <rguenther@suse.de>
6411
6412         PR lto/69393
6413         * testsuite/libgomp.c++/pr69393.C: New testcase.
6414
6415 2016-01-22  Ilya Verbin  <ilya.verbin@intel.com>
6416
6417         * target.c (gomp_get_target_fn_addr): Allow host fallback if target
6418         function wasn't mapped to the device with non-shared memory.
6419
6420 2016-01-20  Ilya Verbin  <ilya.verbin@intel.com>
6421
6422         * task.c (gomp_create_target_task): Set firstprivate_copies to NULL.
6423
6424 2016-01-19  Martin Jambor  <mjambor@suse.cz>
6425             Martin Liska  <mliska@suse.cz>
6426
6427         * plugin/Makefrag.am: Add HSA plugin requirements.
6428         * plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable.
6429         (HSA_RUNTIME_LIB): Likewise.
6430         (HSA_RUNTIME_CPPFLAGS): Likewise.
6431         (HSA_RUNTIME_INCLUDE): New substitution.
6432         (HSA_RUNTIME_LIB): Likewise.
6433         (HSA_RUNTIME_LDFLAGS): Likewise.
6434         (hsa-runtime): New configure option.
6435         (hsa-runtime-include): Likewise.
6436         (hsa-runtime-lib): Likewise.
6437         (PLUGIN_HSA): New substitution variable.
6438         Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new
6439         configure options.
6440         (PLUGIN_HSA_CPPFLAGS): Likewise.
6441         (PLUGIN_HSA_LDFLAGS): Likewise.
6442         (PLUGIN_HSA_LIBS): Likewise.
6443         Check that we have access to HSA run-time.
6444         * libgomp-plugin.h (offload_target_type): New element
6445         OFFLOAD_TARGET_TYPE_HSA.
6446         * libgomp.h (gomp_target_task): New fields firstprivate_copies and
6447         args.
6448         (bool gomp_create_target_task): Updated.
6449         (gomp_device_descr): Extra parameter of run_func and async_run_func,
6450         new field can_run_func.
6451         * libgomp_g.h (GOMP_target_ext): Update prototype.
6452         * oacc-host.c (host_run): Added a new parameter args.
6453         * target.c (calculate_firstprivate_requirements): New function.
6454         (copy_firstprivate_data): Likewise.
6455         (gomp_target_fallback_firstprivate): Use them.
6456         (gomp_target_unshare_firstprivate): New function.
6457         (gomp_get_target_fn_addr): Allow returning NULL for shared memory
6458         devices.
6459         (GOMP_target): Do host fallback for all shared memory devices.  Do not
6460         pass any args to plugins.
6461         (GOMP_target_ext): Introduce device-specific argument parameter args.
6462         Allow host fallback if device shares memory.  Do not remap data if
6463         device has shared memory.
6464         (gomp_target_task_fn): Likewise.  Also treat shared memory devices
6465         like host fallback for mappings.
6466         (GOMP_target_data): Treat shared memory devices like host fallback.
6467         (GOMP_target_data_ext): Likewise.
6468         (GOMP_target_update): Likewise.
6469         (GOMP_target_update_ext): Likewise.  Also pass NULL as args to
6470         gomp_create_target_task.
6471         (GOMP_target_enter_exit_data): Likewise.
6472         (omp_target_alloc): Treat shared memory devices like host fallback.
6473         (omp_target_free): Likewise.
6474         (omp_target_is_present): Likewise.
6475         (omp_target_memcpy): Likewise.
6476         (omp_target_memcpy_rect): Likewise.
6477         (omp_target_associate_ptr): Likewise.
6478         (gomp_load_plugin_for_device): Also load can_run.
6479         * task.c (GOMP_PLUGIN_target_task_completion): Free
6480         firstprivate_copies.
6481         (gomp_create_target_task): Accept new argument args and store it to
6482         ttask.
6483         * plugin/plugin-hsa.c: New file.
6484
6485 2016-01-18  Tom de Vries  <tom@codesourcery.com>
6486
6487         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: New test.
6488         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Same.
6489         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c: Same.
6490         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c: Same.
6491         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c: Same.
6492         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c: Same.
6493         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c: Same.
6494         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c: Same.
6495         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c: Same.
6496         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-2.c: Same.
6497         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit-2.c:
6498         Same.
6499         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit.c:
6500         Same.
6501         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-update.c: Same.
6502         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-data.c: Same.
6503         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Same.
6504         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c: Same.
6505         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Same.
6506         * testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c: Same.
6507         * testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Same.
6508         * testsuite/libgomp.oacc-c-c++-common/kernels-parallel-loop-data-enter-exit.c:
6509         Same.
6510         * testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c: Same.
6511
6512 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
6513
6514         * task.c (GOMP_PLUGIN_target_task_completion): Add missing return.
6515
6516 2016-01-15  Cesar Philippidis  <cesar@codesourcery.com>
6517
6518         * testsuite/libgomp.oacc-fortran/kernels-data.f90: New test.
6519
6520 2016-01-12  James Norris  <jnorris@codesourcery.com>
6521
6522         * libgomp.texi: Updates for OpenACC.
6523
6524 2016-01-11  Alexander Monakov  <amonakov@ispras.ru>
6525
6526         * plugin/plugin-nvptx.c (link_ptx): Do not set CU_JIT_TARGET.
6527
6528 2016-01-07  H.J. Lu  <hongjiu.lu@intel.com>
6529
6530         PR fortran/66680
6531         * testsuite/libgomp.fortran/pr66680.f90: New test.
6532
6533 2016-01-07  Jakub Jelinek  <jakub@redhat.com>
6534
6535         PR middle-end/68960
6536         * testsuite/libgomp.c/pr68960.c: New test.
6537
6538 2016-01-06  Nathan Sidwell  <nathan@acm.org>
6539
6540         * openacc.h (acc_on_device): Add routine pragma for C++ wrapper.
6541         * testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: New.
6542
6543 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
6544
6545         Update copyright years.
6546
6547         * libgomp.texi: Bump @copying's copyright year.
6548
6549 2015-12-31  Nathan Sidwell  <nathan@acm.org>
6550
6551         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Correct
6552         dg-additional-options syntax.
6553         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise.
6554         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise.
6555         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise.
6556         * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise.
6557         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise.
6558         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise.
6559         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise.
6560         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise.
6561         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise.
6562         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise.
6563         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise.
6564         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise.
6565         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise.
6566         * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise.
6567         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise.
6568         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise.
6569         * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise.
6570         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise.
6571
6572 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
6573
6574         * libgomp.h (REFCOUNT_LINK): Define.
6575         (struct splay_tree_key_s): Add link_key.
6576         * target.c (gomp_map_vars): Treat REFCOUNT_LINK objects as not mapped.
6577         Replace target address of the pointer with target address of newly
6578         mapped object in the splay tree.  Set link pointer on target to the
6579         device address of the mapped object.
6580         (gomp_unmap_vars): Restore target address of the pointer in the splay
6581         tree for REFCOUNT_LINK objects after unmapping.
6582         (gomp_load_image_to_device): Set refcount to REFCOUNT_LINK for "omp
6583         declare target link" objects.
6584         (gomp_unload_image_from_device): Replace j with i.  Force unmap of all
6585         "omp declare target link" objects, which were mapped for the image.
6586         (gomp_exit_data): Restore target address of the pointer in the splay
6587         tree for REFCOUNT_LINK objects after unmapping.
6588         * testsuite/libgomp.c/target-link-1.c: New file.
6589
6590 2015-12-14  Ilya Verbin  <ilya.verbin@intel.com>
6591
6592         * libgomp.h (gomp_device_state): New enum.
6593         (struct gomp_device_descr): Replace is_initialized with state.
6594         (gomp_fini_device): Remove declaration.
6595         * oacc-host.c (host_dispatch): Use state instead of is_initialized.
6596         * oacc-init.c (acc_init_1): Use state instead of is_initialized.
6597         (acc_shutdown_1): Likewise.  Inline gomp_fini_device.
6598         (acc_set_device_type): Use state instead of is_initialized.
6599         (acc_set_device_num): Likewise.
6600         * target.c (resolve_device): Use state instead of is_initialized.
6601         Do not initialize finalized device.
6602         (gomp_map_vars): Do nothing if device is finalized.
6603         (gomp_unmap_vars): Likewise.
6604         (gomp_update): Likewise.
6605         (GOMP_offload_register_ver): Use state instead of is_initialized.
6606         (GOMP_offload_unregister_ver): Likewise.
6607         (gomp_init_device): Likewise.
6608         (gomp_unload_device): Likewise.
6609         (gomp_fini_device): Remove.
6610         (gomp_get_target_fn_addr): Do nothing if device is finalized.
6611         (GOMP_target): Go to host fallback if device is finalized.
6612         (GOMP_target_ext): Likewise.
6613         (gomp_exit_data): Do nothing if device is finalized.
6614         (gomp_target_task_fn): Go to host fallback if device is finalized.
6615         (gomp_target_fini): New static function.
6616         (gomp_target_init): Use state instead of is_initialized.
6617         Call gomp_target_fini at exit.
6618
6619 2015-12-09  Tom de Vries  <tom@codesourcery.com>
6620
6621         PR tree-optimization/68716
6622         * testsuite/libgomp.c/omp-nested-2.c: New test.
6623
6624 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
6625
6626         * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: Restrict to
6627         target openacc_nvidia_accel_selected.
6628         * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: Likewise.
6629         * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: Likewise.
6630         * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: Remove file.
6631         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: Remove file.
6632
6633 2015-12-01  Julian Brown  <julian@codesourcery.com>
6634             James Norris  <James_Norris@mentor.com>
6635
6636         * oacc-parallel.c (GOACC_host_data): New function.
6637         * libgomp.map (GOACC_host_data): Add to GOACC_2.0.1.
6638         * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: New test.
6639         * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: New test.
6640         * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: New test.
6641         * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: New test.
6642         * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: New test.
6643         * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: New test.
6644
6645 2015-11-30  James Norris  <jnorris@codesourcery.com>
6646             Cesar Philippidis  <cesar@codesourcery.com>
6647
6648         libgomp/
6649         * libgomp.oacc-fortran/routine-5.f90: New test.
6650         * libgomp.oacc-fortran/routine-7.f90: New test.
6651         * libgomp.oacc-fortran/routine-9.f90: New test.
6652
6653 2015-11-30  Tom de Vries  <tom@codesourcery.com>
6654
6655         PR tree-optimization/46032
6656         * testsuite/libgomp.c/pr46032.c: New test.
6657
6658 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
6659
6660         PR libgomp/68579
6661         * task.c (gomp_task_run_post_handle_depend_hash): New forward decl.
6662         (gomp_create_target_task): Call it before freeing
6663         GOMP_TARGET_TASK_DATA tasks.
6664
6665         PR c/63326
6666         * testsuite/libgomp.c/cancel-parallel-2.c (foo): Add semicolon
6667         in between case label and OpenMP standalone directives.
6668         * testsuite/libgomp.c++/cancel-parallel-2.C (foo): Likewise.
6669
6670 2015-11-26  David Edelsohn  <dje.gcc@gmail.com>
6671
6672         * configure: Regenerate.
6673
6674 2015-11-26  Jakub Jelinek  <jakub@redhat.com>
6675
6676         * testsuite/libgomp.c/target-35.c: New test.
6677
6678 2015-11-22  James Norris  <jnorris@codesourcery.com>
6679             Cesar Philippidis  <cesar@codesourcery.com>
6680
6681         * testsuite/libgomp.oacc-fortran/declare-1.f90: New test.
6682         * testsuite/libgomp.oacc-fortran/declare-2.f90: Likewise.
6683         * testsuite/libgomp.oacc-fortran/declare-3.f90: Likewise.
6684         * testsuite/libgomp.oacc-fortran/declare-4.f90: Likewise.
6685         * testsuite/libgomp.oacc-fortran/declare-5.f90: Likewise.
6686
6687 2015-11-20  Jakub Jelinek  <jakub@redhat.com>
6688
6689         PR middle-end/68221
6690         * testsuite/libgomp.c/reduction-11.c: Remove xfail.
6691         * testsuite/libgomp.c/reduction-12.c: Likewise.
6692         * testsuite/libgomp.c++/reduction-11.C: Likewise.
6693         * testsuite/libgomp.c++/reduction-12.C: Likewise.
6694
6695 2015-11-19  Nathan Sidwell  <nathan@codesourcery.com>
6696
6697         * libgomp.oacc-c-c++-common/reduction-dbl.c: New.
6698         * libgomp.oacc-c-c++-common/reduction-flt.c: New.
6699         * libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Use typedef.
6700         * libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Use typedef.
6701         * libgomp.oacc-c-c++-common/reduction-2.c: Uncomment broken tests
6702         and fix.
6703         * libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
6704         * libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
6705
6706 2015-11-18  Nathan Sidwell  <nathan@codesourcery.com>
6707
6708         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Add
6709         worker & gang cases.
6710         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.
6711
6712 2015-11-17  Cesar Philippidis  <cesar@codesourcery.com>
6713
6714         * config/nvptx/priority_queue.c: New file.
6715
6716 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
6717
6718         * libgomp.texi: Update references from OpenMP 4.0 to OpenMP 4.5
6719         sections.
6720
6721 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
6722             Aldy Hernandez  <aldyh@redhat.com>
6723             Ilya Verbin  <ilya.verbin@intel.com>
6724
6725         * ordered.c (gomp_doacross_init, GOMP_doacross_post,
6726         GOMP_doacross_wait, gomp_doacross_ull_init, GOMP_doacross_ull_post,
6727         GOMP_doacross_ull_wait): For GFS_GUIDED don't divide number of
6728         iterators or IV by chunk size.
6729         * parallel.c (gomp_resolve_num_threads): Don't assume that
6730         if thr->ts.team is non-NULL, then pool must be non-NULL.
6731         * libgomp-plugin.h (GOMP_PLUGIN_target_task_completion): Declare.
6732         * libgomp.map (GOMP_PLUGIN_1.1): New symbol version, export
6733         GOMP_PLUGIN_target_task_completion.
6734         * Makefile.am (libgomp_la_SOURCES): Add priority_queue.c.
6735         * Makefile.in: Regenerate.
6736         * libgomp.h: Shuffle prototypes and forward definitions around so
6737         priority queues can be defined.
6738         (enum gomp_task_kind): Add GOMP_TASK_ASYNC_RUNNING.
6739         (enum gomp_target_task_state): New enum.
6740         (struct gomp_target_task): Add state, tgt, task and team fields.
6741         (gomp_create_target_task): Change return type to bool, add
6742         state argument.
6743         (gomp_target_task_fn): Change return type to bool.
6744         (struct gomp_device_descr): Add async_run_func.
6745         (struct gomp_task): Remove children, next_child, prev_child,
6746         next_queue, prev_queue, next_taskgroup, prev_taskgroup.
6747         Add pnode field.
6748         (struct gomp_taskgroup): Remove children.
6749         Add taskgroup_queue.
6750         (struct gomp_team): Change task_queue type to a priority queue.
6751         (splay_compare): Define inline.
6752         (priority_queue_offset): New.
6753         (priority_node_to_task): New.
6754         (task_to_priority_node): New.
6755         * oacc-mem.c: Do not include splay-tree.h.
6756         * priority_queue.c: New file.
6757         * priority_queue.h: New file.
6758         * splay-tree.c: Do not include splay-tree.h.
6759         (splay_tree_foreach_internal): New.
6760         (splay_tree_foreach): New.
6761         * splay-tree.h: Become re-entrant if splay_tree_prefix is defined.
6762         (splay_tree_callback): Define typedef.
6763         * target.c (splay_compare): Move to libgomp.h.
6764         (GOMP_target): Don't adjust *thr in any way around running offloaded
6765         task.
6766         (GOMP_target_ext): Likewise.  Handle target nowait.
6767         (GOMP_target_update_ext, GOMP_target_enter_exit_data): Check
6768         return value from gomp_create_target_task, if false, fallthrough
6769         as if no dependencies exist.
6770         (gomp_target_task_fn): Change return type to bool, return true
6771         if the task should have another part scheduled later.  Handle
6772         target nowait.
6773         (gomp_load_plugin_for_device): Initialize async_run.
6774         * task.c (gomp_init_task): Initialize children_queue.
6775         (gomp_clear_parent_in_list): New.
6776         (gomp_clear_parent_in_tree): New.
6777         (gomp_clear_parent): Handle priorities.
6778         (GOMP_task): Likewise.
6779         (priority_queue_move_task_first,
6780         gomp_target_task_completion, GOMP_PLUGIN_target_task_completion):
6781         New functions.
6782         (gomp_create_target_task): Use priority queues.  Change return type
6783         to bool, add state argument, return false if for async
6784         {{enter,exit} data,update} constructs no dependencies need to be
6785         waited for, handle target nowait.  Set task->fn to NULL instead of
6786         gomp_target_task_fn.
6787         (verify_children_queue): Remove.
6788         (priority_list_upgrade_task): New.
6789         (priority_queue_upgrade_task): New.
6790         (verify_task_queue): Remove.
6791         (priority_list_downgrade_task): New.
6792         (priority_queue_downgrade_task): New.
6793         (gomp_task_run_pre): Use priority queues.
6794         Abstract code out to priority_queue_downgrade_task.
6795         (gomp_task_run_post_handle_dependers): Use priority queues.
6796         (gomp_task_run_post_remove_parent): Likewise.
6797         (gomp_task_run_post_remove_taskgroup): Likewise.
6798         (gomp_barrier_handle_tasks): Likewise.  Handle target nowait target
6799         tasks specially.
6800         (GOMP_taskwait): Likewise.
6801         (gomp_task_maybe_wait_for_dependencies): Likewise.  Abstract code to
6802         priority-queue_upgrade_task.
6803         (GOMP_taskgroup_start): Use priority queues.
6804         (GOMP_taskgroup_end): Likewise.  Handle target nowait target tasks
6805         specially.  If taskgroup is NULL, and thr->ts.level is 0, act as a
6806         barrier.
6807         * taskloop.c (GOMP_taskloop): Handle priorities.
6808         * team.c (gomp_new_team): Call priority_queue_init.
6809         (free_team): Call priority_queue_free.
6810         (gomp_free_thread): Call gomp_team_end if thr->ts.team is artificial
6811         team created for target nowait in implicit parallel region.
6812         (gomp_team_start): For nested check, test thr->ts.level instead of
6813         thr->ts.team != NULL.
6814         * testsuite/libgomp.c/doacross-3.c: New test.
6815         * testsuite/libgomp.c/ordered-5.c: New test.
6816         * testsuite/libgomp.c/priority.c: New test.
6817         * testsuite/libgomp.c/target-31.c: New test.
6818         * testsuite/libgomp.c/target-32.c: New test.
6819         * testsuite/libgomp.c/target-33.c: New test.
6820         * testsuite/libgomp.c/target-34.c: New test.
6821
6822 2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6823
6824         * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: New.
6825
6826         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Sequential
6827         loop is sequential.
6828
6829 2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6830
6831         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: New.
6832         * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: New.
6833
6834 2015-11-12  James Norris  <jnorris@codesourcery.com>
6835             Joseph Myers  <joseph@codesourcery.com>
6836
6837         * libgomp.map (GOACC_2.0.1): Export GOACC_declare.
6838         * oacc-parallel.c (GOACC_declare): New function.
6839         * testsuite/libgomp.oacc-c-c++-common/declare-1.c: New test.
6840         * testsuite/libgomp.oacc-c-c++-common/declare-2.c: Likewise.
6841         * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Likewise.
6842         * testsuite/libgomp.oacc-c-c++-common/declare-5.c: Likewise.
6843         * testsuite/libgomp.oacc-c++/declare-1.C: Likewise.
6844
6845 2015-11-12  Nathan Sidwell  <nathan@codesourcery.com>
6846
6847         * testsuite/libgomp.oacc-c-c++-common/default-1.c: New.
6848
6849 2015-11-1  Nathan Sidwell  <nathan@codesourcery.com>
6850
6851         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: New.
6852         * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: New.
6853
6854 2015-11-09  Nathan Sidwell  <nathan@codesourcery.com>
6855
6856         * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Remove
6857         inadvertent commit.
6858
6859 2015-11-09  Nathan Sidwell  <nathan@codesourcery.com>
6860
6861         * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: New.
6862         * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: New.
6863         * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: New.
6864         * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: New.
6865         * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: New.
6866
6867 2015-11-06  Thomas Schwinge  <thomas@codesourcery.com>
6868
6869         * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: XFAIL.
6870         * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise.
6871
6872 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
6873             Ilya Verbin  <ilya.verbin@intel.com>
6874
6875         * libgomp_g.h (GOMP_loop_nonmonotonic_dynamic_next,
6876         GOMP_loop_nonmonotonic_dynamic_start,
6877         GOMP_loop_nonmonotonic_guided_next,
6878         GOMP_loop_nonmonotonic_guided_start,
6879         GOMP_loop_ull_nonmonotonic_dynamic_next,
6880         GOMP_loop_ull_nonmonotonic_dynamic_start,
6881         GOMP_loop_ull_nonmonotonic_guided_next,
6882         GOMP_loop_ull_nonmonotonic_guided_start,
6883         GOMP_parallel_loop_nonmonotonic_dynamic,
6884         GOMP_parallel_loop_nonmonotonic_guided): New prototypes.
6885         (GOMP_target_41): Renamed to ...
6886         (GOMP_target_ext): ... this.  Add num_teams and thread_limit
6887         arguments.
6888         (GOMP_target_data_41): Renamed to ...
6889         (GOMP_target_data_ext): ... this.
6890         (GOMP_target_update_41): Renamed to ...
6891         (GOMP_target_update_ext): ... this.
6892         * libgomp.map (GOMP_4.5): Export GOMP_target_ext,
6893         GOMP_target_data_ext and GOMP_target_update_ext instead of
6894         GOMP_target_41, GOMP_target_data_41 and GOMP_target_update_41.
6895         Export GOMP_loop_nonmonotonic_dynamic_next,
6896         GOMP_loop_nonmonotonic_dynamic_start,
6897         GOMP_loop_nonmonotonic_guided_next,
6898         GOMP_loop_nonmonotonic_guided_start,
6899         GOMP_loop_ull_nonmonotonic_dynamic_next,
6900         GOMP_loop_ull_nonmonotonic_dynamic_start,
6901         GOMP_loop_ull_nonmonotonic_guided_next,
6902         GOMP_loop_ull_nonmonotonic_guided_start,
6903         GOMP_parallel_loop_nonmonotonic_dynamic and
6904         GOMP_parallel_loop_nonmonotonic_guided.
6905         * loop.c (GOMP_parallel_loop_nonmonotonic_dynamic,
6906         GOMP_parallel_loop_nonmonotonic_guided,
6907         GOMP_loop_nonmonotonic_dynamic_start,
6908         GOMP_loop_nonmonotonic_guided_start,
6909         GOMP_loop_nonmonotonic_dynamic_next,
6910         GOMP_loop_nonmonotonic_guided_next): New aliases or functions.
6911         * loop_ull.c (GOMP_loop_ull_nonmonotonic_dynamic_start,
6912         GOMP_loop_ull_nonmonotonic_guided_start,
6913         GOMP_loop_ull_nonmonotonic_dynamic_next,
6914         GOMP_loop_ull_nonmonotonic_guided_next): Likewise.
6915         * target.c (gomp_map_0len_lookup, gomp_map_val): New inline
6916         functions.
6917         (gomp_map_vars): Handle GOMP_MAP_ALWAYS_POINTER.  For
6918         GOMP_MAP_ZERO_LEN_ARRAY_SECTION use gomp_map_0len_lookup.
6919         Use gomp_map_val function.
6920         (gomp_target_fallback_firstprivate): New static function.
6921         (GOMP_target_41): Renamed to ...
6922         (GOMP_target_ext): ... this.  Add num_teams and thread_limit
6923         arguments.  Move firstprivate fallback handling into a new
6924         function.
6925         (GOMP_target_data_41): Renamed to ...
6926         (GOMP_target_data_ext): ... this.
6927         (GOMP_target_update_41): Renamed to ...
6928         (GOMP_target_update_ext): ... this.
6929         (gomp_exit_data): For GOMP_MAP_*ZERO_LEN* use
6930         gomp_map_0len_lookup instead of gomp_map_lookup.
6931         (omp_target_is_present): Use gomp_map_0len_lookup instead of
6932         gomp_map_lookup.
6933         * testsuite/libgomp.c/target-28.c: Likewise.
6934         * testsuite/libgomp.c/monotonic-1.c: New test.
6935         * testsuite/libgomp.c/monotonic-2.c: New test.
6936         * testsuite/libgomp.c/nonmonotonic-1.c: New test.
6937         * testsuite/libgomp.c/nonmonotonic-2.c: New test.
6938         * testsuite/libgomp.c/pr66199-5.c: New test.
6939         * testsuite/libgomp.c/pr66199-6.c: New test.
6940         * testsuite/libgomp.c/pr66199-7.c: New test.
6941         * testsuite/libgomp.c/pr66199-8.c: New test.
6942         * testsuite/libgomp.c/pr66199-9.c: New test.
6943         * testsuite/libgomp.c/reduction-11.c: New test.
6944         * testsuite/libgomp.c/reduction-12.c: New test.
6945         * testsuite/libgomp.c/reduction-13.c: New test.
6946         * testsuite/libgomp.c/reduction-14.c: New test.
6947         * testsuite/libgomp.c/reduction-15.c: New test.
6948         * testsuite/libgomp.c/target-12.c (main): Adjust for
6949         omp_target_is_present change for one-past-last element.
6950         * testsuite/libgomp.c/target-17.c (foo): Drop tests where
6951         the same var is both mapped and privatized.
6952         * testsuite/libgomp.c/target-19.c (foo): Adjust for different
6953         handling of zero-length array sections.
6954         * testsuite/libgomp.c/target-28.c: New test.
6955         * testsuite/libgomp.c/target-29.c: New test.
6956         * testsuite/libgomp.c/target-30.c: New test.
6957         * testsuite/libgomp.c/target-teams-1.c: New test.
6958         * testsuite/libgomp.c++/member-6.C: New test.
6959         * testsuite/libgomp.c++/member-7.C: New test.
6960         * testsuite/libgomp.c++/monotonic-1.C: New test.
6961         * testsuite/libgomp.c++/monotonic-2.C: New test.
6962         * testsuite/libgomp.c++/nonmonotonic-1.C: New test.
6963         * testsuite/libgomp.c++/nonmonotonic-2.C: New test.
6964         * testsuite/libgomp.c++/pr66199-3.C: New test.
6965         * testsuite/libgomp.c++/pr66199-4.C: New test.
6966         * testsuite/libgomp.c++/pr66199-5.C: New test.
6967         * testsuite/libgomp.c++/pr66199-6.C: New test.
6968         * testsuite/libgomp.c++/pr66199-7.C: New test.
6969         * testsuite/libgomp.c++/pr66199-8.C: New test.
6970         * testsuite/libgomp.c++/pr66199-9.C: New test.
6971         * testsuite/libgomp.c++/reduction-11.C: New test.
6972         * testsuite/libgomp.c++/reduction-12.C: New test.
6973         * testsuite/libgomp.c++/target-13.C: New test.
6974         * testsuite/libgomp.c++/target-14.C: New test.
6975         * testsuite/libgomp.c++/target-15.C: New test.
6976         * testsuite/libgomp.c++/target-16.C: New test.
6977         * testsuite/libgomp.c++/target-17.C: New test.
6978         * testsuite/libgomp.c++/target-18.C: New test.
6979         * testsuite/libgomp.c++/target-19.C: New test.
6980
6981 2015-11-04  Nathan Sidwell  <nathan@codesourcery.com>
6982
6983         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Fix dimensions
6984         and reduction copy.
6985         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
6986         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
6987         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
6988         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
6989         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Likewise.
6990         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
6991         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
6992         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
6993         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
6994         * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c: Likewise.
6995         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
6996         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
6997         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
6998         * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: New.
6999
7000 2015-11-04  Nathan Sidwell  <nathan@codesourcery.com>
7001
7002         * libgomp.oacc-c-c++-common/loop-red-g-1.c: New.
7003         * libgomp.oacc-c-c++-common/loop-red-gwv-1.c: New.
7004         * libgomp.oacc-c-c++-common/loop-red-v-1.c: New.
7005         * libgomp.oacc-c-c++-common/loop-red-v-2.c: New.
7006         * libgomp.oacc-c-c++-common/loop-red-w-1.c: New.
7007         * libgomp.oacc-c-c++-common/loop-red-w-2.c: New.
7008         * libgomp.oacc-c-c++-common/loop-red-wv-1.c: New.
7009         * libgomp.oacc-fortran/reduction-5.f90: Avoid reference var.
7010
7011 2015-11-03  Nathan Sidwell  <nathan@codesourcery.com>
7012
7013         * libgomp.h (struct acc_dispatch_t): Remove args from exec_func.
7014         * plugin/plugin-nvptx.c (nvptx_exec): Remove sizes & kinds arg.
7015         (GOMP_OFFLOAD_openacc_parallel): Likewise.
7016         * oacc-host.c (host_openacc_exec): Likewise.
7017         * oacc-parallel.c (GOACC_parallel_keyed): Adjust exec_func call.
7018
7019 2015-11-03  Julian Brown  <julian@codesourcery.com>
7020             Thomas Schwinge  <thomas@codesourcery.com>
7021
7022         * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: New file.
7023         * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
7024         * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c:
7025         Likewise.
7026         * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: Likewise.
7027         * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: Likewise.
7028
7029 2015-11-03  James Norris  <jnorris@codesourcery.com>
7030
7031         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-1.c: New
7032         file.
7033         * testsuite/libgomp.oacc-c-c++-common/atomic_capture-2.c:
7034         Likewise.
7035         * testsuite/libgomp.oacc-c-c++-common/atomic_rw-1.c: Likewise.
7036         * testsuite/libgomp.oacc-c-c++-common/atomic_update-1.c: Likewise.
7037         * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Likewise.
7038         * testsuite/libgomp.oacc-fortran/atomic_rw-1.f90: New file.
7039         * testsuite/libgomp.oacc-fortran/atomic_update-1.f90: Likewise.
7040
7041 2015-10-29  Nathan Sidwell  <nathan@codesourcery.com>
7042
7043         * openacc.h (enum acc_device_t): Reformat. Ensure layout
7044         compatibility.
7045         (enum acc_async_t): Reformat.
7046         (acc_on_device): Declare compatible with builtin and provide C++
7047         wrapper.
7048         * testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: New.
7049
7050 2015-10-29  Thomas Schwinge  <thomas@codesourcery.com>
7051             Cesar Philippidis  <cesar@codesourcery.com>
7052
7053         * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: Rename to...
7054         * testsuite/libgomp.oacc-c-c++-common/combined-directives-1.c:
7055         ... this.  Add a description of the test at the top of the file.
7056         * testsuite/libgomp.oacc-fortran/combdir-1.f90: Rename file to...
7057         * testsuite/libgomp.oacc-fortran/combined-directives-1.f90:
7058         ... this.  Add a description of the test at the top of the file.
7059
7060 2015-10-28  Nathan Sidwell  <nathan@codesourcery.com>
7061
7062         * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: New.
7063         * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: New.
7064         * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: New.
7065         * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: New.
7066         * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: New.
7067         * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: New.
7068
7069 2015-10-27  Nathan Sidwell  <nathan@codesourcery.com>
7070
7071         * plugin/plugin-nvptx.c (nvptx_exec): Remove check on compute
7072         dimensions.
7073
7074 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
7075
7076         PR testsuite/68063
7077         * testsuite/libgomp.c++/member-1.C (A::m1): Add missing private clause.
7078
7079 2015-10-27  James Norris  <jnorris@codesourcery.com>
7080
7081         * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: New file.
7082         * testsuite/libgomp.oacc-fortran/combdir-1.f90: Likewise.
7083
7084 2015-10-26  Thomas Schwinge  <thomas@codesourcery.com>
7085
7086         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Print to stderr.
7087         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
7088
7089         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Remove explicit
7090         acc_device_nvidia usage.
7091         * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
7092         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
7093         * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
7094
7095         * oacc-init.c (acc_shutdown): Call gomp_init_targets_once.
7096         * testsuite/libgomp.oacc-c-c++-common/lib-8.c: New file.
7097
7098         PR libgomp/66518
7099         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Resolve XFAIL.
7100
7101         PR libgomp/65437
7102         PR libgomp/66518
7103         * oacc-mem.c (update_dev_host): Call goacc_lazy_initialize.
7104         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Remove XFAIL.
7105
7106 2015-10-23  Tom de Vries  <tom@codesourcery.com>
7107
7108         PR testsuite/68063
7109         * testsuite/libgomp.c++/member-2.C (A::m1): Add missing private clause.
7110
7111 2015-10-20  Nathan Sidwell  <nathan@codesourcery.com>
7112
7113         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Set sane
7114         vector_length.
7115         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
7116
7117 2015-10-14  Ilya Verbin  <ilya.verbin@intel.com>
7118             Aleksander Ivanushenko  <aleksander.ivanushenko@intel.com>
7119
7120         * target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end
7121         to 0 when mapnum is 0.
7122
7123 2015-10-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7124
7125         * fortran.c (omp_get_place_proc_ids_, omp_get_partition_place_nums_):
7126         Cast to int from int32_t.
7127
7128 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
7129             Aldy Hernandez  <aldyh@redhat.com>
7130             Ilya Verbin  <ilya.verbin@intel.com>
7131
7132         * config/linux/affinity.c (omp_get_place_num_procs,
7133         omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
7134         * config/linux/doacross.h: New file.
7135         * config/posix/affinity.c (omp_get_place_num_procs,
7136         omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions.
7137         * config/posix/doacross.h: New file.
7138         * env.c: Include gomp-constants.h.
7139         (struct gomp_task_icv): Rename run_sched_modifier to
7140         run_sched_chunk_size.
7141         (gomp_max_task_priority_var): New variable.
7142         (parse_schedule): Rename run_sched_modifier to run_sched_chunk_size.
7143         (handle_omp_display_env): Change _OPENMP value from 201307 to
7144         201511.  Print OMP_MAX_TASK_PRIORITY.
7145         (initialize_env): Parse OMP_MAX_TASK_PRIORITY.
7146         (omp_set_schedule, omp_get_schedule): Rename modifier argument to
7147         chunk_size and run_sched_modifier to run_sched_chunk_size.
7148         (omp_get_max_task_priority, omp_get_initial_device,
7149         omp_get_num_places, omp_get_place_num, omp_get_partition_num_places,
7150         omp_get_partition_place_nums): New functions.
7151         * fortran.c (omp_set_schedule_, omp_set_schedule_8_,
7152         omp_get_schedule_, omp_get_schedule_8_): Rename modifier argument
7153         to chunk_size.
7154         (omp_get_num_places_, omp_get_place_num_procs_,
7155         omp_get_place_num_procs_8_, omp_get_place_proc_ids_,
7156         omp_get_place_proc_ids_8_, omp_get_place_num_,
7157         omp_get_partition_num_places_, omp_get_partition_place_nums_,
7158         omp_get_partition_place_nums_8_, omp_get_initial_device_,
7159         omp_get_max_task_priority_): New functions.
7160         * libgomp_g.h (GOMP_loop_doacross_static_start,
7161         GOMP_loop_doacross_dynamic_start, GOMP_loop_doacross_guided_start,
7162         GOMP_loop_doacross_runtime_start, GOMP_loop_ull_doacross_static_start,
7163         GOMP_loop_ull_doacross_dynamic_start,
7164         GOMP_loop_ull_doacross_guided_start,
7165         GOMP_loop_ull_doacross_runtime_start, GOMP_doacross_post,
7166         GOMP_doacross_wait, GOMP_doacross_ull_post, GOMP_doacross_wait,
7167         GOMP_taskloop, GOMP_taskloop_ull, GOMP_target_41,
7168         GOMP_target_data_41, GOMP_target_update_41,
7169         GOMP_target_enter_exit_data): New prototypes.
7170         (GOMP_task): Add prototype argument.
7171         * libgomp.h (_LIBGOMP_CHECKING_): Define to 0 if not yet defined.
7172         (struct gomp_doacross_work_share): New type.
7173         (struct gomp_work_share): Add doacross field.
7174         (struct gomp_task_icv): Rename run_sched_modifier to
7175         run_sched_chunk_size.
7176         (enum gomp_task_kind): Rename GOMP_TASK_IFFALSE to
7177         GOMP_TASK_UNDEFERRED.  Add comments.
7178         (struct gomp_task_depend_entry): Add comments.
7179         (struct gomp_task): Likewise.
7180         (struct gomp_taskgroup): Likewise.
7181         (struct gomp_target_task): New type.
7182         (struct gomp_team): Add comment.
7183         (gomp_get_place_proc_ids_8, gomp_doacross_init,
7184         gomp_doacross_ull_init, gomp_task_maybe_wait_for_dependencies,
7185         gomp_create_target_task, gomp_target_task_fn): New prototypes.
7186         (struct target_var_desc): New type.
7187         (struct target_mem_desc): Adjust comment.  Use struct
7188         target_var_desc instead of splay_tree_key for list.
7189         (REFCOUNT_INFINITY): Define.
7190         (struct splay_tree_key_s): Remove copy_from field.
7191         (struct gomp_device_descr): Add dev2dev_func field.
7192         (enum gomp_map_vars_kind): New enum.
7193         (gomp_map_vars): Add one argument.
7194         * libgomp.map (OMP_4.5): Export omp_get_max_task_priority,
7195         omp_get_max_task_priority_, omp_get_num_places, omp_get_num_places_,
7196         omp_get_place_num_procs, omp_get_place_num_procs_,
7197         omp_get_place_num_procs_8_, omp_get_place_proc_ids,
7198         omp_get_place_proc_ids_, omp_get_place_proc_ids_8_, omp_get_place_num,
7199         omp_get_place_num_, omp_get_partition_num_places,
7200         omp_get_partition_num_places_, omp_get_partition_place_nums,
7201         omp_get_partition_place_nums_, omp_get_partition_place_nums_8_,
7202         omp_get_initial_device, omp_get_initial_device_, omp_target_alloc,
7203         omp_target_free, omp_target_is_present, omp_target_memcpy,
7204         omp_target_memcpy_rect, omp_target_associate_ptr and
7205         omp_target_disassociate_ptr.
7206         (GOMP_4.0.2): Renamed to ...
7207         (GOMP_4.5): ... this.  Export GOMP_target_41, GOMP_target_data_41,
7208         GOMP_target_update_41, GOMP_target_enter_exit_data, GOMP_taskloop,
7209         GOMP_taskloop_ull, GOMP_loop_doacross_dynamic_start,
7210         GOMP_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
7211         GOMP_loop_doacross_static_start, GOMP_doacross_post,
7212         GOMP_doacross_wait, GOMP_loop_ull_doacross_dynamic_start,
7213         GOMP_loop_ull_doacross_guided_start,
7214         GOMP_loop_ull_doacross_runtime_start,
7215         GOMP_loop_ull_doacross_static_start, GOMP_doacross_ull_post and
7216         GOMP_doacross_ull_wait.
7217         * libgomp.texi: Document omp_get_max_task_priority.
7218         Rename modifier argument to chunk_size for omp_set_schedule and
7219         omp_get_schedule.  Document OMP_MAX_TASK_PRIORITY env var.
7220         * loop.c (GOMP_loop_runtime_start): Adjust for run_sched_modifier
7221         to run_sched_chunk_size renaming.
7222         (GOMP_loop_ordered_runtime_start): Likewise.
7223         (gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start,
7224         gomp_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start,
7225         GOMP_parallel_loop_runtime_start): New functions.
7226         (GOMP_parallel_loop_runtime): Adjust for run_sched_modifier
7227         to run_sched_chunk_size renaming.
7228         (GOMP_loop_doacross_static_start, GOMP_loop_doacross_dynamic_start,
7229         GOMP_loop_doacross_guided_start): New functions or aliases.
7230         * loop_ull.c (GOMP_loop_ull_runtime_start): Adjust for
7231         run_sched_modifier to run_sched_chunk_size renaming.
7232         (GOMP_loop_ull_ordered_runtime_start): Likewise.
7233         (gomp_loop_ull_doacross_static_start,
7234         gomp_loop_ull_doacross_dynamic_start,
7235         gomp_loop_ull_doacross_guided_start,
7236         GOMP_loop_ull_doacross_runtime_start): New functions.
7237         (GOMP_loop_ull_doacross_static_start,
7238         GOMP_loop_ull_doacross_dynamic_start,
7239         GOMP_loop_ull_doacross_guided_start): New functions or aliases.
7240         * oacc-mem.c (acc_map_data, present_create_copy,
7241         gomp_acc_insert_pointer): Pass GOMP_MAP_VARS_OPENACC instead of false
7242         to gomp_map_vars.
7243         (gomp_acc_remove_pointer): Use copy_from from target_var_desc.
7244         * oacc-parallel.c (GOACC_data_start): Pass GOMP_MAP_VARS_OPENACC
7245         instead of false to gomp_map_vars.
7246         (GOACC_parallel_keyed): Likewise.  Use copy_from from target_var_desc.
7247         * omp.h.in (omp_lock_hint_t): New type.
7248         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
7249         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
7250         omp_get_place_num, omp_get_partition_num_places,
7251         omp_get_partition_place_nums, omp_get_initial_device,
7252         omp_get_max_task_priority, omp_target_alloc, omp_target_free,
7253         omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect,
7254         omp_target_associate_ptr, omp_target_disassociate_ptr): New
7255         prototypes.
7256         * omp_lib.f90.in (omp_lock_hint_kind): New parameter.
7257         (omp_lock_hint_none, omp_lock_hint_uncontended,
7258         omp_lock_hint_contended, omp_lock_hint_nonspeculative,
7259         omp_lock_hint_speculative): New parameters.
7260         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
7261         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
7262         omp_get_place_num, omp_get_partition_num_places,
7263         omp_get_partition_place_nums, omp_get_initial_device,
7264         omp_get_max_task_priority): New interfaces.
7265         (omp_set_schedule, omp_get_schedule): Rename modifier argument
7266         to chunk_size.
7267         * omp_lib.h.in (omp_lock_hint_kind): New parameter.
7268         (omp_lock_hint_none, omp_lock_hint_uncontended,
7269         omp_lock_hint_contended, omp_lock_hint_nonspeculative,
7270         omp_lock_hint_speculative): New parameters.
7271         (omp_init_lock_with_hint, omp_init_nest_lock_with_hint,
7272         omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids,
7273         omp_get_place_num, omp_get_partition_num_places,
7274         omp_get_partition_place_nums, omp_get_initial_device,
7275         omp_get_max_task_priority): New functions and subroutines.
7276         * ordered.c: Include stdarg.h and string.h.
7277         (MAX_COLLAPSED_BITS): Define.
7278         (gomp_doacross_init, GOMP_doacross_post, GOMP_doacross_wait,
7279         gomp_doacross_ull_init, GOMP_doacross_ull_post,
7280         GOMP_doacross_ull_wait): New functions.
7281         * target.c: Include errno.h.
7282         (resolve_device): If device is not initialized, call
7283         gomp_init_device on it.
7284         (gomp_map_lookup): New function.
7285         (gomp_map_vars_existing): Add tgt_var argument, fill it in.
7286         Don't bump refcount if REFCOUNT_INFINITY.  Handle
7287         GOMP_MAP_ALWAYS_TO_P.
7288         (get_kind): Rename is_openacc argument to short_mapkind.
7289         (gomp_map_pointer): Use gomp_map_lookup.
7290         (gomp_map_fields_existing): New function.
7291         (gomp_map_vars): Rename is_openacc argument to short_mapkind
7292         and is_target to pragma_kind.  Handle GOMP_MAP_VARS_ENTER_DATA,
7293         handle GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_STRUCT,
7294         GOMP_MAP_USE_DEVICE_PTR, GOMP_MAP_ZERO_LEN_ARRAY_SECTION.
7295         Adjust for tgt->list changed type and copy_from living in there.
7296         (gomp_copy_from_async): Adjust for tgt->list changed type and
7297         copy_from living in there.
7298         (gomp_unmap_vars): Likewise.
7299         (gomp_update): Likewise.  Rename is_openacc argument to
7300         short_mapkind.  Don't fail if object is not mapped.
7301         (gomp_load_image_to_device): Initialize refcount to
7302         REFCOUNT_INFINITY.
7303         (gomp_target_fallback): New function.
7304         (gomp_get_target_fn_addr): Likewise.
7305         (GOMP_target): Adjust gomp_map_vars caller, use
7306         gomp_get_target_fn_addr and gomp_target_fallback.
7307         (GOMP_target_41): New function.
7308         (gomp_target_data_fallback): New function.
7309         (GOMP_target_data): Use it, adjust gomp_map_vars caller.
7310         (GOMP_target_data_41): New function.
7311         (GOMP_target_update): Adjust gomp_update caller.
7312         (GOMP_target_update_41): New function.
7313         (gomp_exit_data, GOMP_target_enter_exit_data,
7314         gomp_target_task_fn, omp_target_alloc, omp_target_free,
7315         omp_target_is_present, omp_target_memcpy,
7316         omp_target_memcpy_rect_worker, omp_target_memcpy_rect,
7317         omp_target_associate_ptr, omp_target_disassociate_ptr,
7318         gomp_load_plugin_for_device): New functions.
7319         * task.c: Include gomp-constants.h.  Include taskloop.c
7320         twice to get GOMP_taskloop and GOMP_taskloop_ull definitions.
7321         (gomp_task_handle_depend): New function.
7322         (GOMP_task): Use it.  Add priority argument.  Use
7323         gomp-constant.h constants instead of hardcoded numbers.
7324         Rename GOMP_TASK_IFFALSE to GOMP_TASK_UNDEFERRED.
7325         (gomp_create_target_task): New function.
7326         (verify_children_queue, verify_taskgroup_queue,
7327         verify_task_queue): New functions.
7328         (gomp_task_run_pre): Call verify_*_queue functions.
7329         If an upcoming tied task is about to leave the sibling or
7330         taskgroup queues in an invalid state, adjust appropriately.
7331         Remove taskgroup argument.  Add comments.
7332         (gomp_task_run_post_handle_dependers): Add comments.
7333         (gomp_task_run_post_remove_parent): Likewise.
7334         (gomp_barrier_handle_tasks): Adjust gomp_task_run_pre caller.
7335         (GOMP_taskwait): Likewise.  Add comments.
7336         (gomp_task_maybe_wait_for_dependencies): Fix scheduling
7337         problem such that the first non parent_depends_on task does not
7338         end up at the end of the children queue.
7339         (GOMP_taskgroup_start): Rename GOMP_TASK_IFFALSE to
7340         GOMP_TASK_UNDEFERRED.
7341         (GOMP_taskgroup_end): Adjust gomp_task_run_pre caller.
7342         * taskloop.c: New file.
7343         * testsuite/lib/libgomp.exp
7344         (check_effective_target_offload_device_nonshared_as): New proc.
7345         * testsuite/libgomp.c/affinity-2.c: New test.
7346         * testsuite/libgomp.c/doacross-1.c: New test.
7347         * testsuite/libgomp.c/doacross-2.c: New test.
7348         * testsuite/libgomp.c/examples-4/declare_target-1.c (fib_wrapper):
7349         Add map clause to target.
7350         * testsuite/libgomp.c/examples-4/declare_target-4.c (accum): Likewise.
7351         * testsuite/libgomp.c/examples-4/declare_target-5.c (accum): Likewise.
7352         * testsuite/libgomp.c/examples-4/device-1.c (main): Likewise.
7353         * testsuite/libgomp.c/examples-4/device-3.c (main): Likewise.
7354         * testsuite/libgomp.c/examples-4/target_data-3.c (gramSchmidt):
7355         Likewise.
7356         * testsuite/libgomp.c/examples-4/teams-2.c (dotprod): Likewise.
7357         * testsuite/libgomp.c/examples-4/teams-3.c (dotprod): Likewise.
7358         * testsuite/libgomp.c/examples-4/teams-4.c (dotprod): Likewise.
7359         * testsuite/libgomp.c/for-2.h (OMPTGT, OMPTO, OMPFROM): Define if
7360         not defined.  Use those where needed.
7361         * testsuite/libgomp.c/for-4.c: New test.
7362         * testsuite/libgomp.c/for-5.c: New test.
7363         * testsuite/libgomp.c/for-6.c: New test.
7364         * testsuite/libgomp.c/linear-1.c: New test.
7365         * testsuite/libgomp.c/ordered-4.c: New test.
7366         * testsuite/libgomp.c/pr66199-2.c (f2): Adjust for linear clause
7367         only allowed on the loop iterator.
7368         * testsuite/libgomp.c/pr66199-3.c: New test.
7369         * testsuite/libgomp.c/pr66199-4.c: New test.
7370         * testsuite/libgomp.c/reduction-7.c: New test.
7371         * testsuite/libgomp.c/reduction-8.c: New test.
7372         * testsuite/libgomp.c/reduction-9.c: New test.
7373         * testsuite/libgomp.c/reduction-10.c: New test.
7374         * testsuite/libgomp.c/target-1.c (fn2, fn3, fn4): Add
7375         map(tofrom:s).
7376         * testsuite/libgomp.c/target-2.c (fn2, fn3, fn4): Likewise.
7377         * testsuite/libgomp.c/target-7.c (foo): Add map(h) where needed.
7378         * testsuite/libgomp.c/target-11.c: New test.
7379         * testsuite/libgomp.c/target-12.c: New test.
7380         * testsuite/libgomp.c/target-13.c: New test.
7381         * testsuite/libgomp.c/target-14.c: New test.
7382         * testsuite/libgomp.c/target-15.c: New test.
7383         * testsuite/libgomp.c/target-16.c: New test.
7384         * testsuite/libgomp.c/target-17.c: New test.
7385         * testsuite/libgomp.c/target-18.c: New test.
7386         * testsuite/libgomp.c/target-19.c: New test.
7387         * testsuite/libgomp.c/target-20.c: New test.
7388         * testsuite/libgomp.c/target-21.c: New test.
7389         * testsuite/libgomp.c/target-22.c: New test.
7390         * testsuite/libgomp.c/target-23.c: New test.
7391         * testsuite/libgomp.c/target-24.c: New test.
7392         * testsuite/libgomp.c/target-25.c: New test.
7393         * testsuite/libgomp.c/target-26.c: New test.
7394         * testsuite/libgomp.c/target-27.c: New test.
7395         * testsuite/libgomp.c/taskloop-1.c: New test.
7396         * testsuite/libgomp.c/taskloop-2.c: New test.
7397         * testsuite/libgomp.c/taskloop-3.c: New test.
7398         * testsuite/libgomp.c/taskloop-4.c: New test.
7399         * testsuite/libgomp.c++/ctor-13.C: New test.
7400         * testsuite/libgomp.c++/doacross-1.C: New test.
7401         * testsuite/libgomp.c++/examples-4/declare_target-2.C:
7402         Replace offload_device with offload_device_nonshared_as.
7403         * testsuite/libgomp.c++/for-12.C: New test.
7404         * testsuite/libgomp.c++/for-13.C: New test.
7405         * testsuite/libgomp.c++/for-14.C: New test.
7406         * testsuite/libgomp.c++/linear-1.C: New test.
7407         * testsuite/libgomp.c++/member-1.C: New test.
7408         * testsuite/libgomp.c++/member-2.C: New test.
7409         * testsuite/libgomp.c++/member-3.C: New test.
7410         * testsuite/libgomp.c++/member-4.C: New test.
7411         * testsuite/libgomp.c++/member-5.C: New test.
7412         * testsuite/libgomp.c++/ordered-1.C: New test.
7413         * testsuite/libgomp.c++/reduction-5.C: New test.
7414         * testsuite/libgomp.c++/reduction-6.C: New test.
7415         * testsuite/libgomp.c++/reduction-7.C: New test.
7416         * testsuite/libgomp.c++/reduction-8.C: New test.
7417         * testsuite/libgomp.c++/reduction-9.C: New test.
7418         * testsuite/libgomp.c++/reduction-10.C: New test.
7419         * testsuite/libgomp.c++/reference-1.C: New test.
7420         * testsuite/libgomp.c++/simd14.C: New test.
7421         * testsuite/libgomp.c++/target-2.C (fn2): Add map(tofrom: s) clause.
7422         * testsuite/libgomp.c++/target-5.C: New test.
7423         * testsuite/libgomp.c++/target-6.C: New test.
7424         * testsuite/libgomp.c++/target-7.C: New test.
7425         * testsuite/libgomp.c++/target-8.C: New test.
7426         * testsuite/libgomp.c++/target-9.C: New test.
7427         * testsuite/libgomp.c++/target-10.C: New test.
7428         * testsuite/libgomp.c++/target-11.C: New test.
7429         * testsuite/libgomp.c++/target-12.C: New test.
7430         * testsuite/libgomp.c++/taskloop-1.C: New test.
7431         * testsuite/libgomp.c++/taskloop-2.C: New test.
7432         * testsuite/libgomp.c++/taskloop-3.C: New test.
7433         * testsuite/libgomp.c++/taskloop-4.C: New test.
7434         * testsuite/libgomp.c++/taskloop-5.C: New test.
7435         * testsuite/libgomp.c++/taskloop-6.C: New test.
7436         * testsuite/libgomp.c++/taskloop-7.C: New test.
7437         * testsuite/libgomp.c++/taskloop-8.C: New test.
7438         * testsuite/libgomp.c++/taskloop-9.C: New test.
7439         * testsuite/libgomp.fortran/affinity1.f90: New test.
7440         * testsuite/libgomp.fortran/affinity2.f90: New test.
7441
7442 2015-10-13  Tom de Vries  <tom@codesourcery.com>
7443
7444         PR tree-optimization/67476
7445         * testsuite/libgomp.c/autopar-3.c: New test.
7446         * testsuite/libgomp.c/autopar-4.c: New test.
7447         * testsuite/libgomp.c/autopar-5.c: New test.
7448         * testsuite/libgomp.c/autopar-6.c: New test.
7449         * testsuite/libgomp.c/autopar-7.c: New test.
7450         * testsuite/libgomp.c/autopar-8.c: New test.
7451
7452 2015-10-12  James Norris  <jnorris@codesourcery.com>
7453
7454         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Fix loop
7455         initializer.
7456
7457 2015-10-09  David Malcolm  <dmalcolm@redhat.com>
7458
7459         * testsuite/lib/libgomp.exp: Load multiline.exp before prune.exp,
7460         using load_gcc_lib.
7461
7462 2015-10-02  Thomas Schwinge  <thomas@codesourcery.com>
7463
7464         * oacc-ptx.h: Remove file, moving its content into...
7465         * config/nvptx/fortran.c: ... here...
7466         * config/nvptx/oacc-init.c: ..., here...
7467         * config/nvptx/oacc-parallel.c: ..., and here.
7468         * config/nvptx/openacc.f90: New file.
7469         * plugin/plugin-nvptx.c: Don't include "oacc-ptx.h".
7470         (link_ptx): Don't link in predefined bits of PTX code.
7471
7472 2015-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7473             Bernd Schmidt <bernds@codesourcery.com>
7474
7475         * plugin/plugin-nvptx.c (targ_fn_launch): Use GOMP_DIM_MAX.
7476         (struct targ_ptx_obj): New.
7477         (nvptx_tdata): Move earlier, change data format.
7478         (link_ptx): Take targ_ptx_obj ptr and count.  Allow multiple
7479         objects.
7480         (GOMP_OFFLOAD_load_image): Adjust.
7481
7482 2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>
7483
7484         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Add checkpoint.
7485         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
7486         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
7487         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
7488         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
7489         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
7490         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
7491         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
7492         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
7493         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
7494         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
7495         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
7496         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
7497         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
7498         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
7499         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
7500         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
7501         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
7502         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
7503         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
7504         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
7505         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
7506         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
7507         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
7508         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
7509         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
7510         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
7511         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
7512         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
7513         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
7514         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
7515         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
7516         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
7517         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
7518         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
7519         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
7520         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
7521         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
7522         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
7523         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
7524         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
7525         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
7526         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
7527         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
7528         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
7529         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
7530         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
7531         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
7532         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
7533         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
7534         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
7535         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
7536         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
7537         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
7538         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
7539         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
7540         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
7541         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
7542         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
7543         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
7544         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
7545         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
7546         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
7547
7548 2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7549
7550         * oacc-init.c (acc_on_device): Force optimization level.
7551
7552 2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7553
7554         * plugin/plugin-nvptx.c (ARRAYSIZE): Delete.
7555         (cuda_errlist): Delete.
7556         (cuda_error): Reimplement.
7557
7558 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
7559
7560         * libgomp.h (acc_dispatch_t): Replace separate geometry args with
7561         array.
7562         * libgomp.map (GOACC_parallel_keyed): New.
7563         * oacc-parallel.c (goacc_wait): Take pointer to va_list.  Adjust
7564         all callers.
7565         (GOACC_parallel_keyed): New interface.  Lose geometry arguments
7566         and take keyed varargs list.  Adjust call to exec_func.
7567         (GOACC_parallel): Force host fallback.
7568         * libgomp_g.h (GOACC_parallel): Remove.
7569         (GOACC_parallel_keyed): Declare.
7570         * plugin/plugin-nvptx.c (struct targ_fn_launch): New struct.
7571         (struct targ_gn_descriptor): Replace name field with launch field.
7572         (nvptx_exec): Lose separate geometry args, take array.  Process
7573         dynamic dimensions and adjust.
7574         (struct nvptx_tdata): Replace fn_names field with fn_descs.
7575         (GOMP_OFFLOAD_load_image): Adjust for change in function table
7576         data.
7577         (GOMP_OFFLOAD_openacc_parallel): Adjust for change in dimension
7578         passing.
7579         * oacc-host.c (host_openacc_exec): Adjust for change in dimension
7580         passing.
7581
7582 2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>
7583
7584         PR libgomp/67141
7585         * oacc-int.h (goacc_host_init): Add declaration.
7586         * oacc-host.c (goacc_host_init): Remove static and constructor attribute.
7587         * oacc-init.c (goacc_runtime_initialize): Call goacc_host_init() at end.
7588
7589 2015-09-08  Aditya Kumar  <hiraditya@msn.com>
7590             Sebastian Pop  <s.pop@samsung.com>
7591
7592         * testsuite/libgomp.graphite/bounds.c (int foo): Modified test case to
7593         match o/p.
7594         * testsuite/libgomp.graphite/force-parallel-1.c (void parloop): Same.
7595         * testsuite/libgomp.graphite/force-parallel-4.c: Same.
7596         * testsuite/libgomp.graphite/force-parallel-5.c: Same.
7597         * testsuite/libgomp.graphite/force-parallel-7.c: Same.
7598         * testsuite/libgomp.graphite/force-parallel-8.c: Same.
7599
7600 2015-09-03  Jakub Jelinek  <jakub@redhat.com>
7601
7602         * configure.tgt: Add missing ;; in between nvptx and rtems
7603         snippets.
7604
7605 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7606
7607         * config/posix/pool.h (gomp_adjust_thread_attr): New.
7608         * config/rtems/pool.h (gomp_adjust_thread_attr): Likewise.
7609         (gomp_thread_pool_reservoir): Add priority member.
7610         * confi/rtems/proc.c (allocate_thread_pool_reservoir): Add
7611         priority.
7612         (parse_thread_pools): Likewise.
7613         * team.c (gomp_team_start): Call configuration provided
7614         gomp_adjust_thread_attr(). Destroy thread attributes if
7615         necessary.
7616         * libgomp.texi: Document GOMP_RTEMS_THREAD_POOLS.
7617
7618 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7619
7620         * config/posix/pool.h: New.
7621         * config/rtems/pool.h: Likewise.
7622         * config/rtems/proc.c: Likewise.
7623         * libgomp.h (gomp_thread_destructor): Declare.
7624         * team.c: Include configuration provided "pool.h".
7625         (gomp_get_thread_pool): Define in configuration.
7626         (gomp_team_end): Call configuration defined
7627         gomp_release_thread_pool().
7628
7629 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7630
7631         * config/rtems/bar.c: New.
7632         * config/rtems/bar.h: Likewise.
7633         * config/rtems/mutex.c: Likewise.
7634         * config/rtems/mutex.h: Likewise.
7635         * config/rtems/sem.c: Likewise.
7636         * config/rtems/sem.h: Likewise.
7637         * configure.ac (*-*-rtems*): Check that Newlib provides a proper
7638         <sys/lock.h> header file.
7639         * configure.tgt (*-*-rtems*): Enable RTEMS configuration if
7640         supported by Newlib.
7641         * configure: Regenerate.
7642
7643 2015-09-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7644
7645         * team.c (gomp_new_thread_pool): Delete and move content to ...
7646         (gomp_get_thread_pool): ... new function.  Allocate and
7647         initialize thread pool on demand.
7648         (get_last_team): Use gomp_get_thread_pool().
7649         (gomp_team_start): Delete thread pool initialization.
7650
7651 2015-09-03  Tom de Vries  <tom@codesourcery.com>
7652
7653         PR tree-optimization/65637
7654         * testsuite/libgomp.c/autopar-2.c: New test.
7655
7656 2015-08-29  Tom de Vries  <tom@codesourcery.com>
7657
7658         PR tree-optimization/46193
7659         * testsuite/libgomp.c/pr46193.c: New test.
7660
7661 2015-08-24  Nathan Sidwell  <nathan@codesourcery.com>
7662
7663         libgomp/
7664         * libgomp.map: Add 4.0.2 version.
7665         * target.c (offload_image_descr): Add version field.
7666         (gomp_load_image_to_device): Add version argument.  Adjust plugin
7667         call.  Improve load mismatch diagnostic.
7668         (gomp_unload_image_from_device): Add version argument.  Adjust plugin
7669         call.
7670         (GOMP_offload_regster): Make stub function, move bulk to ...
7671         (GOMP_offload_register_ver): ... here.  Process version argument.
7672         (GOMP_offload_unregister): Make stub function, move bulk to ...
7673         (GOMP_offload_unregister_ver): ... here.  Process version argument.
7674         (gomp_init_device): Process version field.
7675         (gomp_unload_device): Process version field.
7676         (gomp_load_plugin_for_device): Reimplement DLSYM & DLSYM_OPT
7677         macros.  Check plugin version.
7678         * libgomp.h (gomp_device_descr): Add version function field.  Adjust
7679         loader and unloader types.
7680         * oacc-host.c: Include gomp-constants.h.
7681         (host_version): New.
7682         (host_load_image, host_unload_image): Adjust.
7683         (host_dispatch): Add host_version.
7684         * plugin/plugin-nvptx.c: Include gomp-constants.h.
7685         (GOMP_OFFLOAD_version): New.
7686         (GOMP_OFFLOAD_load_image): Add version arg and check it.
7687         (GOMP_OFFLOAD_unload_image): Likewise.
7688         * plugin/plugin-host.c: Include gomp-constants.h.
7689         (GOMP_OFFLOAD_version): New.
7690         (GOMP_OFFLOAD_load_image): Add version arg.
7691         (GOMP_OFFLOAD_unload_image): Likewise.
7692
7693 2015-08-24  Tom de Vries  <tom@codesourcery.com>
7694
7695         PR tree-optimization/65468
7696         * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: New test.
7697
7698 2015-08-24  Tom de Vries  <tom@codesourcery.com>
7699
7700         PR tree-optimization/65468
7701         * testsuite/libgomp.c/static-chunk-size-one.c: New test.
7702
7703 2015-08-24  Joost VandeVondele  <vondele@gnu.gcc.org>
7704
7705         PR libgomp/66761
7706         PR libgomp/67303
7707         * iter.c (gomp_iter_dynamic_next): Employ an atomic load.
7708         (gomp_iter_guided_next): Idem.
7709         * iter_ull.c (gomp_iter_ull_dynamic_next): Idem.
7710         (gomp_iter_ull_guided_next): Idem.
7711         * config/linux/wait.h (do_spin): Idem.
7712
7713 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
7714
7715         * libgomp-plugin.h (enum offload_target_type): Remove
7716         OFFLOAD_TARGET_TYPE_HOST_NONSHM.
7717         * openacc.f90 (openacc_kinds): Remove acc_device_host_nonshm.
7718         * openacc.h (enum acc_device_t): Likewise.
7719         * openacc_lib.h: Likewise.
7720         * oacc-init.c (name_of_acc_device_t): Don't handle it.
7721         (acc_on_device): Just use __builtin_acc_on_device.
7722         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Don't forbid usage
7723         of acc_on_device builtin.
7724         * plugin/plugin-host.h: Remove file.
7725         * plugin/plugin-host.c: Likewise, but salvage some content into...
7726         * oacc-host.c: ... this file.
7727         * plugin/Makefrag.am: Don't build libgomp-plugin-host_nonshm.la.
7728         * plugin/configfrag.ac (offload_targets): Don't add host_nonshm.
7729         * Makefile.in: Regenerate.
7730         * configure: Likewise.
7731         * testsuite/lib/libgomp.exp
7732         (check_effective_target_openacc_host_nonshm_selected): Remove.
7733         * testsuite/libgomp.oacc-c++/c++.exp: Don't handle
7734         ACC_DEVICE_TYPE=host_nonshm.
7735         * testsuite/libgomp.oacc-c/c.exp: Likewise.
7736         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
7737         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
7738         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
7739         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
7740         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
7741
7742 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
7743             Jakub Jelinek  <jakub@redhat.com>
7744
7745         * config/nvptx/affinity.c: New file.
7746         * config/nvptx/alloc.c: Likewise.
7747         * config/nvptx/bar.c: Likewise.
7748         * config/nvptx/barrier.c: Likewise.
7749         * config/nvptx/critical.c: Likewise.
7750         * config/nvptx/env.c: Likewise.
7751         * config/nvptx/error.c: Likewise.
7752         * config/nvptx/fortran.c: Likewise.
7753         * config/nvptx/iter.c: Likewise.
7754         * config/nvptx/iter_ull.c: Likewise.
7755         * config/nvptx/libgomp-plugin.c: Likewise.
7756         * config/nvptx/lock.c: Likewise.
7757         * config/nvptx/loop.c: Likewise.
7758         * config/nvptx/loop_ull.c: Likewise.
7759         * config/nvptx/mutex.c: Likewise.
7760         * config/nvptx/oacc-async.c: Likewise.
7761         * config/nvptx/oacc-cuda.c: Likewise.
7762         * config/nvptx/oacc-host.c: Likewise.
7763         * config/nvptx/oacc-init.c: Likewise.
7764         * config/nvptx/oacc-mem.c: Likewise.
7765         * config/nvptx/oacc-parallel.c: Likewise.
7766         * config/nvptx/oacc-plugin.c: Likewise.
7767         * config/nvptx/omp-lock.h: Likewise.
7768         * config/nvptx/ordered.c: Likewise.
7769         * config/nvptx/parallel.c: Likewise.
7770         * config/nvptx/proc.c: Likewise.
7771         * config/nvptx/ptrlock.c: Likewise.
7772         * config/nvptx/sections.c: Likewise.
7773         * config/nvptx/sem.c: Likewise.
7774         * config/nvptx/single.c: Likewise.
7775         * config/nvptx/splay-tree.c: Likewise.
7776         * config/nvptx/target.c: Likewise.
7777         * config/nvptx/task.c: Likewise.
7778         * config/nvptx/team.c: Likewise.
7779         * config/nvptx/time.c: Likewise.
7780         * config/nvptx/work.c: Likewise.
7781         * configure.ac: Don't probe pthreads support for host nvptx*-*-*.
7782         * configure: Regenerate.
7783         * configure.tgt (config_path): Set to "nvptx" for target
7784         nvptx*-*-*.
7785
7786 2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>
7787
7788         * testsuite/libgomp.oacc-c-c++-common/vector-type-1.c: New file.
7789
7790 2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7791
7792         * plugin/plugin-nvptx.c: Don't include dlfcn.h.
7793         (cuda_errlist): Constify.
7794         (errmsg):  Move into ...
7795         (cuda_error): ... here.  Make smaller.
7796         (_XSTR, _STR): Delete.
7797         (cuda_synames): Delete.
7798         (verify_device_library): Delete.
7799         (nvptx_init): Don't call it.
7800
7801 2015-07-28  Tom de Vries  <tom@codesourcery.com>
7802
7803         * testsuite/libgomp.c/uns-outer-4.c: New test.
7804
7805 2015-07-24  Cesar Philippidis  <cesar@codesourcery.com>
7806
7807         * testsuite/libgomp.c/pr66714.c: New test.
7808
7809 2015-07-22  Maxim Blumenthal  <maxim.blumenthal@intel.com>
7810
7811         PR libgomp/66950
7812         * testsuite/libgomp.c/examples-4/simd-7.c (N): Change to 30 from 45.
7813         (fib_ref): New function.
7814         (fib): Correct corner cases in the recursion.
7815         (main): Replace the non-simd loop with fib_ref call.
7816         * testsuite/libgomp.fortran/examples-4/simd-7.f90: (fib_ref): New
7817         subroutine.
7818         (fibonacci): Lower the parameter N to 30.  Correct accordingly check
7819         for the last array element value.  Replace the non-simd loop with
7820         fib_ref call.  Remove redundant b_ref array.  Remove the comparison
7821         of the last array element with according Fibonacci sequence element.
7822         (fib): Correct corner cases in the recursion.
7823
7824 2015-07-21  Nathan Sidwell  <nathan@codesourcery.com>
7825
7826         * target.c (gomp_offload_image_to_device): Rename to ...
7827         (gomp_load_image_to_device): ... here.
7828         (GOMP_offload_register): Adjust call.
7829         (gomp_init_device): Likewise.
7830         (gomp_unload_image_from_device): New.  Broken out of ...
7831         (GOMP_offload_unregister): ... here.  Call it.
7832         (gomp_unload_device): New.
7833         * libgomp.h (gomp_unload_device): Declare.
7834         * oacc-init.c (acc_shutdown_1): Unload from device before deleting
7835         mem maps.
7836
7837 2015-07-20  Nathan Sidwell  <nathan@codesourcery.com>
7838
7839         * oacc-parallel.c (GOACC_parallel): Move variadic handling into
7840         wait=-specific if.
7841         (GOACC_enter_exit_data, GOACC_update): Use consistent num_waits
7842         !=0 condition.
7843         (goacc_waits): Move !num_waits handling to ...
7844         (GOACC_wait): ... here, the only caller that might have zero waits.
7845
7846         * plugin/plugin-nvptx.c (struct targ_fn_descriptor): Move later.
7847         (struct ptx_image_data): Move earlier, add fns field.
7848         (struct ptx_device): Add images and image_lock fields.
7849         (ptx_images, ptx_image_lock): Delete.
7850         (nvptx_open_device): Initialize images and image_lock fields.
7851         (nvptx_close_device): Destroy image_lock.
7852         (GOMP_OFFLOAD_load_image): Register image to device-specific fields.
7853         (GOMP_OFFLOAD_unload_image): Unregister image from device-specific
7854         fields.
7855
7856 2015-07-17  Nathan Sidwell  <nathan@codesourcery.com>
7857
7858         * target.c (GOMP_offload_register): Use int for device type arg.
7859         (GOMP_offload_unregister): Likewise.
7860
7861         * target.c (struct_offload_image_descr): Constify host_table.
7862         (gomp_offload_image_to_device): Likewise.
7863         (GOMP_offload_register, GOMP_offload_unregister): Likewise.
7864
7865         * libgomp.h (gomp_device_descr): Constify target data arguments.
7866         * target.c (struct offload_image_descr): Constify target_data.
7867         (gomp_offload_image_to_device): Likewise.
7868         (GOMP_offload_register): Likewise.
7869         (GOMP_offload_unregister): Likewise.
7870         * plugin/plugin-host.c (GOMP_OFFLOAD_load_image,
7871         GOMP_OFFLOAD_unload_image): Constify target data.
7872         * plugin/plugin-nvptx.c (struct ptx_image_data): Constify target data.
7873         (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): Likewise.
7874
7875 2015-07-16  Nathan Sidwell  <nathan@codesourcery.com>
7876
7877         * plugin/plugin-nvptx.c (link_ptx): Constify string argument.
7878         Workaround driver library const error.
7879         (struct nvptx_tdata, nvptx_tdata_t): New.
7880         (GOMP_OFFLOAD_load_image): Use struct for target_data's real
7881         type.
7882
7883 2015-07-15  Maxim Blumenthal  <maxim.blumenthal@intel.com>
7884
7885         * testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Change type
7886         of EPS parameter from integer to real.
7887         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: (check): Change
7888         type of EPS parameter from integer to real.
7889
7890 2015-07-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7891
7892         * team.c (get_last_team): New.
7893         (gomp_new_team): Recycle last non-nested team if possible.
7894         (gomp_team_end): Move team work share list free lock destruction
7895         to ...
7896         (free_team): ... here.
7897
7898 2015-07-14  Maxim Blumenthal  <maxim.blumenthal@intel.com>
7899
7900         * testsuite/libgomp.c/examples-4/simd-3.c: (main): Change type of res
7901         and ref from int to double.  Replaced their comparison with
7902         an inequality of their difference and EPS.
7903         * testsuite/libgomp.c/examples-4/simd-8.c: (main): Replace the
7904         comparison of pri and a reference number with an inequality of their
7905         difference and EPS.
7906         * testsuite/libgomp.fortran/examples-4/simd-3.f90: (main): Replaced
7907         the comparison of sum and sum_ref with an inequality of their
7908         difference and EPS.
7909         * testsuite/libgomp.fortran/examples-4/simd-8.f90: (main): Replace
7910         the comparison of pri and a reference number with an inequality of
7911         their difference and EPS.
7912
7913 2015-07-13  Maxim Blumenthal  <maxim.blumenthal@intel.com>
7914
7915         * testsuite/libgomp.c++/examples-4/e.53.2.C: Renamed to...
7916         * testsuite/libgomp.c++/examples-4/declare_target-2.C: ...this.
7917         * testsuite/libgomp.c++/examples-4/e.51.5.C: Renamed to...
7918         * testsuite/libgomp.c++/examples-4/target_data-5.C: ...this.
7919         * testsuite/libgomp.c/examples-4/e.56.3.c: Renamed to...
7920         * testsuite/libgomp.c/examples-4/array_sections-3.c: ...this.
7921         * testsuite/libgomp.c/examples-4/e.56.4.c: Renamed to...
7922         * testsuite/libgomp.c/examples-4/array_sections-4.c: ...this.
7923         * testsuite/libgomp.c/examples-4/e.55.1.c: Renamed to...
7924         * testsuite/libgomp.c/examples-4/async_target-1.c: ...this.
7925         * testsuite/libgomp.c/examples-4/e.55.2.c: Renamed to...
7926         * testsuite/libgomp.c/examples-4/async_target-2.c: ...this.
7927         (vec_mult_ref): Remove v1 and v2 arguments, turn them into local
7928         variables.
7929         (vec_mult): Likewise.  Add #pragma omp taskwait.
7930         (main): Adjust caller.
7931         * testsuite/libgomp.c/examples-4/e.53.1.c: Renamed to...
7932         * testsuite/libgomp.c/examples-4/declare_target-1.c: ...this.
7933         * testsuite/libgomp.c/examples-4/e.53.3.c: Renamed to...
7934         * testsuite/libgomp.c/examples-4/declare_target-3.c: ...this.
7935         * testsuite/libgomp.c/examples-4/e.53.4.c: Renamed to...
7936         * testsuite/libgomp.c/examples-4/declare_target-4.c: ...this.
7937         * testsuite/libgomp.c/examples-4/e.53.5.c: Renamed to...
7938         * testsuite/libgomp.c/examples-4/declare_target-5.c: ...this.
7939         * testsuite/libgomp.c/examples-4/e.57.1.c: Renamed to...
7940         * testsuite/libgomp.c/examples-4/device-1.c: ...this.
7941         * testsuite/libgomp.c/examples-4/e.57.2.c: Renamed to...
7942         * testsuite/libgomp.c/examples-4/device-2.c: ...this.
7943         * testsuite/libgomp.c/examples-4/e.57.3.c: Renamed to...
7944         * testsuite/libgomp.c/examples-4/device-3.c: ...this.
7945         * testsuite/libgomp.c/examples-4/simd-1.c: New file.
7946         * testsuite/libgomp.c/examples-4/simd-2.c: New file.
7947         * testsuite/libgomp.c/examples-4/simd-3.c: New file.
7948         * testsuite/libgomp.c/examples-4/simd-4.c: New file.
7949         * testsuite/libgomp.c/examples-4/simd-5.c: New file.
7950         * testsuite/libgomp.c/examples-4/simd-6.c: New file.
7951         * testsuite/libgomp.c/examples-4/simd-7.c: New file.
7952         * testsuite/libgomp.c/examples-4/simd-8.c: New file.
7953         * testsuite/libgomp.c/examples-4/e.50.1.c: Renamed to...
7954         * testsuite/libgomp.c/examples-4/target-1.c: ...this.
7955         * testsuite/libgomp.c/examples-4/e.50.2.c: Renamed to...
7956         * testsuite/libgomp.c/examples-4/target-2.c: ...this.
7957         * testsuite/libgomp.c/examples-4/e.50.3.c: Renamed to...
7958         * testsuite/libgomp.c/examples-4/target-3.c: ...this.
7959         * testsuite/libgomp.c/examples-4/e.50.4.c: Renamed to...
7960         * testsuite/libgomp.c/examples-4/target-4.c: ...this.
7961         * testsuite/libgomp.c/examples-4/e.50.5.c: Renamed to...
7962         * testsuite/libgomp.c/examples-4/target-5.c: ...this.
7963         * testsuite/libgomp.c/examples-4/e.51.1.c: Renamed to...
7964         * testsuite/libgomp.c/examples-4/target_data-1.c: ...this.
7965         * testsuite/libgomp.c/examples-4/e.51.2.c: Renamed to...
7966         * testsuite/libgomp.c/examples-4/target_data-2.c: ...this.
7967         * testsuite/libgomp.c/examples-4/e.51.3.c: Renamed to...
7968         * testsuite/libgomp.c/examples-4/target_data-3.c: ...this.
7969         * testsuite/libgomp.c/examples-4/e.51.4.c: Renamed to...
7970         * testsuite/libgomp.c/examples-4/target_data-4.c: ...this.
7971         * testsuite/libgomp.c/examples-4/e.51.6.c: Renamed to...
7972         * testsuite/libgomp.c/examples-4/target_data-6.c: ...this.
7973         * testsuite/libgomp.c/examples-4/e.51.7.c: Renamed to...
7974         * testsuite/libgomp.c/examples-4/target_data-7.c: ...this.
7975         * testsuite/libgomp.c/examples-4/e.52.1.c: Renamed to...
7976         * testsuite/libgomp.c/examples-4/target_update-1.c: ...this.
7977         * testsuite/libgomp.c/examples-4/e.52.2.c: Renamed to...
7978         * testsuite/libgomp.c/examples-4/target_update-2.c: ...this.
7979         * testsuite/libgomp.c/examples-4/task_dep-1.c: New file.
7980         * testsuite/libgomp.c/examples-4/task_dep-2.c: New file.
7981         * testsuite/libgomp.c/examples-4/task_dep-3.c: New file.
7982         * testsuite/libgomp.c/examples-4/task_dep-4.c: New file.
7983         * testsuite/libgomp.c/examples-4/task_dep-5.c: New file.
7984         * testsuite/libgomp.c/examples-4/e.54.2.c: Renamed to...
7985         * testsuite/libgomp.c/examples-4/teams-2.c: ...this.
7986         * testsuite/libgomp.c/examples-4/e.54.3.c: Renamed to...
7987         * testsuite/libgomp.c/examples-4/teams-3.c: ...this.
7988         * testsuite/libgomp.c/examples-4/e.54.4.c: Renamed to...
7989         * testsuite/libgomp.c/examples-4/teams-4.c: ...this.
7990         * testsuite/libgomp.c/examples-4/e.54.5.c: Renamed to...
7991         * testsuite/libgomp.c/examples-4/teams-5.c: ...this.
7992         * testsuite/libgomp.c/examples-4/e.54.6.c: Renamed to...
7993         * testsuite/libgomp.c/examples-4/teams-6.c: ...this.
7994         * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Renamed to...
7995         * testsuite/libgomp.fortran/examples-4/array_sections-3.f90: ...this.
7996         * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Renamed to...
7997         * testsuite/libgomp.fortran/examples-4/array_sections-4.f90: ...this.
7998         * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Renamed to...
7999         * testsuite/libgomp.fortran/examples-4/async_target-1.f90: ...this.
8000         * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Renamed to...
8001         * testsuite/libgomp.fortran/examples-4/async_target-2.f90: ...this.
8002         (vec_mult): Add !$omp taskwait.
8003         * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Renamed to...
8004         * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: ...this.
8005         * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Renamed to...
8006         * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: ...this.
8007         * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Renamed to...
8008         * testsuite/libgomp.fortran/examples-4/declare_target-3.f90: ...this.
8009         * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Renamed to...
8010         * testsuite/libgomp.fortran/examples-4/declare_target-4.f90: ...this.
8011         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Renamed to...
8012         * testsuite/libgomp.fortran/examples-4/declare_target-5.f90: ...this.
8013         * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Renamed to...
8014         * testsuite/libgomp.fortran/examples-4/device-1.f90: ...this.
8015         * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Renamed to...
8016         * testsuite/libgomp.fortran/examples-4/device-2.f90: ...this.
8017         * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Renamed to...
8018         * testsuite/libgomp.fortran/examples-4/device-3.f90: ...this.
8019         * testsuite/libgomp.fortran/examples-4/simd-1.f90: New file.
8020         * testsuite/libgomp.fortran/examples-4/simd-2.f90: New file.
8021         * testsuite/libgomp.fortran/examples-4/simd-3.f90: New file.
8022         * testsuite/libgomp.fortran/examples-4/simd-4.f90: New file.
8023         * testsuite/libgomp.fortran/examples-4/simd-5.f90: New file.
8024         * testsuite/libgomp.fortran/examples-4/simd-6.f90: New file.
8025         * testsuite/libgomp.fortran/examples-4/simd-7.f90: New file.
8026         * testsuite/libgomp.fortran/examples-4/simd-8.f90: New file.
8027         * testsuite/libgomp.fortran/examples-4/e.50.1.f90: Renamed to...
8028         * testsuite/libgomp.fortran/examples-4/target-1.f90: ...this.
8029         * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Renamed to...
8030         * testsuite/libgomp.fortran/examples-4/target-2.f90: ...this.
8031         * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Renamed to...
8032         * testsuite/libgomp.fortran/examples-4/target-3.f90: ...this.
8033         * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Renamed to...
8034         * testsuite/libgomp.fortran/examples-4/target-4.f90: ...this.
8035         * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Renamed to...
8036         * testsuite/libgomp.fortran/examples-4/target-5.f90: ...this.
8037         * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Renamed to...
8038         * testsuite/libgomp.fortran/examples-4/target_data-1.f90: ...this.
8039         * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Renamed to...
8040         * testsuite/libgomp.fortran/examples-4/target_data-2.f90: ...this.
8041         * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Renamed to...
8042         * testsuite/libgomp.fortran/examples-4/target_data-3.f90: ...this.
8043         * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Renamed to...
8044         * testsuite/libgomp.fortran/examples-4/target_data-4.f90: ...this.
8045         * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Renamed to...
8046         * testsuite/libgomp.fortran/examples-4/target_data-5.f90: ...this.
8047         * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Renamed to...
8048         * testsuite/libgomp.fortran/examples-4/target_data-6.f90: ...this.
8049         * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Renamed to...
8050         * testsuite/libgomp.fortran/examples-4/target_data-7.f90: ...this.
8051         * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Renamed to...
8052         * testsuite/libgomp.fortran/examples-4/target_update-1.f90: ...this.
8053         * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Renamed to...
8054         * testsuite/libgomp.fortran/examples-4/target_update-2.f90: ...this.
8055         * testsuite/libgomp.fortran/examples-4/task_dep-1.f90: New file.
8056         * testsuite/libgomp.fortran/examples-4/task_dep-2.f90: New file.
8057         * testsuite/libgomp.fortran/examples-4/task_dep-3.f90: New file.
8058         * testsuite/libgomp.fortran/examples-4/task_dep-4.f90: New file.
8059         * testsuite/libgomp.fortran/examples-4/task_dep-5.f90: New file.
8060         * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Renamed to...
8061         * testsuite/libgomp.fortran/examples-4/teams-2.f90: ...this.
8062         * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Renamed to...
8063         * testsuite/libgomp.fortran/examples-4/teams-3.f90: ...this.
8064         * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Renamed to...
8065         * testsuite/libgomp.fortran/examples-4/teams-4.f90: ...this.
8066         * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Renamed to...
8067         * testsuite/libgomp.fortran/examples-4/teams-5.f90: ...this.
8068         * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Renamed to...
8069         * testsuite/libgomp.fortran/examples-4/teams-6.f90: ...this.
8070
8071 2015-07-10  Tom de Vries  <tom@codesourcery.com>
8072
8073         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: New test.
8074         * testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: New test.
8075
8076 2015-07-08  Thomas Schwinge  <thomas@codesourcery.com>
8077
8078         PR libgomp/65099
8079         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return 0 if not
8080         in a 64-bit configuration.
8081         * testsuite/libgomp.oacc-c++/c++.exp: Don't attempt nvidia
8082         offloading testing if no such device is available.
8083         * testsuite/libgomp.oacc-c/c.exp: Likewise.
8084         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
8085
8086 2015-07-08  Tom de Vries  <tom@codesourcery.com>
8087
8088         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Fix
8089         second call to f.
8090         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
8091
8092 2015-07-07  Tom de Vries  <tom@codesourcery.com>
8093
8094         PR tree-optimization/66642
8095         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Test low
8096         iteration count case.
8097         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c (init): New
8098         function, factor out of ...
8099         (main): ... here.  Test low iteration count case.
8100
8101 2015-07-06  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8102
8103         * libgomp.h (gomp_thread_pool): Comment last_team field.
8104
8105 2015-07-02  Uros Bizjak  <ubizjak@gmail.com>
8106
8107         * testsuite/libgomp.c++/pr66702-1.C: Require
8108         vect_simd_clones effective target.
8109         * testsuite/libgomp.c++/pr66702-2.C: Ditto.
8110
8111 2015-06-30  Tom de Vries  <tom@codesourcery.com>
8112
8113         * testsuite/libgomp.oacc-c++/c++.exp: Set DEFAULT_CFLAGS to -O2 if not
8114         already set.  Use DEFAULT_CFLAGS in dg-runtest.
8115         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Remove dg-options
8116         "-O2".
8117
8118 2015-06-30  Tom de Vries  <tom@codesourcery.com>
8119
8120         * testsuite/libgomp.c++/c++.exp: Set DEFAULT_CFLAGS to -O2 if not
8121         already set.  Use DEFAULT_CFLAGS in dg-runtest.
8122         * testsuite/libgomp.c++/atomic-16.C: Remove dg-options "-O2 -fopenmp".
8123         * testsuite/libgomp.c++/pr64824.C: Same.
8124         * testsuite/libgomp.c++/pr64868.C: Same.
8125         * testsuite/libgomp.c++/pr66199-1.C: Same.
8126         * testsuite/libgomp.c++/pr66199-2.C: Same.
8127         * testsuite/libgomp.c++/target-2.C: Same.
8128         * testsuite/libgomp.c++/for-7.C: Use dg-additional-options for
8129         -std=<standard> option.
8130         * testsuite/libgomp.c++/udr-11.C: Same.
8131         * testsuite/libgomp.c++/udr-12.C: Same.
8132         * testsuite/libgomp.c++/udr-13.C: Same.
8133         * testsuite/libgomp.c++/udr-14.C: Same.
8134         * testsuite/libgomp.c++/udr-15.C: Same.
8135         * testsuite/libgomp.c++/udr-16.C: Same.
8136         * testsuite/libgomp.c++/udr-17.C: Same.
8137         * testsuite/libgomp.c++/udr-18.C: Same.
8138         * testsuite/libgomp.c++/udr-19.C: Same.
8139         * testsuite/libgomp.c++/atomic-1.C: Remove dg-options "-O2".
8140         * testsuite/libgomp.c++/simd-1.C: Same.
8141         * testsuite/libgomp.c++/simd-2.C: Same.
8142         * testsuite/libgomp.c++/simd-3.C: Same.
8143         * testsuite/libgomp.c++/simd-4.C: Same.
8144         * testsuite/libgomp.c++/simd-5.C: Same.
8145         * testsuite/libgomp.c++/simd-6.C: Same.
8146         * testsuite/libgomp.c++/simd-7.C: Same.
8147         * testsuite/libgomp.c++/simd-8.C: Same.
8148         * testsuite/libgomp.c++/simd-9.C: Same.
8149         * testsuite/libgomp.c++/simd10.C: Same.
8150         * testsuite/libgomp.c++/simd11.C: Same.
8151         * testsuite/libgomp.c++/simd12.C: Same.
8152         * testsuite/libgomp.c++/simd13.C: Same.
8153
8154 2015-06-30  Jakub Jelinek  <jakub@redhat.com>
8155
8156         PR middle-end/66702
8157         * testsuite/libgomp.c++/pr66702-1.C: New test.
8158         * testsuite/libgomp.c++/pr66702-2.C: New test.
8159
8160 2015-06-30  Tom de Vries  <tom@codesourcery.com>
8161
8162         * testsuite/libgomp.c/parloops-exit-first-loop-alt-5.c: New test.
8163         * testsuite/libgomp.c/parloops-exit-first-loop-alt-6.c: New test.
8164         * testsuite/libgomp.c/parloops-exit-first-loop-alt-7.c: New test.
8165         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Update comment.
8166
8167 2015-06-30  Tom de Vries  <tom@codesourcery.com>
8168
8169         PR tree-optimization/66652
8170         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (f): Rewrite
8171         using restrict pointers.
8172         (main): Add arguments to calls to f.
8173         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
8174
8175 2015-06-23  Andreas Tobler  <andreast@gcc.gnu.org>
8176
8177         * configure.ac: Fix check for header <sys/sysctl.h>.
8178         * configure: Regenerate.
8179         * config.h.in: Likewise.
8180
8181 2015-06-23  Tom de Vries  <tom@codesourcery.com>
8182
8183         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (main): Use
8184         abort.
8185         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c (main): Same.
8186
8187 2015-06-19  Thomas Schwinge  <thomas@codesourcery.com>
8188
8189         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Only consider for
8190         acc_device_nvidia.
8191
8192         PR libgomp/66518
8193         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: XFAIL.
8194         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
8195
8196 2015-06-15  Tom de Vries  <tom@codesourcery.com>
8197
8198         * testsuite/libgomp.c/atomic-1.c: Remove dg-options "-O2".  Use
8199         dg-additional-options for any remaining options.
8200         * testsuite/libgomp.c/atomic-2.c: Same.
8201         * testsuite/libgomp.c/atomic-4.c: Same.
8202         * testsuite/libgomp.c/atomic-5.c: Same.
8203         * testsuite/libgomp.c/atomic-6.c: Same.
8204         * testsuite/libgomp.c/autopar-1.c: Same.
8205         * testsuite/libgomp.c/copyin-1.c: Same.
8206         * testsuite/libgomp.c/copyin-2.c: Same.
8207         * testsuite/libgomp.c/copyin-3.c: Same.
8208         * testsuite/libgomp.c/examples-4/e.53.5.c: Same.
8209         * testsuite/libgomp.c/nestedfn-5.c: Same.
8210         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Same.
8211         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Same.
8212         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: Same.
8213         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
8214         * testsuite/libgomp.c/pr32362-1.c: Same.
8215         * testsuite/libgomp.c/pr32362-2.c: Same.
8216         * testsuite/libgomp.c/pr32362-3.c: Same.
8217         * testsuite/libgomp.c/pr39591-1.c: Same.
8218         * testsuite/libgomp.c/pr39591-2.c: Same.
8219         * testsuite/libgomp.c/pr39591-3.c: Same.
8220         * testsuite/libgomp.c/pr58392.c: Same.
8221         * testsuite/libgomp.c/pr58756.c: Same.
8222         * testsuite/libgomp.c/simd-1.c: Same.
8223         * testsuite/libgomp.c/simd-10.c: Same.
8224         * testsuite/libgomp.c/simd-11.c: Same.
8225         * testsuite/libgomp.c/simd-12.c: Same.
8226         * testsuite/libgomp.c/simd-13.c: Same.
8227         * testsuite/libgomp.c/simd-14.c: Same.
8228         * testsuite/libgomp.c/simd-15.c: Same.
8229         * testsuite/libgomp.c/simd-2.c: Same.
8230         * testsuite/libgomp.c/simd-3.c: Same.
8231         * testsuite/libgomp.c/simd-4.c: Same.
8232         * testsuite/libgomp.c/simd-5.c: Same.
8233         * testsuite/libgomp.c/simd-6.c: Same.
8234         * testsuite/libgomp.c/simd-7.c: Same.
8235         * testsuite/libgomp.c/simd-8.c: Same.
8236         * testsuite/libgomp.c/simd-9.c: Same.
8237
8238 2015-06-15  Tom de Vries  <tom@codesourcery.com>
8239
8240         * testsuite/libgomp.c/pr35625.c: Fix typo.
8241
8242 2015-06-15  Tom de Vries  <tom@codesourcery.com>
8243
8244         * testsuite/libgomp.c/atomic-18.c: Remove superfluous -fopenmp setting
8245         in dg-options.
8246         * testsuite/libgomp.c/atomic-3.c: Same.
8247         * testsuite/libgomp.c/debug-1.c: Same.
8248         * testsuite/libgomp.c/nqueens-1.c: Same.
8249         * testsuite/libgomp.c/pr26171.c: Same.
8250         * testsuite/libgomp.c/pr48591.c: Same.
8251         * testsuite/libgomp.c/pr64824.c: Same.
8252         * testsuite/libgomp.c/pr64868.c: Same.
8253         * testsuite/libgomp.c/pr66133.c: Same.
8254         * testsuite/libgomp.c/pr66199-1.c: Same.
8255         * testsuite/libgomp.c/pr66199-2.c: Same.
8256         * testsuite/libgomp.c/target-8.c: Same.
8257
8258 2015-06-15  Tom de Vries  <tom@codesourcery.com>
8259
8260         * testsuite/libgomp.c/collapse-3.c: Use dg-additional-options for
8261         -std={gnu99,c99}.
8262         * testsuite/libgomp.c/for-1.c: Same.
8263         * testsuite/libgomp.c/for-2.c: Same.
8264         * testsuite/libgomp.c/for-3.c: Same.
8265         * testsuite/libgomp.c/pr35625.c: Same.
8266         * testsuite/libgomp.c/pr39154.c: Same.
8267         * testsuite/libgomp.c/simd-16.c: Same.
8268         * testsuite/libgomp.c/simd-17.c: Same.
8269
8270 2015-06-13  Tom de Vries  <tom@codesourcery.com>
8271
8272         * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: New test.
8273
8274 2015-06-13  Tom de Vries  <tom@codesourcery.com>
8275
8276         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Add comment.
8277         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
8278         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Add comment.
8279         (N): Define.
8280         (main): Use N instead of hardcoded constants.
8281
8282 2015-06-05  Tom de Vries  <tom@codesourcery.com>
8283
8284         merge from gomp4 branch:
8285         2015-05-28  Tom de Vries  <tom@codesourcery.com>
8286
8287         PR tree-optimization/65443
8288         * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: New test.
8289         * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: New test.
8290         * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: New test.
8291
8292 2015-05-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
8293
8294         * testsuite/libgomp.graphite/bounds.c: Adjust for
8295         cleanup-tree-dump removal.
8296         * testsuite/libgomp.graphite/force-parallel-1.c: Likewise.
8297         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
8298         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
8299         * testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
8300         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
8301         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
8302         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
8303         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
8304         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
8305         * testsuite/libgomp.graphite/pr41118.c: Likewise.
8306
8307 2015-05-28  Uros Bizjak  <ubizjak@gmail.com>
8308
8309         * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Remove function.
8310         (futex_wait) [!__x86_64__]: Use __asm operand instead of sys_futex0.
8311         (futex_wake) [!__x86_64__]: Ditto.
8312
8313 2015-05-28  Julian Brown  <julian@codesourcery.com>
8314
8315         * oacc-init.c (resolve_device): Add FAIL_IS_ERROR argument. Update
8316         function comment. Only call gomp_fatal if new argument is true.
8317         (acc_dev_num_out_of_range): New function.
8318         (acc_init_1, acc_shutdown_1): Update call to resolve_device. Call
8319         acc_dev_num_out_of_range as appropriate.
8320         (acc_get_num_devices, acc_set_device_type, acc_get_device_type)
8321         (acc_get_device_num, acc_set_device_num): Update calls to
8322         resolve_device.
8323         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Update expected test
8324         output.
8325
8326 2015-05-28  Julian Brown  <julian@codesourcery.com>
8327
8328         PR libgomp/65742
8329         * oacc-init.c (plugin/plugin-host.h): Include.
8330         (acc_on_device): Check whether we're in an offloaded region for
8331         host_nonshm
8332         plugin. Don't use __builtin_acc_on_device.
8333         * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_parallel): Set
8334         nonshm_exec flag in thread-local data.
8335         (GOMP_OFFLOAD_openacc_create_thread_data): Allocate thread-local
8336         data for host_nonshm plugin.
8337         (GOMP_OFFLOAD_openacc_destroy_thread_data): Free thread-local data
8338         for host_nonshm plugin.
8339         * plugin/plugin-host.h: New.
8340
8341 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
8342
8343         * config/linux/ia64/futex.h (sys_futex0) Change operand "op" to int.
8344
8345 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
8346
8347         * config/linux/wait.h (gomp_futex_wait, gomp_futex_wake):
8348         Declare as int.
8349         (FUTEX_PRIVATE_FLAG): Remove L suffix.
8350         * config/linux/mutex.c (gomp_futex_wait, gomp_futex_wake):
8351         Declare as int.
8352
8353 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
8354
8355         * config/linux/x86/futex.h (sys_futex0) [__PIC__]: Remove function.
8356
8357 2015-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
8358
8359         * target.c (gomp_map_pointer): New function abstracting out
8360         GOMP_MAP_POINTER handling.
8361         (gomp_map_vars): Remove GOMP_MAP_POINTER handling code and use
8362         gomp_map_pointer().
8363
8364 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
8365
8366         PR middle-end/66199
8367         * testsuite/libgomp.c/pr66199-1.c: New test.
8368         * testsuite/libgomp.c/pr66199-2.c: New test.
8369         * testsuite/libgomp.c++/pr66199-1.C: New test.
8370         * testsuite/libgomp.c++/pr66199-2.C: New test.
8371         * testsuite/libgomp.fortran/pr66199-1.f90: New test.
8372         * testsuite/libgomp.fortran/pr66199-2.f90: New test.
8373
8374 2015-05-19  Julian Brown  <julian@codesourcery.com>
8375
8376         * plugin/plugin-nvptx.c (nvptx_get_num_devices): Return zero
8377         on cuInit failure.
8378
8379 2015-05-13  Jakub Jelinek  <jakub@redhat.com>
8380
8381         PR middle-end/66133
8382         * testsuite/libgomp.c/pr66133.c: New test.
8383
8384 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
8385
8386         * Makefile.in: Regenerated with automake-1.11.6.
8387         * aclocal.m4: Likewise.
8388         * config.h.in: Likewise.
8389         * configure: Likewise.
8390         * testsuite/Makefile.in: Likewise.
8391
8392 2015-05-08  Jason Merrill  <jason@redhat.com>
8393
8394         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c (main): Use
8395         _Complex.
8396
8397         * openacc.h (__GOACC_NOTHROW): Fix noexcept syntax.
8398
8399 2015-05-06  Julian Brown  <julian@codesourcery.com>
8400
8401         * oacc-init.c (acc_device_lock): Add explanatory comment.
8402         (resolve_device): Add comment about locking requirement.
8403         (acc_init_1, acc_shutdown_1): Likewise. Add locking around
8404         gomp_init_device and gomp_fini_device calls.
8405         (acc_get_num_devices, acc_set_device_type, acc_get_device_type)
8406         (acc_get_device_num, acc_set_device_num): Add locking around
8407         resolve_device and gomp_init_device calls.
8408
8409 2015-05-06  Julian Brown  <julian@codesourcery.com>
8410
8411         * oacc-init.c (acc_shutdown_1): Call gomp_mutex_unlock for
8412         goacc_thread_lock on error paths.
8413         * oacc-mem.c (lookup_host): Remove locking from function. Note
8414         locking requirement for caller in function comment.
8415         (lookup_dev): Likewise.
8416         (acc_free, acc_deviceptr, acc_hostptr, acc_is_present)
8417         (acc_map_data, acc_unmap_data, present_create_copy, delete_copyout)
8418         (update_dev_host, gomp_acc_insert_pointer, gomp_acc_remove_pointer):
8419         Add locking.
8420
8421 2015-05-05  Thomas Schwinge  <thomas@codesourcery.com>
8422
8423         PR testsuite/65205
8424         PR libgomp/65993
8425         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: In dg-output,
8426         don't expect "0x" prefix for "%p" format specifier, don't expect
8427         "(nil)" for NULL pointer.
8428         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
8429         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
8430         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
8431         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
8432         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
8433         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
8434         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
8435         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
8436         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
8437         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
8438         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
8439         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
8440         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
8441         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
8442         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
8443         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
8444         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
8445         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
8446         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
8447         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
8448         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
8449         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
8450         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
8451         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
8452         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
8453         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
8454         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
8455         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
8456         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: More
8457         accurately specify what we're looking for.
8458         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
8459         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
8460         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
8461         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
8462         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
8463
8464 2015-04-30  James Norris  <jnorris@codesourcery.com>
8465
8466         PR testsuite/65205
8467         * testsuite/lib/libgomp.exp
8468         (check_effective_target_openacc_host_selected)
8469         (check_effective_target_openacc_host_nonshm_selected): New
8470         procedures.
8471         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Fix misuse of
8472         dg-shouldfail.
8473         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
8474         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
8475         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
8476         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
8477         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
8478         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
8479         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
8480         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
8481         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
8482         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
8483         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
8484         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
8485         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
8486         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
8487         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
8488         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
8489         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
8490         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
8491         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
8492         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
8493         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
8494         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
8495         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
8496         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
8497         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
8498         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
8499         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
8500         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
8501         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
8502         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
8503         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
8504         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
8505         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
8506         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
8507         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
8508         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
8509         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
8510         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
8511         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
8512         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
8513         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
8514         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
8515         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
8516
8517 2015-04-08  Julian Brown  <julian@codesourcery.com>
8518
8519         * libgomp.h (target_mem_desc: Remove mem_map field.
8520         (acc_dispatch_t): Remove open_device_func, close_device_func,
8521         get_device_num_func, set_device_num_func, target_data members.
8522         Change create_thread_data_func argument to device number instead of
8523         generic pointer.
8524         * oacc-async.c (assert.h): Include.
8525         (acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
8526         (acc_wait_all, acc_wait_all_async): Use current host thread's
8527         active device, not base_dev.
8528         * oacc-cuda.c (acc_get_current_cuda_device)
8529         (acc_get_current_cuda_context, acc_get_cuda_stream)
8530         (acc_set_cuda_stream): Likewise.
8531         * oacc-host.c (host_dispatch): Don't set open_device_func,
8532         close_device_func, get_device_num_func or set_device_num_func.
8533         * oacc-init.c (base_dev, init_key): Remove.
8534         (cached_base_dev): New.
8535         (name_of_acc_device_t): New.
8536         (acc_init_1): Initialise default-numbered device, not zeroth.
8537         (acc_shutdown_1): Close all devices of a given type.
8538         (goacc_destroy_thread): Don't use base_dev.
8539         (lazy_open, lazy_init, lazy_init_and_open): Remove.
8540         (goacc_attach_host_thread_to_device): New.
8541         (acc_init): Reimplement with goacc_attach_host_thread_to_device.
8542         (acc_get_num_devices): Don't use base_dev.
8543         (acc_set_device_type): Reimplement.
8544         (acc_get_device_type): Don't use base_dev.
8545         (acc_get_device_num): Tweak logic.
8546         (acc_set_device_num): Likewise.
8547         (acc_on_device): Use acc_get_device_type.
8548         (goacc_runtime_initialize): Initialize cached_base_dev not base_dev.
8549         (goacc_lazy_initialize): Reimplement with acc_init and
8550         goacc_attach_host_thread_to_device.
8551         * oacc-int.h (goacc_thread): Add base_dev field.
8552         (base_dev): Remove extern declaration.
8553         (goacc_attach_host_thread_to_device): Add prototype.
8554         * oacc-mem.c (acc_malloc): Use current thread's device instead of
8555         base_dev.
8556         (acc_free): Likewise.
8557         (acc_memcpy_to_device): Likewise.
8558         (acc_memcpy_from_device): Likewise.
8559         * oacc-parallel.c (select_acc_device): Remove. Replace calls with
8560         goacc_lazy_initialize (throughout).
8561         (GOACC_parallel): Use tgt_offset to locate target functions.
8562         * target.c (gomp_map_vars): Don't set tgt->mem_map.
8563         (gomp_unmap_vars): Use devicep->mem_map pointer not tgt->mem_map.
8564         (gomp_load_plugin_for_device): Remove open_device, close_device,
8565         get_device_num, set_device_num openacc hook initialisation. Don't set
8566         openacc.target_data.
8567         * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_open_device)
8568         (GOMP_OFFLOAD_openacc_close_device)
8569         (GOMP_OFFLOAD_openacc_get_device_num)
8570         (GOMP_OFFLOAD_openacc_set_device_num): Remove.
8571         (GOMP_OFFLOAD_openacc_create_thread_data): Change (unused) argument
8572         to int.
8573         * plugin/plugin-nvptx.c (ptx_inited): Remove.
8574         (instantiated_devices, ptx_dev_lock): New.
8575         (struct ptx_image_data): New.
8576         (ptx_devices, ptx_images, ptx_image_lock): New.
8577         (fini_streams_for_device): Reorder cuStreamDestroy call.
8578         (nvptx_get_num_devices): Remove forward declaration.
8579         (nvptx_init): Change return type to bool.
8580         (nvptx_fini): Remove.
8581         (nvptx_attach_host_thread_to_device): New.
8582         (nvptx_open_device): Return struct ptx_device* instead of void*.
8583         (nvptx_close_device): Change argument type to struct ptx_device*,
8584         return type to void.
8585         (nvptx_get_num_devices): Use instantiated_devices not ptx_inited.
8586         (kernel_target_data, kernel_host_table): Remove static globals.
8587         (GOMP_OFFLOAD_register_image, GOMP_OFFLOAD_get_table): Remove.
8588         (GOMP_OFFLOAD_init_device): Reimplement.
8589         (GOMP_OFFLOAD_fini_device): Likewise.
8590         (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New.
8591         (GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free, GOMP_OFFLOAD_dev2host)
8592         (GOMP_OFFLOAD_host2dev): Use ORD argument.
8593         (GOMP_OFFLOAD_openacc_open_device)
8594         (GOMP_OFFLOAD_openacc_close_device)
8595         (GOMP_OFFLOAD_openacc_set_device_num)
8596         (GOMP_OFFLOAD_openacc_get_device_num): Remove.
8597         (GOMP_OFFLOAD_openacc_create_thread_data): Change argument to int
8598         (device number).
8599
8600         testsuite/
8601         * libgomp.oacc-c-c++-common/lib-9.c: Fix devnum check in test.
8602
8603 2015-04-06  Ilya Verbin  <ilya.verbin@intel.com>
8604
8605         * libgomp-plugin.h (struct mapping_table): Replace with addr_pair.
8606         * libgomp.h (struct gomp_memory_mapping): Remove.
8607         (struct target_mem_desc): Change type of mem_map from
8608         gomp_memory_mapping * to splay_tree_s *.
8609         (struct gomp_device_descr): Remove register_image_func, get_table_func.
8610         Add load_image_func, unload_image_func.
8611         Change type of mem_map from gomp_memory_mapping to splay_tree_s.
8612         Remove offload_regions_registered.
8613         (gomp_init_tables): Remove.
8614         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
8615         to splay_tree_s *.
8616         * libgomp.map (GOMP_4.0.1): Add GOMP_offload_unregister.
8617         * oacc-host.c (host_dispatch): Do not initialize register_image_func,
8618         get_table_func, mem_map.is_initialized, mem_map.splay_tree.root,
8619         offload_regions_registered.
8620         Initialize load_image_func, unload_image_func, mem_map.root.
8621         (goacc_host_init): Do not initialize host_dispatch.mem_map.lock.
8622         * oacc-init.c (lazy_open): Don't call gomp_init_tables.
8623         (acc_shutdown_1): Use dev's lock and splay_tree instead of mem_map's.
8624         * oacc-mem.c (lookup_host): Get gomp_device_descr *dev instead of
8625         gomp_memory_mapping *.  Use dev's lock and splay_tree.
8626         (lookup_dev): Use dev's lock.
8627         (acc_deviceptr): Pass dev to lookup_host instead of mem_map.
8628         (acc_is_present): Likewise.
8629         (acc_map_data): Likewise.
8630         (acc_unmap_data): Likewise.  Use dev's lock.
8631         (present_create_copy): Likewise.
8632         (delete_copyout): Pass dev to lookup_host instead of mem_map.
8633         (update_dev_host): Likewise.
8634         (gomp_acc_remove_pointer): Likewise.  Use dev's lock.
8635         * oacc-parallel.c (GOACC_parallel): Use dev's lock and splay_tree.
8636         * plugin/plugin-host.c (GOMP_OFFLOAD_register_image): Remove.
8637         (GOMP_OFFLOAD_get_table): Remove
8638         (GOMP_OFFLOAD_load_image): New function.
8639         (GOMP_OFFLOAD_unload_image): New function.
8640         * target.c (register_lock): New mutex for offload image registration.
8641         (num_devices): Do not guard with PLUGIN_SUPPORT.
8642         (gomp_realloc_unlock): New static function.
8643         (gomp_map_vars_existing): Add device descriptor argument.  Unlock mutex
8644         before gomp_fatal.
8645         (gomp_map_vars): Use dev's lock and splay_tree instead of mem_map's.
8646         Pass devicep to gomp_map_vars_existing.  Unlock mutex before gomp_fatal.
8647         (gomp_copy_from_async): Use dev's lock and splay_tree instead of
8648         mem_map's.
8649         (gomp_unmap_vars): Likewise.
8650         (gomp_update): Remove gomp_memory_mapping argument.  Use dev's lock and
8651         splay_tree instead of mm's.  Unlock mutex before gomp_fatal.
8652         (gomp_offload_image_to_device): New static function.
8653         (GOMP_offload_register): Add mutex lock.
8654         Call gomp_offload_image_to_device for all initialized devices.
8655         Replace gomp_realloc with gomp_realloc_unlock.
8656         (GOMP_offload_unregister): New function.
8657         (gomp_init_tables): Replace with gomp_init_device.  Replace a call to
8658         get_table_func from the plugin with calls to init_device_func and
8659         gomp_offload_image_to_device.
8660         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
8661         to splay_tree_s *.
8662         (GOMP_target): Do not call gomp_init_tables.  Use dev's lock and
8663         splay_tree instead of mem_map's.  Unlock mutex before gomp_fatal.
8664         (GOMP_target_data): Do not call gomp_init_tables.
8665         (GOMP_target_update): Likewise.  Remove argument from gomp_update.
8666         (gomp_load_plugin_for_device): Replace register_image and get_table
8667         with load_image and unload_image in DLSYM ().
8668         (gomp_register_images_for_device): Remove function.
8669         (gomp_target_init): Do not initialize current_device.mem_map.*,
8670         current_device.offload_regions_registered.
8671         Remove call to gomp_register_images_for_device.
8672         Do not free offload_images and num_offload_images.
8673
8674 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
8675
8676         PR fortran/65597
8677         * testsuite/libgomp.fortran/pr65597.f90: New test.
8678
8679 2015-03-27  Tom de Vries  <tom@codesourcery.com>
8680
8681         PR testsuite/65594
8682         * testsuite/libgomp.graphite/force-parallel-6.c (abort): Declare.
8683         (init, check): New function.
8684         (foo): Change return type to void.
8685         (main): Call init and check.
8686
8687 2015-03-27  Tom de Vries  <tom@codesourcery.com>
8688
8689         PR testsuite/65594
8690         * testsuite/libgomp.graphite/force-parallel-6.c (M): Define.
8691         (foo): Use M for non-inner loops to scale down test-case.
8692
8693 2015-03-25  Kai Tietz  <ktietz@redhat.com>
8694
8695         PR libgomp/64972
8696         * oacc-parallel.c (GOACC_parallel): Use PRIu64 if available.
8697         (GOACC_data_start): Likewise.
8698         * target.c (gomp_map_vars): Likewise.
8699
8700 2015-03-21  John David Anglin  <danglin@gcc.gnu.org>
8701
8702         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Don't run on
8703         hppa*-*-hpux*.
8704
8705 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
8706
8707         * testsuite/libgomp.c/target-10.c: New test.
8708         * testsuite/libgomp.c++/target-4.C: New test.
8709
8710 2015-03-13  Ilya Verbin  <ilya.verbin@intel.com>
8711
8712         * testsuite/libgomp.fortran/declare-target-1.f90: New test.
8713         * testsuite/libgomp.fortran/declare-target-2.f90: New file.
8714
8715 2015-03-13  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8716
8717         * configure.tgt (*-*-rtems*): Use local-exec TLS model.
8718         * configure.ac (*-*-rtems*): Assume Pthread is supported.
8719         (pthread.h): Check for this header file.
8720         * configure: Regenerate.
8721
8722 2015-02-25  Tom de Vries  <tom@codesourcery.com>
8723
8724         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (DO_PRAGMA)
8725         (check_reduction_op, check_reduction_macro, max, min):
8726         Declare.
8727         (test_reductions_int, test_reductions_minmax, test_reductions_bool): New
8728         function.
8729         (main): Use new functions.
8730
8731 2015-02-18  Ilya Tocar  <ilya.tocar@intel.com>
8732
8733         * target.c (gomp_load_plugin_for_device): Use const char * instead of
8734         char * for variables holding dlerror return values.
8735         (DLSYM_OPT): Ditto.
8736
8737 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
8738
8739         * libgomp-plugin.c (GOMP_PLUGIN_debug): Fix typo.
8740
8741 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
8742             Cesar Philippidis  <cesar@codesourcery.com>
8743
8744         * oacc-ptx.h (GOACC_INTERNAL_PTX): Add GOACC_tid, GOACC_ntid,
8745         GOACC_ctaid, and GOACC_nctaid routines.
8746
8747 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
8748
8749         PR c/64824
8750         * testsuite/libgomp.c/atomic-18.c: New test.
8751         * testsuite/libgomp.c++/atomic-16.C: New test.
8752
8753 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
8754
8755         PR c/64824
8756         PR c/64868
8757         * testsuite/libgomp.c/pr64824.c: New test.
8758         * testsuite/libgomp.c/pr64868.c: New test.
8759         * testsuite/libgomp.c++/pr64824.C: New test.
8760         * testsuite/libgomp.c++/pr64868.C: New test.
8761
8762 2015-02-01  David Edelsohn  <dje.gcc@gmail.com>
8763
8764         PR libgomp/64635
8765         * configure.tgt (*-*-aix*): Use standard posix plugin-suffix.h.
8766         Link with -lpthread.
8767         * config/aix/plugin-suffix.h: Delete.
8768
8769 2015-01-28  Jack Howarth  <howarth.at.gcc@gmail.com>
8770
8771         PR libgomp/64635
8772         * configure.tgt (*-*-aix*): Use config_path "aix posix".
8773         (*-*-darwin*): Use config_path "bsd darwin posix".
8774         (*-*-hpux*): Use config_path "hpux posix".
8775         * target.c: Add include of plugin-suffix.h and use
8776         SONAME_SUFFIX macro.
8777         * config/aix/plugin-suffix.h: New file.
8778         * config/darwin/plugin-suffix.h: New file.
8779         * config/hpux/plugin-suffix.h: New file.
8780         * config/posix/plugin-suffix.h: New file.
8781
8782 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
8783
8784         PR middle-end/64734
8785         * libgomp.c/pr64734.c: New test.
8786
8787 2015-01-23  Tom de Vries  <tom@codesourcery.com>
8788
8789         PR libgomp/64672
8790         * testsuite/libgomp.oacc-c-c++-common/abort-5.c: New test.
8791
8792 2015-01-23  Tom de Vries  <tom@codesourcery.com>
8793
8794         PR libgomp/64707
8795         * testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to
8796         dg-options.
8797
8798 2015-01-19  Thomas Schwinge  <thomas@codesourcery.com>
8799
8800         PR libgomp/64625
8801         * libgomp_g.h (GOACC_data_start, GOACC_enter_exit_data)
8802         (GOACC_parallel, GOACC_update): Remove const_void *offload_table
8803         formal parameter.  Update all users.
8804         * target.c (GOMP_target, GOMP_target_data, GOMP_target_update):
8805         Document unused formal parameter.
8806
8807 2015-01-16  Thomas Schwinge  <thomas@codesourcery.com>
8808
8809         * oacc-parallel.c: Don't include <alloca.h>.
8810         (GOACC_parallel): Use gomp_alloca instead of alloca.
8811
8812 2015-01-16  Gerald Pfeifer  <gerald@pfeifer.com>
8813
8814         * target.c (num_devices): Guard with PLUGIN_SUPPORT.
8815
8816 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
8817             James Norris  <jnorris@codesourcery.com>
8818             Tom de Vries  <tom@codesourcery.com>
8819             Julian Brown  <julian@codesourcery.com>
8820             Cesar Philippidis  <cesar@codesourcery.com>
8821             Nathan Sidwell  <nathan@codesourcery.com>
8822             Tobias Burnus  <burnus@net-b.de>
8823
8824         * Makefile.am (search_path): Add $(top_srcdir)/../include.
8825         (libgomp_la_SOURCES): Add splay-tree.c, libgomp-plugin.c,
8826         oacc-parallel.c, oacc-host.c, oacc-init.c, oacc-mem.c,
8827         oacc-async.c, oacc-plugin.c, oacc-cuda.c.
8828         [USE_FORTRAN] (libgomp_la_SOURCES): Add openacc.f90.
8829         Include $(top_srcdir)/plugin/Makefrag.am.
8830         (nodist_libsubinclude_HEADERS): Add openacc.h.
8831         [USE_FORTRAN] (nodist_finclude_HEADERS): Add openacc_lib.h,
8832         openacc.f90, openacc.mod, openacc_kinds.mod.
8833         (omp_lib.mod): Generalize into...
8834         (%.mod): ... this new rule.
8835         (openacc_kinds.mod, openacc.mod): New rules.
8836         * plugin/configfrag.ac: New file.
8837         * configure.ac: Move plugin/offloading support into it.  Include
8838         it.  Instantiate testsuite/libgomp-test-support.pt.exp.
8839         * plugin/Makefrag.am: New file.
8840         * testsuite/Makefile.am (OFFLOAD_TARGETS)
8841         (OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS): Don't
8842         export.
8843         (libgomp-test-support.exp): New rule.
8844         (all-local): Depend on it.
8845         * Makefile.in: Regenerate.
8846         * testsuite/Makefile.in: Regenerate.
8847         * config.h.in: Likewise.
8848         * configure: Likewise.
8849         * configure.tgt: Harden shell syntax.
8850         * env.c: Include "oacc-int.h".
8851         (parse_acc_device_type): New function.
8852         (gomp_debug_var, goacc_device_type, goacc_device_num): New
8853         variables.
8854         (initialize_env): Initialize those.  Call
8855         goacc_runtime_initialize.
8856         * error.c (gomp_vdebug, gomp_debug, gomp_vfatal): New functions.
8857         (gomp_fatal): Call gomp_vfatal.
8858         * libgomp.h: Include "libgomp-plugin.h" and <stdarg.h>.
8859         (gomp_debug_var, goacc_device_type, goacc_device_num, gomp_vdebug)
8860         (gomp_debug, gomp_verror, gomp_vfatal, gomp_init_targets_once)
8861         (splay_tree_node, splay_tree, splay_tree_key)
8862         (struct target_mem_desc, struct splay_tree_key_s)
8863         (struct gomp_memory_mapping, struct acc_dispatch_t)
8864         (struct gomp_device_descr, gomp_acc_insert_pointer)
8865         (gomp_acc_remove_pointer, target_mem_desc, gomp_copy_from_async)
8866         (gomp_unmap_vars, gomp_init_device, gomp_init_tables)
8867         (gomp_free_memmap, gomp_fini_device): New declarations.
8868         (gomp_vdebug, gomp_debug): New macros.
8869         Include "splay-tree.h".
8870         * libgomp.map (OACC_2.0): New symbol version.  Use for
8871         acc_get_num_devices, acc_get_num_devices_h_, acc_set_device_type,
8872         acc_set_device_type_h_, acc_get_device_type,
8873         acc_get_device_type_h_, acc_set_device_num, acc_set_device_num_h_,
8874         acc_get_device_num, acc_get_device_num_h_, acc_async_test,
8875         acc_async_test_h_, acc_async_test_all, acc_async_test_all_h_,
8876         acc_wait, acc_wait_h_, acc_wait_async, acc_wait_async_h_,
8877         acc_wait_all, acc_wait_all_h_, acc_wait_all_async,
8878         acc_wait_all_async_h_, acc_init, acc_init_h_, acc_shutdown,
8879         acc_shutdown_h_, acc_on_device, acc_on_device_h_, acc_malloc,
8880         acc_free, acc_copyin, acc_copyin_32_h_, acc_copyin_64_h_,
8881         acc_copyin_array_h_, acc_present_or_copyin,
8882         acc_present_or_copyin_32_h_, acc_present_or_copyin_64_h_,
8883         acc_present_or_copyin_array_h_, acc_create, acc_create_32_h_,
8884         acc_create_64_h_, acc_create_array_h_, acc_present_or_create,
8885         acc_present_or_create_32_h_, acc_present_or_create_64_h_,
8886         acc_present_or_create_array_h_, acc_copyout, acc_copyout_32_h_,
8887         acc_copyout_64_h_, acc_copyout_array_h_, acc_delete,
8888         acc_delete_32_h_, acc_delete_64_h_, acc_delete_array_h_,
8889         acc_update_device, acc_update_device_32_h_,
8890         acc_update_device_64_h_, acc_update_device_array_h_,
8891         acc_update_self, acc_update_self_32_h_, acc_update_self_64_h_,
8892         acc_update_self_array_h_, acc_map_data, acc_unmap_data,
8893         acc_deviceptr, acc_hostptr, acc_is_present, acc_is_present_32_h_,
8894         acc_is_present_64_h_, acc_is_present_array_h_,
8895         acc_memcpy_to_device, acc_memcpy_from_device,
8896         acc_get_current_cuda_device, acc_get_current_cuda_context,
8897         acc_get_cuda_stream, acc_set_cuda_stream.
8898         (GOACC_2.0): New symbol version.  Use for GOACC_data_end,
8899         GOACC_data_start, GOACC_enter_exit_data, GOACC_parallel,
8900         GOACC_update, GOACC_wait, GOACC_get_thread_num,
8901         GOACC_get_num_threads.
8902         (GOMP_PLUGIN_1.0): New symbol version.  Use for
8903         GOMP_PLUGIN_malloc, GOMP_PLUGIN_malloc_cleared,
8904         GOMP_PLUGIN_realloc, GOMP_PLUGIN_debug, GOMP_PLUGIN_error,
8905         GOMP_PLUGIN_fatal, GOMP_PLUGIN_async_unmap_vars,
8906         GOMP_PLUGIN_acc_thread.
8907         * libgomp.texi: Update for OpenACC changes, and GOMP_DEBUG
8908         environment variable.
8909         * libgomp_g.h (GOACC_data_start, GOACC_data_end)
8910         (GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait)
8911         (GOACC_get_num_threads, GOACC_get_thread_num): New declarations.
8912         * splay-tree.h (splay_tree_lookup, splay_tree_insert)
8913         (splay_tree_remove): New declarations.
8914         (rotate_left, rotate_right, splay_tree_splay, splay_tree_insert)
8915         (splay_tree_remove, splay_tree_lookup): Move into...
8916         * splay-tree.c: ... this new file.
8917         * target.c: Include "oacc-plugin.h", "oacc-int.h", <assert.h>.
8918         (splay_tree_node, splay_tree, splay_tree_key)
8919         (struct target_mem_desc, struct splay_tree_key_s)
8920         (struct gomp_device_descr): Don't declare.
8921         (num_devices_openmp): New variable.
8922         (gomp_get_num_devices ): Use it.
8923         (gomp_init_targets_once): New function.
8924         (gomp_get_num_devices ): Use it.
8925         (get_kind, gomp_copy_from_async, gomp_free_memmap)
8926         (gomp_fini_device, gomp_register_image_for_device): New functions.
8927         (gomp_map_vars): Add devaddrs parameter.
8928         (gomp_update): Add mm parameter.
8929         (gomp_init_device): Move most of it into...
8930         (gomp_init_tables): ... this new function.
8931         (gomp_register_images_for_device): Remove function.
8932         (splay_compare, gomp_map_vars, gomp_unmap_vars, gomp_init_device):
8933         Make them hidden instead of static.
8934         (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_vars)
8935         (gomp_update, gomp_init_device, GOMP_target, GOMP_target_data)
8936         (GOMP_target_end_data, GOMP_target_update)
8937         (gomp_load_plugin_for_device, gomp_target_init): Update for
8938         OpenACC changes.
8939         * oacc-async.c: New file.
8940         * oacc-cuda.c: Likewise.
8941         * oacc-host.c: Likewise.
8942         * oacc-init.c: Likewise.
8943         * oacc-int.h: Likewise.
8944         * oacc-mem.c: Likewise.
8945         * oacc-parallel.c: Likewise.
8946         * oacc-plugin.c: Likewise.
8947         * oacc-plugin.h: Likewise.
8948         * oacc-ptx.h: Likewise.
8949         * openacc.f90: Likewise.
8950         * openacc.h: Likewise.
8951         * openacc_lib.h: Likewise.
8952         * plugin/plugin-host.c: Likewise.
8953         * plugin/plugin-nvptx.c: Likewise.
8954         * libgomp-plugin.c: Likewise.
8955         * libgomp-plugin.h: Likewise.
8956         * libgomp_target.h: Remove file after merging content into the
8957         former file.  Update all users.
8958         * testsuite/lib/libgomp.exp: Load libgomp-test-support.exp.
8959         (offload_targets_s, offload_targets_s_openacc): New variables.
8960         (check_effective_target_openacc_nvidia_accel_present)
8961         (check_effective_target_openacc_nvidia_accel_selected): New
8962         procedures.
8963         (libgomp_init): Update for OpenACC changes.
8964         * testsuite/libgomp-test-support.exp.in: New file.
8965         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
8966         * testsuite/libgomp.oacc-c/c.exp: Likewise.
8967         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
8968         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Likewise.
8969         * testsuite/libgomp.oacc-c-c++-common/abort-2.c: Likewise.
8970         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
8971         * testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise.
8972         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
8973         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
8974         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: Likewise.
8975         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Likewise.
8976         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
8977         * testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise.
8978         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
8979         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
8980         * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
8981         * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
8982         * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
8983         * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
8984         * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
8985         * testsuite/libgomp.oacc-c-c++-common/data-1.c: Likewise.
8986         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
8987         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
8988         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
8989         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
8990         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
8991         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
8992         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
8993         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
8994         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
8995         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
8996         * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
8997         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
8998         * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Likewise.
8999         * testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise.
9000         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
9001         * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
9002         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
9003         * testsuite/libgomp.oacc-c-c++-common/lib-12.c: Likewise.
9004         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
9005         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
9006         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
9007         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
9008         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
9009         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
9010         * testsuite/libgomp.oacc-c-c++-common/lib-19.c: Likewise.
9011         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
9012         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
9013         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
9014         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
9015         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
9016         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
9017         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
9018         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
9019         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
9020         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
9021         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
9022         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
9023         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
9024         * testsuite/libgomp.oacc-c-c++-common/lib-31.c: Likewise.
9025         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
9026         * testsuite/libgomp.oacc-c-c++-common/lib-33.c: Likewise.
9027         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
9028         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
9029         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
9030         * testsuite/libgomp.oacc-c-c++-common/lib-37.c: Likewise.
9031         * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Likewise.
9032         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
9033         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
9034         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
9035         * testsuite/libgomp.oacc-c-c++-common/lib-41.c: Likewise.
9036         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
9037         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
9038         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
9039         * testsuite/libgomp.oacc-c-c++-common/lib-45.c: Likewise.
9040         * testsuite/libgomp.oacc-c-c++-common/lib-46.c: Likewise.
9041         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
9042         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
9043         * testsuite/libgomp.oacc-c-c++-common/lib-49.c: Likewise.
9044         * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Likewise.
9045         * testsuite/libgomp.oacc-c-c++-common/lib-50.c: Likewise.
9046         * testsuite/libgomp.oacc-c-c++-common/lib-51.c: Likewise.
9047         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
9048         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
9049         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
9050         * testsuite/libgomp.oacc-c-c++-common/lib-55.c: Likewise.
9051         * testsuite/libgomp.oacc-c-c++-common/lib-56.c: Likewise.
9052         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
9053         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
9054         * testsuite/libgomp.oacc-c-c++-common/lib-59.c: Likewise.
9055         * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise.
9056         * testsuite/libgomp.oacc-c-c++-common/lib-60.c: Likewise.
9057         * testsuite/libgomp.oacc-c-c++-common/lib-61.c: Likewise.
9058         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
9059         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
9060         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
9061         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
9062         * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Likewise.
9063         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
9064         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
9065         * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
9066         * testsuite/libgomp.oacc-c-c++-common/lib-7.c: Likewise.
9067         * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
9068         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
9069         * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
9070         * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
9071         * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
9072         * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
9073         * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
9074         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
9075         * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
9076         * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
9077         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
9078         * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
9079         * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
9080         * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
9081         * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
9082         * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
9083         * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise.
9084         * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise.
9085         * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise.
9086         * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise.
9087         * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
9088         * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
9089         * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
9090         * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise.
9091         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
9092         * testsuite/libgomp.oacc-c-c++-common/nested-2.c: Likewise.
9093         * testsuite/libgomp.oacc-c-c++-common/offset-1.c: Likewise.
9094         * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: Likewise.
9095         * testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise.
9096         * testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: Likewise.
9097         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
9098         * testsuite/libgomp.oacc-c-c++-common/present-2.c: Likewise.
9099         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
9100         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
9101         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
9102         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
9103         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
9104         * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c:
9105         Likewise.
9106         * testsuite/libgomp.oacc-c-c++-common/subr.h: Likewise.
9107         * testsuite/libgomp.oacc-c-c++-common/subr.ptx: Likewise.
9108         * testsuite/libgomp.oacc-c-c++-common/timer.h: Likewise.
9109         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
9110         * testsuite/libgomp.oacc-c-c++-common/update-1.c: Likewise.
9111         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
9112         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
9113         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
9114         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
9115         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
9116         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
9117         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
9118         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
9119         * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
9120         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
9121         * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
9122         * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
9123         * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
9124         * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
9125         * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
9126         * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
9127         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
9128         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
9129         * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
9130         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
9131         * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
9132         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
9133         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
9134         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
9135         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
9136         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
9137         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
9138         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
9139         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
9140         * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
9141         * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
9142         * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
9143         * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
9144         * testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
9145         * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
9146         * testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
9147         * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
9148         * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
9149         * testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
9150         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
9151         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
9152         * testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
9153         * testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
9154         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
9155         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
9156         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
9157         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
9158         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
9159         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
9160         * testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
9161         * testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
9162         * testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
9163         * testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
9164         * testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
9165         * testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
9166
9167 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
9168             Julian Brown  <julian@codesourcery.com>
9169             David Malcolm  <dmalcolm@redhat.com>
9170
9171         * configure.ac: Rename libgomp from "GNU OpenMP Runtime Library"
9172         to "GNU Offloading and Multi Processing Runtime Library".  Change
9173         all users.
9174         * configure: Regenerate.
9175         * libgomp.texi: Update.
9176
9177 2015-01-08  Thomas Schwinge  <thomas@codesourcery.com>
9178
9179         * configure.ac [tgt_dir] (offload_additional_lib_paths): Also add
9180         "$tgt_dir/lib32".
9181         * configure: Regenerate.
9182
9183         * testsuite/lib/libgomp.exp (libgomp_init): Correctly match
9184         "intelmic" in $offload_targets.
9185
9186 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
9187
9188         Update copyright years.
9189
9190         * libgomp.texi: Bump @copying's copyright year.
9191
9192 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9193
9194         * testsuite/lib/libgomp.exp: Load target-utils.exp.
9195         Move load of target-supports.exp earlier.
9196
9197 2014-12-10  Ilya Verbin  <ilya.verbin@intel.com>
9198
9199         * testsuite/libgomp.c/target-9.c: New test.
9200
9201 2014-12-09  Varvara Rainchik  <varvara.rainchik@intel.com>
9202
9203         * config.h.in: Regenerate.
9204         * configure: Regenerate.
9205         * configure.ac: Add GCC_CHECK_EMUTLS.
9206         * libgomp.h: Add check for USE_EMUTLS: this case
9207         is equal to HAVE_TLS.
9208         * team.c: Likewise.
9209
9210 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
9211
9212         * configure.tgt (x86_64-*-linux*): Tune -m32 multilib to generic.
9213
9214 2014-11-28  Andrey Turetskiy  <andrey.turetskiy@intel.com>
9215             Ilya Verbin  <ilya.verbin@intel.com>
9216
9217         * testsuite/libgomp.c/target-critical-1.c: New test.
9218
9219 2014-11-26  Jakub Jelinek  <jakub@redhat.com>
9220
9221         * testsuite/libgomp.c/examples-4/e.53.4.c: Add -DITESTITERS=20
9222         to dg-options unless expensive testing is on.
9223         (TESTITERS): Define to N if not defined.
9224         (main): Use TESTITERS instead of N.
9225         * testsuite/libgomp.c/examples-4/e.55.1.c: Define CHUNKSZ from
9226         dg-additional-options depending on whether expensive testing is on.
9227         * testsuite/libgomp.fortran/examples-4/e.55.1.f90 (e_55_1_mod):
9228         Decrease N to 100000 and CHUNKSZ to 10000.
9229
9230 2014-11-24  Jakub Jelinek  <jakub@redhat.com>
9231
9232         PR fortran/63938
9233         * testsuite/libgomp.fortran/pr63938-1.f90: New test.
9234         * testsuite/libgomp.fortran/pr63938-2.f90: New test.
9235
9236 2014-11-21  Steve Ellcey  <sellcey@imgtec.com>
9237
9238         * config/linux/mips/futex.h (SYS_futex): Define if not already done.
9239
9240 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
9241
9242         PR bootstrap/63784
9243         * configure: Regenerated.
9244
9245 2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
9246
9247         * testsuite/libgomp.c/examples-4/e.53.5.c: Require
9248         vect_simd_clones effective target.
9249         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
9250
9251 2014-11-14  Jakub Jelinek  <jakub@redhat.com>
9252
9253         * libgomp.c/examples-4/e.54.2.c (main): Use N / 8 instead
9254         of 32 as block_size.
9255         * libgomp.fortran/examples-4/e.54.2.f90 (e_54_1): Use n / 8
9256         instead of 32 as block_size.
9257
9258 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
9259             Ilya Verbin  <ilya.verbin@intel.com>
9260
9261         * Makefile.in: Regenerate.
9262         * configure: Regenerate.
9263         * configure.ac: Set up offload_additional_options,
9264         offload_additional_lib_paths and offload_targets.
9265         * testsuite/Makefile.am: Export environment variables: OFFLOAD_TARGETS,
9266         OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS.
9267         * testsuite/Makefile.in: Regenerate.
9268         * testsuite/lib/libgomp.exp (libgomp_init): Append
9269         offload_additional_lib_paths to LD_LIBRARY_PATH.  Append
9270         offload_additional_options to ALWAYS_CFLAGS.  Append liboffloadmic
9271         build directory to LD_LIBRARY_PATH for intelmic offload targets.
9272
9273 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
9274             Ilya Verbin  <ilya.verbin@intel.com>
9275             Kirill Yukhin  <kirill.yukhin@intel.com>
9276             Ilya Tocar  <ilya.tocar@intel.com>
9277
9278         * testsuite/lib/libgomp.exp
9279         (check_effective_target_offload_device): New.
9280         * testsuite/libgomp.c++/c++.exp: Include tests from subdirectories.
9281         * testsuite/libgomp.c++/examples-4/e.51.5.C: New test.
9282         * testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto.
9283         * testsuite/libgomp.c/examples-4/e.50.1.c: Ditto.
9284         * testsuite/libgomp.c/examples-4/e.50.2.c: Ditto.
9285         * testsuite/libgomp.c/examples-4/e.50.3.c: Ditto.
9286         * testsuite/libgomp.c/examples-4/e.50.4.c: Ditto.
9287         * testsuite/libgomp.c/examples-4/e.50.5.c: Ditto.
9288         * testsuite/libgomp.c/examples-4/e.51.1.c: Ditto.
9289         * testsuite/libgomp.c/examples-4/e.51.2.c: Ditto.
9290         * testsuite/libgomp.c/examples-4/e.51.3.c: Ditto.
9291         * testsuite/libgomp.c/examples-4/e.51.4.c: Ditto.
9292         * testsuite/libgomp.c/examples-4/e.51.6.c: Ditto.
9293         * testsuite/libgomp.c/examples-4/e.51.7.c: Ditto.
9294         * testsuite/libgomp.c/examples-4/e.52.1.c: Ditto.
9295         * testsuite/libgomp.c/examples-4/e.52.2.c: Ditto.
9296         * testsuite/libgomp.c/examples-4/e.53.1.c: Ditto.
9297         * testsuite/libgomp.c/examples-4/e.53.3.c: Ditto.
9298         * testsuite/libgomp.c/examples-4/e.53.4.c: Ditto.
9299         * testsuite/libgomp.c/examples-4/e.53.5.c: Ditto.
9300         * testsuite/libgomp.c/examples-4/e.54.2.c: Ditto.
9301         * testsuite/libgomp.c/examples-4/e.54.3.c: Ditto.
9302         * testsuite/libgomp.c/examples-4/e.54.4.c: Ditto.
9303         * testsuite/libgomp.c/examples-4/e.54.5.c: Ditto.
9304         * testsuite/libgomp.c/examples-4/e.54.6.c: Ditto.
9305         * testsuite/libgomp.c/examples-4/e.55.1.c: Ditto.
9306         * testsuite/libgomp.c/examples-4/e.55.2.c: Ditto.
9307         * testsuite/libgomp.c/examples-4/e.56.3.c: Ditto.
9308         * testsuite/libgomp.c/examples-4/e.56.4.c: Ditto.
9309         * testsuite/libgomp.c/examples-4/e.57.1.c: Ditto.
9310         * testsuite/libgomp.c/examples-4/e.57.2.c: Ditto.
9311         * testsuite/libgomp.c/examples-4/e.57.3.c: Ditto.
9312         * testsuite/libgomp.c/target-7.c: Fix test.
9313         * testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test.
9314         * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto.
9315         * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto.
9316         * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto.
9317         * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto.
9318         * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto.
9319         * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto.
9320         * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto.
9321         * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto.
9322         * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto.
9323         * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto.
9324         * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto.
9325         * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto.
9326         * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto.
9327         * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto.
9328         * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto.
9329         * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto.
9330         * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto.
9331         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
9332         * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto.
9333         * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto.
9334         * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto.
9335         * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto.
9336         * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto.
9337         * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto.
9338         * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto.
9339         * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto.
9340         * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto.
9341         * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto.
9342         * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto.
9343         * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto.
9344
9345 2014-11-13  Jakub Jelinek  <jakub@redhat.com>
9346             Ilya Verbin  <ilya.verbin@intel.com>
9347             Thomas Schwinge  <thomas@codesourcery.com>
9348             Andrey Turetskiy  <andrey.turetskiy@intel.com>
9349
9350         * libgomp.map (GOMP_4.0.1): New symbol version.
9351         Add GOMP_offload_register.
9352         * libgomp_target.h: New file.
9353         * splay-tree.h: New file.
9354         * target.c: Include config.h, libgomp_target.h, dlfcn.h, splay-tree.h.
9355         (gomp_target_init): New forward declaration.
9356         (gomp_is_initialized): New static variable.
9357         (splay_tree_node, splay_tree, splay_tree_key): New typedefs.
9358         (struct target_mem_desc, struct splay_tree_key_s, offload_image_descr):
9359         New structures.
9360         (offload_images, num_offload_images, devices, num_devices): New static
9361         variables.
9362         (splay_compare): New static function.
9363         (struct gomp_device_descr): New structure.
9364         (gomp_get_num_devices): Call gomp_target_init.
9365         (resolve_device, gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt)
9366         (gomp_unmap_vars, gomp_update, gomp_init_device): New static functions.
9367         (GOMP_offload_register): New function.
9368         (GOMP_target): Arrange for host callback to be performed in a separate
9369         initial thread and contention group, inheriting ICVs from
9370         gomp_global_icv etc.  Call gomp_map_vars and gomp_unmap_vars.
9371         Add device initialization and lookup for target function in splay tree.
9372         (GOMP_target_data): Add device initialization and call gomp_map_vars.
9373         (GOMP_target_end_data): Call gomp_unmap_vars.
9374         (GOMP_target_update): Add device initialization and call gomp_update.
9375         (gomp_load_plugin_for_device, gomp_register_images_for_device)
9376         (gomp_target_init): New static functions.
9377
9378 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
9379             Thomas Schwinge  <thomas@codesourcery.com>
9380             Ilya Verbin  <ilya.verbin@intel.com>
9381             Andrey Turetskiy  <andrey.turetskiy@intel.com>
9382
9383         * config.h.in: Regenerate.
9384         * configure: Regenerate.
9385         * configure.ac: Check for libdl, required for plugin support.
9386         (PLUGIN_SUPPORT): Define if plugins are supported.
9387         (enable_offload_targets): Support Intel MIC targets.
9388         (OFFLOAD_TARGETS): List of target names suitable for offloading.
9389
9390 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9391
9392         PR target/63610
9393         * configure: Regenerate.
9394
9395 2014-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9396
9397         * config/posix/lock.c (_XOPEN_SOURCE) Define as 600.
9398
9399 2014-10-06  Marek Polacek  <polacek@redhat.com>
9400
9401         * testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
9402         * testsuite/libgomp.c/nqueens-1.c: Include <stdlib.h>.
9403         * testsuite/libgomp.c/thread-limit-1.c: Include <omp.h>
9404         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
9405
9406 2014-10-06  Marek Polacek  <polacek@redhat.com>
9407
9408         * testsuite/libgomp.c/affinity-1.c: Fix implicit declarations.
9409         * testsuite/libgomp.c/nqueens-1.c: Likewise.
9410         * testsuite/libgomp.c/pr26943-3.c: Likewise.
9411         * testsuite/libgomp.c/pr26943-4.c: Likewise.
9412         * testsuite/libgomp.c/pr36802-2.c: Likewise.
9413         * testsuite/libgomp.c/pr36802-3.c: Likewise.
9414         * testsuite/libgomp.c/thread-limit-1.c: Likewise.
9415         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
9416         * testsuite/libgomp.c/appendix-a/a.15.1.c: Include <omp.h>.
9417         * testsuite/libgomp.c/omp-loop02.c: Fix defaulting to int.
9418         * testsuite/libgomp.c/omp-parallel-for.c: Likewise.
9419         * testsuite/libgomp.c/omp-parallel-if.c: Likewise.
9420         * testsuite/libgomp.c/omp-single-1.c: Likewise.
9421         * testsuite/libgomp.c/omp-single-2.c: Likewise.
9422         * testsuite/libgomp.c/omp_matvec.c: Likewise.
9423         * testsuite/libgomp.c/omp_workshare3.c: Likewise.
9424         * testsuite/libgomp.c/omp_workshare4.c: Likewise.
9425         * testsuite/libgomp.c/shared-1.c: Fix defaulting to int.  Fix implicit
9426         declarations.
9427
9428 2014-10-03  Jakub Jelinek  <jakub@redhat.com>
9429
9430         PR libgomp/61200
9431         * testsuite/libgomp.c/pr61200.c: New test.
9432
9433 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
9434
9435         PR c++/63248
9436         * testsuite/libgomp.c++/pr63248.C: New test.
9437
9438 2014-08-04  Jakub Jelinek  <jakub@redhat.com>
9439
9440         * task.c (GOMP_taskgroup_end): If taskgroup->num_children
9441         is not zero, but taskgroup->children is NULL and there are
9442         any task->children, schedule those instead of waiting.
9443         * testsuite/libgomp.c/depend-6.c: New test.
9444         * testsuite/libgomp.c/depend-7.c: New test.
9445         * testsuite/libgomp.c/depend-8.c: New test.
9446         * testsuite/libgomp.c/depend-9.c: New test.
9447         * testsuite/libgomp.c/depend-10.c: New test.
9448
9449 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
9450
9451         * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
9452         (struct gomp_taskwait): New type.
9453         (struct gomp_task): Add taskwait and parent_depends_on, remove
9454         in_taskwait and taskwait_sem fields.
9455         (gomp_finish_task): Don't destroy taskwait_sem.
9456         * task.c (gomp_init_task): Don't init in_taskwait, instead init
9457         taskwait and parent_depends_on.
9458         (GOMP_task): For if (0) tasks with depend clause that depend on
9459         earlier tasks don't defer them, instead call
9460         gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
9461         Initialize redundant_out field, for redundant out entries just
9462         move them at the end of linked list instead of removing them
9463         completely, and set redundant_out flag instead of redundant.
9464         (gomp_task_run_pre): Update last_parent_depends_on if scheduling
9465         that task.
9466         (gomp_task_run_post_handle_dependers): If parent is in
9467         gomp_task_maybe_wait_for_dependencies and newly runnable task
9468         is not parent_depends_on, queue it in parent->children linked
9469         list after all runnable tasks with parent_depends_on set.
9470         Adjust for addition of taskwait indirection.
9471         (gomp_task_run_post_remove_parent): If parent is in
9472         gomp_task_maybe_wait_for_dependencies and task to be removed
9473         is parent_depends_on, decrement n_depend and if needed awake
9474         parent.  Adjust for addition of taskwait indirection.
9475         (GOMP_taskwait): Adjust for addition of taskwait indirection.
9476         (gomp_task_maybe_wait_for_dependencies): New function.
9477         * testsuite/libgomp.c/depend-5.c: New test.
9478
9479 2014-07-13  Tobias Burnus  <burnus@net-b.de>
9480
9481         * testsuite/libgomp.fortran/pr34020.f90: Make compile
9482         with TS 18508/Fortran 2015.
9483
9484 2014-07-06  Marek Polacek  <polacek@redhat.com>
9485
9486         PR c/6940
9487         * testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.
9488
9489 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
9490
9491         * testsuite/lib/libgomp.exp (libgomp_target_compile): If $source
9492         matches regex $lang_source_re, add $lang_include_flags to options.
9493         * testsuite/libgomp.c/c.exp: Unset lang_include_flags.
9494         * testsuite/libgomp.c++/c++.exp: Likewise.
9495         * testsuite/libgomp.fortran/fortran.exp: Likewise.  Set lang_source_re
9496         and lang_include_flags instead of adding -fintrinsic-modules-path= to
9497         ALWAYS_CFLAGS.
9498         * testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags.
9499
9500 2014-07-03  Thomas Schwinge  <thomas@codesourcery.com>
9501
9502         * testsuite/libgomp.fortran/fortran.exp: Explain
9503         gfortran-dg-runtest usage.
9504
9505 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
9506
9507         * testsuite/libgomp.fortran/simd5.f90: New test.
9508         * testsuite/libgomp.fortran/simd6.f90: New test.
9509         * testsuite/libgomp.fortran/simd7.f90: New test.
9510
9511 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
9512
9513         * testsuite/libgomp.c/for-2.c: Define SC to static for
9514         #pragma omp for simd testing.
9515         * testsuite/libgomp.c/for-2.h (SC): Define if not defined.
9516         (N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use
9517         SC macro.
9518         * testsuite/libgomp.c/simd-14.c: New test.
9519         * testsuite/libgomp.c/simd-15.c: New test.
9520         * testsuite/libgomp.c/simd-16.c: New test.
9521         * testsuite/libgomp.c/simd-17.c: New test.
9522         * testsuite/libgomp.c++/for-10.C: Define SC to static for
9523         #pragma omp for simd testing.
9524         * testsuite/libgomp.c++/simd10.C: New test.
9525         * testsuite/libgomp.c++/simd11.C: New test.
9526         * testsuite/libgomp.c++/simd12.C: New test.
9527         * testsuite/libgomp.c++/simd13.C: New test.
9528
9529         * testsuite/libgomp.fortran/aligned1.f03: New test.
9530         * testsuite/libgomp.fortran/nestedfn5.f90: New test.
9531         * testsuite/libgomp.fortran/target7.f90: Surround loop spawning
9532         tasks with !$omp parallel !$omp single.
9533         * testsuite/libgomp.fortran/target8.f90: New test.
9534         * testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust
9535         not to use trim in the combiner, instead call elemental function.
9536         (fn): New elemental function.
9537         * testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init):
9538         Make elemental.
9539         * testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out,
9540         omp_in): Likewise.
9541         * testsuite/libgomp.fortran/udr12.f90: New test.
9542         * testsuite/libgomp.fortran/udr13.f90: New test.
9543         * testsuite/libgomp.fortran/udr14.f90: New test.
9544         * testsuite/libgomp.fortran/udr15.f90: New test.
9545
9546 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
9547
9548         * omp_lib.f90.in (openmp_version): Set to 201307.
9549         * omp_lib.h.in (openmp_version): Likewise.
9550         * testsuite/libgomp.c/target-8.c: New test.
9551         * testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch
9552         and inbranch clauses.
9553         * testsuite/libgomp.fortran/depend-3.f90: New test.
9554         * testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new
9555         openmp_version.
9556         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
9557         * testsuite/libgomp.fortran/target1.f90: New test.
9558         * testsuite/libgomp.fortran/target2.f90: New test.
9559         * testsuite/libgomp.fortran/target3.f90: New test.
9560         * testsuite/libgomp.fortran/target4.f90: New test.
9561         * testsuite/libgomp.fortran/target5.f90: New test.
9562         * testsuite/libgomp.fortran/target6.f90: New test.
9563         * testsuite/libgomp.fortran/target7.f90: New test.
9564
9565 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
9566
9567         PR fortran/60928
9568         * testsuite/libgomp.fortran/allocatable9.f90: New test.
9569         * testsuite/libgomp.fortran/allocatable10.f90: New test.
9570         * testsuite/libgomp.fortran/allocatable11.f90: New test.
9571         * testsuite/libgomp.fortran/allocatable12.f90: New test.
9572         * testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
9573         * testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
9574         * testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
9575         * testsuite/libgomp.fortran/associate1.f90: New test.
9576         * testsuite/libgomp.fortran/associate2.f90: New test.
9577         * testsuite/libgomp.fortran/procptr1.f90: New test.
9578
9579 2014-06-06  Jakub Jelinek  <jakub@redhat.com>
9580
9581         * testsuite/libgomp.fortran/simd1.f90: New test.
9582         * testsuite/libgomp.fortran/udr1.f90: New test.
9583         * testsuite/libgomp.fortran/udr2.f90: New test.
9584         * testsuite/libgomp.fortran/udr3.f90: New test.
9585         * testsuite/libgomp.fortran/udr4.f90: New test.
9586         * testsuite/libgomp.fortran/udr5.f90: New test.
9587         * testsuite/libgomp.fortran/udr6.f90: New test.
9588         * testsuite/libgomp.fortran/udr7.f90: New test.
9589         * testsuite/libgomp.fortran/udr8.f90: New test.
9590         * testsuite/libgomp.fortran/udr9.f90: New test.
9591         * testsuite/libgomp.fortran/udr10.f90: New test.
9592         * testsuite/libgomp.fortran/udr11.f90: New test.
9593
9594 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
9595
9596         * testsuite/libgomp.fortran/declare-simd-1.f90: Require
9597         vect_simd_clones effective target.
9598         * testsuite/libgomp.fortran/declare-simd-2.f90: Ditto.
9599
9600 2014-05-21  Jakub Jelinek  <jakub@redhat.com>
9601
9602         PR middle-end/61252
9603         * testsuite/libgomp.c++/simd-9.C: New test.
9604
9605 2014-05-18  Uros Bizjak  <ubizjak@gmail.com>
9606
9607         * libgomp.texi (Runitme Library Routines): Remove multiple @menu.
9608         (Environment Variables) Move OMP_PROC_BIND and OMP_STACKSIZE node
9609         texts according to their @menu entry positions.
9610
9611 2014-05-11  Jakub Jelinek  <jakub@redhat.com>
9612
9613         * testsuite/libgomp.fortran/cancel-do-1.f90: New test.
9614         * testsuite/libgomp.fortran/cancel-do-2.f90: New test.
9615         * testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
9616         * testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
9617         * testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
9618         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
9619         * testsuite/libgomp.fortran/declare-simd-1.f90: New test.
9620         * testsuite/libgomp.fortran/declare-simd-2.f90: New test.
9621         * testsuite/libgomp.fortran/declare-simd-3.f90: New test.
9622         * testsuite/libgomp.fortran/depend-1.f90: New test.
9623         * testsuite/libgomp.fortran/depend-2.f90: New test.
9624         * testsuite/libgomp.fortran/omp_atomic5.f90: New test.
9625         * testsuite/libgomp.fortran/simd1.f90: New test.
9626         * testsuite/libgomp.fortran/simd2.f90: New test.
9627         * testsuite/libgomp.fortran/simd3.f90: New test.
9628         * testsuite/libgomp.fortran/simd4.f90: New test.
9629         * testsuite/libgomp.fortran/taskgroup1.f90: New test.
9630
9631 2014-05-02  Jakub Jelinek  <jakub@redhat.com>
9632
9633         * testsuite/libgomp.c/simd-10.c: New test.
9634         * testsuite/libgomp.c/simd-11.c: New test.
9635         * testsuite/libgomp.c/simd-12.c: New test.
9636         * testsuite/libgomp.c/simd-13.c: New test.
9637
9638 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
9639
9640         * testsuite/libgomp.c++/atomic-14.C: Allow seq_cst and
9641         atomic type clauses in any order and optional comma in between.
9642         * testsuite/libgomp.c++/atomic-15.C: Likewise.
9643         * testsuite/libgomp.c/atomic-17.c: Likewise.
9644
9645         * testsuite/libgomp.c/simd-7.c: New test.
9646         * testsuite/libgomp.c/simd-8.c: New test.
9647         * testsuite/libgomp.c/simd-9.c: New test.
9648         * testsuite/libgomp.c/loop-16.c: New test.
9649
9650 2014-04-02  Richard Henderson  <rth@redhat.com>
9651
9652         * config/linux/futex.h (futex_wait): Get error value from errno.
9653         (futex_wake): Likewise.
9654
9655 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
9656
9657         PR c++/60331
9658         * testsuite/libgomp.c++/udr-11.C: New test.
9659         * testsuite/libgomp.c++/udr-12.C: New test.
9660         * testsuite/libgomp.c++/udr-13.C: New test.
9661         * testsuite/libgomp.c++/udr-14.C: New test.
9662         * testsuite/libgomp.c++/udr-15.C: New test.
9663         * testsuite/libgomp.c++/udr-16.C: New test.
9664         * testsuite/libgomp.c++/udr-17.C: New test.
9665         * testsuite/libgomp.c++/udr-18.C: New test.
9666         * testsuite/libgomp.c++/udr-19.C: New test.
9667
9668 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9669
9670         Update copyright years
9671
9672 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9673
9674         * hashtab.h: Use the standard form for the copyright notice.
9675
9676 2014-01-02  Tobias Burnus  <burnus@net-b.de>
9677
9678         * libgomp.texi: Bump @copying's copyright year.
9679
9680 2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>
9681
9682         * testsuite/libgomp.c/affinity-1.c: Remove alloca.h include. Replace
9683         alloca () with __builtin_alloca ().
9684         * testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
9685         * testsuite/libgomp.c/lock-3.c: Likewise.
9686         * testsuite/libgomp.c/pr48591.c: Likewise.
9687
9688 2013-12-17  Jakub Jelinek  <jakub@redhat.com>
9689
9690         PR testsuite/59534
9691         * testsuite/libgomp.fortran/retval1.f90 (e5): Avoid non-shortcircuited
9692         comparisons.
9693
9694 2013-12-16  Jakub Jelinek  <jakub@redhat.com>
9695
9696         PR libgomp/58756
9697         * testsuite/libgomp.c/pr58756.c: New test.
9698
9699 2013-12-12  Jakub Jelinek  <jakub@redhat.com>
9700
9701         PR libgomp/59467
9702         * testsuite/libgomp.fortran/crayptr2.f90: Add private (d) clause to
9703         !$omp parallel.
9704
9705 2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
9706
9707         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
9708         ALWAYS_CFLAGS.
9709         * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
9710         * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
9711         * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
9712         * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
9713         Likewise.
9714
9715         * libgomp_g.h: Include <stddef.h> for size_t.
9716
9717         * libgomp.spec.in: Update comment about libgomp's dependencies.
9718         * configure.ac: Likewise.
9719         * configure: Regenerate.
9720
9721 2013-10-16  Tobias Burnus  <burnus@net-b.de>
9722
9723         * libgomp.texi: (Runtime Library Routines): Update references for
9724         OpenMP 4.0. Add omp_get_cancellation, omp_get_default_device,
9725         omp_get_num_devices, omp_get_num_teams, omp_get_proc_bind,
9726         omp_get_team_num, omp_is_initial_device, omp_set_default_device.
9727         (Environment Variables): Update references for OpenMP 4.0. Add
9728         OMP_CANCELLATION, OMP_DEFAULT_DEVICE, OMP_PLACES.
9729         Move OMP_DISPLAY_ENV and OMP_PROC_BIND up to be in alphabetical
9730         order.
9731
9732 2013-10-14  Jakub Jelinek  <jakub@redhat.com>
9733
9734         * env.c (parse_bind_var): Initialize value to avoid
9735         (false positive) warning.
9736
9737 2013-10-12  Jakub Jelinek  <jakub@redhat.com>
9738
9739         PR libgomp/58691
9740         * config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
9741         to check variable.
9742         (gomp_init_num_threads): Move i variable declaration into
9743         #ifdef CPU_ALLOC_SIZE block.
9744         * config/linux/affinity.c (gomp_affinity_init_level): Test
9745         gomp_places_list_len == 0 rather than gomp_places_list == 0
9746         when checking for topology reading error.
9747         * team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
9748         * env.c (parse_affinity): Add ignore argument, if true, don't populate
9749         gomp_places_list, only parse env var and always return false.
9750         (parse_places_var): Likewise.  Don't check gomp_global_icv.bind_var.
9751         (initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
9752         vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
9753         and either of these variables were parsed correctly into a places
9754         list.
9755
9756 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
9757             Jakub Jelinek  <jakub@redhat.com>
9758
9759         * testsuite/libgomp.graphite/force-parallel-1.c: Expect 4 instead
9760         of 5 loopfn matches.
9761         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
9762         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
9763         * testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
9764         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
9765         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
9766         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
9767         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
9768         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
9769
9770 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
9771
9772         * Makefile.am (omp_lib.mod): Streamline rule.
9773         * Makefile.in: Regenerate.
9774
9775         * libgomp.texi (Runtime Library Routines): C linkage, don't throw
9776         exceptions.
9777
9778         * testsuite/libgomp.c/lib-1.c (main): Add missing error check.
9779         * testsuite/libgomp.fortran/lib1.f90: Likewise.
9780         * testsuite/libgomp.fortran/lib2.f: Likewise.
9781         * testsuite/libgomp.fortran/lib3.f: Likewise.
9782
9783         * configure.ac: Typo fix.
9784         * configure: Regenerate.
9785
9786         * testsuite/libgomp.fortran/openmp_version-1.f: New file.
9787         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
9788
9789         * omp.h.in: Don't touch the user's namespace.
9790
9791 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
9792             Tobias Burnus  <burnus@net-b.de>
9793             Richard Henderson  <rth@redhat.com>
9794
9795         * target.c: New file.
9796         * Makefile.am (libgomp_la_SOURCES): Add target.c.
9797         * Makefile.in: Regenerated.
9798         * libgomp_g.h (GOMP_task): Add depend argument.
9799         (GOMP_barrier_cancel, GOMP_loop_end_cancel,
9800         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
9801         GOMP_target_end_data, GOMP_target_update, GOMP_teams,
9802         GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
9803         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
9804         GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
9805         GOMP_taskgroup_start, GOMP_taskgroup_end,
9806         GOMP_parallel_sections): New prototypes.
9807         * fortran.c (omp_is_initial_device): Add ialias_redirect.
9808         (omp_is_initial_device_): New function.
9809         (ULP, STR1, STR2, ialias_redirect): Removed.
9810         (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
9811         omp_set_default_device_8_, omp_get_default_device_,
9812         omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
9813         functions.
9814         * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
9815         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
9816         GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
9817         @@GOMP_4.0.
9818         (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
9819         omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
9820         omp_set_default_device, omp_set_default_device_,
9821         omp_set_default_device_8_, omp_get_default_device,
9822         omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
9823         omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
9824         omp_get_team_num_): Export @@OMP_4.0.
9825         * team.c (struct gomp_thread_start_data): Add place field.
9826         (gomp_thread_start): Clear thr->thread_pool and
9827         thr->task before returning.  Use gomp_team_barrier_wait_final
9828         instead of gomp_team_barrier_wait.  Initialize thr->place.
9829         (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
9830         team_cancelled and task_queued_count fields.
9831         (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
9832         before calling pthread_exit.
9833         (gomp_free_thread): No longer static.  Use
9834         gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
9835         (gomp_team_start): Add flags argument.  Set
9836         thr->thread_pool->threads_busy to nthreads immediately after creating
9837         new pool.  Use gomp_managed_threads_lock instead of
9838         gomp_remaining_threads_lock.  Handle OpenMP 4.0 affinity.
9839         (gomp_team_end): Use gomp_managed_threads_lock instead of
9840         gomp_remaining_threads_lock.  Use gomp_team_barrier_wait_final instead
9841         of gomp_team_barrier_wait.  If team->team_cancelled, call
9842         gomp_fini_workshare on ws chain starting at team->work_shares_to_free
9843         rather than thr->ts.work_share.
9844         (initialize_team): Don't call gomp_sem_init here.
9845         * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
9846         caller.
9847         (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
9848         * env.c (gomp_global_icv): Add default_device_var, target_data and
9849         bind_var initializers.
9850         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
9851         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
9852         gomp_places_list_len): New variables.
9853         (parse_bind_var, parse_one_place, parse_places_var): New functions.
9854         (parse_affinity): Rewritten to construct OMP_PLACES list with unit
9855         sized places.
9856         (gomp_cancel_var): New global variable.
9857         (parse_int): New function.
9858         (handle_omp_display_env): New function.
9859         (initialize_env): Use it.  Initialize default_device_var.
9860         Parse OMP_CANCELLATION env var.  Use parse_bind_var to parse
9861         OMP_PROC_BIND instead of parse_boolean.  Use parse_places_var for
9862         OMP_PLACES parsing.  Don't call parse_affinity if OMP_PLACES has
9863         been successfully parsed (and call gomp_init_affinity in that case).
9864         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
9865         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
9866         omp_get_team_num, omp_is_initial_device): New functions.
9867         * libgomp.h: Include stdlib.h.
9868         (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
9869         Define.
9870         (struct target_mem_desc): Forward declare.
9871         (struct gomp_task_icv): Add default_device_var, target_data, bind_var
9872         and thread_limit_var fields.
9873         (gomp_get_num_devices): New prototype.
9874         (gomp_cancel_var): New extern decl.
9875         (struct gomp_team): Add work_shares_to_free, work_share_cancelled,
9876         team_cancelled and task_queued_count fields.  Add comments about
9877         task_{,queued_,running_}count.
9878         (gomp_cancel_kind): New enum.
9879         (gomp_work_share_end_cancel): New prototype.
9880         (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
9881         copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
9882         and depend fields.
9883         (struct gomp_taskgroup): New type.
9884         (struct gomp_task_depend_entry,
9885         struct gomp_dependers_vec): New types.
9886         (gomp_finish_task): Free depend_hash if non-NULL.
9887         (struct gomp_team_state): Add place_partition_off
9888         and place_partition_len fields.
9889         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
9890         gomp_places_list_len): New extern decls.
9891         (struct gomp_thread): Add place field.
9892         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
9893         (gomp_init_thread_affinity): Add place argument.
9894         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
9895         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
9896         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
9897         gomp_affinity_init_level, gomp_affinity_print_place): New
9898         prototypes.
9899         (gomp_team_start): Add flags argument.
9900         (gomp_thread_limit_var, gomp_remaining_threads_count,
9901         gomp_remaining_threads_lock): Remove.
9902         (gomp_managed_threads_lock): New variable.
9903         (struct gomp_thread_pool): Add threads_busy field.
9904         (gomp_free_thread): New prototype.
9905         * task.c: Include hashtab.h.
9906         (hash_entry_type): New typedef.
9907         (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
9908         (gomp_init_task): Clear dependers, depend_hash, depend_count,
9909         copy_ctors_done and taskgroup fields.
9910         (GOMP_task): Add depend argument, handle depend clauses.  If
9911         gomp_team_barrier_cancelled or if it's taskgroup has been
9912         cancelled, don't queue or start new tasks.  Set copy_ctors_done
9913         field if needed.  Initialize taskgroup field.  If copy_ctors_done
9914         and already cancelled, don't discard the task.  If taskgroup is
9915         non-NULL, enqueue the task into taskgroup queue.  Increment
9916         num_children field in taskgroup.  Increment task_queued_count.
9917         (gomp_task_run_pre, gomp_task_run_post_remove_parent,
9918         gomp_task_run_post_remove_taskgroup): New inline functions.
9919         (gomp_task_run_post_handle_depend_hash,
9920         gomp_task_run_post_handle_dependers,
9921         gomp_task_run_post_handle_depend): New functions.
9922         (GOMP_taskwait): Use them.  If more than one new tasks
9923         have been queued, wake other threads if needed.
9924         (gomp_barrier_handle_tasks): Likewise.  If
9925         gomp_team_barrier_cancelled, don't start any new tasks, just free
9926         all tasks.
9927         (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
9928         * omp_lib.f90.in
9929         (omp_proc_bind_kind, omp_proc_bind_false,
9930         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
9931         omp_proc_bind_spread): New params.
9932         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
9933         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
9934         omp_get_team_num, omp_is_initial_device): New interfaces.
9935         (omp_get_dynamic, omp_get_nested, omp_in_parallel,
9936         omp_get_max_threads, omp_get_num_procs, omp_get_num_threads,
9937         omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels,
9938         omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num,
9939         omp_get_team_size, omp_get_active_level, omp_in_final): Remove
9940         useless use omp_lib_kinds.
9941         * omp.h.in (omp_proc_bind_t): New typedef.
9942         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
9943         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
9944         omp_get_team_num, omp_is_initial_device): New prototypes.
9945         * loop.c (gomp_parallel_loop_start): Add flags argument, pass it
9946         through to gomp_team_start.
9947         (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
9948         GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
9949         Adjust gomp_parallel_loop_start callers.
9950         (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
9951         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
9952         GOMP_loop_end_cancel): New functions.
9953         (GOMP_parallel_end): Add ialias_redirect.
9954         * hashtab.h: New file.
9955         * libgomp.texi (Environment Variables): Minor cleanup,
9956         update section refs to OpenMP 4.0rc2.
9957         (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
9958         environment variables.
9959         * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
9960         team->work_shares_to_free to thr->ts.work_share before calling
9961         free_work_share.
9962         (gomp_work_share_end_cancel): New function.
9963         * config/linux/proc.c: Include errno.h.
9964         (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
9965         (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
9966         sizeof (cpu_set_t) to determine number of iterations.  Fix up check
9967         extern decl.  Use CPU_COUNT_S if available, or CPU_COUNT if
9968         gomp_cpuset_size is sizeof (cpu_set_t).
9969         (gomp_init_num_threads): Initialize gomp_cpuset_size,
9970         gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
9971         of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
9972         to pthread_getaffinity_np.  Free and clear gomp_cpusetp if it didn't
9973         contain any logical CPUs.
9974         (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
9975         is NULL.  Use gomp_cpusetp instead of &cpuset and pass
9976         gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
9977         pthread_getaffinity_np.  Check gomp_places_list instead of
9978         gomp_cpu_affinity.  Adjust gomp_cpuset_popcount caller.
9979         * config/linux/bar.c (gomp_barrier_wait_end,
9980         gomp_barrier_wait_last): Use BAR_* defines.
9981         (gomp_team_barrier_wait_end): Likewise.  Clear BAR_CANCELLED
9982         from state where needed.  Set work_share_cancelled to 0 on last
9983         thread.
9984         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
9985         gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
9986         functions.
9987         * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
9988         Add cpusetsize argument.
9989         (gomp_cpuset_size, gomp_cpusetp): Declare.
9990         * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
9991         (affinity_counter): Remove.
9992         (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
9993         if CPU_ALLOC_SIZE isn't defined.
9994         (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
9995         silently create OMP_PLACES=threads, if it is non-NULL afterwards,
9996         bind current thread to the first place.
9997         (gomp_init_thread_affinity): Rewritten.  Add place argument, just
9998         pthread_setaffinity_np to gomp_places_list[place].
9999         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
10000         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
10001         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
10002         gomp_affinity_init_level, gomp_affinity_print_place): New functions.
10003         * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
10004         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
10005         (gomp_barrier_t): Add awaited_final field.
10006         (gomp_barrier_init): Initialize awaited_final field.
10007         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
10008         gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
10009         prototypes.
10010         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.  Use BAR_*
10011         defines.
10012         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
10013         gomp_team_barrier_cancelled): New inline functions.
10014         (gomp_barrier_last_thread,
10015         gomp_team_barrier_set_task_pending,
10016         gomp_team_barrier_clear_task_pending,
10017         gomp_team_barrier_set_waiting_for_tasks,
10018         gomp_team_barrier_waiting_for_tasks,
10019         gomp_team_barrier_done): Use BAR_* defines.
10020         * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
10021         (gomp_barrier_wait_end): Use BAR_* defines.
10022         (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
10023         Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
10024         Use BAR_* defines.
10025         (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
10026         gomp_team_barrier_cancel): New functions.
10027         * config/posix/affinity.c (gomp_init_thread_affinity): Add place
10028         argument.
10029         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
10030         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
10031         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
10032         gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
10033         * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
10034         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
10035         (gomp_barrier_t): Add cancellable field.
10036         (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
10037         gomp_team_barrier_cancel): New prototypes.
10038         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
10039         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
10040         gomp_team_barrier_cancelled): New inline functions.
10041         (gomp_barrier_wait_start, gomp_barrier_last_thread,
10042         gomp_team_barrier_set_task_pending,
10043         gomp_team_barrier_clear_task_pending,
10044         gomp_team_barrier_set_waiting_for_tasks,
10045         gomp_team_barrier_waiting_for_tasks,
10046         gomp_team_barrier_done): Use BAR_* defines.
10047         * barrier.c (GOMP_barrier_cancel): New function.
10048         * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
10049         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
10050         omp_proc_bind_spread): New params.
10051         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
10052         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
10053         omp_get_team_num, omp_is_initial_device): New externals.
10054         * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
10055         New functions.
10056         (gomp_resolve_num_threads): Adjust for thread_limit now being in
10057         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
10058         infinity.  If not nested, just return minimum of max_num_threads
10059         and icv->thread_limit_var and if thr->thread_pool, set threads_busy
10060         to the returned value.  Otherwise, don't update atomically
10061         gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
10062         (GOMP_parallel_end): Adjust for thread_limit now being in
10063         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
10064         infinity.  Adjust threads_busy in the pool rather than
10065         gomp_remaining_threads_count.  Remember team->nthreads and call
10066         gomp_team_end before adjusting threads_busy, if not nested
10067         afterwards, just set it to 1 non-atomically.  Add ialias.
10068         (GOMP_parallel_start): Adjust gomp_team_start caller.
10069         * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
10070         * testsuite/libgomp.c/affinity-1.c: New test.
10071         * testsuite/libgomp.c/atomic-15.c: New test.
10072         * testsuite/libgomp.c/atomic-16.c: New test.
10073         * testsuite/libgomp.c/atomic-17.c: New test.
10074         * testsuite/libgomp.c/cancel-for-1.c: New test.
10075         * testsuite/libgomp.c/cancel-for-2.c: New test.
10076         * testsuite/libgomp.c/cancel-parallel-1.c: New test.
10077         * testsuite/libgomp.c/cancel-parallel-2.c: New test.
10078         * testsuite/libgomp.c/cancel-parallel-3.c: New test.
10079         * testsuite/libgomp.c/cancel-sections-1.c: New test.
10080         * testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
10081         * testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
10082         * testsuite/libgomp.c/depend-1.c: New test.
10083         * testsuite/libgomp.c/depend-2.c: New test.
10084         * testsuite/libgomp.c/depend-3.c: New test.
10085         * testsuite/libgomp.c/depend-4.c: New test.
10086         * testsuite/libgomp.c/for-1.c: New test.
10087         * testsuite/libgomp.c/for-1.h: New file.
10088         * testsuite/libgomp.c/for-2.c: New test.
10089         * testsuite/libgomp.c/for-2.h: New file.
10090         * testsuite/libgomp.c/for-3.c: New test.
10091         * testsuite/libgomp.c/pr58392.c: New test.
10092         * testsuite/libgomp.c/simd-1.c: New test.
10093         * testsuite/libgomp.c/simd-2.c: New test.
10094         * testsuite/libgomp.c/simd-3.c: New test.
10095         * testsuite/libgomp.c/simd-4.c: New test.
10096         * testsuite/libgomp.c/simd-5.c: New test.
10097         * testsuite/libgomp.c/simd-6.c: New test.
10098         * testsuite/libgomp.c/target-1.c: New test.
10099         * testsuite/libgomp.c/target-2.c: New test.
10100         * testsuite/libgomp.c/target-3.c: New test.
10101         * testsuite/libgomp.c/target-4.c: New test.
10102         * testsuite/libgomp.c/target-5.c: New test.
10103         * testsuite/libgomp.c/target-6.c: New test.
10104         * testsuite/libgomp.c/target-7.c: New test.
10105         * testsuite/libgomp.c/taskgroup-1.c: New test.
10106         * testsuite/libgomp.c/thread-limit-1.c: New test.
10107         * testsuite/libgomp.c/thread-limit-2.c: New test.
10108         * testsuite/libgomp.c/thread-limit-3.c: New test.
10109         * testsuite/libgomp.c/udr-1.c: New test.
10110         * testsuite/libgomp.c/udr-2.c: New test.
10111         * testsuite/libgomp.c/udr-3.c: New test.
10112         * testsuite/libgomp.c++/affinity-1.C: New test.
10113         * testsuite/libgomp.c++/atomic-10.C: New test.
10114         * testsuite/libgomp.c++/atomic-11.C: New test.
10115         * testsuite/libgomp.c++/atomic-12.C: New test.
10116         * testsuite/libgomp.c++/atomic-13.C: New test.
10117         * testsuite/libgomp.c++/atomic-14.C: New test.
10118         * testsuite/libgomp.c++/atomic-15.C: New test.
10119         * testsuite/libgomp.c++/cancel-for-1.C: New test.
10120         * testsuite/libgomp.c++/cancel-for-2.C: New test.
10121         * testsuite/libgomp.c++/cancel-parallel-1.C: New test.
10122         * testsuite/libgomp.c++/cancel-parallel-2.C: New test.
10123         * testsuite/libgomp.c++/cancel-parallel-3.C: New test.
10124         * testsuite/libgomp.c++/cancel-sections-1.C: New test.
10125         * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
10126         * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
10127         * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
10128         * testsuite/libgomp.c++/cancel-test.h: New file.
10129         * testsuite/libgomp.c++/for-9.C: New test.
10130         * testsuite/libgomp.c++/for-10.C: New test.
10131         * testsuite/libgomp.c++/for-11.C: New test.
10132         * testsuite/libgomp.c++/simd-1.C: New test.
10133         * testsuite/libgomp.c++/simd-2.C: New test.
10134         * testsuite/libgomp.c++/simd-3.C: New test.
10135         * testsuite/libgomp.c++/simd-4.C: New test.
10136         * testsuite/libgomp.c++/simd-5.C: New test.
10137         * testsuite/libgomp.c++/simd-6.C: New test.
10138         * testsuite/libgomp.c++/simd-7.C: New test.
10139         * testsuite/libgomp.c++/simd-8.C: New test.
10140         * testsuite/libgomp.c++/target-1.C: New test.
10141         * testsuite/libgomp.c++/target-2.C: New test.
10142         * testsuite/libgomp.c++/target-2-aux.cc: New file.
10143         * testsuite/libgomp.c++/target-3.C: New test.
10144         * testsuite/libgomp.c++/taskgroup-1.C: New test.
10145         * testsuite/libgomp.c++/udr-1.C: New test.
10146         * testsuite/libgomp.c++/udr-2.C: New test.
10147         * testsuite/libgomp.c++/udr-3.C: New test.
10148         * testsuite/libgomp.c++/udr-4.C: New test.
10149         * testsuite/libgomp.c++/udr-5.C: New test.
10150         * testsuite/libgomp.c++/udr-6.C: New test.
10151         * testsuite/libgomp.c++/udr-7.C: New test.
10152         * testsuite/libgomp.c++/udr-8.C: New test.
10153         * testsuite/libgomp.c++/udr-9.C: New test.
10154
10155 2013-09-20  Jakub Jelinek  <jakub@redhat.com>
10156
10157         PR testsuite/57605
10158         * testsuite/lib/libgomp.exp: Add -fdiagnostics-color=never to
10159         ALWAYS_CFLAGS.
10160
10161 2013-09-20  Alan Modra  <amodra@gmail.com>
10162
10163         * configure: Regenerate.
10164
10165 2013-09-19  Jakub Jelinek  <jakub@redhat.com>
10166
10167         * testsuite/libgomp.c/sections-2.c: New test.
10168
10169 2013-06-28  Marcus Shawcroft  <marcus.shawcroft@arm.com>
10170
10171         * testsuite/libgomp.fortran/strassen.f90:
10172         Add dg-skip-if aarch64_tiny.
10173
10174 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
10175             Cesar Philippidis  <cesar@codesourcery.com>
10176
10177         * testsuite/lib/libgomp.exp: Reorder lib loads into dependency order.
10178         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
10179         * testsuite/libgomp.c/c.exp: load_gcc_lib gcc-dg.exp.
10180         * testsuite/libgomp.fortran/fortran.exp: Likewise.
10181         * testsuite/libgomp.graphite/graphite.exp: Likewise.
10182         * testsuite/libgomp.c++/c++.exp: load_gcc_lib gcc-dg.exp.
10183         Use dg-runtest rather than gfortran-dg-runtest.
10184
10185 2013-06-10  Thomas Schwinge  <thomas@codesourcery.com>
10186
10187         * testsuite/libgomp.c/icv-2.c: Extend current handling of
10188         Linux-based x86 systems to cover all GNU systems.
10189         * testsuite/libgomp.c/lock-3.c: Likewise.
10190         * testsuite/libgomp.c/pr48591.c: Likewise.
10191
10192 2013-06-06  Thomas Schwinge  <thomas@codesourcery.com>
10193
10194         * configure.tgt (XCFLAGS): Add -ftls-model=initial-exec for
10195         GNU/Hurd, as done for Linux-based systems.
10196
10197         * config/posix/ptrlock.h: Fix comment.
10198
10199 2013-05-27  Tobias Burnus  <burnus@net-b.de>
10200
10201         PR fortran/57423
10202         * libgomp.texi (omp_set_dynamic, omp_set_nested, omp_set_nested,
10203         omp_set_num_threads, omp_init_lock, omp_set_lock, omp_test_lock,
10204         omp_unset_lock, omp_destroy_lock, omp_init_nest_lock,
10205         omp_set_nest_lock, omp_test_nest_lock, omp_unset_nest_lock,
10206         omp_destroy_nest_lock): Correct arguments to match the one in
10207         the OpenMP spec.
10208         * omp_lib.f90.in (omp_init_lock, omp_init_nest_lock, omp_destroy_lock
10209         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock, omp_unset_lock,
10210         omp_unset_nest_lock, omp_set_dynamic, omp_set_nested,
10211         omp_set_num_threads, omp_test_lock, omp_test_nest_lock): Ditto.
10212
10213 2013-05-16  Jakub Jelinek  <jakub@redhat.com>
10214
10215         * testsuite/libgomp.c/loop-13.c: New test.
10216         * testsuite/libgomp.c/loop-14.c: New test.
10217         * testsuite/libgomp.c/loop-15.c: New test.
10218         * testsuite/libgomp.c++/loop-13.C: New test.
10219         * testsuite/libgomp.c++/loop-14.C: New test.
10220         * testsuite/libgomp.c++/loop-15.C: New test.
10221
10222 2013-02-06  Jakub Jelinek  <jakub@redhat.com>
10223
10224         PR middle-end/56217
10225         * testsuite/libgomp.c++/pr56217.C: New test.
10226
10227 2013-02-01  Alan Modra  <amodra@gmail.com>
10228
10229         * task.c (GOMP_task, GOMP_taskwait): Comment.
10230
10231 2013-01-31  Dmitry Vyukov  <dvyukov@gcc.gnu.org>
10232             Joost VandeVondele  <Joost.VandeVondele@mat.ethz.ch>
10233
10234         PR libgomp/55561
10235         * config/linux/wait.h (do_spin): Use atomic load for addr.
10236         * config/linux/ptrlock.c (gomp_ptrlock_get_slow): Use atomic
10237         for intptr and ptrlock.
10238         * config/linux/ptrlock.h (gomp_ptrlock_get): Use atomic load
10239         for ptrlock.
10240
10241 2013-01-22  Alan Modra  <amodra@gmail.com>
10242
10243         PR libgomp/51376
10244         PR libgomp/56073
10245         * task.c (GOMP_task): Revert 2011-12-09 change.
10246         (GOMP_taskwait): Likewise.  Instead use atomic load with acquire
10247         barrier to read task->children..
10248         (gomp_barrier_handle_tasks): ..and matching atomic store with
10249         release barrier here when setting parent->children to NULL.
10250
10251 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
10252             Tobias Burnus  <burnus@net-b.de>
10253
10254         PR driver/55884
10255         * testsuite/libgomp.fortran/fortran.exp: Use
10256         -fintrinsic-modules-path= instead of
10257         -fintrinsic-modules-path.
10258
10259 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
10260
10261         Update copyright years.
10262
10263 2012-12-19  Tobias Burnus  <burnus@net-b.de>
10264
10265         * testsuite/libgomp.fortran/fortran.exp: Set
10266         -fintrinsic-modules-path.
10267
10268 2012-12-19  Tobias Burnus  <burnus@net-b.de>
10269
10270         * testsuite/libgomp.fortran/use_intrinsic_1.f90: New; moved
10271         from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90.
10272
10273 2012-11-21  Jakub Jelinek  <jakub@redhat.com>
10274
10275         PR libgomp/55411
10276         * team.c (gomp_free_thread): Decrease gomp_managed_threads
10277         if pool had any threads_used.
10278
10279 2012-11-07  Jack Howarth <howarth@bromo.med.uc.edu>
10280
10281         * testsuite/libgomp.c++/pr24455.C: Use
10282         -Wl,-undefined,dynamic_lookup on darwin.
10283
10284 2012-11-07  David Edelsohn  <dje.gcc@gmail.com>
10285
10286         * testsuite/libgomp.c++/pr24455.C: Use -Wl,-G on AIX.
10287
10288 2012-10-24  Dominique d'Humieres  <dominiq@lps.ens.fr>
10289
10290         * testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.
10291
10292 2012-10-23  Ian Bolton  <ian.bolton@arm.com>
10293             Jim MacArthur  <jim.macarthur@arm.com>
10294             Marcus Shawcroft  <marcus.shawcroft@arm.com>
10295             Nigel Stephens  <nigel.stephens@arm.com>
10296             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10297             Richard Earnshaw  <rearnsha@arm.com>
10298             Sofiane Naci  <sofiane.naci@arm.com>
10299             Stephen Thomas  <stephen.thomas@arm.com>
10300             Tejas Belagod  <tejas.belagod@arm.com>
10301             Yufeng Zhang  <yufeng.zhang@arm.com>
10302
10303         * configure.tgt: Add AArch64.
10304
10305 2012-10-04  Jason Merrill  <jason@redhat.com>
10306
10307         * testsuite/libgomp.c++/tls-init1.C: New.
10308
10309 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
10310
10311         * configure: Regenerated.
10312
10313 2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>
10314
10315         * config/linux/mips/futex.h (sys_futex0): Change to static
10316         function with noinline, nomips16 attributes under MIPS16. Adjust
10317         asm statement to place 'li v0,SYS_futex' immediately before
10318         syscall insn.
10319
10320 2012-07-04  Sandra Loosemore <sandra@codesourcery.com>
10321
10322         * libgomp.texi (Library Index): Renamed from "Index" to prevent
10323         conflict with index.html on case-insensitive file systems.
10324
10325 2012-07-03  Uros Bizjak  <ubizjak@gmail.com>
10326
10327         * config/linux/x86/futex.h (cpu_relax): Use __builtin_ia32_pause.
10328         * testsuite/libgomp.c/sort-1.c (busy_wait): Ditto.
10329
10330 2012-07-02  Richard Guenther  <rguenther@suse.de>
10331             Michael Matz  <matz@suse.de>
10332             Tobias Grosser <tobias@grosser.es>
10333             Sebastian Pop <sebpop@gmail.com>
10334
10335         * testsuite/libgomp.graphite/force-parallel-4.c: Adjust.
10336         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
10337         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
10338         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
10339
10340 2012-06-28  Andreas Schwab  <schwab@linux-m68k.org>
10341
10342         * libgomp.texi: Include gpl_v3.texi instead of gpl.texi.
10343
10344 2012-06-22  Richard Guenther  <rguenther@suse.de>
10345
10346         Merge from graphite branch
10347         2012-01-13  Tobias Grosser  <tobias@grosser.es>
10348
10349         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
10350         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
10351
10352 2012-06-07  Jakub Jelinek  <jakub@redhat.com>
10353
10354         PR middle-end/53580
10355         * testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
10356         use GOMP_barrier () call instead.
10357         * testsuite/libgomp.c/pr26943-3.c: Likewise.
10358         * testsuite/libgomp.c/pr26943-4.c: Likewise.
10359         * testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
10360         call GOMP_barrier instead.
10361         * testsuite/libgomp.fortran/vla5.f90: Likewise.
10362
10363 2012-06-06  Jakub Jelinek  <jakub@redhat.com>
10364
10365         PR libgomp/52993
10366         * config/linux/lock.c (gomp_init_nest_lock_25): Fix up last
10367         argument to memset call.
10368
10369 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
10370
10371         * configure: Regenerated.
10372
10373 2012-04-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10374
10375         * testsuite/lib/libgomp.exp: Add -fno-diagnostics-show-caret.
10376
10377 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
10378
10379         PR bootstrap/52812
10380         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
10381
10382 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
10383
10384         PR middle-end/52547
10385         * testsuite/libgomp.c/pr52547.c: New test.
10386
10387 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
10388
10389         * testsuite/lib/libgomp.exp: load fortran-modules.exp
10390
10391 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10392
10393         * configure.tgt (mips-sgi-irix6*): Remove.
10394
10395 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10396
10397         * configure.tgt (alpha*-dec-osf*): Remove.
10398
10399         * config/osf/sem.h: Remove.
10400         * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally.
10401
10402 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
10403
10404         * config/linux/sparc/futex.h (cpu_relax): Read from CC register.
10405
10406 2012-02-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10407
10408         PR libstdc++/52188
10409         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove symvers_renaming.
10410         Remove ENABLE_SYMVERS_SOL2.
10411         * configure: Regenerate.
10412         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
10413         (PREPROCESS): New variable.
10414         (libgomp.ver): New target.
10415         [LIBGOMP_BUILD_VERSIONED_SHLIB &&
10416         LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
10417         LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
10418         Use libgomp.ver.
10419         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
10420         * Makefile.in: Regenerate.
10421
10422 2012-02-14  Walter Lee  <walt@tilera.com>
10423
10424         * configure.tgt: Handle tilegx and tilepro.
10425         * config/linux/tile/futex.h: New file.
10426
10427 2012-02-08  Richard Guenther  <rguenther@suse.de>
10428
10429         PR tree-optimization/46886
10430         * testsuite/libgomp.c/pr46886.c: New testcase.
10431
10432 2012-01-25  Matthias Klose  <doko@ubuntu.com>
10433
10434         * config/linux/arm: Remove empty directory.
10435         * configure.tgt (config_path): Remove linux-arm for arm*-*-linux*.
10436
10437 2011-12-09  Alan Modra  <amodra@gmail.com>
10438
10439         PR libgomp/51376
10440         * task.c (GOMP_taskwait): Don't access task->children outside of
10441         task_lock mutex region.
10442         (GOMP_task): Likewise.
10443
10444 2011-12-06  Jakub Jelinek  <jakub@redhat.com>
10445
10446         PR libgomp/51132
10447         * testsuite/libgomp.graphite/force-parallel-1.c: Move large arrays
10448         to file scope.
10449         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
10450         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
10451         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
10452         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
10453         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
10454
10455 2011-12-02  Alan Modra  <amodra@gmail.com>
10456
10457         * config/linux/affinity.c: Use atomic rather than sync builtin.
10458         * config/linux/lock.c: Likewise.
10459         * config/linux/ptrlock.h: Likewise.
10460         * config/linux/ptrlock.c: Likewise.
10461         * config/linux/ptrlock.h (gomp_ptrlock_set): Always write here..
10462         * config/linux/ptrlock.c (gomp_ptrlock_set_slow): ..not here.
10463         * config/linux/futex.h (atomic_write_barrier): Delete unused function.
10464         * config/linux/alpha/futex.h (atomic_write_barrier): Likewise.
10465         * config/linux/ia64/futex.h (atomic_write_barrier): Likewise.
10466         * config/linux/mips/futex.h (atomic_write_barrier): Likewise.
10467         * config/linux/powerpc/futex.h (atomic_write_barrier): Likewise.
10468         * config/linux/s390/futex.h (atomic_write_barrier): Likewise.
10469         * config/linux/sparc/futex.h (atomic_write_barrier): Likewise.
10470         * config/linux/x86/futex.h (atomic_write_barrier): Likewise.
10471
10472 2011-11-30  Alan Modra  <amodra@gmail.com>
10473
10474         PR libgomp/51298
10475         * config/linux/bar.h: Use atomic rather than sync builtins.
10476         * config/linux/bar.c: Likewise.  Add missing acquire
10477         synchronisation on generation field.
10478         * task.c (gomp_barrier_handle_tasks): Regain lock so as to not
10479         double unlock.
10480
10481 2011-11-30  Alan Modra  <amodra@gmail.com>
10482
10483         * ordered.c (gomp_ordered_sync): Add MEMMODEL_ACQ_REL fence.
10484         * critical.c (GOMP_critical_start): Add MEMMODEL_RELEASE fence.
10485         * config/linux/mutex.h: Use atomic rather than sync builtins.
10486         * config/linux/mutex.c: Likewise.  Comment.  Use -1 for waiting state.
10487         * config/linux/omp-lock.h: Comment fix.
10488         * config/linux/arm/mutex.h: Delete.
10489         * config/linux/powerpc/mutex.h: Delete.
10490         * config/linux/ia64/mutex.h: Delete.
10491         * config/linux/mips/mutex.h: Delete.
10492
10493 2011-11-30  Alan Modra  <amodra@gmail.com>
10494
10495         PR libgomp/51249
10496         * config/linux/sem.h: Rewrite.
10497         * config/linux/sem.c: Rewrite.
10498
10499 2011-11-28  Richard Henderson  <rth@redhat.com>
10500
10501         * libgomp.h (enum memmodel): New.
10502
10503 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
10504
10505         * configure: Regenerate.
10506
10507 2011-10-10  Matthias Klose  <doko@ubuntu.com>
10508
10509         * config/posix95: Remove empty directory.
10510
10511 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
10512
10513         * testsuite/libgomp.fortran/threadprivate4.f90: New test.
10514
10515 2011-08-19  Jakub Jelinek  <jakub@redhat.com>
10516
10517         PR fortran/49792
10518         * testsuite/libgomp.fortran/pr49792-1.f90: New test.
10519         * testsuite/libgomp.fortran/pr49792-2.f90: New test.
10520
10521 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10522
10523         * config/posix95/lock.c, posix95/omp-lock.h: Remove.
10524
10525 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10526
10527         PR libgomp/49965
10528         * testsuite/libgomp.c++/task-8.C: Replaced err by errval.
10529
10530 2011-08-03  Uros Bizjak  <ubizjak@gmail.com>
10531
10532         * config/linux/proc.h: New.
10533         * config/linux/proc.c: Include "proc.h".  Do not include <sched.h>.
10534         (gomp_cpuset_popcount): Rename from cpuset_popcount.  No more static.
10535         (gomp_init_num_threads): Update call to cpuset_popcount.
10536         (get_num_procs): Ditto.
10537         * config/linux/affinity.c (gomp_init_affinity): Call
10538         gomp_cpuset_popcount.
10539
10540 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
10541
10542         PR fortran/42041
10543         PR fortran/46752
10544         * omp.h.in (omp_in_final): New prototype.
10545         * omp_lib.f90.in (omp_in_final): New interface.
10546         (omp_integer_kind, omp_logical_kind): Remove
10547         and replace all its uses in the module with 4.
10548         (openmp_version): Change to 201107.
10549         * omp_lib.h.in (omp_sched_static, omp_sched_dynamic,
10550         omp_sched_guided, omp_sched_auto): Use omp_sched_kind
10551         kind for the parameters.
10552         (omp_in_final): New external.
10553         (openmp_version): Change to 201107.
10554         * task.c (omp_in_final): New function.
10555         (gomp_init_task): Initialize final_task.
10556         (GOMP_task): Remove unused attribute from flags.  Handle final
10557         tasks.
10558         (GOMP_taskyield): New function.
10559         (omp_in_final): Return true if if (false) or final (true) task
10560         or descendant of final (true).
10561         * fortran.c (omp_in_final_): New function.
10562         * libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_.
10563         (GOMP_3.0): Export GOMP_taskyield.
10564         * env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New
10565         variables.
10566         (parse_unsigned_long_list): New function.
10567         (initialize_env): Use it for OMP_NUM_THREADS.  Call parse_boolean
10568         with "OMP_PROC_BIND".  If OMP_PROC_BIND=true, call gomp_init_affinity
10569         even if parse_affinity returned false.
10570         * config/linux/affinity.c (gomp_init_affinity): Handle
10571         gomp_cpu_affinity_len == 0.
10572         * libgomp_g.h (GOMP_taskyield): New prototype.
10573         * libgomp.h (struct gomp_task): Add final_task field.
10574         (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs.
10575         * team.c (gomp_team_start): Override new task's nthreads_var icv
10576         if list form OMP_NUM_THREADS has been used and it has value for
10577         the new nesting level.
10578
10579         * testsuite/libgomp.c/atomic-11.c: New test.
10580         * testsuite/libgomp.c/atomic-12.c: New test.
10581         * testsuite/libgomp.c/atomic-13.c: New test.
10582         * testsuite/libgomp.c/atomic-14.c: New test.
10583         * testsuite/libgomp.c/reduction-6.c: New test.
10584         * testsuite/libgomp.c/task-5.c: New test.
10585         * testsuite/libgomp.c++/atomic-2.C: New test.
10586         * testsuite/libgomp.c++/atomic-3.C: New test.
10587         * testsuite/libgomp.c++/atomic-4.C: New test.
10588         * testsuite/libgomp.c++/atomic-5.C: New test.
10589         * testsuite/libgomp.c++/atomic-6.C: New test.
10590         * testsuite/libgomp.c++/atomic-7.C: New test.
10591         * testsuite/libgomp.c++/atomic-8.C: New test.
10592         * testsuite/libgomp.c++/atomic-9.C: New test.
10593         * testsuite/libgomp.c++/task-8.C: New test.
10594         * testsuite/libgomp.c++/reduction-4.C: New test.
10595         * testsuite/libgomp.fortran/allocatable7.f90: New test.
10596         * testsuite/libgomp.fortran/allocatable8.f90: New test.
10597         * testsuite/libgomp.fortran/crayptr3.f90: New test.
10598         * testsuite/libgomp.fortran/omp_atomic3.f90: New test.
10599         * testsuite/libgomp.fortran/omp_atomic4.f90: New test.
10600         * testsuite/libgomp.fortran/pointer1.f90: New test.
10601         * testsuite/libgomp.fortran/pointer2.f90: New test.
10602         * testsuite/libgomp.fortran/task4.f90: New test.
10603
10604 2011-08-02  Tobias Burnus  <burnus@net-b.de>
10605
10606         * libgomp.texi: Update OpenMP spec references to 3.1.
10607         (omp_in_final,OMP_PROC_BIND): New sections.
10608         (OMP_NUM_THREADS): Document that the value can be now a list.
10609         (GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref.
10610
10611 2011-08-02  H.J. Lu  <hongjiu.lu@intel.com>
10612
10613         * config/linux/x86/futex.h: Check __x86_64__ instead of
10614         __LP64__.
10615
10616 2011-07-29  Jakub Jelinek  <jakub@redhat.com>
10617
10618         PR middle-end/49897
10619         PR middle-end/49898
10620         * testsuite/libgomp.c/pr49897-1.c: New test.
10621         * testsuite/libgomp.c/pr49897-2.c: New test.
10622         * testsuite/libgomp.c/pr49898-1.c: New test.
10623         * testsuite/libgomp.c/pr49898-2.c: New test.
10624
10625 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
10626
10627         * testsuite/lib/libgomp.exp (libgomp_init): Add -march=i486
10628         for ia32 instead of ilp32.
10629
10630         * testsuite/libgomp.c/atomic-1.c: Require ia32 instead of ilp32.
10631         * testsuite/libgomp.c/atomic-6.c: Likewise.
10632
10633 2011-07-23  Sebastian Pop  <sebastian.pop@amd.com>
10634
10635         * testsuite/libgomp.graphite/force-parallel-1.c: Un-xfail.
10636         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust pattern.
10637
10638 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10639
10640         PR libgomp/45351
10641         * config/osf/sem.h: New file.
10642         * configure.tgt (alpha*-dec-osf*): Prepend osf to config_path.
10643
10644 2011-07-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10645
10646         PR target/49541
10647         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -lgomp to
10648         ldflags.
10649
10650 2011-07-15  Jakub Jelinek  <jakub@redhat.com>
10651
10652         * config/linux/wait.h (do_spin): New inline, largely copied
10653         from do_wait, just don't do futex_wait here, instead return true if
10654         it should be done.
10655         (do_wait): Implement using do_spin.
10656         * config/linux/mutex.h (gomp_mutex_lock_slow): Add an int argument
10657         to prototype.
10658         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
10659         __sync_bool_compare_and_swap, pass the oldval to
10660         gomp_mutex_lock_slow.
10661         * config/linux/mutex.c (gomp_mutex_lock_slow): Add oldval argument.
10662         If all mutex contenders are just spinning and not sleeping, don't
10663         change state to 2 unnecessarily.  Optimize the loop when state has
10664         already become 2 to use just one atomic operation per loop instead
10665         of two.
10666         * config/linux/ia64/mutex.h (gomp_mutex_lock_slow): Add an int argument
10667         to prototype.
10668         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
10669         __sync_bool_compare_and_swap, pass the oldval to
10670         gomp_mutex_lock_slow.
10671
10672 2011-06-22  Jakub Jelinek  <jakub@redhat.com>
10673
10674         PR libgomp/49490
10675         * iter.c (gomp_iter_static_next): For chunk size 0
10676         only use n ceil/ nthreads size for the first
10677         n % nthreads threads in the team instead of
10678         all threads except for the last few ones which
10679         get less work or none at all.
10680         * iter_ull.c (gomp_iter_ull_static_next): Likewise.
10681         * env.c (parse_schedule): If OMP_SCHEDULE doesn't have
10682         chunk argument, set run_sched_modifier to 0 for static
10683         resp. 1 for other kinds.  If chunk argument is 0
10684         and not static, set value to 1.
10685
10686 2011-05-19  Jakub Jelinek  <jakub@redhat.com>
10687
10688         PR c++/49043
10689         * testsuite/libgomp.c++/pr49043.C: New test.
10690
10691         PR c++/48869
10692         * testsuite/libgomp.c++/pr48869.C: New test.
10693
10694 2011-05-06  Jakub Jelinek  <jakub@redhat.com>
10695
10696         PR fortran/48894
10697         * fortran.c: Include limits.h.
10698         (TO_INT): Define.
10699         (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
10700         *set.
10701         (omp_set_num_threads_8_, omp_set_schedule_8_,
10702         omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
10703         omp_get_team_size_8_): Use TO_INT macro.
10704         * testsuite/libgomp.fortran/pr48894.f90: New test.
10705
10706 2011-04-13  Jakub Jelinek  <jakub@redhat.com>
10707
10708         PR middle-end/48591
10709         * testsuite/libgomp.c/pr48591.c: New test.
10710
10711 2011-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10712
10713         PR bootstrap/48135
10714         * acinclude.m4 (enable_symvers): Handle --disable-symvers.
10715         * configure: Regenerate.
10716
10717 2011-02-27  Jakub Jelinek  <jakub@redhat.com>
10718
10719         PR fortran/47886
10720         * testsuite/libgomp.fortran/task3.f90: New test.
10721
10722 2011-02-24  Tobias Burnus  <burnus@net-b.de>
10723
10724         * libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.
10725
10726 2011-02-23  Jakub Jelinek  <jakub@redhat.com>
10727
10728         PR libgomp/47854
10729         * libgomp.texi (omp_get_wtime): Don't say time in the past
10730         must be Unix Epoch.
10731
10732 2011-02-18  Jakub Jelinek  <jakub@redhat.com>
10733
10734         PR libgomp/47804
10735         * testsuite/libgomp.fortran/fortran.exp: Check for both
10736         libquadmath.a and libquadmath.${shlib_ext}.  If neither exists,
10737         but $blddir != "", still append ${blddir}/${lang_library_path}
10738         to ld_library_path.
10739
10740 2011-02-16  Tobias Burnus  <burnus@net-b.de>
10741
10742         PR libgomp/47758
10743         * testsuite/libgomp.fortran/fortran.exp: Check for the existence
10744         of libquadmath.a before adding its libpath to ldflags.
10745
10746 2011-02-14  Jakub Jelinek  <jakub@redhat.com>
10747
10748         PR libgomp/47731
10749         * config/linux/futex.h (futex_wait): Pass NULL as timeout argument
10750         to FUTEX_WAIT futex syscall.
10751         * config/linux/wait.h: Include <futex.h> instead of "futex.h".
10752
10753 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10754
10755         * configure: Regenerate.
10756
10757 2011-01-20  Benjamin Kosnik  <bkoz@redhat.com>
10758
10759         PR libstdc++/36104
10760         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Accept gnu variants.
10761
10762 2011-01-16  Gerald Pfeifer
10763
10764         * configure.tgt (*-*-freebsd*): Add -lpthread to XLDFLAGS.
10765
10766 2010-12-14  Jakub Jelinek  <jakub@redhat.com>
10767
10768         PR fortran/46874
10769         * libgomp.fortran/allocatable6.f90: New test.
10770
10771 2010-12-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10772
10773         * acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
10774         * configure: Regenerate.
10775
10776 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
10777
10778         PR target/40125
10779         PR lto/46695
10780         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
10781         * Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags.
10782         * aclocal.m4: Regenerate.
10783         * configure: Regenerate.
10784         * Makefile.in: Regenerate.
10785         * testsuite/Makefile.in: Regenerate.
10786
10787 2010-12-02  Jakub Jelinek  <jakub@redhat.com>
10788
10789         PR fortran/46753
10790         * libgomp.fortran/pr46753.f90: New test.
10791
10792         PR libgomp/43706
10793         * env.c (initialize_env): Default to spin count 300000
10794         instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
10795         is specified.
10796
10797         PR libgomp/45240
10798         * parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
10799         at the end if sync builtins aren't supported.
10800
10801 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10802
10803         * configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
10804
10805 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10806
10807         * testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0.
10808
10809 2010-11-24  Iain Sandoe  <iains@gcc.gnu.org>
10810
10811         * testsuite/libgomp.fortran/fortran.exp: Add paths for libquadmath.
10812
10813 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
10814             Tobias Burnus  <burnus@net-b.de>
10815
10816         PR fortran/32049
10817         * configure.ac:
10818         * configure: Regenerate.
10819
10820 2010-10-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>
10821
10822         * config/linux/futex.h: New.
10823         * config/linux/arm/mutex.h: New.
10824         * configure.tgt (arm*-*-linux*): Add config path.
10825
10826 2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
10827
10828         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
10829
10830 2010-09-23  Tobias Burnus  <burnus@net-b.de>
10831
10832         * libgomp.texi (omp_get_nested, omp_set_nested, omp_set_dynamic):
10833         Change Fortran datatype to LOGICAL.
10834         (omp_set_lock, omp_test_lock, omp_unset_lock, omp_set_nested_lock,
10835         omp_unset_nested_lock): Use intent(inout) instead of intent(out).
10836
10837 2010-08-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10838
10839         * configure: Regenerate.
10840
10841 2010-07-26  Jakub Jelinek  <jakub@redhat.com>
10842
10843         * libgomp.texi: Add function keyword to a couple of Fortran
10844         interfaces, use integer instead of int for Fortran.
10845
10846 2010-07-26  Aldy Hernandez  <aldyh@redhat.com>
10847
10848         * libgomp.texi: Fix spelling and pasto problems throughout.
10849         Adjust prototypes to match code.
10850
10851 2010-07-24  Tobias Burnus  <burnus@net-b.de>
10852
10853         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to
10854         silence -fwhole-file warning.
10855
10856 2010-07-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10857
10858         * configure.tgt (*-*-solaris2.[56]*): Removed.
10859
10860 2010-07-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10861
10862         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
10863         Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU,
10864         LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals.
10865         (HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless
10866         targetting solaris2*.
10867         * configure: Regenerate.
10868         * config.h.in: Regenerate.
10869
10870         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect
10871         libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU.
10872         Add libgomp_version_dep.
10873         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol
10874         versioning.
10875         [!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep.
10876         (libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep).
10877         * Makefile.in: Regenerate.
10878
10879         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless
10880         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
10881         * libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0
10882         to common block, protected by
10883         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
10884
10885 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
10886
10887         * libgomp.texi: Move to GFDL version 1.3.  Update copyright years.
10888
10889 2010-06-09  Iain Sandoe  <iains@gcc.gnu.org>
10890
10891         PR bootstrap/43170
10892         * configure: Regenerate.
10893
10894 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10895
10896         PR other/43620
10897         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
10898         * configure: Regenerate.
10899         * Makefile.in: Regenerate.
10900         * testsuite/Makefile.in: Regenerate.
10901
10902 2010-04-26  Jakub Jelinek  <jakub@redhat.com>
10903
10904         PR c/43893
10905         * testsuite/libgomp.c/pr43893.c: New test.
10906         * testsuite/libgomp.c++/pr43893.C: New test.
10907
10908 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
10909
10910         PR middle-end/43570
10911         * testsuite/libgomp.fortran/vla8.f90: New test.
10912
10913 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
10914
10915         PR libgomp/43706
10916         * config/linux/affinity.c (gomp_init_affinity): Decrease
10917         gomp_available_cpus if affinity mask confines the process to fewer
10918         CPUs.
10919         * config/linux/proc.c (get_num_procs): If gomp_cpu_affinity is
10920         non-NULL, just return gomp_available_cpus.
10921
10922         PR libgomp/43569
10923         * sections.c (gomp_sections_init): Initialize ws->mode.
10924
10925 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
10926
10927         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Remove set but
10928         not unused bar variable.
10929         * configure: Regenerate.
10930
10931 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10932
10933         * Makefile.in: Regenerate.
10934         * aclocal.m4: Regenerate.
10935         * testsuite/Makefile.in: Regenerate.
10936
10937 2010-03-22  Jakub Jelinek  <jakub@redhat.com>
10938
10939         PR libgomp/42942
10940         * env.c (parse_unsigned_long): Add ALLOW_ZERO argument.
10941         (initialize_env): Adjust callers.
10942         (omp_set_max_active_levels): Set gomp_max_active_levels_var even
10943         when the argument is 0.
10944
10945         * testsuite/libgomp.c/pr42942.c: New test.
10946
10947 2010-03-08  Tobias Grosser  <grosser@fim.uni-passau.de>
10948
10949         PR middle-end/42644
10950         PR middle-end/42130
10951         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
10952         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust.
10953
10954 2010-01-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10955
10956         * testsuite/libgomp.c++/task-1.C: Renamed err to e.
10957         * testsuite/libgomp.c++/task-6.C: Likewise.
10958
10959 2010-01-28  Steve Ellcey  <sje@cup.hp.com>
10960
10961         * configure.tgt (*-*-hpux*): Add -frandom-seed flag.
10962
10963 2010-01-26  Paolo Bonzini  <bonzini@gnu.org>
10964
10965         * configure.ac: Test for executability of _the first word_ of GFORTRAN.
10966         * configure: Regenerate.
10967
10968 2010-01-26  Jakub Jelinek  <jakub@redhat.com>
10969
10970         PR fortran/42866
10971         * testsuite/libgomp.fortran/allocatable5.f90: New test.
10972
10973 2010-01-20  Paolo Bonzini  <bonzini@gnu.org>
10974
10975         * configure.ac: Test for executability of GFORTRAN.
10976         * configure: Regenerate.
10977
10978 2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10979
10980         * configure: Regenerate.
10981
10982 2010-01-04  H.J. Lu  <hongjiu.lu@intel.com>
10983
10984         PR libgomp/42602
10985         * libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.
10986
10987 2010-01-03  Richard Guenther  <rguenther@suse.de>
10988
10989         * testsuite/libgomp.fortran/recursion1.f90: New testcase.
10990
10991 2009-12-23  Sebastian Pop  <sebpop@gmail.com>
10992
10993         * testsuite/libgomp.graphite/pr4118.c: New.
10994
10995 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
10996
10997         * testsuite/libgomp.fortran/crayptr2.f90: Remove forced static linkage
10998         for darwin, protect the test with require-effective-target tls_runtime.
10999         * testsuite/libgomp.fortran/pr32550.f90: Ditto.
11000
11001 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
11002
11003         PR target/41605
11004         * testsuite/lib/libgomp.exp: Provide -B options to allow for
11005         link spec %s substitutions for static libraries.
11006
11007 2009-12-18  Jack Howarth <howarth@bromo.med.uc.edu>
11008
11009         PR testsuite/42135
11010         * libgomp.graphite/force-parallel-2.c: Reduce array size.
11011
11012 2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11013
11014         * Makefile.in: Regenerate.
11015         * configure: Regenerate.
11016         * testsuite/Makefile.in: Regenerate.
11017
11018 2009-11-30  Dave Korn  <dave.korn.cygwin@gmail.com>
11019
11020         * testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
11021         settings for LC_ALL and LANG.
11022
11023 2009-11-25  Jakub Jelinek  <jakub@redhat.com>
11024
11025         PR fortran/42162
11026         * testsuite/libgomp.fortran/pr42162.f90: New test.
11027
11028 2009-11-13  Jakub Jelinek  <jakub@redhat.com>
11029
11030         PR middle-end/42029
11031         * testsuite/libgomp.c/pr42029.c: New test.
11032
11033 2009-10-26  Jakub Jelinek  <jakub@redhat.com>
11034
11035         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
11036         *s.  Accept ld version without text in ()s.
11037         * configure: Regenerated.
11038
11039 2009-10-22  Razya Ladelsky  <razya@il.ibm.com>
11040
11041         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust scan.
11042
11043 2009-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11044
11045         PR libgomp/41418
11046         * configure.ac: Set FC to "no" if $GFORTRAN starts with "no"
11047         or a hyphen (happens with fortran language disabled).
11048         * configure: Regenerate.
11049
11050 2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11051
11052         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid 'head',
11053         use sed script portable to Solaris /bin/sed for extracting ld
11054         version.
11055         * configure: Regenerate.
11056
11057 2009-09-17  Alexander Monakov  <amonakov@ispras.ru>
11058
11059         * testsuite/libgomp.graphite/bounds.c: New test.
11060
11061 2009-09-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11062
11063         * Makefile.am (libgomp_la_LINK): New.
11064         * Makefile.in: Regenerate.
11065
11066 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11067
11068         * configure.ac (AC_PREREQ): Bump to 2.64.
11069
11070 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11071
11072         * Makefile.am (install-html, install-pdf): Remove.
11073         * Makefile.in: Regenerate.
11074
11075         * Makefile.in: Regenerate.
11076         * aclocal.m4: Regenerate.
11077         * config.h.in: Regenerate.
11078         * configure: Regenerate.
11079         * testsuite/Makefile.in: Regenerate.
11080
11081 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11082
11083         * Makefile.am (LINK): Add $(AM_LIBTOOLFLAGS) and $(LIBTOOLFLAGS).
11084         * Makefile.in: Regenerate.
11085
11086 2009-08-20  Dave Korn  <dave.korn.cygwin@gmail.com>
11087
11088         * Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
11089         * Makefile.in: Regenerate.
11090
11091 2009-08-19  Tobias Burnus  <burnus@net-b.de>
11092
11093         PR fortran/41102
11094         omp_lib.h.in: Fix -std=f95 errors.
11095
11096 2009-08-14  David Edelsohn  <edelsohn@gnu.org>
11097
11098         * testsuite/libgomp.graphite: Move from gcc.dg/graphite.
11099         * testsuite/libgomp.graphite/graphite_autopar.exp: Delete.
11100         * testsuite/libgomp.graphite/graphite.exp: New.
11101
11102 2009-08-05  Andreas Tobler  <a.tobler@schweiz.org>
11103
11104         * testsuite/libgomp.fortran/fortran.exp: Add flags in case of shared
11105         only build.
11106
11107 2009-08-04  David Daney  <ddaney@caviumnetworks.com>
11108
11109         * config/linux/mutex.h (gomp_mutex_unlock): Add comment about
11110         needed memory barrier semantics.
11111         * config/linux/mips/mutex.h: New file.
11112
11113 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11114
11115         * configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
11116
11117 2009-07-16  Joseph Myers  <joseph@codesourcery.com>
11118
11119         * configure: Regenerate.
11120
11121 2009-07-11  Richard Sandiford  <rdsandiford@googlemail.com>
11122
11123         PR testsuite/40699
11124         PR testsuite/40707
11125         PR testsuite/40709
11126         * testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
11127         * testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
11128         testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.
11129
11130 2009-07-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
11131
11132         * testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
11133         options when choosing a multilib.
11134
11135 2009-06-30  Richard Sandiford  <r.sandiford@uk.ibm.com>
11136
11137         * testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
11138         ld_library_path.  Use add_path.  Add just find_libgcc_s to
11139         ld_library_path, not every libgcc multilib directory.
11140         * testsuite/libgomp.c/c.exp (ld_library_path): Don't call
11141         gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
11142         * testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
11143         Use add_path.
11144         * testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.
11145
11146 2009-06-09  Nathan Froyd  <froydnj@codesourcery.com>
11147
11148         * Makefile.am (LTLDFLAGS): Define.
11149         (LINK): Define.
11150         * Makefile.in: Regenerate.
11151
11152 2009-05-27  Janne Blomqvist  <jb@gcc.gnu.org>
11153
11154         PR fortran/39718
11155         * testsuite/libgomp.fortran/fortran.exp: Don't link with
11156         libgfortranbegin, check existence of libgfortran.a instead of
11157         libgfortranbegin.a.
11158
11159 2009-05-20  Jakub Jelinek  <jakub@redhat.com>
11160
11161         PR libgomp/40174
11162         * team.c (gomp_thread_start): Destroy thr->release semaphore.
11163         (gomp_free_pool_helper): Likewise.
11164
11165 2009-04-20  Vasilis Liaskovitis  <vliaskov@gmail.com>
11166             Jakub Jelinek  <jakub@redhat.com>
11167
11168         PR fortran/35423
11169         * testsuite/libgomp.fortran/workshare2.f90: New test.
11170
11171 2009-04-09  Nick Clifton  <nickc@redhat.com>
11172
11173         * iter.c: Change copyright header to refer to version 3 of the
11174         GNU General Public License with version 3.1 of the GCC Runtime
11175         Library Exception and to point readers at the COPYING3 and
11176         COPYING3.RUNTIME files and the FSF's license web page.
11177         * alloc.c: Likewise.
11178         * barrier.c: Likewise.
11179         * config/bsd/proc.c: Likewise.
11180         * config/linux/affinity.c: Likewise.
11181         * config/linux/alpha/futex.h: Likewise.
11182         * config/linux/bar.c: Likewise.
11183         * config/linux/bar.h: Likewise.
11184         * config/linux/ia64/futex.h: Likewise.
11185         * config/linux/ia64/mutex.h: Likewise.
11186         * config/linux/lock.c: Likewise.
11187         * config/linux/mips/futex.h: Likewise.
11188         * config/linux/mutex.c: Likewise.
11189         * config/linux/mutex.h: Likewise.
11190         * config/linux/powerpc/futex.h: Likewise.
11191         * config/linux/proc.c: Likewise.
11192         * config/linux/ptrlock.c: Likewise.
11193         * config/linux/ptrlock.h: Likewise.
11194         * config/linux/s390/futex.h: Likewise.
11195         * config/linux/sem.c: Likewise.
11196         * config/linux/sem.h: Likewise.
11197         * config/linux/sparc/futex.h: Likewise.
11198         * config/linux/wait.h: Likewise.
11199         * config/linux/x86/futex.h: Likewise.
11200         * config/mingw32/proc.c: Likewise.
11201         * config/mingw32/time.c: Likewise.
11202         * config/posix/affinity.c: Likewise.
11203         * config/posix/bar.c: Likewise.
11204         * config/posix/bar.h: Likewise.
11205         * config/posix/lock.c: Likewise.
11206         * config/posix/mutex.h: Likewise.
11207         * config/posix/proc.c: Likewise.
11208         * config/posix/ptrlock.h: Likewise.
11209         * config/posix/sem.c: Likewise.
11210         * config/posix/sem.h: Likewise.
11211         * config/posix/time.c: Likewise.
11212         * config/posix95/lock.c: Likewise.
11213         * critical.c: Likewise.
11214         * env.c: Likewise.
11215         * error.c: Likewise.
11216         * fortran.c: Likewise.
11217         * iter_ull.c: Likewise.
11218         * libgomp.h: Likewise.
11219         * libgomp_f.h.in: Likewise.
11220         * libgomp_g.h: Likewise.
11221         * loop.c: Likewise.
11222         * loop_ull.c: Likewise.
11223         * omp.h.in: Likewise.
11224         * omp_lib.f90.in: Likewise.
11225         * omp_lib.h.in: Likewise.
11226         * ordered.c: Likewise.
11227         * parallel.c: Likewise.
11228         * sections.c: Likewise.
11229         * single.c: Likewise.
11230         * task.c: Likewise.
11231         * team.c: Likewise.
11232         * work.c: Likewise.
11233
11234 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
11235
11236         * testsuite/config/default.exp: Change copyright header to refer to
11237         version 3 of the GNU General Public License and to point readers
11238         at the COPYING3 file and the FSF's license web page.
11239
11240 2009-04-08  Jakub Jelinek  <jakub@redhat.com>
11241
11242         PR middle-end/39573
11243         * libgomp.c++/pr39573.C: New test.
11244
11245 2009-04-01  Jakub Jelinek  <jakub@redhat.com>
11246
11247         PR other/39591
11248         * testsuite/libgomp.c/pr39591-1.c: New test.
11249         * testsuite/libgomp.c/pr39591-2.c: New test.
11250         * testsuite/libgomp.c/pr39591-3.c: New test.
11251
11252 2009-03-25  Uros Bizjak  <ubizjak@gmail.com>
11253
11254         * testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
11255         * testsuite/libgomp.c/atomic-6.c: Ditto.
11256
11257 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
11258
11259         PR c/39495
11260         * testsuite/libgomp.c/loop-12.c: New test.
11261         * testsuite/libgomp.c/loop-11.c: New test.
11262         * testsuite/libgomp.c++/loop-11.C: New test.
11263         * testsuite/libgomp.c++/loop-12.C: New test.
11264         * testsuite/libgomp.c++/for-8.C: New test.
11265
11266 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11267
11268         * configure: Regenerate.
11269
11270 2009-02-11  Jakub Jelinek  <jakub@redhat.com>
11271
11272         PR middle-end/39154
11273         * testsuite/libgomp.c/pr39154.c: New test.
11274
11275 2009-01-30  Ian Lance Taylor  <iant@google.com>
11276
11277         * acinclude.m4 (LIBCOMP_CHECK_LINKER_FEATURES): Set
11278         libgomp_ld_is_gold.  Get gold version number.
11279         (LIBGOMP_ENABLE_SYMVERS): Gold always support symbol versioning.
11280         * configure: Rebuild.
11281
11282 2009-01-19  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
11283
11284         * testsuite/lib/libgomp.exp: Add -B option for targets that
11285         use libgfortran.a%s in their specs.
11286
11287 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
11288
11289         PR libgomp/38086
11290         * acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check.
11291         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if
11292         HAVE_AS_SYMVER_DIRECTIVE is not defined.
11293         * configure: Regenerated.
11294         * config.h.in: Likewise.
11295
11296 2008-12-28  Jakub Jelinek  <jakub@redhat.com>
11297
11298         PR c++/38650
11299         * testsuite/libgomp.c/pr38650.c: New test.
11300         * testsuite/libgomp.c++/pr38650.C: New test.
11301
11302 2008-12-27  Jakub Jelinek  <jakub@redhat.com>
11303
11304         * testsuite/libgomp.c/collapse-1.c (main): Add private(k) clause.
11305
11306 2008-12-26  Uros Bizjak  <ubizjak@gmail.com>
11307
11308         * testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.
11309
11310 2008-12-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11311
11312         * configure: Regenerate.
11313
11314 2008-12-08  Jakub Jelinek  <jakub@redhat.com>
11315
11316         PR middle-end/36802
11317         * testsuite/libgomp.c/pr36802-1.c: New test.
11318         * testsuite/libgomp.c/pr36802-2.c: New test.
11319         * testsuite/libgomp.c/pr36802-3.c: New test.
11320
11321 2008-12-01  Janis Johnson  <janis187@us.ibm.com>
11322
11323         PR libgomp/38270
11324         * config/linux/powerpc/mutex.h: New.
11325
11326 2008-12-01  Jakub Jelinek  <jakub@redhat.com>
11327
11328         PR c++/38257
11329         * testsuite/libgomp.c++/for-7.C: New test.
11330
11331         PR c++/38348
11332         * testsuite/libgomp.c++/for-6.C: New test.
11333
11334 2008-11-26  Janis Johnson  <janis187@us.ibm.com>
11335
11336         PR testsuite/28870
11337         * testsuite/lib/libgomp.exp: Include new timeout library files.
11338         (libgomp_target_compile): Set timeout value from new proc.
11339
11340 2008-11-13  Steve Ellcey  <sje@cup.hp.com>
11341
11342         PR libgomp/37938
11343         * config/linux/ia64/mutex.h: New.
11344
11345 2008-11-04  Tobias Burnus  <burnus@net-b.de>
11346
11347         PR libgomp/37935
11348         * libgomp.texi (Runtime library routines, environment variables):
11349         Update for OpenMP version 3.0.
11350
11351 2008-09-26  Peter O'Gorman  <pogma@thewrittenword.com>
11352             Steve Ellcey  <sje@cup.hp.com>
11353
11354         * configure: Regenerate for new libtool.
11355         * Makefile.in: Ditto.
11356         * testsuite/Makefile.in: Ditto.
11357
11358 2008-09-19  Jakub Jelinek  <jakub@redhat.com>
11359             Andreas Tobler  <a.tobler@schweiz.org>
11360
11361         * config/bsd/proc.c: New file.
11362         * configure.tgt (*-*-darwin*): Use config_path "bsd posix".
11363         * configure.ac: Check for header <sys/sysctl.h>
11364         * configure: Regenerate.
11365         * config.h.in: Likewise.
11366
11367 2008-09-05  Janis Johnson  <janis187@us.ibm.com>
11368
11369         * testsuite/ligbomp.c/c.exp: Unset lang_test_file only if it exists.
11370
11371 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
11372
11373         * Makefile.am (libgomp_la_LDFLAGS): Add -no-undefined.
11374         * Makefile.in: Regenerated.
11375         * testsuite/Makefile.in: Regenerated.
11376
11377 2008-08-21  Nathan Froyd  <froydnj@codesourcery.com>
11378
11379         * testsuite/lib/libgomp.exp (libgomp_init): Only set things that
11380         depend on blddir if blddir exists.
11381         (libgomp_target_compile): Likewise.
11382         * testsuite/libgomp.c++/c++.exp: Likewise.
11383         * testsuite/libgomp.fortran/fortran.exp: Likewise.
11384
11385 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11386
11387         * libgomp.texi: Update to GFDL 1.2.  Update copyright years.
11388         Do not list GPL as Invariant Section.
11389
11390 2008-07-28  Ilie Garbacea  <ilie@mips.com>
11391             Chao-ying Fu  <fu@mips.com>
11392
11393         * configure.tgt: Enable futex for MIPS.
11394         * config/linux/mips/futex.h: New file.
11395
11396 2008-07-16  Jakub Jelinek  <jakub@redhat.com>
11397
11398         * team.c (gomp_team_end): Free team immediately if it has
11399         just one thread.
11400
11401 2008-07-08  David Edelsohn  <edelsohn@gnu.org>
11402
11403         * testsuite/libgomp.c++/c++.exp: Append multilib library path.
11404         * testsuite/libgomp.fortran/fortran.exp: Same.
11405         * testsuite/libgomp.c/c.exp: Same.
11406         * testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
11407         directory to library path first.
11408
11409 2008-06-29  Krister Walfridsson  <krister.walfridsson@gmail.com>
11410
11411         * env.c (parse_stacksize): Add cast to avoid warning.
11412         (parse_spincount): Likewise.
11413
11414 2008-06-27  Jakub Jelinek  <jakub@redhat.com>
11415
11416         * testsuite/libgomp.c/loop-10.c: New test.
11417         * libgomp.c/loop-3.c (main): Add lastprivate clause.
11418         * libgomp.c++/loop-6.C (main): Likewise.
11419
11420         PR debug/36617
11421         * testsuite/libgomp.c/debug-1.c: New test.
11422
11423 2008-06-19  Jakub Jelinek  <jakub@redhat.com>
11424
11425         * testsuite/libgomp.c/nqueens-1.c: New test.
11426
11427         PR c++/36523
11428         * testsuite/libgomp.c++/task-7.C: New function.
11429
11430 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11431
11432         * configure: Regenerate.
11433
11434 2008-06-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
11435
11436         * env.c (initialize_env): Always initialize gomp_remaining_threads_lock
11437         mutex when HAVE_SYNC_BUILTINS isn't defined.
11438
11439 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11440
11441         * libgomp.texi (omp_test_lock): Fix typo.
11442
11443 2008-06-12  Tobias Burnus  <burnus@net-b.de>
11444
11445         * omp_lib.f90.in: Add "implicit none".
11446
11447 2008-06-12  Jakub Jelinek  <jakub@redhat.com>
11448
11449         PR middle-end/36506
11450         * testsuite/libgomp.c/reduction-5.c: New test.
11451
11452 2008-06-11  Jakub Jelinek  <jakub@redhat.com>
11453
11454         * libgomp.h (struct gomp_task): Add in_tied_task field.
11455         * task.c (gomp_init_task): Initialize it.
11456         (GOMP_task): Likewise.  Call gomp_team_barrier_set_task_pending
11457         unconditionally.  Don't call gomp_team_barrier_wake if
11458         current task is implicit or if(0) from implicit and number of
11459         running tasks is equal to nthreads - 1.
11460
11461         PR libgomp/36471
11462         * omp_lib.f90.in (omp_get_ancestor_thread_num_8,
11463         omp_get_team_size_8): Fix pastos.
11464
11465         PR libgomp/36469
11466         * configure.ac: Add AC_CHECK_FUNCS (strtoull).
11467         * configure: Regenerated.
11468         * config.h.in: Regenerated.
11469         * env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
11470         defined.
11471
11472 2008-06-06  Andreas Tobler  <a.tobler@schweiz.org>
11473
11474         PR bootstrap/36452
11475         * loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
11476         (GOMP_loop_ull_dynamic_start): Likewise.
11477         (GOMP_loop_ull_guided_start): Likewise.
11478         (GOMP_loop_ull_ordered_static_start): Likewise.
11479         (GOMP_loop_ull_ordered_dynamic_start): Likewise.
11480         (GOMP_loop_ull_ordered_guided_start): Likewise.
11481
11482 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
11483             Richard Henderson  <rth@redhat.com>
11484             Ulrich Drepper  <drepper@redhat.com>
11485             Jakob Blomer  <jakob.blomer@ira.uka.de>
11486
11487         * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
11488         Substitute also OMP_*LOCK_25*.
11489         * configure: Regenerated.
11490         * config.h.in: Regenerated.
11491         * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
11492         ptrlock.c and task.c.
11493         * Makefile.in: Regenerated.
11494         * testsuite/Makefile.in: Regenerated.
11495         * task.c: New file.
11496         * loop_ull.c: New file.
11497         * iter_ull.c: New file.
11498         * libgomp.h: Include ptrlock.h.
11499         (enum gomp_task_kind): New type.
11500         (struct gomp_team): Add task_lock, task_queue, task_count,
11501         task_running_count, single_count fields.  Add
11502         work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
11503         Remove work_share_lock, generation_mask,
11504         oldest_live_gen, num_live_gen and init_work_shares fields, add
11505         work work_share_list_alloc, work_share_list_free and work_share_chunk
11506         fields.  Change work_shares from pointer to pointers into an array.
11507         Change ordered_release field into gomp_sem_t ** from flexible array
11508         member.  Add implicit_task and initial_work_shares fields.
11509         Move close to the end of the struct.
11510         (struct gomp_team_state): Add single_count, last_work_share,
11511         active_level and level fields, remove work_share_generation.
11512         (gomp_barrier_handle_tasks): New prototype.
11513         (gomp_finish_task): New inline function.
11514         (struct gomp_work_share): Move chunk_size, end, incr into
11515         transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
11516         next_ll fields.  Reshuffle fields.  Add next_alloc,
11517         next_ws, next_free and inline_ordered_team_ids fields, change
11518         ordered_team_ids into pointer from flexible array member.
11519         Add mode field.  Put lock and next into a different cache line
11520         from most of the write-once fields.
11521         (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
11522         gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
11523         gomp_iter_ull_guided_next): New prototypes.
11524         (gomp_new_icv): New prototype.
11525         (struct gomp_thread): Add thread_pool and task fields.
11526         (struct gomp_thread_pool): New type.
11527         (gomp_new_team): New prototype.
11528         (gomp_team_start): Change type of last argument.
11529         (gomp_new_work_share): Removed.
11530         (gomp_init_work_share, gomp_fini_work_share): New prototypes.
11531         (gomp_work_share_init_done): New static inline.
11532         (gomp_throttled_spin_count_var, gomp_available_cpus,
11533         gomp_managed_threads): New extern decls.
11534         (gomp_init_task): New prototype.
11535         (gomp_spin_count_var): New extern var decl.
11536         (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
11537         or no alias support, or if not PIC.
11538         (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
11539         gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
11540         gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
11541         gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
11542         gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
11543         gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
11544         gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
11545         gomp_test_nest_lock_25): New prototypes.
11546         (omp_lock_symver, strong_alias): Define.
11547         (gomp_remaining_threads_count, gomp_remaining_threads_lock): New
11548         decls.
11549         (gomp_end_task): New.
11550         (struct gomp_task_icv, gomp_global_icv): New.
11551         (gomp_thread_limit_var, gomp_max_active_levels_var): New.
11552         (struct gomp_task): New.
11553         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
11554         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
11555         (gomp_icv): New.
11556         (gomp_schedule_type): Reorder enum to match
11557         omp_sched_t.
11558         * team.c (struct gomp_thread_start_data): Add thread_pool and task
11559         fields.
11560         (gomp_thread_start): Add gomp_team_barrier_wait call.
11561         For non-nested case remove clearing of docked thread thr fields.
11562         Use pool fields instead of global gomp_* variables.  Use
11563         gomp_barrier_wait_last when needed.  Initialize ts.active_level.
11564         Create tasks for each member thread.
11565         (free_team): Only destroy team barrier, task_lock here and free it.
11566         (gomp_free_thread): Free last_team if non-NULL.
11567         (gomp_team_end): Call gomp_team_barrier_wait instead of
11568         gomp_barrier_wait.  For nested case call one extra
11569         gomp_barrier_wait.  Move here some destruction from free_team.
11570         Call free_team on pool->last_team if any, rather than freeing
11571         current team.  Destroy work_share_list_free_lock ifndef
11572         HAVE_SYNC_BUILTINS.
11573         (gomp_new_icv): New function.
11574         (gomp_threads, gomp_threads_size, gomp_threads_used,
11575         gomp_threads_dock): Removed.
11576         (gomp_thread_destructor): New variable.
11577         (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
11578         functions.
11579         (gomp_team_start): Create new pool if current thread doesn't have
11580         one.  Use pool fields instead of global gomp_* variables.
11581         Initialize thread_pool field for new threads.  Clear single_count.
11582         Change last argument from ws to team, don't create
11583         new team, set ts.work_share to &team->work_shares[0] and clear
11584         ts.last_work_share.  Don't clear ts.work_share_generation.
11585         If number of threads changed, adjust atomically gomp_managed_threads.
11586         Use gomp_init_task instead of gomp_new_task,
11587         set thr->task to the corresponding implicit_task array entry.
11588         Create tasks for each member thread.  Initialize ts.level.
11589         (initialize_team): Call pthread_key_create on
11590         gomp_thread_destructor.
11591         (team_destructor): New function.
11592         (new_team): Removed.
11593         (gomp_new_team): New function.
11594         (free_team): Free gomp_work_share blocks chained through next_alloc,
11595         instead of freeing work_shares and destroying work_share_lock.
11596         (gomp_team_end): Call gomp_fini_work_share.  If number of threads
11597         changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
11598         * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
11599         of gomp_barrier_wait.
11600         * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
11601         instead of gomp_barrier_wait.  Call gomp_work_share_init_done
11602         if gomp_work_share_start returned true.  Don't unlock ws->lock.
11603         (GOMP_single_copy_end): Call gomp_team_barrier_wait instead
11604         of gomp_barrier_wait.
11605         (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
11606         gomp_work_share_init_done if gomp_work_share_start returned true.
11607         Don't unlock ws->lock.
11608         * work.c: Include stddef.h.
11609         (free_work_share): Use work_share_list_free_lock instead
11610         of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
11611         Call gomp_fini_work_share and then either free ws if orphaned, or
11612         put it into work_share_list_free list of the current team.
11613         (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
11614         functions.
11615         (gomp_work_share_start, gomp_work_share_end,
11616         gomp_work_share_end_nowait): Rewritten.
11617         * omp_lib.f90.in Change some tabs to spaces to prevent warnings.
11618         (openmp_version): Set to 200805.
11619         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
11620         omp_sched_guided, omp_sched_auto): New parameters.
11621         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
11622         omp_set_max_active_levels, omp_get_max_active_levels,
11623         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
11624         omp_get_active_level): New interfaces.
11625         * omp_lib.h.in (openmp_version): Set to 200805.
11626         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
11627         omp_sched_guided, omp_sched_auto): New parameters.
11628         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
11629         omp_set_max_active_levels, omp_get_max_active_levels,
11630         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
11631         omp_get_active_level): New externals.
11632         * loop.c: Include limits.h.
11633         (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
11634         GFS_AUTO.
11635         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
11636         Likewise.  Use gomp_icv.
11637         (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
11638         ts.static_trip here.
11639         (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
11640         gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
11641         (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
11642         gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
11643         don't unlock ws->lock, otherwise lock it.
11644         (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
11645         gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
11646         (gomp_parallel_loop_start): Call gomp_new_team instead of
11647         gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
11648         Adjust gomp_team_start caller.  Pass 0 as second argument to
11649         gomp_resolve_num_threads.
11650         (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
11651         If adding ws->chunk_size nthreads + 1 times after end won't
11652         overflow, set ws->mode to 1.
11653         * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
11654         GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
11655         GOMP_loop_ull_ordered_static_start,
11656         GOMP_loop_ull_ordered_dynamic_start,
11657         GOMP_loop_ull_ordered_guided_start,
11658         GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
11659         GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
11660         GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
11661         GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
11662         GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
11663         prototypes.
11664         * libgomp.map: Export lock routines also @@OMP_2.0.
11665         (GOMP_loop_ordered_dynamic_first,
11666         GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
11667         GOMP_loop_ordered_static_first): Remove.
11668         (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
11669         GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
11670         GOMP_loop_ull_ordered_dynamic_next,
11671         GOMP_loop_ull_ordered_dynamic_start,
11672         GOMP_loop_ull_ordered_guided_next,
11673         GOMP_loop_ull_ordered_guided_start,
11674         GOMP_loop_ull_ordered_runtime_next,
11675         GOMP_loop_ull_ordered_runtime_start,
11676         GOMP_loop_ull_ordered_static_next,
11677         GOMP_loop_ull_ordered_static_start,
11678         GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
11679         GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
11680         GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
11681         (omp_set_schedule, omp_get_schedule,
11682         omp_get_thread_limit, omp_set_max_active_levels,
11683         omp_get_max_active_levels, omp_get_level,
11684         omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
11685         omp_set_schedule_, omp_set_schedule_8_,
11686         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
11687         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
11688         omp_get_max_active_levels_, omp_get_level_,
11689         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
11690         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
11691         New exports @@OMP_3.0.
11692         * omp.h.in (omp_sched_t): New type.
11693         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
11694         omp_set_max_active_levels, omp_get_max_active_levels,
11695         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
11696         omp_get_active_level): New prototypes.
11697         * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
11698         gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
11699         gomp_thread_limit_var, gomp_remaining_threads_count,
11700         gomp_remaining_threads_lock): New variables.
11701         (parse_spincount): New function.
11702         (initialize_env): Call gomp_init_num_threads unconditionally.
11703         Initialize gomp_available_cpus.  Call parse_spincount,
11704         initialize gomp_{,throttled_}spin_count_var
11705         depending on presence and value of OMP_WAIT_POLICY and
11706         GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
11707         Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
11708         OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
11709         for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
11710         gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
11711         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
11712         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
11713         (gomp_global_icv): New.
11714         (parse_schedule): Use it.  Parse "auto".
11715         (omp_set_num_threads): Use gomp_icv.
11716         (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
11717         Likewise.
11718         (omp_get_max_threads): Move from parallel.c.
11719         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
11720         omp_set_max_active_levels, omp_get_max_active_levels): New functions,
11721         add ialias.
11722         (parse_stacksize, parse_wait_policy): New functions.
11723         * fortran.c: Rewrite lock wrappers, if symbol versioning provide
11724         both wrappers for compatibility and new locks.
11725         (omp_set_schedule, omp_get_schedule,
11726         omp_get_thread_limit, omp_set_max_active_levels,
11727         omp_get_max_active_levels, omp_get_level,
11728         omp_get_ancestor_thread_num, omp_get_team_size,
11729         omp_get_active_level): New ialias_redirect.
11730         (omp_set_schedule_, omp_set_schedule_8_,
11731         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
11732         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
11733         omp_get_max_active_levels_, omp_get_level_,
11734         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
11735         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
11736         New functions.
11737         * parallel.c: Include limits.h.
11738         (gomp_resolve_num_threads): Add count argument.  Rewritten.
11739         (GOMP_parallel_start): Call gomp_new_team and pass that as last
11740         argument to gomp_team_start.  Pass 0 as second argument to
11741         gomp_resolve_num_threads.
11742         (GOMP_parallel_end): Decrease gomp_remaining_threads_count
11743         if gomp_thread_limit_var != ULONG_MAX.
11744         (omp_in_parallel): Implement using ts.active_level.
11745         (omp_get_max_threads): Move to env.c.
11746         (omp_get_level, omp_get_ancestor_thread_num,
11747         omp_get_team_size, omp_get_active_level): New functions,
11748         add ialias.
11749         * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
11750         after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
11751         gomp_iter_dynamic_next instead of the _locked variant and don't take
11752         lock around it, otherwise acquire it before calling
11753         gomp_iter_dynamic_next_locked.
11754         (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
11755         gomp_iter_dynamic_next instead of the _locked variant and don't take
11756         lock around it.
11757         (GOMP_parallel_sections_start): Call gomp_new_team instead of
11758         gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
11759         Adjust gomp_team_start caller.  Pass count as second argument to
11760         gomp_resolve_num_threads, don't adjust num_threads after the call.
11761         Use gomp_icv.
11762         * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
11763         ws->chunk_size by incr.
11764         (gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
11765         code.
11766         * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
11767         types.
11768         (omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
11769         (omp_check_defines): Check even the compat defines.
11770         * config/linux/ptrlock.c: New file.
11771         * config/linux/ptrlock.h: New file.
11772         * config/linux/wait.h: New file.
11773         * config/posix/ptrlock.c: New file.
11774         * config/posix/ptrlock.h: New file.
11775         * config/linux/bar.h (gomp_team_barrier_wait,
11776         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
11777         (gomp_team_barrier_set_task_pending,
11778         gomp_team_barrier_clear_task_pending,
11779         gomp_team_barrier_set_waiting_for_tasks,
11780         gomp_team_barrier_waiting_for_tasks,
11781         gomp_team_barrier_done): New inlines.
11782         (gomp_barrier_t): Rewritten.
11783         (gomp_barrier_state_t): New typedef.
11784         (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
11785         gomp_barrier_wait_start): Rewritten.
11786         (gomp_barrier_wait_end): Change second argument to
11787         gomp_barrier_state_t.
11788         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
11789         inlines.
11790         * config/linux/bar.c: Include wait.h instead of libgomp.h and
11791         futex.h.
11792         (gomp_barrier_wait_end): Rewritten.
11793         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
11794         gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
11795         * config/posix/bar.h (gomp_barrier_t): Add generation field.
11796         (gomp_barrier_state_t): New typedef.
11797         (gomp_team_barrier_wait,
11798         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
11799         (gomp_barrier_wait_start): Or all but low 2 bits from generation
11800         into the return value.  Return gomp_barrier_state_t.
11801         (gomp_team_barrier_set_task_pending,
11802         gomp_team_barrier_clear_task_pending,
11803         gomp_team_barrier_set_waiting_for_tasks,
11804         gomp_team_barrier_waiting_for_tasks,
11805         gomp_team_barrier_done): New inlines.
11806         (gomp_barrier_wait_end): Change second argument to
11807         gomp_barrier_state_t.
11808         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
11809         inlines.
11810         * config/posix/bar.c (gomp_barrier_init): Clear generation field.
11811         (gomp_barrier_wait_end): Change second argument to
11812         gomp_barrier_state_t.
11813         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
11814         gomp_team_barrier_wake): New functions.
11815         * config/linux/mutex.c: Include wait.h instead of libgomp.h and
11816         futex.h.
11817         (gomp_futex_wake, gomp_futex_wait): New variables.
11818         (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
11819         * config/linux/lock.c: Rewrite to make locks task owned,
11820         for backwards compatibility provide the old entrypoints
11821         if symbol versioning.  Include wait.h instead of libgomp.h and
11822         futex.h.
11823         (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
11824         * config/posix95/lock.c: Rewrite to make locks task owned,
11825         for backwards compatibility provide the old entrypoints
11826         if symbol versioning.
11827         * config/posix/lock.c: Rewrite to make locks task owned,
11828         for backwards compatibility provide the old entrypoints
11829         if symbol versioning.
11830         * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
11831         (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
11832         * config/posix/proc.c, config/mingw32/proc.c: Similarly.
11833         * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
11834         (sys_futex0): Return error code.
11835         (futex_wake, futex_wait): If ENOSYS was returned, clear
11836         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
11837         (cpu_relax, atomic_write_barrier): New static inlines.
11838         * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
11839         (futex_wake, futex_wait): If ENOSYS was returned, clear
11840         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
11841         (cpu_relax, atomic_write_barrier): New static inlines.
11842         * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
11843         (sys_futex0): Return error code.
11844         (futex_wake, futex_wait): If ENOSYS was returned, clear
11845         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
11846         (cpu_relax, atomic_write_barrier): New static inlines.
11847         * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
11848         (sys_futex0): Return error code.
11849         (futex_wake, futex_wait): If ENOSYS was returned, clear
11850         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
11851         (cpu_relax, atomic_write_barrier): New static inlines.
11852         * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
11853         (sys_futex0): Return error code.
11854         (futex_wake, futex_wait): If ENOSYS was returned, clear
11855         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
11856         (cpu_relax, atomic_write_barrier): New static inlines.
11857         * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
11858         (sys_futex0): Return error code.
11859         (futex_wake, futex_wait): If ENOSYS was returned, clear
11860         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
11861         (cpu_relax, atomic_write_barrier): New static inlines.
11862         * config/linux/sem.c: Include wait.h instead of libgomp.h and
11863         futex.h.
11864         (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
11865         * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
11866         * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
11867         types.
11868         (omp_nest_lock_t): Change owner into void *, add lock field.
11869         * config/posix95/omp-lock.h: Include semaphore.h.
11870         (omp_lock_25_t, omp_nest_lock_25_t): New types.
11871         (omp_lock_t): Use sem_t instead of mutex if semaphores
11872         aren't broken.
11873         (omp_nest_lock_t): Likewise.  Change owner to void *.
11874         * config/posix/omp-lock.h: Include semaphore.h.
11875         (omp_lock_25_t, omp_nest_lock_25_t): New types.
11876         (omp_lock_t): Use sem_t instead of mutex if semaphores
11877         aren't broken.
11878         (omp_nest_lock_t): Likewise.  Add owner field.
11879
11880 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
11881
11882         * testsuite/libgomp.c/collapse-1.c: New test.
11883         * testsuite/libgomp.c/collapse-2.c: New test.
11884         * testsuite/libgomp.c/collapse-3.c: New test.
11885         * testsuite/libgomp.c/icv-1.c: New test.
11886         * testsuite/libgomp.c/icv-2.c: New test.
11887         * testsuite/libgomp.c/lib-2.c: New test.
11888         * testsuite/libgomp.c/lock-1.c: New test.
11889         * testsuite/libgomp.c/lock-2.c: New test.
11890         * testsuite/libgomp.c/lock-3.c: New test.
11891         * testsuite/libgomp.c/loop-4.c: New test.
11892         * testsuite/libgomp.c/loop-5.c: New test.
11893         * testsuite/libgomp.c/loop-6.c: New test.
11894         * testsuite/libgomp.c/loop-7.c: New test.
11895         * testsuite/libgomp.c/loop-8.c: New test.
11896         * testsuite/libgomp.c/loop-9.c: New test.
11897         * testsuite/libgomp.c/nested-3.c: New test.
11898         * testsuite/libgomp.c/nestedfn-6.c: New test.
11899         * testsuite/libgomp.c/sort-1.c: New test.
11900         * testsuite/libgomp.c/task-1.c: New test.
11901         * testsuite/libgomp.c/task-2.c: New test.
11902         * testsuite/libgomp.c/task-3.c: New test.
11903         * testsuite/libgomp.c/task-4.c: New test.
11904         * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
11905         to C++ testsuite default compiler options.
11906         * testsuite/libgomp.c++/collapse-1.C: New test.
11907         * testsuite/libgomp.c++/collapse-2.C: New test.
11908         * testsuite/libgomp.c++/ctor-10.C: New test.
11909         * testsuite/libgomp.c++/for-1.C: New test.
11910         * testsuite/libgomp.c++/for-2.C: New test.
11911         * testsuite/libgomp.c++/for-3.C: New test.
11912         * testsuite/libgomp.c++/for-4.C: New test.
11913         * testsuite/libgomp.c++/for-5.C: New test.
11914         * testsuite/libgomp.c++/loop-8.C: New test.
11915         * testsuite/libgomp.c++/loop-9.C: New test.
11916         * testsuite/libgomp.c++/loop-10.C: New test.
11917         * testsuite/libgomp.c++/task-1.C: New test.
11918         * testsuite/libgomp.c++/task-2.C: New test.
11919         * testsuite/libgomp.c++/task-3.C: New test.
11920         * testsuite/libgomp.c++/task-4.C: New test.
11921         * testsuite/libgomp.c++/task-5.C: New test.
11922         * testsuite/libgomp.c++/task-6.C: New test.
11923         * testsuite/libgomp.fortran/allocatable1.f90: New test.
11924         * testsuite/libgomp.fortran/allocatable2.f90: New test.
11925         * testsuite/libgomp.fortran/allocatable3.f90: New test.
11926         * testsuite/libgomp.fortran/allocatable4.f90: New test.
11927         * testsuite/libgomp.fortran/collapse1.f90: New test.
11928         * testsuite/libgomp.fortran/collapse2.f90: New test.
11929         * testsuite/libgomp.fortran/collapse3.f90: New test.
11930         * testsuite/libgomp.fortran/collapse4.f90: New test.
11931         * testsuite/libgomp.fortran/lastprivate1.f90: New test.
11932         * testsuite/libgomp.fortran/lastprivate2.f90: New test.
11933         * testsuite/libgomp.fortran/lib4.f90: New test.
11934         * testsuite/libgomp.fortran/lock-1.f90: New test.
11935         * testsuite/libgomp.fortran/lock-2.f90: New test.
11936         * testsuite/libgomp.fortran/nested1.f90: New test.
11937         * testsuite/libgomp.fortran/nestedfn4.f90: New test.
11938         * testsuite/libgomp.fortran/strassen.f90: New test.
11939         * testsuite/libgomp.fortran/tabs1.f90: New test.
11940         * testsuite/libgomp.fortran/tabs2.f: New test.
11941         * testsuite/libgomp.fortran/task1.f90: New test.
11942         * testsuite/libgomp.fortran/task2.f90: New test.
11943         * testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
11944         * testsuite/libgomp.fortran/vla5.f90: Likewise.
11945         * testsuite/libgomp.c/pr26943-2.c: Likewise.
11946         * testsuite/libgomp.c/pr26943-3.c: Likewise.
11947         * testsuite/libgomp.c/pr26943-4.c: Likewise.
11948
11949 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
11950
11951         PR c++/36308
11952         * testsuite/libgomp.c++/ctor-11.C: New test.
11953         * testsuite/libgomp.c++/ctor-12.C: New test.
11954
11955 2008-05-15  Janis Johnson  <janis187@us.ibm.com>
11956
11957         * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.
11958
11959 2008-05-07  Jakub Jelinek  <jakub@redhat.com>
11960
11961         PR middle-end/36106
11962         * testsuite/libgomp.c/atomic-5.c: New test.
11963         * testsuite/libgomp.c/atomic-6.c: New test.
11964         * testsuite/libgomp.c/autopar-1.c: New test.
11965
11966 2008-04-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11967
11968         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
11969         (LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
11970         (LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
11971         (LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
11972         * configure: Regenerate.
11973         * Makefile.in, testsuite/Makefile.in: Likewise.
11974
11975 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
11976
11977         PR bootstrap/35457
11978         * aclocal.m4: Regenerate.
11979         * configure: Regenerate.
11980
11981 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
11982
11983         PR middle-end/35611
11984         * testsuite/libgomp.c/atomic-4.c: New test.
11985
11986         PR libgomp/35625
11987         * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
11988         (gomp_iter_guided_next): Likewise.
11989         * testsuite/libgomp.c/pr35625.c: New test.
11990
11991 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11992
11993         * aclocal.m4: Regenerate.
11994         * configure: Likewise.
11995         * Makefile.in: Likewise.
11996         * testsuite/Makefile.in: Likewise.
11997
11998 2008-03-13  Jakub Jelinek  <jakub@redhat.com>
11999
12000         PR middle-end/35185
12001         * testsuite/libgomp.c++/pr35185.C: New test.
12002
12003 2008-03-12  Jakub Jelinek  <jakub@redhat.com>
12004
12005         PR middle-end/35549
12006         * testsuite/libgomp.c/pr35549.c: New test.
12007
12008 2008-03-06  Jakub Jelinek  <jakub@redhat.com>
12009
12010         * testsuite/libgomp.c/atomic-3.c: New test.
12011
12012 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12013
12014         PR fortran/33197
12015         * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
12016         .F08 file suffixes.
12017
12018 2008-03-03  Peter O'Gorman  <pogma@thewrittenword.com>
12019
12020         PR libgomp/33131
12021         * configure.ac: Add ACX_HEADER_STRING.
12022         * env.c: Include strings.h.
12023         * aclocal.m4: Regenerate.
12024         * config.h.in: Regenerate.
12025         * configure: Regenerate.
12026         * Makefile.in: Regenerate.
12027         * testsuite/Makefile.in: Regenerate.
12028
12029 2008-02-15  Jakub Jelinek  <jakub@redhat.com>
12030
12031         PR middle-end/35196
12032         * testsuite/libgomp.c/pr35196.c: New test.
12033
12034         PR middle-end/35130
12035         * testsuite/libgomp.fortran/pr35130.f90: New test.
12036         * testsuite/libgomp.c/pr35130.c: New test.
12037
12038 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
12039
12040         PR middle-end/33880
12041         * testsuite/libgomp.c/pr33880.c: New test.
12042         * testsuite/libgomp.fortran/pr33880.f90: New test.
12043
12044 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
12045
12046         * configure: Regenerate.
12047
12048 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
12049
12050         * configure.ac: Move futex checking into ../config/futex.m4.
12051         * configure: Rebuilt.
12052         * aclocal.m4: Rebuilt.
12053         * Makefile.in: Rebuilt.
12054
12055         * configure.tgt: Rename have_tls to gcc_cv_have_tls to match
12056         2007-10-15 ../config/tls.m4 change.
12057
12058 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
12059
12060         PR c++/34513
12061         * testsuite/libgomp.c/pr34513.c: New test.
12062         * testsuite/libgomp.c++/pr34513.C: New test.
12063
12064 2007-12-17  Jack Howarth  <howarth@bromo.med.uc.edu>
12065
12066         PR target/32765
12067         * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
12068
12069 2007-12-04  Jakub Jelinek  <jakub@redhat.com>
12070
12071         * omp.h.in (__GOMP_NOTHROW): Define.  Use it on omp_* prototypes.
12072
12073 2007-12-03  Jakub Jelinek  <jakub@redhat.com>
12074
12075         * testsuite/libgomp.c/private-1.c: New test.
12076
12077 2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>
12078             Paolo Bonzini  <bonzini@gnu.org>
12079
12080         * Makefile.am: Use space as vpath separator.  Use 'vpath %'
12081         instead of 'VPATH ='.
12082         * Makefile.in: Regenerate.
12083
12084 2007-11-23  Matthias Klose  <doko@ubuntu.com>
12085
12086         * configure.ac: Adjust makeinfo version check.
12087         * configure: Regenerate.
12088
12089 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
12090
12091         PR fortran/34020
12092         * testsuite/libgomp.fortran/pr34020.f90: New test.
12093
12094 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
12095
12096         PR c++/33894
12097         * testsuite/libgomp.c++/atomic-1.C: New test.
12098
12099 2007-10-25  Jakub Jelinek  <jakub@redhat.com>
12100
12101         PR libgomp/33275
12102         * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
12103         Make x and y integers rather than (implicit) reals.  Add private (j)
12104         clause to the last omp parallel.
12105
12106 2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
12107
12108         * configure: Regenerate following changes to ../config/tls.m4.
12109
12110 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
12111
12112         * testsuite/libgomp.fortran/stack.f90: New test.
12113
12114 2007-09-10  Danny Smith  <dannysmith@users.sourceforge.net>
12115
12116         * config/mingw32/proc.c: New file.
12117
12118 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
12119
12120         * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
12121         (main): Use __get_cpuid to get i386 target fetaures.
12122         * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
12123         (main): Use __get_cpuid to get x86_64 target fetaures.
12124
12125 2007-08-15  Jack Howarth  <howarth@bromo.med.uc.edu>
12126
12127         PR target/32765
12128         * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
12129         * testsuite/libgomp.fortran/crayptr2.f90: Likwise.
12130
12131 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
12132
12133         PR fortran/32550
12134         * testsuite/libgomp.fortran/pr32550.f90: New test.
12135         * testsuite/libgomp.fortran/crayptr2.f90: New test.
12136
12137 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
12138
12139         * aclocal.m4: Regenerated.
12140
12141 2007-07-05  Tobias Burnus  <burnus@net-b.de>
12142
12143         PR fortran/32359
12144         * testsuite/libgomp.fortran/pr32359.f90: New.
12145
12146 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
12147
12148         PR libgomp/32468
12149         * sections.c (GOMP_parallel_sections_start): Only decrease
12150         number of threads to COUNT if dyn_var is true.
12151         * testsuite/libgomp.c/pr32468.c: New test.
12152
12153 2007-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
12154
12155         PR libgomp/26308
12156         * config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.
12157
12158 2007-06-21  Jakub Jelinek  <jakub@redhat.com>
12159
12160         PR middle-end/32362
12161         * testsuite/libgomp.c/pr32362-1.c: New test.
12162         * testsuite/libgomp.c/pr32362-2.c: New test.
12163         * testsuite/libgomp.c/pr32362-3.c: New test.
12164
12165 2007-06-07  Jakub Jelinek  <jakub@redhat.com>
12166
12167         * team.c (gomp_team_start): Fix setting up thread_attr
12168         stack size.
12169
12170 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
12171
12172         * configure: Regenerate.
12173
12174 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
12175
12176         * Makefile.in: Regenerate.
12177         * configure: Regenerate.
12178         * aclocal.m4: Regenerate.
12179         * testsuite/Makefile.in: Regenerate.
12180
12181 2007-05-04  Jakub Jelinek  <jakub@redhat.com>
12182
12183         * config/linux/proc.c: New file.
12184
12185         PR libgomp/28482
12186         * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
12187
12188 2007-04-19  Daniel Franke  <franke.daniel@gmail.com>
12189
12190         * libgomp.texi (GOMP_CPU_AFFINITY): Updated.
12191
12192 2007-04-16  Matthias Klose  <doko@debian.org>
12193
12194         * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
12195         flags if not building with -m64.
12196         * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
12197         flag for i?86-*-* targets, if current target matches -m64.
12198
12199 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
12200
12201         * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
12202         * Makefile.in: Regenerate.
12203
12204 2007-04-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
12205
12206         PR testsuite/31369
12207         * testsuite/libgomp.c++/c++.exp: Don't use concat when setting
12208         ld_library_path.
12209         * testsuite/libgomp.fortran/fortran.exp: Likewise.
12210
12211 2007-04-04  Jakub Jelinek  <jakub@redhat.com>
12212
12213         * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
12214         decls.
12215         (gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
12216         * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
12217         (parse_affinity): New function.
12218         (initialize_env): Call it and gomp_init_affinity.
12219         * team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
12220         create new pthread_attr_t and call gomp_init_thread_affinity
12221         on it for each thread before passing the attribute to pthread_create.
12222         * config/linux/affinity.c: New file.
12223         * config/posix/affinity.c: New file.
12224         * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
12225         * configure: Rebuilt.
12226         * config.h.in: Rebuilt.
12227         * Makefile.am (libgomp_la_SOURCES): Add affinity.c.
12228         * Makefile.in: Rebuilt.
12229
12230 2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>
12231
12232         * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
12233         *-*-darwin*.
12234         * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
12235         and use it if found.
12236
12237 2007-03-18  Uros Bizjak  <ubizjak@gmail.com>
12238
12239         * testsuite/config/default.exp: New file.
12240         * testsuite/lib/libgomp.exp: New file.
12241         * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
12242         libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
12243         load_lib *, load_gcc_lib *): Move to libgomp.exp.
12244         (libgomp_load): Remove.
12245         * testsuite/lib/libgomp.exp (libgomp_init): Compute
12246         always_ld_library_path, not ld_library_path.  Set additional_flags
12247         to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
12248         (target_compile): Do not call libgomp_init.  Append lang_library_path
12249         and lang_link_flags to options.
12250         * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
12251         ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
12252         here.
12253         * testsuite/libgomp.c++/c++.exp: Set ld_library_path from
12254         always_ld_library_path.  Set LD_LIBRARY_PATH here.
12255         * testsuite/libgomp.fortran/fortran.exp: Ditto.
12256         * testsuite/libgomp.c/atomic-1.c: Set dg-options to
12257         "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
12258         CX8 flag.
12259         * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
12260         lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
12261         * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
12262         * testsuite/libgomp.c/pr29947-1.c: Ditto.
12263         * testsuite/libgomp.c/atomic-10.c: Ditto.
12264
12265 2007-03-21  Jakub Jelinek  <jakub@redhat.com>
12266
12267         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
12268         dg-final cleanup-modules line.
12269         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
12270         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
12271         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
12272         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
12273         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
12274         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
12275         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
12276
12277 2007-03-18  Andreas Schwab  <schwab@suse.de>
12278
12279         * acinclude.m4: Adjust regular expression for ld version
12280         extraction.
12281         * configure: Regenerate.
12282
12283 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
12284
12285         * Makefile.am: Add install-pdf target as copied from
12286         automake v1.10 rules.
12287         * Makefile.in: Regenerate
12288
12289 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
12290
12291         PR libgomp/28486
12292         * configure: Regenerate.
12293
12294         PR c++/30703
12295         * testsuite/libgomp.c++/pr30703.C: New test.
12296
12297 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
12298
12299         Revert:
12300         2006-07-05  Eric Christopher  <echristo@apple.com>
12301         * configure.ac: Depend addition of -pthread on host OS.
12302         * configure: Regenerate.
12303
12304 2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12305
12306         * libgomp.texi: Fix spacing after abbreviations.
12307
12308 2007-01-31  Daniel Franke <franke.daniel@gmail.com>
12309
12310         PR libgomp/30546
12311         * configure.ac: Add check for makeinfo
12312         * Makefile.am: Redefined target libgomp.info, build libgomp.info only
12313         if an appropriate version of makeinfo is found.
12314         * aclocal.m4: Regenerated.
12315         * configure: Regenerated.
12316         * Makefile.in: Regenerated.
12317         * testsuite/Makefile.in: Regenerated.
12318
12319 2007-01-29  Daniel Franke <franke.daniel@gmail.com>
12320
12321         PR libgomp/30540
12322         * libgomp.texi: More about implementation-dependent settings.
12323
12324 2007-01-26  Tobias Burnus  <burnus@net-b.de>
12325
12326         * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
12327
12328 2007-01-24  Jakub Jelinek  <jakub@redhat.com>
12329
12330         PR middle-end/30494
12331         * testsuite/libgomp.c/pr30494.c: New test.
12332
12333 2007-01-15  Tom Tromey  <tromey@redhat.com>
12334
12335         * configure: Rebuilt.
12336         * configure.ac: Fixed comment.
12337
12338 2007-01-14  Daniel Franke  <franke.daniel@gmail.com>
12339
12340         * libgomp.texi: Document implementation specific default values of
12341         environment variables.
12342
12343 2006-12-21  Daniel Franke  <franke.daniel@gmail.com>
12344
12345         PR libgomp/28209
12346         * libgomp.texi: New file.
12347         * configure.ac: Add --enable-generated-files-in-srcdir option.
12348         * Makefile.am: Add info, dvi, pdf, html targets. On request, copy
12349         files to srcdir.
12350         * Makefile.in: Regenerated.
12351         * config.h.in: Regenerated.
12352         * testsuite/Makefile.in: Regenerated.
12353         * NOTES: Removed.
12354
12355 2006-12-04  Daniel Franke  <franke.daniel@gmail.com>
12356
12357         PR libgomp/29949
12358         * env.c (omp_set_num_threads): Set illegal thread count to 1.
12359
12360 2006-12-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
12361
12362         * configure: Regenerate.
12363
12364 2006-12-04  Jakub Jelinek  <jakub@redhat.com>
12365
12366         PR libgomp/29947
12367         * loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
12368         start if there shouldn't be any loop iterations.
12369         (gomp_loop_ordered_static_start): Remove start == end test.
12370         * testsuite/libgomp.c/pr29947-1.c: New test.
12371         * testsuite/libgomp.c/pr29947-2.c: New test.
12372
12373 2006-12-02  Eric Botcazou  <ebotcazou@libertysurf.fr>
12374
12375         * configure.tgt: Force initial-exec TLS model on Linux only.
12376
12377 2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12378
12379         * configure: Regenerated.
12380
12381 2006-11-09  Uros Bizjak  <ubizjak@gmail.com>
12382
12383         * env.c (parse_schedule): Reject out of range values.
12384         (parse_unsigned_long): Reject out of range, negative or zero values.
12385
12386 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
12387
12388         PR fortran/29629
12389         * testsuite/libgomp.fortran/pr29629.f90: New test.
12390
12391 2006-10-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
12392
12393         PR libgomp/29494
12394         * configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
12395         * config/posix95: New directory.
12396         * config/posix95/omp-lock.h: New file.
12397         * config/posix95/lock.c: Likewise.
12398
12399 2006-10-14  Geoffrey Keating  <geoffk@apple.com>
12400
12401         * aclocal.m4: Regenerate.
12402         * configure: Regenerate.
12403
12404 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
12405
12406         * testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
12407         '<' to '<='.
12408
12409 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
12410
12411         * acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from
12412         test.
12413         * configure: Regenerate.
12414         * fortran.c  (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.
12415
12416 2006-09-26  Jakub Jelinek  <jakub@redhat.com>
12417
12418         PR middle-end/25261
12419         PR middle-end/28790
12420         * testsuite/libgomp.c/nestedfn-4.c: New test.
12421         * testsuite/libgomp.c/nestedfn-5.c: New test.
12422         * testsuite/libgomp.fortran/nestedfn3.f90: New test.
12423
12424         PR fortran/29097
12425         * testsuite/libgomp.fortran/condinc1.f: New test.
12426         * testsuite/libgomp.fortran/condinc2.f: New test.
12427         * testsuite/libgomp.fortran/condinc3.f90: New test.
12428         * testsuite/libgomp.fortran/condinc4.f90: New test.
12429         * testsuite/libgomp.fortran/condinc1.inc: New file.
12430
12431 2006-09-18  Tom Tromey  <tromey@redhat.com>
12432
12433         * configure: Rebuilt.
12434
12435 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
12436
12437         PR c/28768
12438         PR preprocessor/14634
12439         * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
12440         to AC_DEFINE.
12441         * configure: Regenerate.
12442
12443 2006-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
12444
12445         * testsuite/libgomp.fortran/reduction3.f90: Change
12446         -2147483648 to -huge(i)-1 to avoid overflow.
12447         * testsuite/libgomp.fortran/reduction4.f90: Change
12448         Z'ffffffff' to not(0) to avoid overflow.
12449
12450 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
12451
12452         PR libgomp/25938
12453         * Makefile.am (libsubincludedir): New.
12454         (nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
12455         * Makefile.in: Regenerate.
12456
12457 2006-08-17  Jakub Jelinek  <jakub@redhat.com>
12458
12459         PR libgomp/28725
12460         * env.c: Include ctype.h.
12461         (parse_schedule, parse_unsigned_long, parse_boolean): Allow
12462         leading and/or trailing whitespace and compare strings case
12463         insensitively.
12464
12465 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
12466
12467         PR fortran/28390
12468         * testsuite/libgomp.fortran/pr28390.f: New test.
12469
12470 2006-07-05  Eric Christopher  <echristo@apple.com>
12471
12472         * configure.ac: Depend addition of -pthread on host OS.
12473         * configure: Regenerate.
12474
12475 2006-06-21  Jakub Jelinek  <jakub@redhat.com>
12476
12477         * critical.c (GOMP_critical_name_start): Fix *pptr initialization
12478         when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
12479         defined.
12480
12481 2006-06-20  Jakub Jelinek  <jakub@redhat.com>
12482
12483         PR libgomp/26175
12484         PR libgomp/26477
12485         * configure.ac: If neither --enable-linux-futex nor
12486         --disable-linux-futex is passed, determine the default by checking
12487         for compiling and/or running against NPTL.  With --enable-linux-futex,
12488         check if SYS_gettid and SYS_futex are defined.
12489         * configure: Rebuilt.
12490
12491 2006-06-14  Richard Henderson  <rth@redhat.com>
12492
12493         PR libgomp/28008
12494         * env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
12495         undefined.  Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.
12496
12497 2006-06-09  Richard Henderson  <rth@redhat.com>
12498
12499         * env.c (gomp_nthreads_var): Change to unsigned long.
12500         (gomp_run_sched_chunk): Likewise.
12501         (parse_unsigned_long): Rename from parse_num_threads and generalize.
12502         (initialize_env): Initialize gomp_thread_attr.
12503         * libgomp.h (gomp_nthreads_var): Update decl.
12504         (gomp_run_sched_chunk): Likewise.
12505         (gomp_thread_attr): Declare.
12506         * team.c (gomp_thread_attr): Export.
12507         (initialize_team): Don't initialize it.
12508
12509 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
12510
12511         PR fortran/27916
12512         * testsuite/libgomp.fortran/pr27916-1.f90: New test.
12513         * testsuite/libgomp.fortran/pr27916-2.f90: New test.
12514
12515 2006-06-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
12516
12517         * config/mingw32/time.c: New file.
12518         * configure.tgt: Use it.
12519
12520 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
12521
12522         * Makefile.am: Add install-html target. Add install-html to .PHONY
12523         * Makefile.in: Regenerate.
12524
12525 2006-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
12526
12527         PR libgomp/27612
12528         * testsuite/libgomp.c/sections-1.c: Require sync_int_long.
12529         * testsuite/libgomp.c/critical-1.c: Likewise.
12530         * testsuite/libgomp.c/loop-1.c: Likewise.
12531         * testsuite/libgomp.c/loop-2.c: Likewise.
12532         * testsuite/libgomp.c/single-1.c: Likewise.
12533         * testsuite/libgomp.c/ordered-1.c: Likewise.
12534         * testsuite/libgomp.c/ordered-2.c: Likewise.
12535
12536 2006-05-15  Jakub Jelinek  <jakub@redhat.com>
12537
12538         PR middle-end/27416
12539         * libgomp.fortran/pr27416-1.f90: New test.
12540
12541 2006-05-03  Jakub Jelinek  <jakub@redhat.com>
12542
12543         PR fortran/27395
12544         * testsuite/libgomp.fortran/pr27395-1.f90: New test.
12545         * testsuite/libgomp.fortran/pr27395-2.f90: New test.
12546
12547 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
12548
12549         PR c++/26943
12550         * testsuite/libgomp.c/pr26943-1.c: New test.
12551         * testsuite/libgomp.c/pr26943-2.c: New test.
12552         * testsuite/libgomp.c/pr26943-3.c: New test.
12553         * testsuite/libgomp.c/pr26943-4.c: New test.
12554         * testsuite/libgomp.c++/pr27337.C: Remove barrier.
12555         * testsuite/libgomp.c++/pr26943.C: New test.
12556
12557 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
12558
12559         PR middle-end/27337
12560         * testsuite/libgomp.c++/pr27337.C: New test.
12561
12562 2006-04-26  Jakub Jelinek  <jakub@redhat.com>
12563
12564         PR c/26171
12565         * testsuite/libgomp.c/pr26171.c: New test.
12566
12567 2006-04-25  Richard Henderson  <rth@redhat.com>
12568
12569         PR libgomp/25865
12570         * configure.ac: Use GCC_CHECK_TLS.
12571         * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
12572         * Makefile.in, aclocal.m4, configure: Regenerate.
12573
12574 2006-04-10  Matthias Klose  <doko@debian.org>
12575
12576         * testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib
12577         directory names containing underscores.
12578
12579 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
12580
12581         PR c++/26691
12582         * testsuite/libgomp.c++/pr26691.C: New test.
12583
12584 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
12585
12586         * testsuite/libgomp.fortran/retval2.f90: New test.
12587
12588 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
12589
12590         * testsuite/libgomp.c++: New directory.
12591
12592 2006-02-25  Shantonu Sen  <ssen@opendarwin.org>
12593
12594         * config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
12595         * config/posix/sem.c: Implement the above.
12596
12597 2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>
12598
12599         * configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
12600         define HAVE_BROKEN_POSIX_SEMAPHORES.
12601         * configure: Rebuilt.
12602         * config.h.in: Rebuilt.
12603
12604 2006-02-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
12605
12606         PR bootstrap/26161
12607         * configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
12608         for the other pthread check.
12609         * configure: Regenerate.
12610         * config.h.in: Regenerate.
12611
12612 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
12613
12614         PR libgomp/25938
12615         PR libgomp/25984
12616         * Makefile.am (fincludedir): New variable.
12617         (nodist_include_HEADERS): Remove Fortran files.
12618         (nodist_finclude_HEADERS): New variable.
12619         * Makefile.in: Regenerated.
12620
12621 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
12622
12623         * testsuite/libgomp.fortran/vla7.f90: Add -w to options.
12624         Remove tests for returning assumed character length arrays.
12625
12626 2006-02-12  Roger Sayle  <roger@eyesopen.com>
12627             John David Anglin  <dave@hiauly1.hia.nrc.ca>
12628
12629         PR libgomp/25936
12630         * configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
12631
12632 2006-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
12633
12634         * testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
12635
12636 2006-02-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
12637
12638         * testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
12639         part of LD_LIBRARY_PATH manually.
12640
12641 2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>
12642
12643         PR libgomp/25852
12644         * testsuite/lib/libgomp-dg.exp (blddir): Set it in
12645         libgomp_init.
12646
12647 2005-01-25  Paolo Bonzini  <bonzini@gnu.org>
12648
12649         PR libgomp/25884
12650         * Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
12651         * configure.ac (PERL): Don't set.
12652         (gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
12653         (OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
12654         OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
12655         * omp.h.in: Wrap the new configure substitutions with @ characters.
12656         * omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
12657         * aclocal.m4, configure, Makefile.in: Regenerate.
12658         * mkomp_h.pl: Delete.
12659
12660 2005-01-24  Paolo Bonzini  <bonzini@gnu.org>
12661
12662         PR libgomp/25259
12663         * configure.ac: Use GCC_HEADER_STDINT.
12664         * libgomp.h: Include gstdint.h.
12665         * libgomp_f.h.in: Don't include stdint.h or inttypes.h.
12666         * configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.
12667
12668 2006-01-24  Richard Henderson  <rth@redhat.com>
12669
12670         PR libgomp/25942
12671         * configure.ac: Add AM_MAINTAINER_MODE.
12672         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.
12673
12674 2006-01-24  Diego Novillo  <dnovillo@redhat.com>
12675
12676         * Makefile.in: Regenerate.
12677         * testsuite/Makefile.in: Regenerate.
12678         * aclocal.m4: Regenerate.
12679
12680 2006-01-23  Andreas Tobler  <a.tobler@schweiz.ch>
12681
12682         * config/posix/proc.c: Conditional include of sys/loadavg.h for
12683         Solaris.
12684         * configure.ac: Add check for loadavg.h.
12685         (link_gomp): Adjust comment.
12686         * configure: Regenerate.
12687         * config.h.in: Regenerate.
12688
12689 2006-01-21  Steve Ellcey  <sje@cup.hp.com>
12690
12691         PR libgomp/25877
12692         * configure.ac: Remove check for alloca.h.
12693         * configure: Regenerate.
12694         * config.h.in: Regenerate.
12695         * libgomp.h: define gomp_alloca to be __builtin_alloca.
12696         * team.c: Remove use of alloca.h.
12697         Call gomp_alloca instead of alloca.
12698
12699 2006-01-20  Steve Ellcey  <sje@cup.hp.com>
12700
12701         PR libgomp/25877
12702         * team.c: Add include of alloca.h.
12703         * configure.ac: Add check for alloca.h.
12704         * configure: Regenerate.
12705         * config.h.in: Regenerate.
12706
12707 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
12708
12709         PR fortran/25219
12710         * testsuite/libgomp.fortran/pr25219.f90: New test.
12711
12712 2005-12-05  Uros Bizjak  <uros@kss-loka.si>
12713
12714         * testsuite/libgomp.c/pr24455.c, testsuite/libgomp.c/copyin-1.c,
12715         testsuite/libgomp.c/copyin-2.c, testsuite/libgomp.c/copyin-3.c,
12716         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
12717         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
12718         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455.C,
12719         testsuite/libgomp.fortran/threadprivate1.f90,
12720         testsuite/libgomp.fortran/threadprivate2.f90,
12721         testsuite/libgomp.fortran/threadprivate3.f90,
12722         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
12723         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
12724         testsuite/libgomp.fortran/omp_parse3.f90: Change required
12725         effective-target to TLS runtime.
12726
12727         * testsuite/libgomp.fortran/pr25162.f: Require
12728         effective-target TLS runtime.
12729
12730 2005-12-01  Jakub Jelinek  <jakub@redhat.com>
12731
12732         * testsuite/libgomp.fortran/nestedfn2.f90: New test.
12733         * testsuite/libgomp.c/nestedfn-3.c: New test.
12734
12735 2005-11-30  Jakub Jelinek  <jakub@redhat.com>
12736
12737         PR fortran/25162
12738         * testsuite/libgomp.fortran/pr25162.f: New test.
12739
12740 2005-11-28  Jakub Jelinek  <jakub@redhat.com>
12741
12742         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Fall back to
12743         CLOCK_REALTIME if clock_* (CLOCK_MONOTONIC, &ts) call failed.
12744
12745 2005-11-25  Jakub Jelinek  <jakub@redhat.com>
12746
12747         * alloc.c, barrier.c, critical.c, env.c, error.c, fortran.c, iter.c,
12748         libgomp.h, libgomp_f.h.in, libgomp_g.h, loop.c, mkomp_h.pl, omp.h.in,
12749         omp_lib.f90.in, omp_lib.h.in, ordered.c, parallel.c, sections.c,
12750         single.c, team.c, work.c, config/linux/alpha/futex.h,
12751         config/linux/bar.c, config/linux/bar.h, config/linux/ia64/futex.h,
12752         config/linux/lock.c, config/linux/mutex.c, config/linux/mutex.h,
12753         config/linux/powerpc/futex.h, config/linux/s390/futex.h,
12754         config/linux/sem.c, config/linux/sem.h, config/linux/sparc/futex.h,
12755         config/linux/x86/futex.h, config/posix/bar.c, config/posix/bar.h,
12756         config/posix/lock.c, config/posix/mutex.h, config/posix/proc.c,
12757         config/posix/sem.c, config/posix/sem.h, config/posix/time.c: Update
12758         FSF address.
12759
12760 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
12761
12762         * Makefile.am: Move libgomp_f.h from nodist_include_HEADERS
12763         to nodist_noinst_HEADERS.
12764         * Makefile.in: Rebuilt.
12765
12766         * config/posix/omp-lock.h (omp_nest_lock_t): Change into struct,
12767         add integer count field.
12768         * config/posix/lock.c (omp_destroy_nest_lock): Adjust for
12769         omp_nest_lock_t type change.
12770         (omp_init_nest_lock): Likewise.  Initialize count to 0.
12771         (omp_set_nest_lock): Adjust for omp_nest_lock_t type change.
12772         Increment count.
12773         (omp_unset_nest_lock): Adjust for omp_nest_lock_t type change.
12774         Decrement count.
12775         (omp_test_nest_lock): Adjust for omp_nest_lock_t type change.
12776         Increment count if successful and return the new nesting level.
12777         * config/linux/lock.c (omp_test_nest_lock): Return new nesting level.
12778         * omp_lib.f90.in (omp_test_lock): Fix LOCK argument type.
12779         * testsuite/libgomp.c/lib-1.c: New test.
12780         * testsuite/libgomp.fortran/lib1.f90: New test.
12781         * testsuite/libgomp.fortran/lib2.f: New test.
12782         * testsuite/libgomp.fortran/lib3.f: New test.
12783
12784 2005-11-17  Richard Henderson  <rth@redhat.com>
12785
12786         PR 24845
12787         * Makefile.am (nodist_toolexeclib_HEADERS): New.
12788         * configure.ac (link_gomp): New.  Substitute it.
12789         (AC_CONFIG_FILES): Add libgomp.spec.
12790         * libgomp.spec.in: New file.
12791         * Makefile.in, testsuite/Makefile.in, configure: Rebuild.
12792         * testsuite/lib/libgomp-dg.exp: Add -B${blddir}/ to flags.
12793
12794 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
12795
12796         * testsuite/libgomp.fortran/reduction1.f90: Adjust for
12797         reduction(-:var) behaving the same as reduction(+:var).
12798         * testsuite/libgomp.c/reduction-4.c: New test.
12799
12800 2005-11-15  Uros Bizjak  <uros@kss-loka.si>
12801
12802         * testsuite/libgomp.c/pr24455-1.c, testsuite/libgomp.c/pr24455.c,
12803         testsuite/libgomp.c/copyin-1.c, testsuite/libgomp.c/copyin-2.c,
12804         testsuite/libgomp.c/copyin-3.c,
12805         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
12806         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
12807         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455-1.C,
12808         testsuite/libgomp.c++/pr24455.C,
12809         testsuite/libgomp.fortran/threadprivate1.f90,
12810         testsuite/libgomp.fortran/threadprivate2.f90,
12811         testsuite/libgomp.fortran/threadprivate3.f90,
12812         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
12813         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
12814         testsuite/libgomp.fortran/omp_parse3.f90: Require
12815         effective-target TLS.
12816
12817 2005-11-14  Diego Novillo  <dnovillo@redhat.com>
12818
12819         * HEADER: Remove.
12820
12821 2005-11-13  Jakub Jelinek  <jakub@redhat.com>
12822
12823         PR libgomp/24797
12824         * team.c (initialize_team): Pass NULL rather than free as
12825         pthread_key_create destructor.  Initialize thread specific data
12826         pointer in initial thread to a static local variable rather than
12827         malloced memory.
12828
12829 2005-11-11  Uros Bizjak  <uros@kss-loka.si>
12830
12831         * testsuite/lib/libgomp-dg.exp: Locate libgcc.a and append
12832         its location to ld_library_path.
12833
12834 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
12835
12836         * testsuite/libgomp.c/c.exp: Rename from dg.exp.
12837
12838 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
12839
12840         * testsuite/libgomp.c: Rename from libgomp.dg.
12841
12842 2005-11-09  Diego Novillo  <dnovillo@redhat.com>
12843
12844         * testsuite/libgomp.c++/pr24455.C: Add copyin clause for
12845         threadprivate variable 'i'.
12846
12847 2005-11-09  Jakub Jelinek  <jakub@redhat.com>
12848
12849         * config/linux/s390/futex.h: New file.
12850         * configure.tgt: Use it.
12851
12852         * testsuite/libgomp.fortran/omp_parse4.f90: Move n initialization
12853         before the parallel.
12854
12855 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
12856
12857         PR c++/24734
12858         * testsuite/libgomp.c++/master-1.C: New test.
12859
12860 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
12861
12862         * testsuite/libgomp.dg/copyin-3.c: New test.
12863
12864 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
12865
12866         * testsuite/libgomp.fortran/retval1.f90: New test.
12867         * testsuite/libgomp.fortran/vla7.f90: New test.
12868
12869 2005-11-06  Jakub Jelinek  <jakub@redhat.com>
12870
12871         * testsuite/libgomp.fortran/vla2.f90: New test.
12872         * testsuite/libgomp.fortran/vla3.f90: New test.
12873         * testsuite/libgomp.fortran/vla4.f90: New test.
12874         * testsuite/libgomp.fortran/vla5.f90: New test.
12875         * testsuite/libgomp.fortran/vla6.f90: New test.
12876
12877 2005-11-01  Jakub Jelinek  <jakub@redhat.com>
12878
12879         * config/linux/sparc/futex.h: New file.
12880         * configure.tgt: Use it.
12881         * testsuite/lib/libgomp-dg.exp: Use -mcpu=v9 for sparc testing.
12882
12883         * critical.c: Include stdlib.h.
12884         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Avoid warnings about
12885         ignoring return value.
12886         * configure.ac: Don't put -Wc,-pthread into XCFLAGS until after
12887         LIBGOMP_CHECK_SYNC_BUILTINS check.
12888         * configure: Rebuilt.
12889
12890 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
12891
12892         * testsuite/libgomp.fortran/vla1.f90: New test.
12893
12894 2005-10-31  Richard Henderson  <rth@redhat.com>
12895
12896         * testsuite/libgomp.fortran/character2.f90: Fix race condition
12897         setting 's' in different threads.
12898
12899 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
12900
12901         * libgomp.h (attribute_hidden, ialias): Define.
12902         * config/posix/proc.c (omp_get_num_procs): Add ialias.
12903         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Likewise.
12904         * config/posix/lock.c (omp_init_lock, omp_init_nest_lock,
12905         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
12906         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
12907         omp_test_lock, omp_test_nest_lock): Likewise.
12908         * config/linux/lock.c (omp_init_lock, omp_init_nest_lock,
12909         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
12910         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
12911         omp_test_lock, omp_test_nest_lock): Likewise.
12912         * env.c (omp_set_dynamic, omp_set_nested, omp_set_num_threads,
12913         omp_get_dynamic, omp_get_nested): Likewise.
12914         * parallel.c (omp_get_num_threads, omp_get_max_threads,
12915         omp_get_thread_num, omp_in_parallel): Likewise.
12916         * fortran.c (ialias_redirect): Define.
12917         (omp_init_lock, omp_init_nest_lock, omp_destroy_lock,
12918         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock,
12919         omp_unset_lock, omp_unset_nest_lock, omp_test_lock,
12920         omp_test_nest_lock, omp_set_dynamic, omp_set_nested,
12921         omp_set_num_threads, omp_get_dynamic, omp_get_nested,
12922         omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
12923         omp_get_num_threads, omp_get_thread_num, omp_get_wtick,
12924         omp_get_wtime): Add ialias_redirect.
12925
12926 2005-10-30  Jakub Jelinek  <jakub@redhat.com>
12927
12928         * fortran.c: Include stdlib.h.
12929
12930 2005-10-29  Jakub Jelinek  <jakub@redhat.com>
12931
12932         * Makefile.am (env.o, env.lo): Depend on libgomp_f.h.
12933         * Makefile.in: Regenerated.
12934
12935 2005-10-28  Jakub Jelinek  <jakub@redhat.com>
12936
12937         * mkomp_h.pl: Remove all -Wc, option prefixes in $COMPILE.
12938         * libgomp_f.h.in (omp_check_defines): New function.
12939         * env.c: Include libgomp_f.h.
12940         (initialize_env): Call omp_check_defines.
12941
12942         * testsuite/libgomp.dg/copyin-2.c: New test.
12943         * testsuite/libgomp.c++/copyin-2.C: New test.
12944         * testsuite/libgomp.fortran/threadprivate3.f90: New test.
12945
12946         * testsuite/libgomp.fortran/threadprivate2.f90: New test.
12947         * testsuite/libgomp.fortran/sharing2.f90: New test.
12948
12949         * testsuite/libgomp.dg/copyin-1.c: New test.
12950         * testsuite/libgomp.c++/copyin-1.C: New test.
12951
12952 2005-10-26  Jakub Jelinek  <jakub@redhat.com>
12953
12954         * testsuite/libgomp.fortran/crayptr1.f90: New test.
12955
12956         * testsuite/libgomp.fortran/workshare1.f90: New test.
12957
12958         * libgomp.fortran/appendix-a/a.28.5.f90: Change into compile
12959         only test.
12960         * libgomp.fortran/sharing1.f90: New test.
12961
12962 2005-10-24  Jakub Jelinek  <jakub@redhat.com>
12963
12964         PR c++/24502
12965         * testsuite/libgomp.c++/loop-7.C: New test.
12966
12967         * testsuite/libgomp.dg/nestedfn-2.c: New test.
12968
12969         * testsuite/libgomp.dg/nestedfn-1.c: New test.
12970         * testsuite/libgomp.fortran/reduction6.f90: New test.
12971         * testsuite/libgomp.fortran/nestedfn1.f90: New test.
12972
12973 2005-10-23  Richard Henderson  <rth@redhat.com>
12974
12975         * testsuite/libgomp.c++/ctor-1.C: New.
12976         * testsuite/libgomp.c++/ctor-2.C: New.
12977         * testsuite/libgomp.c++/ctor-3.C: New.
12978         * testsuite/libgomp.c++/ctor-4.C: New.
12979         * testsuite/libgomp.c++/ctor-5.C: New.
12980         * testsuite/libgomp.c++/ctor-6.C: New.
12981         * testsuite/libgomp.c++/ctor-7.C: New.
12982         * testsuite/libgomp.c++/ctor-8.C: New.
12983         * testsuite/libgomp.c++/ctor-9.C: New.
12984
12985 2005-10-21  Diego Novillo  <dnovillo@redhat.com>
12986
12987         PR 24455
12988         * testsuite/libgomp.c++/pr24455-1.C: New test.
12989         * testsuite/libgomp.c++/pr24455.C: New test.
12990         * testsuite/libgomp.dg/pr24455-1.c: New test.
12991         * testsuite/libgomp.dg/pr24455.c: New test.
12992
12993 2005-10-20  Richard Henderson  <rth@redhat.com>
12994
12995         * testsuite/libgomp.c++/loop-6.C: New.
12996         * testsuite/libgomp.dg/loop-3.c: New.
12997
12998 2005-10-20  Jakub Jelinek  <jakub@redhat.com>
12999
13000         * testsuite/libgomp.fortran/jacobi.f: Don't make i and j
13001         explicitly private.
13002         * testsuite/libgomp.fortran/omp_parse1.f90 (test_do): Make i
13003         explicitly shared.
13004
13005 2005-10-19  Diego Novillo  <dnovillo@redhat.com>
13006
13007         * testsuite/libgomp.fortran/jacobi.f: New test.
13008
13009 2005-10-19  Richard Henderson  <rth@redhat.com>
13010
13011         * configure.tgt (i?86-linux): Default to with_arch instead of
13012         CFLAGS.  Add -mtune to match target_cpu.
13013         (x86_64-linux): Tune to i686.
13014
13015         * fortran.c (omp_test_nest_lock_): Fix typo.
13016
13017 2005-10-19  Jakub Jelinek  <jakub@redhat.com>
13018
13019         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
13020         gomp_ordered_sync): Do nothing if team->nthreads == 1.
13021         * testsuite/libgomp.dg/ordered-3.c: New test.
13022
13023         * testsuite/libgomp.dg/appendix-a/a.18.1.c: Remove unconditional abort.
13024         Remove volatile keyword.
13025
13026         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Reorder variables
13027         in COMMON block to avoid warnings on 64-bit targets.
13028
13029 2005-10-18  Diego Novillo  <dnovillo@redhat.com>
13030
13031         * testsuite/libgomp.dg/shared-3.c: New test.
13032
13033 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
13034
13035         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: Removed.
13036         * testsuite/libgomp.fortran/reduction5.f90: New test.
13037
13038 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
13039
13040         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Add -ffixed-form to
13041         dg-options.
13042         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.  Enable
13043         flush loop now that __sync_synchronize has proper memory barrier.
13044         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: Fix a typo.
13045         Add -ffixed-form to dg-options.
13046
13047 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
13048
13049         * testsuite/libgomp.fortran/fortran.exp: Also gather tests
13050         from subdirectories.
13051         * testsuite/libgomp.fortran/appendix-a/a.15.1.f90: New test.
13052         * testsuite/libgomp.fortran/appendix-a/a.16.1.f90: New test.
13053         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: New test.
13054         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: New test.
13055         * testsuite/libgomp.fortran/appendix-a/a.2.1.f90: New test.
13056         * testsuite/libgomp.fortran/appendix-a/a.21.1.f90: New test.
13057         * testsuite/libgomp.fortran/appendix-a/a.22.7.f90: New test.
13058         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: New test.
13059         * testsuite/libgomp.fortran/appendix-a/a.26.1.f90: New test.
13060         * testsuite/libgomp.fortran/appendix-a/a.28.1.f90: New test.
13061         * testsuite/libgomp.fortran/appendix-a/a.28.2.f90: New test.
13062         * testsuite/libgomp.fortran/appendix-a/a.28.3.f90: New test.
13063         * testsuite/libgomp.fortran/appendix-a/a.28.4.f90: New test.
13064         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: New test.
13065         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: New test.
13066         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: New test.
13067         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: New test.
13068         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: New test.
13069         * testsuite/libgomp.fortran/appendix-a/a.33.3.f90: New test.
13070         * testsuite/libgomp.fortran/appendix-a/a.38.1.f90: New test.
13071         * testsuite/libgomp.fortran/appendix-a/a.39.1.f90: New test.
13072         * testsuite/libgomp.fortran/appendix-a/a.4.1.f90: New test.
13073         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: New test.
13074         * testsuite/libgomp.fortran/appendix-a/a.5.1.f90: New test.
13075         * testsuite/libgomp.fortran/appendix-a/a10.1.f90: New test.
13076
13077 2005-10-17  Jakub Jelinek  <jakub@redhat.com>
13078
13079         * testsuite/libgomp.dg/dg.exp: Only unset lang_* if
13080         lang_library_path exists.  Use find instead of glob to gather tests.
13081         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: Removed.
13082
13083 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
13084
13085         * testsuite/libgomp.dg/appendix-a/a.15.1.c: New test.
13086         * testsuite/libgomp.dg/appendix-a/a.16.1.c: New test.
13087         * testsuite/libgomp.dg/appendix-a/a.18.1.c: New test.
13088         * testsuite/libgomp.dg/appendix-a/a.19.1.c: New test.
13089         * testsuite/libgomp.dg/appendix-a/a.2.1.c: New test.
13090         * testsuite/libgomp.dg/appendix-a/a.21.1.c: New test.
13091         * testsuite/libgomp.dg/appendix-a/a.26.1.c: New test.
13092         * testsuite/libgomp.dg/appendix-a/a.29.1.c: New test.
13093         * testsuite/libgomp.dg/appendix-a/a.3.1.c: New test.
13094         * testsuite/libgomp.dg/appendix-a/a.39.1.c: New test.
13095         * testsuite/libgomp.dg/appendix-a/a.4.1.c: New test.
13096         * testsuite/libgomp.dg/appendix-a/a.5.1.c: New test.
13097         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: New file.
13098
13099 2005-10-15  Jakub Jelinek  <jakub@redhat.com>
13100
13101         * testsuite/libgomp.dg/vla-1.c: New test.
13102
13103         * testsuite/libgomp.fortran/reference2.f90: New test.
13104
13105         * testsuite/libgomp.fortran/character2.f90: Remove explicit
13106         declaration of omp_get_thread_num.
13107         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.  Add
13108         use omp_lib.
13109
13110         * testsuite/libgomp.fortran/reduction1.f90: New test.
13111         * testsuite/libgomp.fortran/reduction2.f90: New test.
13112         * testsuite/libgomp.fortran/reduction3.f90: New test.
13113         * testsuite/libgomp.fortran/reduction4.f90: New test.
13114
13115 2005-10-13  Richard Henderson  <rth@redhat.com>
13116
13117         * Makefile.am (libgomp_la_SOURCES): Add bar.c.
13118         * Makefile.in: Regenerate.
13119         * barrier.c (GOMP_barrier): Use gomp_barrier_wait.
13120         * libgomp.h: Include bar.h.
13121         (struct gomp_barrier): Remove.
13122         (struct gomp_team): Add barrier.  Replace master_barrier with
13123         master_release.  Replace threads with ordered_release.
13124         (struct gomp_thread): Replace barrier with release.
13125         * ordered.c (gomp_ordered_first): Update for ordered_release change.
13126         (gomp_ordered_last, gomp_ordered_next, gomp_ordered_static_init,
13127         gomp_ordered_static_next, gomp_ordered_sync): Likewise.
13128         * single.c (GOMP_single_copy_start): Use gomp_barrier_wait.
13129         (GOMP_single_copy_end): Likewise.
13130         * team.c (gomp_threads_dock): New.
13131         (gomp_barrier_init, gomp_barrier_destroy): Remove.
13132         (gomp_thread_start): Use gomp_barrier_wait.
13133         (new_team, free_team): Update for gomp_team changes.
13134         (gomp_team_start): Use gomp_barrier_wait and gomp_barrier_reinit.
13135         (gomp_team_end): Use gomp_barrier_wait.
13136         (initialize_team): Update for gomp_thread changes.
13137         * work.c (gomp_work_share_end): Use gomp_barrier_wait_start.
13138         (gomp_work_share_end_nowait): Use atomic ops when available.
13139         * config/linux/bar.c, config/linux/bar.h: New files.
13140         * config/posix/bar.c, config/posix/bar.h: New files.
13141
13142 2005-10-13  Jakub Jelinek  <jakub@redhat.com>
13143
13144         * single.c (GOMP_single_copy_end): Don't segfault if team is NULL.
13145         * testsuite/libgomp.dg/single-2.c: New test.
13146
13147         * testsuite/libgomp.dg/dg.exp (lang_library_path, lang_test_file,
13148         lang_link_flags): Unset, so that they aren't inherited from previously
13149         sourced *.exp.
13150
13151         * testsuite/libgomp.fortran/threadprivate1.f90: New test.
13152
13153 2005-10-12  Richard Henderson  <rth@redhat.com>
13154
13155         * testsuite/lib/libgomp-dg.exp: Set blddir at toplevel.
13156         (libgomp_init): Use lang_test_file, lang_library_path, and
13157         lang_link_flags, set by the subdirectory files.  Add -fopenmp here.
13158
13159         * testsuite/libgomp.fortran/fortran.exp (lang_library_path): New.
13160         (lang_test_file, lang_link_flags): New.
13161         (DEFAULT_FFLAGS, ALWAYS_CFLAGS, multilibs, blddir): Remove.
13162
13163         * testsuite/libgomp.c++/c++.exp, testsuite/libgomp.c++/loop-1.C,
13164         testsuite/libgomp.c++/loop-2.C, testsuite/libgomp.c++/loop-3.C,
13165         testsuite/libgomp.c++/loop-4.C, testsuite/libgomp.c++/nested-1.C,
13166         testsuite/libgomp.c++/parallel-1.C,
13167         testsuite/libgomp.c++/reduction-1.C,
13168         testsuite/libgomp.c++/reduction-2.C,
13169         testsuite/libgomp.c++/reduction-3.C,
13170         testsuite/libgomp.c++/sections-1.C, testsuite/libgomp.c++/shared-1.C,
13171         testsuite/libgomp.c++/shared-2.C, testsuite/libgomp.c++/single-1.C,
13172         testsuite/libgomp.c++/single-2.C, testsuite/libgomp.c++/single-3.C:
13173         New files, largely cribbed from the C testsuite.
13174
13175 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
13176
13177         * testsuite/libgomp.fortran/character1.f90: New test.
13178         * testsuite/libgomp.fortran/character2.f90: New test.
13179
13180         * testsuite/libgomp.dg/nested-1.c: New test.
13181         * testsuite/libgomp.dg/nested-2.c: New test.
13182         * testsuite/libgomp.fortran/do1.f90: New test.
13183         * testsuite/libgomp.fortran/do2.f90: New test.
13184
13185         * testsuite/libgomp.fortran/reference1.f90: New test.
13186
13187 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
13188
13189         * testsuite/libgomp.dg/reduction-1.c: New test.
13190         * testsuite/libgomp.dg/reduction-2.c: New test.
13191         * testsuite/libgomp.dg/reduction-3.c: New test.
13192
13193 2005-10-10  Jakub Jelinek  <jakub@redhat.com>
13194
13195         * testsuite/libgomp.dg/atomic-1.c: New test.
13196         * testsuite/libgomp.dg/atomic-2.c: New test.
13197
13198 2005-10-09  Richard Henderson  <rth@redhat.com>
13199
13200         * critical.c (atomic_lock): New.
13201         (initialize_critical): Initialize it.
13202         (GOMP_atomic_start, GOMP_atomic_end): New.
13203         * libgomp.map: Export them.
13204         * libgomp_g.h: Declare them.
13205
13206         * testsuite/libgomp.dg/atomic-10.c: Move from gcc testsuite.
13207
13208 2005-10-02  Richard Henderson  <rth@redhat.com>
13209
13210         * configure.ac: Move save_CFLAGS hack earlier.  Append -Wall/-Werror
13211         to XCFLAGS instead of CFLAGS.
13212
13213 2005-09-30  Richard Henderson  <rth@redhat.com>
13214
13215         * configure.ac: Determine whether -pthread or -lpthread is needed.
13216         * Makefile.am (libgomp_la_LDFLAGS): Remove explicit -lpthread.
13217         * Makefile.in, configure: Rebuild.
13218
13219 2005-09-28  Richard Henderson  <rth@redhat.com>
13220
13221         * testsuite/libgomp.dg/omp-loop03.c: Fix return code.
13222         * testsuite/libgomp.dg/omp-single-3.c: New test.
13223
13224 2005-09-28  Diego Novillo  <dnovillo@redhat.com>
13225
13226         * testsuite/libgomp.dg/omp-single-2.c: New test.
13227         * testsuite/libgomp.dg/shared-2.c: Fix return code.
13228
13229 2005-09-27  Richard Henderson  <rth@redhat.com>
13230
13231         * testsuite/libgomp.dg/omp-loop03.c: Add initial barrier.
13232         * testsuite/libgomp.dg/omp-parallel-for.c: Specify static schedule.
13233
13234 2005-09-27  Jakub Jelinek  <jakub@redhat.com>
13235
13236         * testsuite/libgomp.dg/omp-loop03.c: New test.
13237
13238 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
13239
13240         * testsuite/libgomp.dg/omp-parallel-for.c: New test.
13241
13242 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
13243
13244         * testsuite/libgomp.dg/omp-single-1.c: New test.
13245         * testsuite/libgomp.dg/shared-1.c: Return 0.
13246         Add prototype for abort.
13247         * testsuite/libgomp.dg/shared-2.c: Likewise.
13248
13249 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
13250
13251         * testsuite/libgomp.fortran/omp_parse3.f90: Fix non-conforming
13252         constructs.
13253
13254 2005-09-26  Diego Novillo  <dnovillo@redhat.com>
13255
13256         * testsuite/libgomp.dg/shared-1.c: New test.
13257         * testsuite/libgomp.dg/shared-2.c: New test.
13258
13259 2005-09-24  Richard Henderson  <rth@redhat.com>
13260
13261         * testsuite/libgomp.dg/omp_workshare3.c: Mark dg-error.
13262
13263 2005-09-24  Richard Henderson  <rth@redhat.com>
13264
13265         * iter.c (gomp_iter_static_next): Round up when computing number
13266         of iterations.  Don't bother distributing a remainder equally.
13267
13268         * testsuite/libgomp.dg/omp-loop01.c (main1): Rename from main.
13269         Don't call srand.  Zero b before testing.
13270         (main): New.
13271
13272 2005-09-24  Jakub Jelinek  <jakub@redhat.com>
13273
13274         * testsuite/libgomp.fortran/omp_atomic1.f90: New test.
13275         * testsuite/libgomp.fortran/omp_atomic2.f90: New test.
13276
13277 2005-09-23  Jakub Jelinek  <jakub@redhat.com>
13278
13279         * testsuite/libgomp.fortran/omp_parse1.f90: Add a test for !$omp do
13280         without !$omp end do, followed immediately by subroutine end.
13281
13282 2005-09-23  Diego Novillo  <dnovillo@redhat.com>
13283
13284         * testsuite/libgomp.dg/omp-parallel-if.c: New test.
13285
13286 2005-09-22  Richard Henderson  <rth@redhat.com>
13287
13288         * critical.c (GOMP_critical_name_start): Change argument to void**.
13289         Reuse the pointer space if the mutex fits.
13290         (GOMP_critical_name_end): Likewise.
13291         (initialize_critical): Don't define if GOMP_MUTEX_INIT_0.
13292         * libgomp_g.h (GOMP_critical_name_start): Update decl.
13293         (GOMP_critical_name_end): Likewise.
13294         * config/linux/mutex.h (GOMP_MUTEX_INIT_0): New.
13295         * config/posix/mutex.h (GOMP_MUTEX_INIT_0): New.
13296
13297 2005-09-20  Richard Henderson  <rth@redhat.com>
13298
13299         * critical.c (GOMP_critical_name_start, GOMP_critical_name_end): New.
13300         (create_lock_lock): New.
13301         (initialize_critical): Initialize it.
13302         * libgomp.map (GOMP_critical_name_start, GOMP_critical_name_end): New.
13303         * libgomp_g.h (GOMP_ordered_start, GOMP_ordered_end): Declare.
13304
13305 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
13306
13307         * testsuite/libgom.dg/omp-loop01.c: Include stdio.h.
13308
13309 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
13310
13311         * testsuite/libgomp.dg/omp-loop01.c: New test.
13312         * testsuite/libgomp.dg/omp-loop02.c: New test.
13313
13314 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
13315
13316         * configure.ac (AC_PROG_FC): Add.
13317         (USE_FORTRAN): New automake conditional.
13318         * configure: Rebuilt.
13319         * Makefile.am (libgomp_la_SOURCES): Add fortran.c.
13320         (nodist_include_HEADERS): Add omp_lib.h, omp_lib.f90 and libgomp_f.h.
13321         If USE_FORTRAN, add also omp_lib.mod and omp_lib_kinds.mod.
13322         Add rules to build them.
13323         * Makefile.in: Rebuilt.
13324         * mkomp_h.pl: Compute and replace also OMP_LOCK_KIND and
13325         OMP_NEST_LOCK_KIND.
13326         * libgomp.map: Add Fortran wrappers.
13327         * libgomp_f.h.in: New file.
13328         * omp_lib.h.in: New file.
13329         * omp_lib.f90.in: New file.
13330         * fortran.c: New file.
13331         * testsuite/lib/libgomp-dg.exp: Load a few more .exp files.
13332         Append libgfortran directory to LD_LIBRARY_PATH if it exists.
13333         Add -Lpath_to_libgfortran and -lgfortran -lgfortranbegin if
13334         libgfortran has been built.
13335         * testsuite/libgomp.fortran/fortran.exp: New file.
13336         * testsuite/libgomp.fortran/omp_cond1.f: New test.
13337         * testsuite/libgomp.fortran/omp_cond2.f: New test.
13338         * testsuite/libgomp.fortran/omp_cond3.F90: New test.
13339         * testsuite/libgomp.fortran/omp_cond4.F90: New test.
13340         * testsuite/libgomp.fortran/omp_hello.f: New test.
13341         * testsuite/libgomp.fortran/omp_orphan.f: New test.
13342         * testsuite/libgomp.fortran/omp_parse1.f90: New test.
13343         * testsuite/libgomp.fortran/omp_parse2.f90: New test.
13344         * testsuite/libgomp.fortran/omp_parse3.f90: New test.
13345         * testsuite/libgomp.fortran/omp_parse4.f90: New test.
13346         * testsuite/libgomp.fortran/omp_reduction.f: New test.
13347         * testsuite/libgomp.fortran/omp_workshare1.f: New test.
13348         * testsuite/libgomp.fortran/omp_workshare2.f: New test.
13349
13350 2005-08-30  Richard Henderson  <rth@redhat.com>
13351
13352         * loop.c (GOMP_loop_static_start): Provide fallback wrapper
13353         function for when aliases are not usable.
13354         (GOMP_loop_dynamic_start, GOMP_loop_guided_start,
13355         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
13356         GOMP_loop_ordered_guided_start, GOMP_loop_static_next,
13357         GOMP_loop_dynamic_next, GOMP_loop_guided_next,
13358         GOMP_loop_ordered_static_next, GOMP_loop_ordered_dynamic_next,
13359         GOMP_loop_ordered_guided_next): Likewise.
13360         * ordered.c (GOMP_ordered_start): Likewise.
13361
13362 2005-08-01  Diego Novillo  <dnovillo@redhat.com>
13363
13364         * testsuite/libgomp.dg/dg.exp: Use -O2 for now.
13365         * testsuite/libgomp.dg/omp_hello.c: Fix return code
13366         * testsuite/libgomp.dg/omp_matvec.c: Likewise.
13367         * testsuite/libgomp.dg/omp_orphan.c: Likewise
13368         * testsuite/libgomp.dg/omp_reduction.c: Likewise
13369         * testsuite/libgomp.dg/omp_workshare1.c: Likewise
13370         * testsuite/libgomp.dg/omp_workshare2.c: Likewise
13371         * testsuite/libgomp.dg/omp_workshare3.c: Likewise
13372         * testsuite/libgomp.dg/omp_workshare4.c: Likewise
13373
13374 2005-07-07  Eric Christopher  <echristo@redhat.com>
13375             Diego Novillo  <dnovillo@redhat.com>
13376
13377         * testsuite/libgomp.dg/dg.exp: Add -fopenmp to DEFAULT_CFLAGS.
13378         * testsuite/libgomp.dg/omp_hello.c: Add standard includes, fix
13379         up code.
13380         * testsuite/libgomp.dg/omp_matvec.c: Ditto.
13381         * testsuite/libgomp.dg/omp_orphan.c: Ditto.
13382         * testsuite/libgomp.dg/omp_reduction.c: Ditto.
13383         * testsuite/libgomp.dg/omp_workshare1.c: Ditto.
13384         * testsuite/libgomp.dg/omp_workshare2.c: Ditto.
13385         * testsuite/libgomp.dg/omp_workshare3.c: Ditto.
13386         * testsuite/libgomp.dg/omp_workshare4.c: Ditto.
13387
13388 2005-06-13  Diego Novillo  <dnovillo@redhat.com>
13389
13390         * TOPLEVEL.patch: Remove.
13391
13392 2005-05-16  Richard Henderson  <rth@redhat.com>
13393
13394         * configure.ac: Test for clock_gettime.
13395         * config.h.in, configure: Rebuild.
13396         * config/posix/time.c: Use recommended TIME_WITH_SYS_TIME pattern.
13397         (omp_get_wtime): Use clock_gettime if available.
13398         (omp_get_wtick): Use clock_getres if available.
13399
13400 2005-05-11  Richard Henderson  <rth@redhat.com>
13401
13402         * config/linux/ia64/futex.h: New file.
13403         * configure.tgt: Use it.
13404
13405         * team.c (gomp_barrier_init, gomp_barrier_destroy): Mark inline.
13406
13407 2005-05-07  Richard Henderson  <rth@redhat.com>
13408
13409         * config/linux/powerpc/futex.h: New file.
13410         * configure.tgt: Use it.
13411
13412         * config/linux/i486/futex.h: Merge ...
13413         * config/linux/x86_64/futex.h: ... into ...
13414         * config/linux/x86/futex.h: ... here.
13415         * configure.tgt: Update to match.
13416
13417 2005-05-06  Richard Henderson  <rth@redhat.com>
13418
13419         * config/linux/alpha/futex.h: Conditionally define SYS_futex.
13420         * config/linux/i486/futex.h: Likewise.
13421         * config/linux/x86_64/futex.h: Likewise.
13422
13423         * config/linux/lock.c: New file.
13424         * config/linux/omp-lock.h: New file.
13425
13426         * critical.c, env.h: Don't include omp.h
13427         * config/posix/lock.c: Include libgomp.h instead of omp.h.
13428         * config/posix/time.c: Likewise.
13429         * config/posix/omp-lock.h: New file.
13430         * libgomp.h: Include omp-lock.h and omp.h.
13431         * Makefile.am (nodist_include_HEADERS): New.
13432         (omp.h): New rule.
13433         * configure.ac (PERL): New.
13434         * mkomp_h.pl: New file.
13435         * omp.h.in: Rename from omp.h; replace omp_lock_t and omp_nest_lock_t
13436         with templates.
13437         * Makefile.in, configure, testsuite/Makefile.in: Rebuild.
13438
13439         * testsuite/lib/libgomp-dg.exp (libgomp_init): Add include into
13440         build directory.  Re-add -march=i486 hack.
13441
13442         * testsuite/lib/libgomp-dg.exp (libgomp_compile_flags): Remove.
13443         (libgomp_link_flags): Remove.
13444         (libgomp_initialized): Remove.
13445         (libgomp_init): Don't protect from reinitialization.  Copy code
13446         from libstdc++ for getting the multilib set correctly.
13447
13448 2005-05-05  Richard Henderson  <rth@redhat.com>
13449
13450         * config/linux/alpha/futex.h: New file.
13451         * configure.tgt (alpha*-*-linux*): Use it.
13452
13453         * config/posix/mutex.c: New file.
13454         * config/posix/sem.c: Use libgomp.h.
13455
13456         * configure.tgt (x86_64-linux): Also test CC for -m32.
13457         * config/linux/x86_64/futex.h (futex_wait): Fix r10 usage.
13458
13459         * testsuite/lib/libgomp-dg.exp (libgomp_link_flags): Add /
13460         after $gccpath.
13461
13462         * Makefile.am (SUBDIRS): New.
13463         (libgomp_la_LDFLAGS): Add -lpthread.
13464         * configure.ac (AM_INIT_AUTOMAKE): Enable dependencies.
13465         * Makefile.in, aclocal.m4, config.h.in, configure: Rebuild.
13466
13467         * libgomp_g.h: New file.
13468         * libgomp.h: Split out all public declarations to libgomp_g.h.
13469         Use pragma GCC visibility instead of ATTRIBUTE_HIDDEN.
13470         * config/linux/mutex.h: Remove ATTRIBUTE_HIDDEN.
13471         * config/linux/sem.h: Likewise.
13472         * config/posix/sem.h: Likewise.
13473
13474         * Makefile.am (AM_LDFLAGS): New.
13475         (libgomp_version_script): Split out from ...
13476         (libgomp_la_LDFLAGS): ... here.
13477         (libgomp_version_info): New.
13478         * acinclude.m4 (LIBGOMP_CHECK_TLS): Use LIBGOMP_ENABLE.
13479         (LIBGOMP_ENABLE): New.
13480         (LIBGOMP_CHECK_LINKER_FEATURES): New.
13481         (LIBGOMP_ENABLE_SYMVERS): New.
13482         * configure.ac (AC_INIT): Version 1.0.
13483         (enable-version-specific-runtime-libs): Use LIBGOMP_ENABLE.
13484         (enable-linux-futex): Likewise.  Rename from enable-futex.
13485         (libtool_VERSION): New.
13486         (LIBGOMP_ENABLE_SYMVERS): Use it.
13487         * configure.tgt: Check with_gnu_ld wrt have_tls optimizations.
13488         * Makefile.in, aclocal.m4, configure: Rebuild.
13489
13490         * config/linux/mutex.c: Include libgomp.h instead of mutex.h.
13491         (gomp_mutex_unlock_slow): Fix typo.
13492         * config/linux/sem.c: Similarly.
13493         (gomp_sem_post_slow): Fix typo.
13494         * config/linux/sem.h (gomp_sem_post_slow): Fix typo.
13495         * config/linux/i486/futex.h: Remove USE_LINUX_SYSENTER code.
13496         [__PIC__] (sys_futex0): Don't use tmp output in asm.
13497
13498         * Makefile.am (AM_CFLAGS): Expand with XCFLAGS.
13499         (libgomp_la_LDFLAGS): Add top_srcdir to path.
13500         * acinclude.m4: Copy libtool.m4 stuff from libgfortran.
13501         * configure.ac: Check for getloadavg.  Substitute XCFLAGS and
13502         XLDFLAGS.  Add XCFLAGS to CFLAGS around LIBGOMP_CHECK_SYNC_BUILTINS.
13503         * configure.tgt: Set XCFLAGS and XLDFLAGS instead of CFLAGS and
13504         LDFLAGS.  Pull enable_futex check to top-level.
13505         * libgomp.h: Fix sem.h and mutex.h includes.  Define ATTRIBUTE_HIDDEN.
13506         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
13507
13508         First attempt at real configury.
13509         * Makefile, config.h: Remove file.
13510         * Makefile.am, Makefile.in: New file.
13511         * acinclude.m4 aclocal.m4: New file.
13512         * configure.ac, configure.tgt, configure: New file.
13513
13514         * config/posix/lock.c: Rename from sys-lock.c.
13515         * config/posix/mutex.h: Rename from sys-mutex.h.
13516         * config/posix/sem.c: Rename from sys-sem.c.
13517         * config/posix/sem.h: Rename from sys-sem.h.
13518         * config/posix/proc.c: Rename from sys-proc.c.
13519         * config/posix/time.c: Rename from sys-proc.c.
13520
13521         * config/linux/mutex.c: New file.
13522         * config/linux/mutex.h: New file.
13523         * config/linux/sem.c: New file.
13524         * config/linux/sem.h: New file.
13525         * config/linux/i486/futex.h: New file.
13526         * config/linux/x86_64/futex.h: New file.
13527
13528 2005-05-04  Richard Henderson  <rth@redhat.com>
13529
13530         * iter.c (gomp_iter_dynamic_next, gomp_iter_guided_next): New.
13531         * libgomp.h: Declare them.
13532         * loop.c (gomp_loop_dynamic_start, gomp_loop_guided_start,
13533         gomp_loop_dynamic_next, gomp_loop_guided_next): Use them.
13534
13535 2005-05-04  Richard Henderson  <rth@redhat.com>
13536
13537         * libgomp-1 code drop
13538
13539 2005-05-04  Richard Henderson  <rth@redhat.com>
13540
13541         * iter.c (gomp_iter_static_next): Return tri-state on 0.
13542         * ordered.c (gomp_ordered_static_next): Remove not_last argument.
13543         * libgomp.h (struct gomp_team_state): Make static_trip unsigned.
13544         (gomp_iter_static_next): Update.
13545         (gomp_ordered_static_next): Update.
13546         * loop.c (gomp_loop_static_start): Update for gomp_iter_static_next.
13547         (gomp_loop_ordered_static_start): Likewise.  Exit early for a
13548         totally empty range.
13549         (gomp_loop_ordered_static_next): Refine test for calling
13550         gomp_ordered_static_next.
13551         * testsuite/ordered-1.c: Add case for more threads than iterations.
13552
13553         * iter.c (gomp_iter_runtime_next_locked): Remove.
13554         * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start,
13555         gomp_loop_guided_start, gomp_loop_ordered_static_start,
13556         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
13557         gomp_loop_static_next, gomp_loop_dynamic_next, gomp_loop_guided_next,
13558         gomp_loop_ordered_static_next, gomp_loop_ordered_dynamic_next,
13559         gomp_loop_ordered_guided_next): Downcase name, make static, add
13560         an external alias with the old name.
13561         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
13562         GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Use a
13563         switch and call one of the above static functions.
13564         * libgomp.h: Update.
13565
13566         * work.c (gomp_work_share_start): Lock the mutex for !first too.
13567         * loop.c (GOMP_loop_static_start, GOMP_loop_dynamic_start,
13568         GOMP_loop_guided_start, GOMP_loop_runtime_start,
13569         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
13570         GOMP_loop_ordered_guided_start): Update to match.
13571         * sections.c (GOMP_sections_start): Likewise.
13572         * single.c (GOMP_single_start, GOMP_single_copy_start): Likewise.
13573
13574         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
13575         gomp_ordered_static_init, gomp_ordered_static_next): Rename s/_loop//.
13576         Use bounds check instead of modulus.
13577         (gomp_ordered_sync): Split out of GOMP_ordered_start.
13578         (gomp_ordered_last): Don't sync with ordered_owner here.
13579         (gomp_ordered_next): Likewise.
13580         (gomp_ordered_static_loop_next): Likewise.
13581         * loop.c, libgomp.h: Update to match.
13582
13583         * libgomp.h (GOMP_barrier): Declare.
13584
13585         * testsuite/barrier-1.c: New file.
13586         * testsuite/critical-1.c: New file.
13587         * testsuite/ordered-2.c: New file.
13588         * testsuite/ordered-1.c: New file.
13589         * testsuite/sections-1.c: New file.
13590         * testsuite/single-1.c: New file.
13591         * testsuite/Makefile (TESTS): Add them.
13592
13593 2005-05-04  Richard Henderson  <rth@redhat.com>
13594
13595         * libgomp.h (struct gomp_work_share): Add ordered_owner.
13596         * loop.c (GOMP_loop_static_start): If not the startup thread,
13597         acquire the mutex to wait for initialization complete.
13598         (GOMP_loop_ordered_static_start): Likewise.
13599         (GOMP_loop_ordered_runtime_start): Likewise.
13600         (GOMP_loop_ordered_static_first): Remove.
13601         (GOMP_loop_ordered_dynamic_first): Remove.
13602         (GOMP_loop_ordered_guided_first): Remove.
13603         (GOMP_loop_ordered_runtime_first): Remove.
13604         * ordered.c (gomp_ordered_loop_first): Post to own release when
13605         we're the first thread.
13606         (gomp_ordered_loop_last): Wait on release if not owner.
13607         (gomp_ordered_loop_next): Likewise.
13608         (gomp_ordered_static_loop_init): New.
13609         (gomp_ordered_static_loop_next): Use ordered_owner.
13610         (GOMP_ordered_start): Likewise.
13611         * work.c (gomp_new_work_share): Initialize ordered_owner.
13612
13613 2005-05-03  Richard Henderson  <rth@redhat.com>
13614
13615         * Makefile (OPT): New.
13616         (CFLAGS): Use it.
13617
13618         * loop.c (GOMP_loop_end, GOMP_loop_end_nowait): New.
13619         * sections.c (GOMP_sections_end, GOMP_sections_end_nowait): New.
13620         * libgomp.h, libgomp.map, NOTES: Update to match.
13621
13622         * team.c (struct gomp_thread_start_data): Remove ts, fn, data.
13623         Add initialized and thr members.
13624         (gomp_thread_start): Pause when initially spawned to wait for
13625         the whole team to be created.
13626         (gomp_team_start): Release team members at the end.
13627
13628         * testsuite/loop-1.c (N): New.  Use it instead of hardcoded 100.
13629         (f_foo_1): Use GOMP_loop_end.
13630         (f_foo_2): Use GOMP_loop_end_nowait.
13631
13632         * testsuite/loop-2.c: New file.
13633         * testsuite/Makefile (TESTS): Add it.
13634
13635 2005-05-03  Richard Henderson  <rth@redhat.com>
13636
13637         * iter.c (gomp_iter_static_next): Fix overflow check typo.
13638         (gomp_iter_dynamic_next_locked): Fix overflow check thinko.
13639         * team.c (new_team): Initialize oldest_live_gen to 1 if no
13640         initial work_share.
13641
13642         * testsuite/Makefile: New file.
13643         * testsuite/loop-1.c: New file.
13644
13645 2005-05-03  Richard Henderson  <rth@redhat.com>
13646
13647         Initial implementation and checkin.
13648 \f
13649 Copyright (C) 2005-2020 Free Software Foundation, Inc.
13650
13651 Copying and distribution of this file, with or without modification,
13652 are permitted in any medium without royalty provided the copyright
13653 notice and this notice are preserved.