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