* oacc-init.c (acc_device_lock): Add explanatory comment.
[official-gcc.git] / libgomp / ChangeLog
blob982e2d3f03355be5dad464e17b93f50055ffb053
1 2015-05-06  Julian Brown  <julian@codesourcery.com>
3         * oacc-init.c (acc_device_lock): Add explanatory comment.
4         (resolve_device): Add comment about locking requirement.
5         (acc_init_1, acc_shutdown_1): Likewise. Add locking around
6         gomp_init_device and gomp_fini_device calls.
7         (acc_get_num_devices, acc_set_device_type, acc_get_device_type)
8         (acc_get_device_num, acc_set_device_num): Add locking around
9         resolve_device and gomp_init_device calls.
11 2015-05-06  Julian Brown  <julian@codesourcery.com>
13         * oacc-init.c (acc_shutdown_1): Call gomp_mutex_unlock for
14         goacc_thread_lock on error paths.
15         * oacc-mem.c (lookup_host): Remove locking from function. Note
16         locking requirement for caller in function comment.
17         (lookup_dev): Likewise.
18         (acc_free, acc_deviceptr, acc_hostptr, acc_is_present)
19         (acc_map_data, acc_unmap_data, present_create_copy, delete_copyout)
20         (update_dev_host, gomp_acc_insert_pointer, gomp_acc_remove_pointer):
21         Add locking.
23 2015-05-05  Thomas Schwinge  <thomas@codesourcery.com>
25         PR testsuite/65205
26         PR libgomp/65993
27         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: In dg-output,
28         don't expect "0x" prefix for "%p" format specifier, don't expect
29         "(nil)" for NULL pointer.
30         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
31         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
32         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
33         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
34         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
35         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
36         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
37         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
38         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
39         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
40         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
41         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
42         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
43         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
44         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
45         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
46         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
47         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
48         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
49         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
50         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
51         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
52         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
53         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
54         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
55         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
56         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
57         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
58         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: More
59         accurately specify what we're looking for.
60         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
61         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
62         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
63         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
64         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
66 2015-04-30  James Norris  <jnorris@codesourcery.com>
68         PR testsuite/65205
69         * testsuite/lib/libgomp.exp
70         (check_effective_target_openacc_host_selected)
71         (check_effective_target_openacc_host_nonshm_selected): New
72         procedures.
73         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Fix misuse of
74         dg-shouldfail.
75         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
76         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
77         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
78         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
79         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
80         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
81         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
82         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
83         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
84         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
85         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
86         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
87         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
88         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
89         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
90         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
91         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
92         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
93         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
94         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
95         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
96         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
97         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
98         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
99         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
100         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
101         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
102         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
103         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
104         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
105         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
106         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
107         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
108         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
109         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
110         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
111         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
112         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
113         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
114         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
115         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
116         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
117         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
119 2015-04-08  Julian Brown  <julian@codesourcery.com>
121         * libgomp.h (target_mem_desc: Remove mem_map field.
122         (acc_dispatch_t): Remove open_device_func, close_device_func,
123         get_device_num_func, set_device_num_func, target_data members.
124         Change create_thread_data_func argument to device number instead of
125         generic pointer.
126         * oacc-async.c (assert.h): Include.
127         (acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
128         (acc_wait_all, acc_wait_all_async): Use current host thread's
129         active device, not base_dev.
130         * oacc-cuda.c (acc_get_current_cuda_device)
131         (acc_get_current_cuda_context, acc_get_cuda_stream)
132         (acc_set_cuda_stream): Likewise.
133         * oacc-host.c (host_dispatch): Don't set open_device_func,
134         close_device_func, get_device_num_func or set_device_num_func.
135         * oacc-init.c (base_dev, init_key): Remove.
136         (cached_base_dev): New.
137         (name_of_acc_device_t): New.
138         (acc_init_1): Initialise default-numbered device, not zeroth.
139         (acc_shutdown_1): Close all devices of a given type.
140         (goacc_destroy_thread): Don't use base_dev.
141         (lazy_open, lazy_init, lazy_init_and_open): Remove.
142         (goacc_attach_host_thread_to_device): New.
143         (acc_init): Reimplement with goacc_attach_host_thread_to_device.
144         (acc_get_num_devices): Don't use base_dev.
145         (acc_set_device_type): Reimplement.
146         (acc_get_device_type): Don't use base_dev.
147         (acc_get_device_num): Tweak logic.
148         (acc_set_device_num): Likewise.
149         (acc_on_device): Use acc_get_device_type.
150         (goacc_runtime_initialize): Initialize cached_base_dev not base_dev.
151         (goacc_lazy_initialize): Reimplement with acc_init and
152         goacc_attach_host_thread_to_device.
153         * oacc-int.h (goacc_thread): Add base_dev field.
154         (base_dev): Remove extern declaration.
155         (goacc_attach_host_thread_to_device): Add prototype.
156         * oacc-mem.c (acc_malloc): Use current thread's device instead of
157         base_dev.
158         (acc_free): Likewise.
159         (acc_memcpy_to_device): Likewise.
160         (acc_memcpy_from_device): Likewise.
161         * oacc-parallel.c (select_acc_device): Remove. Replace calls with
162         goacc_lazy_initialize (throughout).
163         (GOACC_parallel): Use tgt_offset to locate target functions.
164         * target.c (gomp_map_vars): Don't set tgt->mem_map.
165         (gomp_unmap_vars): Use devicep->mem_map pointer not tgt->mem_map.
166         (gomp_load_plugin_for_device): Remove open_device, close_device,
167         get_device_num, set_device_num openacc hook initialisation. Don't set
168         openacc.target_data.
169         * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_open_device)
170         (GOMP_OFFLOAD_openacc_close_device)
171         (GOMP_OFFLOAD_openacc_get_device_num)
172         (GOMP_OFFLOAD_openacc_set_device_num): Remove.
173         (GOMP_OFFLOAD_openacc_create_thread_data): Change (unused) argument
174         to int.
175         * plugin/plugin-nvptx.c (ptx_inited): Remove.
176         (instantiated_devices, ptx_dev_lock): New.
177         (struct ptx_image_data): New.
178         (ptx_devices, ptx_images, ptx_image_lock): New.
179         (fini_streams_for_device): Reorder cuStreamDestroy call.
180         (nvptx_get_num_devices): Remove forward declaration.
181         (nvptx_init): Change return type to bool.
182         (nvptx_fini): Remove.
183         (nvptx_attach_host_thread_to_device): New.
184         (nvptx_open_device): Return struct ptx_device* instead of void*.
185         (nvptx_close_device): Change argument type to struct ptx_device*,
186         return type to void.
187         (nvptx_get_num_devices): Use instantiated_devices not ptx_inited.
188         (kernel_target_data, kernel_host_table): Remove static globals.
189         (GOMP_OFFLOAD_register_image, GOMP_OFFLOAD_get_table): Remove.
190         (GOMP_OFFLOAD_init_device): Reimplement.
191         (GOMP_OFFLOAD_fini_device): Likewise.
192         (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): New.
193         (GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free, GOMP_OFFLOAD_dev2host)
194         (GOMP_OFFLOAD_host2dev): Use ORD argument.
195         (GOMP_OFFLOAD_openacc_open_device)
196         (GOMP_OFFLOAD_openacc_close_device)
197         (GOMP_OFFLOAD_openacc_set_device_num)
198         (GOMP_OFFLOAD_openacc_get_device_num): Remove.
199         (GOMP_OFFLOAD_openacc_create_thread_data): Change argument to int
200         (device number).
202         testsuite/
203         * libgomp.oacc-c-c++-common/lib-9.c: Fix devnum check in test.
205 2015-04-06  Ilya Verbin  <ilya.verbin@intel.com>
207         * libgomp-plugin.h (struct mapping_table): Replace with addr_pair.
208         * libgomp.h (struct gomp_memory_mapping): Remove.
209         (struct target_mem_desc): Change type of mem_map from
210         gomp_memory_mapping * to splay_tree_s *.
211         (struct gomp_device_descr): Remove register_image_func, get_table_func.
212         Add load_image_func, unload_image_func.
213         Change type of mem_map from gomp_memory_mapping to splay_tree_s.
214         Remove offload_regions_registered.
215         (gomp_init_tables): Remove.
216         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
217         to splay_tree_s *.
218         * libgomp.map (GOMP_4.0.1): Add GOMP_offload_unregister.
219         * oacc-host.c (host_dispatch): Do not initialize register_image_func,
220         get_table_func, mem_map.is_initialized, mem_map.splay_tree.root,
221         offload_regions_registered.
222         Initialize load_image_func, unload_image_func, mem_map.root.
223         (goacc_host_init): Do not initialize host_dispatch.mem_map.lock.
224         * oacc-init.c (lazy_open): Don't call gomp_init_tables.
225         (acc_shutdown_1): Use dev's lock and splay_tree instead of mem_map's.
226         * oacc-mem.c (lookup_host): Get gomp_device_descr *dev instead of
227         gomp_memory_mapping *.  Use dev's lock and splay_tree.
228         (lookup_dev): Use dev's lock.
229         (acc_deviceptr): Pass dev to lookup_host instead of mem_map.
230         (acc_is_present): Likewise.
231         (acc_map_data): Likewise.
232         (acc_unmap_data): Likewise.  Use dev's lock.
233         (present_create_copy): Likewise.
234         (delete_copyout): Pass dev to lookup_host instead of mem_map.
235         (update_dev_host): Likewise.
236         (gomp_acc_remove_pointer): Likewise.  Use dev's lock.
237         * oacc-parallel.c (GOACC_parallel): Use dev's lock and splay_tree.
238         * plugin/plugin-host.c (GOMP_OFFLOAD_register_image): Remove.
239         (GOMP_OFFLOAD_get_table): Remove
240         (GOMP_OFFLOAD_load_image): New function.
241         (GOMP_OFFLOAD_unload_image): New function.
242         * target.c (register_lock): New mutex for offload image registration.
243         (num_devices): Do not guard with PLUGIN_SUPPORT.
244         (gomp_realloc_unlock): New static function.
245         (gomp_map_vars_existing): Add device descriptor argument.  Unlock mutex
246         before gomp_fatal.
247         (gomp_map_vars): Use dev's lock and splay_tree instead of mem_map's.
248         Pass devicep to gomp_map_vars_existing.  Unlock mutex before gomp_fatal.
249         (gomp_copy_from_async): Use dev's lock and splay_tree instead of
250         mem_map's.
251         (gomp_unmap_vars): Likewise.
252         (gomp_update): Remove gomp_memory_mapping argument.  Use dev's lock and
253         splay_tree instead of mm's.  Unlock mutex before gomp_fatal.
254         (gomp_offload_image_to_device): New static function.
255         (GOMP_offload_register): Add mutex lock.
256         Call gomp_offload_image_to_device for all initialized devices.
257         Replace gomp_realloc with gomp_realloc_unlock.
258         (GOMP_offload_unregister): New function.
259         (gomp_init_tables): Replace with gomp_init_device.  Replace a call to
260         get_table_func from the plugin with calls to init_device_func and
261         gomp_offload_image_to_device.
262         (gomp_free_memmap): Change type of argument from gomp_memory_mapping *
263         to splay_tree_s *.
264         (GOMP_target): Do not call gomp_init_tables.  Use dev's lock and
265         splay_tree instead of mem_map's.  Unlock mutex before gomp_fatal.
266         (GOMP_target_data): Do not call gomp_init_tables.
267         (GOMP_target_update): Likewise.  Remove argument from gomp_update.
268         (gomp_load_plugin_for_device): Replace register_image and get_table
269         with load_image and unload_image in DLSYM ().
270         (gomp_register_images_for_device): Remove function.
271         (gomp_target_init): Do not initialize current_device.mem_map.*,
272         current_device.offload_regions_registered.
273         Remove call to gomp_register_images_for_device.
274         Do not free offload_images and num_offload_images.
276 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
278         PR fortran/65597
279         * testsuite/libgomp.fortran/pr65597.f90: New test.
281 2015-03-27  Tom de Vries  <tom@codesourcery.com>
283         PR testsuite/65594
284         * testsuite/libgomp.graphite/force-parallel-6.c (abort): Declare.
285         (init, check): New function.
286         (foo): Change return type to void.
287         (main): Call init and check.
289 2015-03-27  Tom de Vries  <tom@codesourcery.com>
291         PR testsuite/65594
292         * testsuite/libgomp.graphite/force-parallel-6.c (M): Define.
293         (foo): Use M for non-inner loops to scale down test-case.
295 2015-03-25  Kai Tietz  <ktietz@redhat.com>
297         PR libgomp/64972
298         * oacc-parallel.c (GOACC_parallel): Use PRIu64 if available.
299         (GOACC_data_start): Likewise.
300         * target.c (gomp_map_vars): Likewise.
302 2015-03-21  John David Anglin  <danglin@gcc.gnu.org>
304         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Don't run on
305         hppa*-*-hpux*.
307 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
309         * testsuite/libgomp.c/target-10.c: New test.
310         * testsuite/libgomp.c++/target-4.C: New test.
312 2015-03-13  Ilya Verbin  <ilya.verbin@intel.com>
314         * testsuite/libgomp.fortran/declare-target-1.f90: New test.
315         * testsuite/libgomp.fortran/declare-target-2.f90: New file.
317 2015-03-13  Sebastian Huber  <sebastian.huber@embedded-brains.de>
319         * configure.tgt (*-*-rtems*): Use local-exec TLS model.
320         * configure.ac (*-*-rtems*): Assume Pthread is supported.
321         (pthread.h): Check for this header file.
322         * configure: Regenerate.
324 2015-02-25  Tom de Vries  <tom@codesourcery.com>
326         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (DO_PRAGMA)
327         (check_reduction_op, check_reduction_macro, max, min):
328         Declare.
329         (test_reductions_int, test_reductions_minmax, test_reductions_bool): New
330         function.
331         (main): Use new functions.
333 2015-02-18  Ilya Tocar  <ilya.tocar@intel.com>
335         * target.c (gomp_load_plugin_for_device): Use const char * instead of
336         char * for variables holding dlerror return values.
337         (DLSYM_OPT): Ditto.
339 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
341         * libgomp-plugin.c (GOMP_PLUGIN_debug): Fix typo.
343 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
344             Cesar Philippidis  <cesar@codesourcery.com>
346         * oacc-ptx.h (GOACC_INTERNAL_PTX): Add GOACC_tid, GOACC_ntid,
347         GOACC_ctaid, and GOACC_nctaid routines.
349 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
351         PR c/64824
352         * testsuite/libgomp.c/atomic-18.c: New test.
353         * testsuite/libgomp.c++/atomic-16.C: New test.
355 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
357         PR c/64824
358         PR c/64868
359         * testsuite/libgomp.c/pr64824.c: New test.
360         * testsuite/libgomp.c/pr64868.c: New test.
361         * testsuite/libgomp.c++/pr64824.C: New test.
362         * testsuite/libgomp.c++/pr64868.C: New test.
364 2015-02-01  David Edelsohn  <dje.gcc@gmail.com>
366         PR libgomp/64635
367         * configure.tgt (*-*-aix*): Use standard posix plugin-suffix.h.
368         Link with -lpthread.
369         * config/aix/plugin-suffix.h: Delete.
371 2015-01-28  Jack Howarth  <howarth.at.gcc@gmail.com>
373         PR libgomp/64635
374         * configure.tgt (*-*-aix*): Use config_path "aix posix".
375         (*-*-darwin*): Use config_path "bsd darwin posix".
376         (*-*-hpux*): Use config_path "hpux posix".
377         * target.c: Add include of plugin-suffix.h and use
378         SONAME_SUFFIX macro.
379         * config/aix/plugin-suffix.h: New file.
380         * config/darwin/plugin-suffix.h: New file.
381         * config/hpux/plugin-suffix.h: New file.
382         * config/posix/plugin-suffix.h: New file.
384 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
386         PR middle-end/64734
387         * libgomp.c/pr64734.c: New test.
389 2015-01-23  Tom de Vries  <tom@codesourcery.com>
391         PR libgomp/64672
392         * testsuite/libgomp.oacc-c-c++-common/abort-5.c: New test.
394 2015-01-23  Tom de Vries  <tom@codesourcery.com>
396         PR libgomp/64707
397         * testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to
398         dg-options.
400 2015-01-19  Thomas Schwinge  <thomas@codesourcery.com>
402         PR libgomp/64625
403         * libgomp_g.h (GOACC_data_start, GOACC_enter_exit_data)
404         (GOACC_parallel, GOACC_update): Remove const_void *offload_table
405         formal parameter.  Update all users.
406         * target.c (GOMP_target, GOMP_target_data, GOMP_target_update):
407         Document unused formal parameter.
409 2015-01-16  Thomas Schwinge  <thomas@codesourcery.com>
411         * oacc-parallel.c: Don't include <alloca.h>.
412         (GOACC_parallel): Use gomp_alloca instead of alloca.
414 2015-01-16  Gerald Pfeifer  <gerald@pfeifer.com>
416         * target.c (num_devices): Guard with PLUGIN_SUPPORT.
418 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
419             James Norris  <jnorris@codesourcery.com>
420             Tom de Vries  <tom@codesourcery.com>
421             Julian Brown  <julian@codesourcery.com>
422             Cesar Philippidis  <cesar@codesourcery.com>
423             Nathan Sidwell  <nathan@codesourcery.com>
424             Tobias Burnus  <burnus@net-b.de>
426         * Makefile.am (search_path): Add $(top_srcdir)/../include.
427         (libgomp_la_SOURCES): Add splay-tree.c, libgomp-plugin.c,
428         oacc-parallel.c, oacc-host.c, oacc-init.c, oacc-mem.c,
429         oacc-async.c, oacc-plugin.c, oacc-cuda.c.
430         [USE_FORTRAN] (libgomp_la_SOURCES): Add openacc.f90.
431         Include $(top_srcdir)/plugin/Makefrag.am.
432         (nodist_libsubinclude_HEADERS): Add openacc.h.
433         [USE_FORTRAN] (nodist_finclude_HEADERS): Add openacc_lib.h,
434         openacc.f90, openacc.mod, openacc_kinds.mod.
435         (omp_lib.mod): Generalize into...
436         (%.mod): ... this new rule.
437         (openacc_kinds.mod, openacc.mod): New rules.
438         * plugin/configfrag.ac: New file.
439         * configure.ac: Move plugin/offloading support into it.  Include
440         it.  Instantiate testsuite/libgomp-test-support.pt.exp.
441         * plugin/Makefrag.am: New file.
442         * testsuite/Makefile.am (OFFLOAD_TARGETS)
443         (OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS): Don't
444         export.
445         (libgomp-test-support.exp): New rule.
446         (all-local): Depend on it.
447         * Makefile.in: Regenerate.
448         * testsuite/Makefile.in: Regenerate.
449         * config.h.in: Likewise.
450         * configure: Likewise.
451         * configure.tgt: Harden shell syntax.
452         * env.c: Include "oacc-int.h".
453         (parse_acc_device_type): New function.
454         (gomp_debug_var, goacc_device_type, goacc_device_num): New
455         variables.
456         (initialize_env): Initialize those.  Call
457         goacc_runtime_initialize.
458         * error.c (gomp_vdebug, gomp_debug, gomp_vfatal): New functions.
459         (gomp_fatal): Call gomp_vfatal.
460         * libgomp.h: Include "libgomp-plugin.h" and <stdarg.h>.
461         (gomp_debug_var, goacc_device_type, goacc_device_num, gomp_vdebug)
462         (gomp_debug, gomp_verror, gomp_vfatal, gomp_init_targets_once)
463         (splay_tree_node, splay_tree, splay_tree_key)
464         (struct target_mem_desc, struct splay_tree_key_s)
465         (struct gomp_memory_mapping, struct acc_dispatch_t)
466         (struct gomp_device_descr, gomp_acc_insert_pointer)
467         (gomp_acc_remove_pointer, target_mem_desc, gomp_copy_from_async)
468         (gomp_unmap_vars, gomp_init_device, gomp_init_tables)
469         (gomp_free_memmap, gomp_fini_device): New declarations.
470         (gomp_vdebug, gomp_debug): New macros.
471         Include "splay-tree.h".
472         * libgomp.map (OACC_2.0): New symbol version.  Use for
473         acc_get_num_devices, acc_get_num_devices_h_, acc_set_device_type,
474         acc_set_device_type_h_, acc_get_device_type,
475         acc_get_device_type_h_, acc_set_device_num, acc_set_device_num_h_,
476         acc_get_device_num, acc_get_device_num_h_, acc_async_test,
477         acc_async_test_h_, acc_async_test_all, acc_async_test_all_h_,
478         acc_wait, acc_wait_h_, acc_wait_async, acc_wait_async_h_,
479         acc_wait_all, acc_wait_all_h_, acc_wait_all_async,
480         acc_wait_all_async_h_, acc_init, acc_init_h_, acc_shutdown,
481         acc_shutdown_h_, acc_on_device, acc_on_device_h_, acc_malloc,
482         acc_free, acc_copyin, acc_copyin_32_h_, acc_copyin_64_h_,
483         acc_copyin_array_h_, acc_present_or_copyin,
484         acc_present_or_copyin_32_h_, acc_present_or_copyin_64_h_,
485         acc_present_or_copyin_array_h_, acc_create, acc_create_32_h_,
486         acc_create_64_h_, acc_create_array_h_, acc_present_or_create,
487         acc_present_or_create_32_h_, acc_present_or_create_64_h_,
488         acc_present_or_create_array_h_, acc_copyout, acc_copyout_32_h_,
489         acc_copyout_64_h_, acc_copyout_array_h_, acc_delete,
490         acc_delete_32_h_, acc_delete_64_h_, acc_delete_array_h_,
491         acc_update_device, acc_update_device_32_h_,
492         acc_update_device_64_h_, acc_update_device_array_h_,
493         acc_update_self, acc_update_self_32_h_, acc_update_self_64_h_,
494         acc_update_self_array_h_, acc_map_data, acc_unmap_data,
495         acc_deviceptr, acc_hostptr, acc_is_present, acc_is_present_32_h_,
496         acc_is_present_64_h_, acc_is_present_array_h_,
497         acc_memcpy_to_device, acc_memcpy_from_device,
498         acc_get_current_cuda_device, acc_get_current_cuda_context,
499         acc_get_cuda_stream, acc_set_cuda_stream.
500         (GOACC_2.0): New symbol version.  Use for GOACC_data_end,
501         GOACC_data_start, GOACC_enter_exit_data, GOACC_parallel,
502         GOACC_update, GOACC_wait, GOACC_get_thread_num,
503         GOACC_get_num_threads.
504         (GOMP_PLUGIN_1.0): New symbol version.  Use for
505         GOMP_PLUGIN_malloc, GOMP_PLUGIN_malloc_cleared,
506         GOMP_PLUGIN_realloc, GOMP_PLUGIN_debug, GOMP_PLUGIN_error,
507         GOMP_PLUGIN_fatal, GOMP_PLUGIN_async_unmap_vars,
508         GOMP_PLUGIN_acc_thread.
509         * libgomp.texi: Update for OpenACC changes, and GOMP_DEBUG
510         environment variable.
511         * libgomp_g.h (GOACC_data_start, GOACC_data_end)
512         (GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait)
513         (GOACC_get_num_threads, GOACC_get_thread_num): New declarations.
514         * splay-tree.h (splay_tree_lookup, splay_tree_insert)
515         (splay_tree_remove): New declarations.
516         (rotate_left, rotate_right, splay_tree_splay, splay_tree_insert)
517         (splay_tree_remove, splay_tree_lookup): Move into...
518         * splay-tree.c: ... this new file.
519         * target.c: Include "oacc-plugin.h", "oacc-int.h", <assert.h>.
520         (splay_tree_node, splay_tree, splay_tree_key)
521         (struct target_mem_desc, struct splay_tree_key_s)
522         (struct gomp_device_descr): Don't declare.
523         (num_devices_openmp): New variable.
524         (gomp_get_num_devices ): Use it.
525         (gomp_init_targets_once): New function.
526         (gomp_get_num_devices ): Use it.
527         (get_kind, gomp_copy_from_async, gomp_free_memmap)
528         (gomp_fini_device, gomp_register_image_for_device): New functions.
529         (gomp_map_vars): Add devaddrs parameter.
530         (gomp_update): Add mm parameter.
531         (gomp_init_device): Move most of it into...
532         (gomp_init_tables): ... this new function.
533         (gomp_register_images_for_device): Remove function.
534         (splay_compare, gomp_map_vars, gomp_unmap_vars, gomp_init_device):
535         Make them hidden instead of static.
536         (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_vars)
537         (gomp_update, gomp_init_device, GOMP_target, GOMP_target_data)
538         (GOMP_target_end_data, GOMP_target_update)
539         (gomp_load_plugin_for_device, gomp_target_init): Update for
540         OpenACC changes.
541         * oacc-async.c: New file.
542         * oacc-cuda.c: Likewise.
543         * oacc-host.c: Likewise.
544         * oacc-init.c: Likewise.
545         * oacc-int.h: Likewise.
546         * oacc-mem.c: Likewise.
547         * oacc-parallel.c: Likewise.
548         * oacc-plugin.c: Likewise.
549         * oacc-plugin.h: Likewise.
550         * oacc-ptx.h: Likewise.
551         * openacc.f90: Likewise.
552         * openacc.h: Likewise.
553         * openacc_lib.h: Likewise.
554         * plugin/plugin-host.c: Likewise.
555         * plugin/plugin-nvptx.c: Likewise.
556         * libgomp-plugin.c: Likewise.
557         * libgomp-plugin.h: Likewise.
558         * libgomp_target.h: Remove file after merging content into the
559         former file.  Update all users.
560         * testsuite/lib/libgomp.exp: Load libgomp-test-support.exp.
561         (offload_targets_s, offload_targets_s_openacc): New variables.
562         (check_effective_target_openacc_nvidia_accel_present)
563         (check_effective_target_openacc_nvidia_accel_selected): New
564         procedures.
565         (libgomp_init): Update for OpenACC changes.
566         * testsuite/libgomp-test-support.exp.in: New file.
567         * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
568         * testsuite/libgomp.oacc-c/c.exp: Likewise.
569         * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
570         * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Likewise.
571         * testsuite/libgomp.oacc-c-c++-common/abort-2.c: Likewise.
572         * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
573         * testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise.
574         * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise.
575         * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
576         * testsuite/libgomp.oacc-c-c++-common/cache-1.c: Likewise.
577         * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Likewise.
578         * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
579         * testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise.
580         * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
581         * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
582         * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise.
583         * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise.
584         * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise.
585         * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise.
586         * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise.
587         * testsuite/libgomp.oacc-c-c++-common/data-1.c: Likewise.
588         * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.
589         * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
590         * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
591         * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
592         * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
593         * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
594         * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
595         * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
596         * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
597         * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
598         * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
599         * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
600         * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Likewise.
601         * testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise.
602         * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
603         * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
604         * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
605         * testsuite/libgomp.oacc-c-c++-common/lib-12.c: Likewise.
606         * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise.
607         * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise.
608         * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise.
609         * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
610         * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
611         * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
612         * testsuite/libgomp.oacc-c-c++-common/lib-19.c: Likewise.
613         * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
614         * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
615         * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
616         * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
617         * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
618         * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise.
619         * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
620         * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
621         * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
622         * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
623         * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
624         * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
625         * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
626         * testsuite/libgomp.oacc-c-c++-common/lib-31.c: Likewise.
627         * testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
628         * testsuite/libgomp.oacc-c-c++-common/lib-33.c: Likewise.
629         * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
630         * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
631         * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
632         * testsuite/libgomp.oacc-c-c++-common/lib-37.c: Likewise.
633         * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Likewise.
634         * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
635         * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
636         * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
637         * testsuite/libgomp.oacc-c-c++-common/lib-41.c: Likewise.
638         * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
639         * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
640         * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
641         * testsuite/libgomp.oacc-c-c++-common/lib-45.c: Likewise.
642         * testsuite/libgomp.oacc-c-c++-common/lib-46.c: Likewise.
643         * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
644         * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
645         * testsuite/libgomp.oacc-c-c++-common/lib-49.c: Likewise.
646         * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Likewise.
647         * testsuite/libgomp.oacc-c-c++-common/lib-50.c: Likewise.
648         * testsuite/libgomp.oacc-c-c++-common/lib-51.c: Likewise.
649         * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
650         * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
651         * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
652         * testsuite/libgomp.oacc-c-c++-common/lib-55.c: Likewise.
653         * testsuite/libgomp.oacc-c-c++-common/lib-56.c: Likewise.
654         * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
655         * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
656         * testsuite/libgomp.oacc-c-c++-common/lib-59.c: Likewise.
657         * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise.
658         * testsuite/libgomp.oacc-c-c++-common/lib-60.c: Likewise.
659         * testsuite/libgomp.oacc-c-c++-common/lib-61.c: Likewise.
660         * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
661         * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
662         * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
663         * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
664         * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Likewise.
665         * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
666         * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
667         * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise.
668         * testsuite/libgomp.oacc-c-c++-common/lib-7.c: Likewise.
669         * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise.
670         * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
671         * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise.
672         * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise.
673         * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise.
674         * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise.
675         * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise.
676         * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
677         * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise.
678         * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise.
679         * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
680         * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise.
681         * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
682         * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
683         * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise.
684         * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.
685         * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise.
686         * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise.
687         * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise.
688         * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise.
689         * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
690         * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise.
691         * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise.
692         * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise.
693         * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.
694         * testsuite/libgomp.oacc-c-c++-common/nested-2.c: Likewise.
695         * testsuite/libgomp.oacc-c-c++-common/offset-1.c: Likewise.
696         * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: Likewise.
697         * testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise.
698         * testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: Likewise.
699         * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
700         * testsuite/libgomp.oacc-c-c++-common/present-2.c: Likewise.
701         * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise.
702         * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
703         * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
704         * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise.
705         * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise.
706         * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c:
707         Likewise.
708         * testsuite/libgomp.oacc-c-c++-common/subr.h: Likewise.
709         * testsuite/libgomp.oacc-c-c++-common/subr.ptx: Likewise.
710         * testsuite/libgomp.oacc-c-c++-common/timer.h: Likewise.
711         * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
712         * testsuite/libgomp.oacc-c-c++-common/update-1.c: Likewise.
713         * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
714         * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise.
715         * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
716         * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
717         * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
718         * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
719         * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
720         * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
721         * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
722         * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
723         * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
724         * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
725         * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
726         * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
727         * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
728         * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
729         * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
730         * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
731         * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise.
732         * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
733         * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise.
734         * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
735         * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
736         * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
737         * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
738         * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
739         * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
740         * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
741         * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
742         * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
743         * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise.
744         * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
745         * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
746         * testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise.
747         * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise.
748         * testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise.
749         * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise.
750         * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise.
751         * testsuite/libgomp.oacc-fortran/map-1.f90: Likewise.
752         * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise.
753         * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
754         * testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise.
755         * testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise.
756         * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise.
757         * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise.
758         * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise.
759         * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise.
760         * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise.
761         * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.
762         * testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise.
763         * testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise.
764         * testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise.
765         * testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise.
766         * testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise.
767         * testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise.
769 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
770             Julian Brown  <julian@codesourcery.com>
771             David Malcolm  <dmalcolm@redhat.com>
773         * configure.ac: Rename libgomp from "GNU OpenMP Runtime Library"
774         to "GNU Offloading and Multi Processing Runtime Library".  Change
775         all users.
776         * configure: Regenerate.
777         * libgomp.texi: Update.
779 2015-01-08  Thomas Schwinge  <thomas@codesourcery.com>
781         * configure.ac [tgt_dir] (offload_additional_lib_paths): Also add
782         "$tgt_dir/lib32".
783         * configure: Regenerate.
785         * testsuite/lib/libgomp.exp (libgomp_init): Correctly match
786         "intelmic" in $offload_targets.
788 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
790         Update copyright years.
792         * libgomp.texi: Bump @copying's copyright year.
794 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
796         * testsuite/lib/libgomp.exp: Load target-utils.exp.
797         Move load of target-supportes.exp earlier.
799 2014-12-10  Ilya Verbin  <ilya.verbin@intel.com>
801         * testsuite/libgomp.c/target-9.c: New test.
803 2014-12-09  Varvara Rainchik  <varvara.rainchik@intel.com>
805         * config.h.in: Regenerate.
806         * configure: Regenerate.
807         * configure.ac: Add GCC_CHECK_EMUTLS.
808         * libgomp.h: Add check for USE_EMUTLS: this case
809         is equal to HAVE_TLS.
810         * team.c: Likewise.
812 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
814         * configure.tgt (x86_64-*-linux*): Tune -m32 multilib to generic.
816 2014-11-28  Andrey Turetskiy  <andrey.turetskiy@intel.com>
817             Ilya Verbin  <ilya.verbin@intel.com>
819         * testsuite/libgomp.c/target-critical-1.c: New test.
821 2014-11-26  Jakub Jelinek  <jakub@redhat.com>
823         * testsuite/libgomp.c/examples-4/e.53.4.c: Add -DITESTITERS=20
824         to dg-options unless expensive testing is on.
825         (TESTITERS): Define to N if not defined.
826         (main): Use TESTITERS instead of N.
827         * testsuite/libgomp.c/examples-4/e.55.1.c: Define CHUNKSZ from
828         dg-additional-options depending on whether expensive testing is on.
829         * testsuite/libgomp.fortran/examples-4/e.55.1.f90 (e_55_1_mod):
830         Decrease N to 100000 and CHUNKSZ to 10000.
832 2014-11-24  Jakub Jelinek  <jakub@redhat.com>
834         PR fortran/63938
835         * testsuite/libgomp.fortran/pr63938-1.f90: New test.
836         * testsuite/libgomp.fortran/pr63938-2.f90: New test.
838 2014-11-21  Steve Ellcey  <sellcey@imgtec.com>
840         * config/linux/mips/futex.h (SYS_futex): Define if not already done.
842 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
844         PR bootstrap/63784
845         * configure: Regenerated.
847 2014-11-19  Uros Bizjak  <ubizjak@gmail.com>
849         * testsuite/libgomp.c/examples-4/e.53.5.c: Require
850         vect_simd_clones effective target.
851         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
853 2014-11-14  Jakub Jelinek  <jakub@redhat.com>
855         * libgomp.c/examples-4/e.54.2.c (main): Use N / 8 instead
856         of 32 as block_size.
857         * libgomp.fortran/examples-4/e.54.2.f90 (e_54_1): Use n / 8
858         instead of 32 as block_size.
860 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
861             Ilya Verbin  <ilya.verbin@intel.com>
863         * Makefile.in: Regenerate.
864         * configure: Regenerate.
865         * configure.ac: Set up offload_additional_options,
866         offload_additional_lib_paths and offload_targets.
867         * testsuite/Makefile.am: Export environment variables: OFFLOAD_TARGETS,
868         OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS.
869         * testsuite/Makefile.in: Regenerate.
870         * testsuite/lib/libgomp.exp (libgomp_init): Append
871         offload_additional_lib_paths to LD_LIBRARY_PATH.  Append
872         offload_additional_options to ALWAYS_CFLAGS.  Append liboffloadmic
873         build directory to LD_LIBRARY_PATH for intelmic offload targets.
875 2014-11-13  Andrey Turetskiy  <andrey.turetskiy@intel.com>
876             Ilya Verbin  <ilya.verbin@intel.com>
877             Kirill Yukhin  <kirill.yukhin@intel.com>
878             Ilya Tocar  <ilya.tocar@intel.com>
880         * testsuite/lib/libgomp.exp
881         (check_effective_target_offload_device): New.
882         * testsuite/libgomp.c++/c++.exp: Include tests from subdirectories.
883         * testsuite/libgomp.c++/examples-4/e.51.5.C: New test.
884         * testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto.
885         * testsuite/libgomp.c/examples-4/e.50.1.c: Ditto.
886         * testsuite/libgomp.c/examples-4/e.50.2.c: Ditto.
887         * testsuite/libgomp.c/examples-4/e.50.3.c: Ditto.
888         * testsuite/libgomp.c/examples-4/e.50.4.c: Ditto.
889         * testsuite/libgomp.c/examples-4/e.50.5.c: Ditto.
890         * testsuite/libgomp.c/examples-4/e.51.1.c: Ditto.
891         * testsuite/libgomp.c/examples-4/e.51.2.c: Ditto.
892         * testsuite/libgomp.c/examples-4/e.51.3.c: Ditto.
893         * testsuite/libgomp.c/examples-4/e.51.4.c: Ditto.
894         * testsuite/libgomp.c/examples-4/e.51.6.c: Ditto.
895         * testsuite/libgomp.c/examples-4/e.51.7.c: Ditto.
896         * testsuite/libgomp.c/examples-4/e.52.1.c: Ditto.
897         * testsuite/libgomp.c/examples-4/e.52.2.c: Ditto.
898         * testsuite/libgomp.c/examples-4/e.53.1.c: Ditto.
899         * testsuite/libgomp.c/examples-4/e.53.3.c: Ditto.
900         * testsuite/libgomp.c/examples-4/e.53.4.c: Ditto.
901         * testsuite/libgomp.c/examples-4/e.53.5.c: Ditto.
902         * testsuite/libgomp.c/examples-4/e.54.2.c: Ditto.
903         * testsuite/libgomp.c/examples-4/e.54.3.c: Ditto.
904         * testsuite/libgomp.c/examples-4/e.54.4.c: Ditto.
905         * testsuite/libgomp.c/examples-4/e.54.5.c: Ditto.
906         * testsuite/libgomp.c/examples-4/e.54.6.c: Ditto.
907         * testsuite/libgomp.c/examples-4/e.55.1.c: Ditto.
908         * testsuite/libgomp.c/examples-4/e.55.2.c: Ditto.
909         * testsuite/libgomp.c/examples-4/e.56.3.c: Ditto.
910         * testsuite/libgomp.c/examples-4/e.56.4.c: Ditto.
911         * testsuite/libgomp.c/examples-4/e.57.1.c: Ditto.
912         * testsuite/libgomp.c/examples-4/e.57.2.c: Ditto.
913         * testsuite/libgomp.c/examples-4/e.57.3.c: Ditto.
914         * testsuite/libgomp.c/target-7.c: Fix test.
915         * testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test.
916         * testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto.
917         * testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto.
918         * testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto.
919         * testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto.
920         * testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto.
921         * testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto.
922         * testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto.
923         * testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto.
924         * testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto.
925         * testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto.
926         * testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto.
927         * testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto.
928         * testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto.
929         * testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto.
930         * testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto.
931         * testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto.
932         * testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto.
933         * testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
934         * testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto.
935         * testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto.
936         * testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto.
937         * testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto.
938         * testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto.
939         * testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto.
940         * testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto.
941         * testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto.
942         * testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto.
943         * testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto.
944         * testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto.
945         * testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto.
947 2014-11-13  Jakub Jelinek  <jakub@redhat.com>
948             Ilya Verbin  <ilya.verbin@intel.com>
949             Thomas Schwinge  <thomas@codesourcery.com>
950             Andrey Turetskiy  <andrey.turetskiy@intel.com>
952         * libgomp.map (GOMP_4.0.1): New symbol version.
953         Add GOMP_offload_register.
954         * libgomp_target.h: New file.
955         * splay-tree.h: New file.
956         * target.c: Include config.h, libgomp_target.h, dlfcn.h, splay-tree.h.
957         (gomp_target_init): New forward declaration.
958         (gomp_is_initialized): New static variable.
959         (splay_tree_node, splay_tree, splay_tree_key): New typedefs.
960         (struct target_mem_desc, struct splay_tree_key_s, offload_image_descr):
961         New structures.
962         (offload_images, num_offload_images, devices, num_devices): New static
963         variables.
964         (splay_compare): New static function.
965         (struct gomp_device_descr): New structure.
966         (gomp_get_num_devices): Call gomp_target_init.
967         (resolve_device, gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt)
968         (gomp_unmap_vars, gomp_update, gomp_init_device): New static functions.
969         (GOMP_offload_register): New function.
970         (GOMP_target): Arrange for host callback to be performed in a separate
971         initial thread and contention group, inheriting ICVs from
972         gomp_global_icv etc.  Call gomp_map_vars and gomp_unmap_vars.
973         Add device initialization and lookup for target function in splay tree.
974         (GOMP_target_data): Add device initialization and call gomp_map_vars.
975         (GOMP_target_end_data): Call gomp_unmap_vars.
976         (GOMP_target_update): Add device initialization and call gomp_update.
977         (gomp_load_plugin_for_device, gomp_register_images_for_device)
978         (gomp_target_init): New static functions.
980 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
981             Thomas Schwinge  <thomas@codesourcery.com>
982             Ilya Verbin  <ilya.verbin@intel.com>
983             Andrey Turetskiy  <andrey.turetskiy@intel.com>
985         * config.h.in: Regenerate.
986         * configure: Regenerate.
987         * configure.ac: Check for libdl, required for plugin support.
988         (PLUGIN_SUPPORT): Define if plugins are supported.
989         (enable_offload_targets): Support Intel MIC targets.
990         (OFFLOAD_TARGETS): List of target names suitable for offloading.
992 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
994         PR target/63610
995         * configure: Regenerate.
997 2014-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
999         * config/posix/lock.c (_XOPEN_SOURCE) Define as 600.
1001 2014-10-06  Marek Polacek  <polacek@redhat.com>
1003         * testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
1004         * testsuite/libgomp.c/nqueens-1.c: Include <stdlib.h>.
1005         * testsuite/libgomp.c/thread-limit-1.c: Include <omp.h>
1006         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
1008 2014-10-06  Marek Polacek  <polacek@redhat.com>
1010         * testsuite/libgomp.c/affinity-1.c: Fix implicit declarations.
1011         * testsuite/libgomp.c/nqueens-1.c: Likewise.
1012         * testsuite/libgomp.c/pr26943-3.c: Likewise.
1013         * testsuite/libgomp.c/pr26943-4.c: Likewise.
1014         * testsuite/libgomp.c/pr36802-2.c: Likewise.
1015         * testsuite/libgomp.c/pr36802-3.c: Likewise.
1016         * testsuite/libgomp.c/thread-limit-1.c: Likewise.
1017         * testsuite/libgomp.c/thread-limit-2.c: Likewise.
1018         * testsuite/libgomp.c/appendix-a/a.15.1.c: Include <omp.h>.
1019         * testsuite/libgomp.c/omp-loop02.c: Fix defaulting to int.
1020         * testsuite/libgomp.c/omp-parallel-for.c: Likewise.
1021         * testsuite/libgomp.c/omp-parallel-if.c: Likewise.
1022         * testsuite/libgomp.c/omp-single-1.c: Likewise.
1023         * testsuite/libgomp.c/omp-single-2.c: Likewise.
1024         * testsuite/libgomp.c/omp_matvec.c: Likewise.
1025         * testsuite/libgomp.c/omp_workshare3.c: Likewise.
1026         * testsuite/libgomp.c/omp_workshare4.c: Likewise.
1027         * testsuite/libgomp.c/shared-1.c: Fix defaulting to int.  Fix implicit
1028         declarations.
1030 2014-10-03  Jakub Jelinek  <jakub@redhat.com>
1032         PR libgomp/61200
1033         * testsuite/libgomp.c/pr61200.c: New test.
1035 2014-09-18  Jakub Jelinek  <jakub@redhat.com>
1037         PR c++/63248
1038         * testsuite/libgomp.c++/pr63248.C: New test.
1040 2014-08-04  Jakub Jelinek  <jakub@redhat.com>
1042         * task.c (GOMP_taskgroup_end): If taskgroup->num_children
1043         is not zero, but taskgroup->children is NULL and there are
1044         any task->children, schedule those instead of waiting.
1045         * testsuite/libgomp.c/depend-6.c: New test.
1046         * testsuite/libgomp.c/depend-7.c: New test.
1047         * testsuite/libgomp.c/depend-8.c: New test.
1048         * testsuite/libgomp.c/depend-9.c: New test.
1049         * testsuite/libgomp.c/depend-10.c: New test.
1051 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
1053         * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
1054         (struct gomp_taskwait): New type.
1055         (struct gomp_task): Add taskwait and parent_depends_on, remove
1056         in_taskwait and taskwait_sem fields.
1057         (gomp_finish_task): Don't destroy taskwait_sem.
1058         * task.c (gomp_init_task): Don't init in_taskwait, instead init
1059         taskwait and parent_depends_on.
1060         (GOMP_task): For if (0) tasks with depend clause that depend on
1061         earlier tasks don't defer them, instead call
1062         gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
1063         Initialize redundant_out field, for redundant out entries just
1064         move them at the end of linked list instead of removing them
1065         completely, and set redundant_out flag instead of redundant.
1066         (gomp_task_run_pre): Update last_parent_depends_on if scheduling
1067         that task.
1068         (gomp_task_run_post_handle_dependers): If parent is in
1069         gomp_task_maybe_wait_for_dependencies and newly runnable task
1070         is not parent_depends_on, queue it in parent->children linked
1071         list after all runnable tasks with parent_depends_on set.
1072         Adjust for addition of taskwait indirection.
1073         (gomp_task_run_post_remove_parent): If parent is in
1074         gomp_task_maybe_wait_for_dependencies and task to be removed
1075         is parent_depends_on, decrement n_depend and if needed awake
1076         parent.  Adjust for addition of taskwait indirection.
1077         (GOMP_taskwait): Adjust for addition of taskwait indirection.
1078         (gomp_task_maybe_wait_for_dependencies): New function.
1079         * testsuite/libgomp.c/depend-5.c: New test.
1081 2014-07-13  Tobias Burnus  <burnus@net-b.de>
1083         * testsuite/libgomp.fortran/pr34020.f90: Make compile
1084         with TS 18508/Fortran 2015.
1086 2014-07-06  Marek Polacek  <polacek@redhat.com>
1088         PR c/6940
1089         * testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.
1091 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
1093         * testsuite/lib/libgomp.exp (libgomp_target_compile): If $source
1094         matches regex $lang_source_re, add $lang_include_flags to options.
1095         * testsuite/libgomp.c/c.exp: Unset lang_include_flags.
1096         * testsuite/libgomp.c++/c++.exp: Likewise.
1097         * testsuite/libgomp.fortran/fortran.exp: Likewise.  Set lang_source_re
1098         and lang_include_flags instead of adding -fintrinsic-modules-path= to
1099         ALWAYS_CFLAGS.
1100         * testsuite/libgomp.graphite/graphite.exp: Unset lang_include_flags.
1102 2014-07-03  Thomas Schwinge  <thomas@codesourcery.com>
1104         * testsuite/libgomp.fortran/fortran.exp: Explain
1105         gfortran-dg-runtest usage.
1107 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
1109         * testsuite/libgomp.fortran/simd5.f90: New test.
1110         * testsuite/libgomp.fortran/simd6.f90: New test.
1111         * testsuite/libgomp.fortran/simd7.f90: New test.
1113 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
1115         * testsuite/libgomp.c/for-2.c: Define SC to static for
1116         #pragma omp for simd testing.
1117         * testsuite/libgomp.c/for-2.h (SC): Define if not defined.
1118         (N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use
1119         SC macro.
1120         * testsuite/libgomp.c/simd-14.c: New test.
1121         * testsuite/libgomp.c/simd-15.c: New test.
1122         * testsuite/libgomp.c/simd-16.c: New test.
1123         * testsuite/libgomp.c/simd-17.c: New test.
1124         * testsuite/libgomp.c++/for-10.C: Define SC to static for
1125         #pragma omp for simd testing.
1126         * testsuite/libgomp.c++/simd10.C: New test.
1127         * testsuite/libgomp.c++/simd11.C: New test.
1128         * testsuite/libgomp.c++/simd12.C: New test.
1129         * testsuite/libgomp.c++/simd13.C: New test.
1131         * testsuite/libgomp.fortran/aligned1.f03: New test.
1132         * testsuite/libgomp.fortran/nestedfn5.f90: New test.
1133         * testsuite/libgomp.fortran/target7.f90: Surround loop spawning
1134         tasks with !$omp parallel !$omp single.
1135         * testsuite/libgomp.fortran/target8.f90: New test.
1136         * testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust
1137         not to use trim in the combiner, instead call elemental function.
1138         (fn): New elemental function.
1139         * testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init):
1140         Make elemental.
1141         * testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out,
1142         omp_in): Likewise.
1143         * testsuite/libgomp.fortran/udr12.f90: New test.
1144         * testsuite/libgomp.fortran/udr13.f90: New test.
1145         * testsuite/libgomp.fortran/udr14.f90: New test.
1146         * testsuite/libgomp.fortran/udr15.f90: New test.
1148 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
1150         * omp_lib.f90.in (openmp_version): Set to 201307.
1151         * omp_lib.h.in (openmp_version): Likewise.
1152         * testsuite/libgomp.c/target-8.c: New test.
1153         * testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch
1154         and inbranch clauses.
1155         * testsuite/libgomp.fortran/depend-3.f90: New test.
1156         * testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new
1157         openmp_version.
1158         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
1159         * testsuite/libgomp.fortran/target1.f90: New test.
1160         * testsuite/libgomp.fortran/target2.f90: New test.
1161         * testsuite/libgomp.fortran/target3.f90: New test.
1162         * testsuite/libgomp.fortran/target4.f90: New test.
1163         * testsuite/libgomp.fortran/target5.f90: New test.
1164         * testsuite/libgomp.fortran/target6.f90: New test.
1165         * testsuite/libgomp.fortran/target7.f90: New test.
1167 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
1169         PR fortran/60928
1170         * testsuite/libgomp.fortran/allocatable9.f90: New test.
1171         * testsuite/libgomp.fortran/allocatable10.f90: New test.
1172         * testsuite/libgomp.fortran/allocatable11.f90: New test.
1173         * testsuite/libgomp.fortran/allocatable12.f90: New test.
1174         * testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
1175         * testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
1176         * testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
1177         * testsuite/libgomp.fortran/associate1.f90: New test.
1178         * testsuite/libgomp.fortran/associate2.f90: New test.
1179         * testsuite/libgomp.fortran/procptr1.f90: New test.
1181 2014-06-06  Jakub Jelinek  <jakub@redhat.com>
1183         * testsuite/libgomp.fortran/simd1.f90: New test.
1184         * testsuite/libgomp.fortran/udr1.f90: New test.
1185         * testsuite/libgomp.fortran/udr2.f90: New test.
1186         * testsuite/libgomp.fortran/udr3.f90: New test.
1187         * testsuite/libgomp.fortran/udr4.f90: New test.
1188         * testsuite/libgomp.fortran/udr5.f90: New test.
1189         * testsuite/libgomp.fortran/udr6.f90: New test.
1190         * testsuite/libgomp.fortran/udr7.f90: New test.
1191         * testsuite/libgomp.fortran/udr8.f90: New test.
1192         * testsuite/libgomp.fortran/udr9.f90: New test.
1193         * testsuite/libgomp.fortran/udr10.f90: New test.
1194         * testsuite/libgomp.fortran/udr11.f90: New test.
1196 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
1198         * testsuite/libgomp.fortran/declare-simd-1.f90: Require
1199         vect_simd_clones effective target.
1200         * testsuite/libgomp.fortran/declare-simd-2.f90: Ditto.
1202 2014-05-21  Jakub Jelinek  <jakub@redhat.com>
1204         PR middle-end/61252
1205         * testsuite/libgomp.c++/simd-9.C: New test.
1207 2014-05-18  Uros Bizjak  <ubizjak@gmail.com>
1209         * libgomp.texi (Runitme Library Routines): Remove multiple @menu.
1210         (Environment Variables) Move OMP_PROC_BIND and OMP_STACKSIZE node
1211         texts according to their @menu entry positions.
1213 2014-05-11  Jakub Jelinek  <jakub@redhat.com>
1215         * testsuite/libgomp.fortran/cancel-do-1.f90: New test.
1216         * testsuite/libgomp.fortran/cancel-do-2.f90: New test.
1217         * testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
1218         * testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
1219         * testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
1220         * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
1221         * testsuite/libgomp.fortran/declare-simd-1.f90: New test.
1222         * testsuite/libgomp.fortran/declare-simd-2.f90: New test.
1223         * testsuite/libgomp.fortran/declare-simd-3.f90: New test.
1224         * testsuite/libgomp.fortran/depend-1.f90: New test.
1225         * testsuite/libgomp.fortran/depend-2.f90: New test.
1226         * testsuite/libgomp.fortran/omp_atomic5.f90: New test.
1227         * testsuite/libgomp.fortran/simd1.f90: New test.
1228         * testsuite/libgomp.fortran/simd2.f90: New test.
1229         * testsuite/libgomp.fortran/simd3.f90: New test.
1230         * testsuite/libgomp.fortran/simd4.f90: New test.
1231         * testsuite/libgomp.fortran/taskgroup1.f90: New test.
1233 2014-05-02  Jakub Jelinek  <jakub@redhat.com>
1235         * testsuite/libgomp.c/simd-10.c: New test.
1236         * testsuite/libgomp.c/simd-11.c: New test.
1237         * testsuite/libgomp.c/simd-12.c: New test.
1238         * testsuite/libgomp.c/simd-13.c: New test.
1240 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
1242         * testsuite/libgomp.c++/atomic-14.C: Allow seq_cst and
1243         atomic type clauses in any order and optional comma in between.
1244         * testsuite/libgomp.c++/atomic-15.C: Likewise.
1245         * testsuite/libgomp.c/atomic-17.c: Likewise.
1247         * testsuite/libgomp.c/simd-7.c: New test.
1248         * testsuite/libgomp.c/simd-8.c: New test.
1249         * testsuite/libgomp.c/simd-9.c: New test.
1250         * testsuite/libgomp.c/loop-16.c: New test.
1252 2014-04-02  Richard Henderson  <rth@redhat.com>
1254         * config/linux/futex.h (futex_wait): Get error value from errno.
1255         (futex_wake): Likewise.
1257 2014-03-25  Jakub Jelinek  <jakub@redhat.com>
1259         PR c++/60331
1260         * testsuite/libgomp.c++/udr-11.C: New test.
1261         * testsuite/libgomp.c++/udr-12.C: New test.
1262         * testsuite/libgomp.c++/udr-13.C: New test.
1263         * testsuite/libgomp.c++/udr-14.C: New test.
1264         * testsuite/libgomp.c++/udr-15.C: New test.
1265         * testsuite/libgomp.c++/udr-16.C: New test.
1266         * testsuite/libgomp.c++/udr-17.C: New test.
1267         * testsuite/libgomp.c++/udr-18.C: New test.
1268         * testsuite/libgomp.c++/udr-19.C: New test.
1270 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1272         Update copyright years
1274 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1276         * hashtab.h: Use the standard form for the copyright notice.
1278 2014-01-02  Tobias Burnus  <burnus@net-b.de>
1280         * libgomp.texi: Bump @copying's copyright year.
1282 2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>
1284         * testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude. Replace
1285         alloca () with __builtin_alloca ().
1286         * testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
1287         * testsuite/libgomp.c/lock-3.c: Likewise.
1288         * testsuite/libgomp.c/pr48591.c: Likewise.
1290 2013-12-17  Jakub Jelinek  <jakub@redhat.com>
1292         PR testsuite/59534
1293         * testsuite/libgomp.fortran/retval1.f90 (e5): Avoid non-shortcircuited
1294         comparisons.
1296 2013-12-16  Jakub Jelinek  <jakub@redhat.com>
1298         PR libgomp/58756
1299         * testsuite/libgomp.c/pr58756.c: New test.
1301 2013-12-12  Jakub Jelinek  <jakub@redhat.com>
1303         PR libgomp/59467
1304         * testsuite/libgomp.fortran/crayptr2.f90: Add private (d) clause to
1305         !$omp parallel.
1307 2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
1309         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
1310         ALWAYS_CFLAGS.
1311         * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
1312         * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
1313         * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
1314         * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
1315         Likewise.
1317         * libgomp_g.h: Include <stddef.h> for size_t.
1319         * libgomp.spec.in: Update comment about libgomp's dependencies.
1320         * configure.ac: Likewise.
1321         * configure: Regenerate.
1323 2013-10-16  Tobias Burnus  <burnus@net-b.de>
1325         * libgomp.texi: (Runtime Library Routines): Update references for
1326         OpenMP 4.0. Add omp_get_cancellation, omp_get_default_device,
1327         omp_get_num_devices, omp_get_num_teams, omp_get_proc_bind,
1328         omp_get_team_num, omp_is_initial_device, omp_set_default_device.
1329         (Environment Variables): Update references for OpenMP 4.0. Add
1330         OMP_CANCELLATION, OMP_DEFAULT_DEVICE, OMP_PLACES.
1331         Move OMP_DISPLAY_ENV and OMP_PROC_BIND up to be in alphabetical
1332         order.
1334 2013-10-14  Jakub Jelinek  <jakub@redhat.com>
1336         * env.c (parse_bind_var): Initialize value to avoid
1337         (false positive) warning.
1339 2013-10-12  Jakub Jelinek  <jakub@redhat.com>
1341         PR libgomp/58691
1342         * config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
1343         to check variable.
1344         (gomp_init_num_threads): Move i variable declaration into
1345         #ifdef CPU_ALLOC_SIZE block.
1346         * config/linux/affinity.c (gomp_affinity_init_level): Test
1347         gomp_places_list_len == 0 rather than gomp_places_list == 0
1348         when checking for topology reading error.
1349         * team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
1350         * env.c (parse_affinity): Add ignore argument, if true, don't populate
1351         gomp_places_list, only parse env var and always return false.
1352         (parse_places_var): Likewise.  Don't check gomp_global_icv.bind_var.
1353         (initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
1354         vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
1355         and either of these variables were parsed correctly into a places
1356         list.
1358 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
1359             Jakub Jelinek  <jakub@redhat.com>
1361         * testsuite/libgomp.graphite/force-parallel-1.c: Expect 4 instead
1362         of 5 loopfn matches.
1363         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
1364         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
1365         * testsuite/libgomp.graphite/force-parallel-4.c: Likewise.
1366         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
1367         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
1368         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
1369         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
1370         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
1372 2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
1374         * Makefile.am (omp_lib.mod): Streamline rule.
1375         * Makefile.in: Regenerate.
1377         * libgomp.texi (Runtime Library Routines): C linkage, don't throw
1378         exceptions.
1380         * testsuite/libgomp.c/lib-1.c (main): Add missing error check.
1381         * testsuite/libgomp.fortran/lib1.f90: Likewise.
1382         * testsuite/libgomp.fortran/lib2.f: Likewise.
1383         * testsuite/libgomp.fortran/lib3.f: Likewise.
1385         * configure.ac: Typo fix.
1386         * configure: Regenerate.
1388         * testsuite/libgomp.fortran/openmp_version-1.f: New file.
1389         * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
1391         * omp.h.in: Don't touch the user's namespace.
1393 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
1394             Tobias Burnus  <burnus@net-b.de>
1395             Richard Henderson  <rth@redhat.com>
1397         * target.c: New file.
1398         * Makefile.am (libgomp_la_SOURCES): Add target.c.
1399         * Makefile.in: Regenerated.
1400         * libgomp_g.h (GOMP_task): Add depend argument.
1401         (GOMP_barrier_cancel, GOMP_loop_end_cancel,
1402         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
1403         GOMP_target_end_data, GOMP_target_update, GOMP_teams,
1404         GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1405         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
1406         GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
1407         GOMP_taskgroup_start, GOMP_taskgroup_end,
1408         GOMP_parallel_sections): New prototypes.
1409         * fortran.c (omp_is_initial_device): Add ialias_redirect.
1410         (omp_is_initial_device_): New function.
1411         (ULP, STR1, STR2, ialias_redirect): Removed.
1412         (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
1413         omp_set_default_device_8_, omp_get_default_device_,
1414         omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
1415         functions.
1416         * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
1417         GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
1418         GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
1419         @@GOMP_4.0.
1420         (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
1421         omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
1422         omp_set_default_device, omp_set_default_device_,
1423         omp_set_default_device_8_, omp_get_default_device,
1424         omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
1425         omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
1426         omp_get_team_num_): Export @@OMP_4.0.
1427         * team.c (struct gomp_thread_start_data): Add place field.
1428         (gomp_thread_start): Clear thr->thread_pool and
1429         thr->task before returning.  Use gomp_team_barrier_wait_final
1430         instead of gomp_team_barrier_wait.  Initialize thr->place.
1431         (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
1432         team_cancelled and task_queued_count fields.
1433         (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
1434         before calling pthread_exit.
1435         (gomp_free_thread): No longer static.  Use
1436         gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
1437         (gomp_team_start): Add flags argument.  Set
1438         thr->thread_pool->threads_busy to nthreads immediately after creating
1439         new pool.  Use gomp_managed_threads_lock instead of
1440         gomp_remaining_threads_lock.  Handle OpenMP 4.0 affinity.
1441         (gomp_team_end): Use gomp_managed_threads_lock instead of
1442         gomp_remaining_threads_lock.  Use gomp_team_barrier_wait_final instead
1443         of gomp_team_barrier_wait.  If team->team_cancelled, call
1444         gomp_fini_worshare on ws chain starting at team->work_shares_to_free
1445         rather than thr->ts.work_share.
1446         (initialize_team): Don't call gomp_sem_init here.
1447         * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
1448         caller.
1449         (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
1450         * env.c (gomp_global_icv): Add default_device_var, target_data and
1451         bind_var initializers.
1452         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
1453         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
1454         gomp_places_list_len): New variables.
1455         (parse_bind_var, parse_one_place, parse_places_var): New functions.
1456         (parse_affinity): Rewritten to construct OMP_PLACES list with unit
1457         sized places.
1458         (gomp_cancel_var): New global variable.
1459         (parse_int): New function.
1460         (handle_omp_display_env): New function.
1461         (initialize_env): Use it.  Initialize default_device_var.
1462         Parse OMP_CANCELLATION env var.  Use parse_bind_var to parse
1463         OMP_PROC_BIND instead of parse_boolean.  Use parse_places_var for
1464         OMP_PLACES parsing.  Don't call parse_affinity if OMP_PLACES has
1465         been successfully parsed (and call gomp_init_affinity in that case).
1466         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1467         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1468         omp_get_team_num, omp_is_initial_device): New functions.
1469         * libgomp.h: Include stdlib.h.
1470         (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
1471         Define.
1472         (struct target_mem_desc): Forward declare.
1473         (struct gomp_task_icv): Add default_device_var, target_data, bind_var
1474         and thread_limit_var fields.
1475         (gomp_get_num_devices): New prototype.
1476         (gomp_cancel_var): New extern decl.
1477         (struct gomp_team): Add work_shares_to_free, work_share_cancelled,
1478         team_cancelled and task_queued_count fields.  Add comments about
1479         task_{,queued_,running_}count.
1480         (gomp_cancel_kind): New enum.
1481         (gomp_work_share_end_cancel): New prototype.
1482         (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
1483         copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
1484         and depend fields.
1485         (struct gomp_taskgroup): New type.
1486         (struct gomp_task_depend_entry,
1487         struct gomp_dependers_vec): New types.
1488         (gomp_finish_task): Free depend_hash if non-NULL.
1489         (struct gomp_team_state): Add place_partition_off
1490         and place_partition_len fields.
1491         (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
1492         gomp_places_list_len): New extern decls.
1493         (struct gomp_thread): Add place field.
1494         (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
1495         (gomp_init_thread_affinity): Add place argument.
1496         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1497         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1498         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1499         gomp_affinity_init_level, gomp_affinity_print_place): New
1500         prototypes.
1501         (gomp_team_start): Add flags argument.
1502         (gomp_thread_limit_var, gomp_remaining_threads_count,
1503         gomp_remaining_threads_lock): Remove.
1504         (gomp_managed_threads_lock): New variable.
1505         (struct gomp_thread_pool): Add threads_busy field.
1506         (gomp_free_thread): New prototype.
1507         * task.c: Include hashtab.h.
1508         (hash_entry_type): New typedef.
1509         (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
1510         (gomp_init_task): Clear dependers, depend_hash, depend_count,
1511         copy_ctors_done and taskgroup fields.
1512         (GOMP_task): Add depend argument, handle depend clauses.  If
1513         gomp_team_barrier_cancelled or if it's taskgroup has been
1514         cancelled, don't queue or start new tasks.  Set copy_ctors_done
1515         field if needed.  Initialize taskgroup field.  If copy_ctors_done
1516         and already cancelled, don't discard the task.  If taskgroup is
1517         non-NULL, enqueue the task into taskgroup queue.  Increment
1518         num_children field in taskgroup.  Increment task_queued_count.
1519         (gomp_task_run_pre, gomp_task_run_post_remove_parent,
1520         gomp_task_run_post_remove_taskgroup): New inline functions.
1521         (gomp_task_run_post_handle_depend_hash,
1522         gomp_task_run_post_handle_dependers,
1523         gomp_task_run_post_handle_depend): New functions.
1524         (GOMP_taskwait): Use them.  If more than one new tasks
1525         have been queued, wake other threads if needed.
1526         (gomp_barrier_handle_tasks): Likewise.  If
1527         gomp_team_barrier_cancelled, don't start any new tasks, just free
1528         all tasks.
1529         (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
1530         * omp_lib.f90.in
1531         (omp_proc_bind_kind, omp_proc_bind_false,
1532         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1533         omp_proc_bind_spread): New params.
1534         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1535         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1536         omp_get_team_num, omp_is_initial_device): New interfaces.
1537         (omp_get_dynamic, omp_get_nested, omp_in_parallel,
1538         omp_get_max_threads, omp_get_num_procs, omp_get_num_threads,
1539         omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels,
1540         omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num,
1541         omp_get_team_size, omp_get_active_level, omp_in_final): Remove
1542         useless use omp_lib_kinds.
1543         * omp.h.in (omp_proc_bind_t): New typedef.
1544         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1545         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1546         omp_get_team_num, omp_is_initial_device): New prototypes.
1547         * loop.c (gomp_parallel_loop_start): Add flags argument, pass it
1548         through to gomp_team_start.
1549         (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
1550         GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
1551         Adjust gomp_parallel_loop_start callers.
1552         (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1553         GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
1554         GOMP_loop_end_cancel): New functions.
1555         (GOMP_parallel_end): Add ialias_redirect.
1556         * hashtab.h: New file.
1557         * libgomp.texi (Environment Variables): Minor cleanup,
1558         update section refs to OpenMP 4.0rc2.
1559         (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
1560         environment variables.
1561         * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
1562         team->work_shares_to_free to thr->ts.work_share before calling
1563         free_work_share.
1564         (gomp_work_share_end_cancel): New function.
1565         * config/linux/proc.c: Include errno.h.
1566         (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
1567         (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
1568         sizeof (cpu_set_t) to determine number of iterations.  Fix up check
1569         extern decl.  Use CPU_COUNT_S if available, or CPU_COUNT if
1570         gomp_cpuset_size is sizeof (cpu_set_t).
1571         (gomp_init_num_threads): Initialize gomp_cpuset_size,
1572         gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
1573         of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
1574         to pthread_getaffinity_np.  Free and clear gomp_cpusetp if it didn't
1575         contain any logical CPUs.
1576         (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
1577         is NULL.  Use gomp_cpusetp instead of &cpuset and pass
1578         gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
1579         pthread_getaffinity_np.  Check gomp_places_list instead of
1580         gomp_cpu_affinity.  Adjust gomp_cpuset_popcount caller.
1581         * config/linux/bar.c (gomp_barrier_wait_end,
1582         gomp_barrier_wait_last): Use BAR_* defines.
1583         (gomp_team_barrier_wait_end): Likewise.  Clear BAR_CANCELLED
1584         from state where needed.  Set work_share_cancelled to 0 on last
1585         thread.
1586         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
1587         gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
1588         functions.
1589         * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
1590         Add cpusetsize argument.
1591         (gomp_cpuset_size, gomp_cpusetp): Declare.
1592         * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
1593         (affinity_counter): Remove.
1594         (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
1595         if CPU_ALLOC_SIZE isn't defined.
1596         (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
1597         silently create OMP_PLACES=threads, if it is non-NULL afterwards,
1598         bind current thread to the first place.
1599         (gomp_init_thread_affinity): Rewritten.  Add place argument, just
1600         pthread_setaffinity_np to gomp_places_list[place].
1601         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1602         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1603         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1604         gomp_affinity_init_level, gomp_affinity_print_place): New functions.
1605         * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
1606         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
1607         (gomp_barrier_t): Add awaited_final field.
1608         (gomp_barrier_init): Initialize awaited_final field.
1609         (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
1610         gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
1611         prototypes.
1612         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.  Use BAR_*
1613         defines.
1614         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
1615         gomp_team_barrier_cancelled): New inline functions.
1616         (gomp_barrier_last_thread,
1617         gomp_team_barrier_set_task_pending,
1618         gomp_team_barrier_clear_task_pending,
1619         gomp_team_barrier_set_waiting_for_tasks,
1620         gomp_team_barrier_waiting_for_tasks,
1621         gomp_team_barrier_done): Use BAR_* defines.
1622         * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
1623         (gomp_barrier_wait_end): Use BAR_* defines.
1624         (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
1625         Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
1626         Use BAR_* defines.
1627         (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
1628         gomp_team_barrier_cancel): New functions.
1629         * config/posix/affinity.c (gomp_init_thread_affinity): Add place
1630         argument.
1631         (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1632         gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1633         gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1634         gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
1635         * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
1636         BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
1637         (gomp_barrier_t): Add cancellable field.
1638         (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
1639         gomp_team_barrier_cancel): New prototypes.
1640         (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
1641         (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
1642         gomp_team_barrier_cancelled): New inline functions.
1643         (gomp_barrier_wait_start, gomp_barrier_last_thread,
1644         gomp_team_barrier_set_task_pending,
1645         gomp_team_barrier_clear_task_pending,
1646         gomp_team_barrier_set_waiting_for_tasks,
1647         gomp_team_barrier_waiting_for_tasks,
1648         gomp_team_barrier_done): Use BAR_* defines.
1649         * barrier.c (GOMP_barrier_cancel): New function.
1650         * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
1651         omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1652         omp_proc_bind_spread): New params.
1653         (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1654         omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1655         omp_get_team_num, omp_is_initial_device): New externals.
1656         * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
1657         New functions.
1658         (gomp_resolve_num_threads): Adjust for thread_limit now being in
1659         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
1660         infinity.  If not nested, just return minimum of max_num_threads
1661         and icv->thread_limit_var and if thr->thread_pool, set threads_busy
1662         to the returned value.  Otherwise, don't update atomically
1663         gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
1664         (GOMP_parallel_end): Adjust for thread_limit now being in
1665         icv->thread_limit_var.  Use UINT_MAX instead of ULONG_MAX as
1666         infinity.  Adjust threads_busy in the pool rather than
1667         gomp_remaining_threads_count.  Remember team->nthreads and call
1668         gomp_team_end before adjusting threads_busy, if not nested
1669         afterwards, just set it to 1 non-atomically.  Add ialias.
1670         (GOMP_parallel_start): Adjust gomp_team_start caller.
1671         * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
1672         * testsuite/libgomp.c/affinity-1.c: New test.
1673         * testsuite/libgomp.c/atomic-15.c: New test.
1674         * testsuite/libgomp.c/atomic-16.c: New test.
1675         * testsuite/libgomp.c/atomic-17.c: New test.
1676         * testsuite/libgomp.c/cancel-for-1.c: New test.
1677         * testsuite/libgomp.c/cancel-for-2.c: New test.
1678         * testsuite/libgomp.c/cancel-parallel-1.c: New test.
1679         * testsuite/libgomp.c/cancel-parallel-2.c: New test.
1680         * testsuite/libgomp.c/cancel-parallel-3.c: New test.
1681         * testsuite/libgomp.c/cancel-sections-1.c: New test.
1682         * testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
1683         * testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
1684         * testsuite/libgomp.c/depend-1.c: New test.
1685         * testsuite/libgomp.c/depend-2.c: New test.
1686         * testsuite/libgomp.c/depend-3.c: New test.
1687         * testsuite/libgomp.c/depend-4.c: New test.
1688         * testsuite/libgomp.c/for-1.c: New test.
1689         * testsuite/libgomp.c/for-1.h: New file.
1690         * testsuite/libgomp.c/for-2.c: New test.
1691         * testsuite/libgomp.c/for-2.h: New file.
1692         * testsuite/libgomp.c/for-3.c: New test.
1693         * testsuite/libgomp.c/pr58392.c: New test.
1694         * testsuite/libgomp.c/simd-1.c: New test.
1695         * testsuite/libgomp.c/simd-2.c: New test.
1696         * testsuite/libgomp.c/simd-3.c: New test.
1697         * testsuite/libgomp.c/simd-4.c: New test.
1698         * testsuite/libgomp.c/simd-5.c: New test.
1699         * testsuite/libgomp.c/simd-6.c: New test.
1700         * testsuite/libgomp.c/target-1.c: New test.
1701         * testsuite/libgomp.c/target-2.c: New test.
1702         * testsuite/libgomp.c/target-3.c: New test.
1703         * testsuite/libgomp.c/target-4.c: New test.
1704         * testsuite/libgomp.c/target-5.c: New test.
1705         * testsuite/libgomp.c/target-6.c: New test.
1706         * testsuite/libgomp.c/target-7.c: New test.
1707         * testsuite/libgomp.c/taskgroup-1.c: New test.
1708         * testsuite/libgomp.c/thread-limit-1.c: New test.
1709         * testsuite/libgomp.c/thread-limit-2.c: New test.
1710         * testsuite/libgomp.c/thread-limit-3.c: New test.
1711         * testsuite/libgomp.c/udr-1.c: New test.
1712         * testsuite/libgomp.c/udr-2.c: New test.
1713         * testsuite/libgomp.c/udr-3.c: New test.
1714         * testsuite/libgomp.c++/affinity-1.C: New test.
1715         * testsuite/libgomp.c++/atomic-10.C: New test.
1716         * testsuite/libgomp.c++/atomic-11.C: New test.
1717         * testsuite/libgomp.c++/atomic-12.C: New test.
1718         * testsuite/libgomp.c++/atomic-13.C: New test.
1719         * testsuite/libgomp.c++/atomic-14.C: New test.
1720         * testsuite/libgomp.c++/atomic-15.C: New test.
1721         * testsuite/libgomp.c++/cancel-for-1.C: New test.
1722         * testsuite/libgomp.c++/cancel-for-2.C: New test.
1723         * testsuite/libgomp.c++/cancel-parallel-1.C: New test.
1724         * testsuite/libgomp.c++/cancel-parallel-2.C: New test.
1725         * testsuite/libgomp.c++/cancel-parallel-3.C: New test.
1726         * testsuite/libgomp.c++/cancel-sections-1.C: New test.
1727         * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
1728         * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
1729         * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
1730         * testsuite/libgomp.c++/cancel-test.h: New file.
1731         * testsuite/libgomp.c++/for-9.C: New test.
1732         * testsuite/libgomp.c++/for-10.C: New test.
1733         * testsuite/libgomp.c++/for-11.C: New test.
1734         * testsuite/libgomp.c++/simd-1.C: New test.
1735         * testsuite/libgomp.c++/simd-2.C: New test.
1736         * testsuite/libgomp.c++/simd-3.C: New test.
1737         * testsuite/libgomp.c++/simd-4.C: New test.
1738         * testsuite/libgomp.c++/simd-5.C: New test.
1739         * testsuite/libgomp.c++/simd-6.C: New test.
1740         * testsuite/libgomp.c++/simd-7.C: New test.
1741         * testsuite/libgomp.c++/simd-8.C: New test.
1742         * testsuite/libgomp.c++/target-1.C: New test.
1743         * testsuite/libgomp.c++/target-2.C: New test.
1744         * testsuite/libgomp.c++/target-2-aux.cc: New file.
1745         * testsuite/libgomp.c++/target-3.C: New test.
1746         * testsuite/libgomp.c++/taskgroup-1.C: New test.
1747         * testsuite/libgomp.c++/udr-1.C: New test.
1748         * testsuite/libgomp.c++/udr-2.C: New test.
1749         * testsuite/libgomp.c++/udr-3.C: New test.
1750         * testsuite/libgomp.c++/udr-4.C: New test.
1751         * testsuite/libgomp.c++/udr-5.C: New test.
1752         * testsuite/libgomp.c++/udr-6.C: New test.
1753         * testsuite/libgomp.c++/udr-7.C: New test.
1754         * testsuite/libgomp.c++/udr-8.C: New test.
1755         * testsuite/libgomp.c++/udr-9.C: New test.
1757 2013-09-20  Jakub Jelinek  <jakub@redhat.com>
1759         PR testsuite/57605
1760         * testsuite/lib/libgomp.exp: Add -fdiagnostics-color=never to
1761         ALWAYS_CFLAGS.
1763 2013-09-20  Alan Modra  <amodra@gmail.com>
1765         * configure: Regenerate.
1767 2013-09-19  Jakub Jelinek  <jakub@redhat.com>
1769         * testsuite/libgomp.c/sections-2.c: New test.
1771 2013-06-28  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1773         * testsuite/libgomp.fortran/strassen.f90:
1774         Add dg-skip-if aarch64_tiny.
1776 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
1777             Cesar Philippidis  <cesar@codesourcery.com>
1779         * testsuite/lib/libgomp.exp: Reorder lib loads into dependency order.
1780         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
1781         * testsuite/libgomp.c/c.exp: load_gcc_lib gcc-dg.exp.
1782         * testsuite/libgomp.fortran/fortran.exp: Likewise.
1783         * testsuite/libgomp.graphite/graphite.exp: Likewise.
1784         * testsuite/libgomp.c++/c++.exp: load_gcc_lib gcc-dg.exp.
1785         Use dg-runtest rather than gfortran-dg-runtest.
1787 2013-06-10  Thomas Schwinge  <thomas@codesourcery.com>
1789         * testsuite/libgomp.c/icv-2.c: Extend current handling of
1790         Linux-based x86 systems to cover all GNU systems.
1791         * testsuite/libgomp.c/lock-3.c: Likewise.
1792         * testsuite/libgomp.c/pr48591.c: Likewise.
1794 2013-06-06  Thomas Schwinge  <thomas@codesourcery.com>
1796         * configure.tgt (XCFLAGS): Add -ftls-model=initial-exec for
1797         GNU/Hurd, as done for Linux-based systems.
1799         * config/posix/ptrlock.h: Fix comment.
1801 2013-05-27  Tobias Burnus  <burnus@net-b.de>
1803         PR fortran/57423
1804         * libgomp.texi (omp_set_dynamic, omp_set_nested, omp_set_nested,
1805         omp_set_num_threads, omp_init_lock, omp_set_lock, omp_test_lock,
1806         omp_unset_lock, omp_destroy_lock, omp_init_nest_lock,
1807         omp_set_nest_lock, omp_test_nest_lock, omp_unset_nest_lock,
1808         omp_destroy_nest_lock): Correct arguments to match the one in
1809         the OpenMP spec.
1810         * omp_lib.f90.in (omp_init_lock, omp_init_nest_lock, omp_destroy_lock
1811         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock, omp_unset_lock,
1812         omp_unset_nest_lock, omp_set_dynamic, omp_set_nested,
1813         omp_set_num_threads, omp_test_lock, omp_test_nest_lock): Ditto.
1815 2013-05-16  Jakub Jelinek  <jakub@redhat.com>
1817         * testsuite/libgomp.c/loop-13.c: New test.
1818         * testsuite/libgomp.c/loop-14.c: New test.
1819         * testsuite/libgomp.c/loop-15.c: New test.
1820         * testsuite/libgomp.c++/loop-13.C: New test.
1821         * testsuite/libgomp.c++/loop-14.C: New test.
1822         * testsuite/libgomp.c++/loop-15.C: New test.
1824 2013-02-06  Jakub Jelinek  <jakub@redhat.com>
1826         PR middle-end/56217
1827         * testsuite/libgomp.c++/pr56217.C: New test.
1829 2013-02-01  Alan Modra  <amodra@gmail.com>
1831         * task.c (GOMP_task, GOMP_taskwait): Comment.
1833 2013-01-31  Dmitry Vyukov  <dvyukov@gcc.gnu.org>
1834             Joost VandeVondele  <Joost.VandeVondele@mat.ethz.ch>
1836         PR libgomp/55561
1837         * config/linux/wait.h (do_spin): Use atomic load for addr.
1838         * config/linux/ptrlock.c (gomp_ptrlock_get_slow): Use atomic
1839         for intptr and ptrlock.
1840         * config/linux/ptrlock.h (gomp_ptrlock_get): Use atomic load
1841         for ptrlock.
1843 2013-01-22  Alan Modra  <amodra@gmail.com>
1845         PR libgomp/51376
1846         PR libgomp/56073
1847         * task.c (GOMP_task): Revert 2011-12-09 change.
1848         (GOMP_taskwait): Likewise.  Instead use atomic load with acquire
1849         barrier to read task->children..
1850         (gomp_barrier_handle_tasks): ..and matching atomic store with
1851         release barrier here when setting parent->children to NULL.
1853 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
1854             Tobias Burnus  <burnus@net-b.de>
1856         PR driver/55884
1857         * testsuite/libgomp.fortran/fortran.exp: Use
1858         -fintrinsic-modules-path= instead of
1859         -fintrinsic-modules-path.
1861 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
1863         Update copyright years.
1865 2012-12-19  Tobias Burnus  <burnus@net-b.de>
1867         * testsuite/libgomp.fortran/fortran.exp: Set
1868         -fintrinsic-modules-path.
1870 2012-12-19  Tobias Burnus  <burnus@net-b.de>
1872         * testsuite/libgomp.fortran/use_intrinsic_1.f90: New; moved
1873         from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90.
1875 2012-11-21  Jakub Jelinek  <jakub@redhat.com>
1877         PR libgomp/55411
1878         * team.c (gomp_free_thread): Decrease gomp_managed_threads
1879         if pool had any threads_used.
1881 2012-11-07  Jack Howarth <howarth@bromo.med.uc.edu>
1883         * testsuite/libgomp.c++/pr24455.C: Use
1884         -Wl,-undefined,dynamic_lookup on darwin.
1886 2012-11-07  David Edelsohn  <dje.gcc@gmail.com>
1888         * testsuite/libgomp.c++/pr24455.C: Use -Wl,-G on AIX.
1890 2012-10-24  Dominique d'Humieres  <dominiq@lps.ens.fr>
1892         * testsuite/libgomp.graphite/force-parallel-6.c: Adjust the loops.
1894 2012-10-23  Ian Bolton  <ian.bolton@arm.com>
1895             Jim MacArthur  <jim.macarthur@arm.com>
1896             Marcus Shawcroft  <marcus.shawcroft@arm.com>
1897             Nigel Stephens  <nigel.stephens@arm.com>
1898             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1899             Richard Earnshaw  <rearnsha@arm.com>
1900             Sofiane Naci  <sofiane.naci@arm.com>
1901             Stephen Thomas  <stephen.thomas@arm.com>
1902             Tejas Belagod  <tejas.belagod@arm.com>
1903             Yufeng Zhang  <yufeng.zhang@arm.com>
1905         * configure.tgt: Add AArch64.
1907 2012-10-04  Jason Merrill  <jason@redhat.com>
1909         * testsuite/libgomp.c++/tls-init1.C: New.
1911 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
1913         * configure: Regenerated.
1915 2012-08-29  Chung-Lin Tang  <cltang@codesourcery.com>
1917         * config/linux/mips/futex.h (sys_futex0): Change to static
1918         function with noinline, nomips16 attributes under MIPS16. Adjust
1919         asm statement to place 'li v0,SYS_futex' immediately before
1920         syscall insn.
1922 2012-07-04  Sandra Loosemore <sandra@codesourcery.com>
1924         * libgomp.texi (Library Index): Renamed from "Index" to prevent
1925         conflict with index.html on case-insensitive file systems.
1927 2012-07-03  Uros Bizjak  <ubizjak@gmail.com>
1929         * config/linux/x86/futex.h (cpu_relax): Use __builtin_ia32_pause.
1930         * testsuite/libgomp.c/sort-1.c (busy_wait): Ditto.
1932 2012-07-02  Richard Guenther  <rguenther@suse.de>
1933             Michael Matz  <matz@suse.de>
1934             Tobias Grosser <tobias@grosser.es>
1935             Sebastian Pop <sebpop@gmail.com>
1937         * testsuite/libgomp.graphite/force-parallel-4.c: Adjust.
1938         * testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
1939         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
1940         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
1942 2012-06-28  Andreas Schwab  <schwab@linux-m68k.org>
1944         * libgomp.texi: Include gpl_v3.texi instead of gpl.texi.
1946 2012-06-22  Richard Guenther  <rguenther@suse.de>
1948         Merge from graphite branch
1949         2012-01-13  Tobias Grosser  <tobias@grosser.es>
1951         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
1952         * testsuite/libgomp.graphite/force-parallel-2.c: Likewise.
1954 2012-06-07  Jakub Jelinek  <jakub@redhat.com>
1956         PR middle-end/53580
1957         * testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
1958         use GOMP_barrier () call instead.
1959         * testsuite/libgomp.c/pr26943-3.c: Likewise.
1960         * testsuite/libgomp.c/pr26943-4.c: Likewise.
1961         * testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
1962         call GOMP_barrier instead.
1963         * testsuite/libgomp.fortran/vla5.f90: Likewise.
1965 2012-06-06  Jakub Jelinek  <jakub@redhat.com>
1967         PR libgomp/52993
1968         * config/linux/lock.c (gomp_init_nest_lock_25): Fix up last
1969         argument to memset call.
1971 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1973         * configure: Regenerated.
1975 2012-04-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1977         * testsuite/lib/libgomp.exp: Add -fno-diagnostics-show-caret.
1979 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
1981         PR bootstrap/52812
1982         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
1984 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
1986         PR middle-end/52547
1987         * testsuite/libgomp.c/pr52547.c: New test.
1989 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1991         * testsuite/lib/libgomp.exp: load fortran-modules.exp
1993 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1995         * configure.tgt (mips-sgi-irix6*): Remove.
1997 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1999         * configure.tgt (alpha*-dec-osf*): Remove.
2001         * config/osf/sem.h: Remove.
2002         * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally.
2004 2012-02-29  Eric Botcazou  <ebotcazou@adacore.com>
2006         * config/linux/sparc/futex.h (cpu_relax): Read from CC register.
2008 2012-02-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2010         PR libstdc++/52188
2011         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Remove symvers_renaming.
2012         Remove ENABLE_SYMVERS_SOL2.
2013         * configure: Regenerate.
2014         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB] (comma): New variable.
2015         (PREPROCESS): New variable.
2016         (libgomp.ver): New target.
2017         [LIBGOMP_BUILD_VERSIONED_SHLIB &&
2018         LIBGOMP_BUILD_VERSIONED_SHLIB_GNU]: Remove
2019         LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2 handling.
2020         Use libgomp.ver.
2021         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Use libgomp.ver, libgomp.ver-sun.
2022         * Makefile.in: Regenerate.
2024 2012-02-14  Walter Lee  <walt@tilera.com>
2026         * configure.tgt: Handle tilegx and tilepro.
2027         * config/linux/tile/futex.h: New file.
2029 2012-02-08  Richard Guenther  <rguenther@suse.de>
2031         PR tree-optimization/46886
2032         * testsuite/libgomp.c/pr46886.c: New testcase.
2034 2012-01-25  Matthias Klose  <doko@ubuntu.com>
2036         * config/linux/arm: Remove empty directory.
2037         * configure.tgt (config_path): Remove linux-arm for arm*-*-linux*.
2039 2011-12-09  Alan Modra  <amodra@gmail.com>
2041         PR libgomp/51376
2042         * task.c (GOMP_taskwait): Don't access task->children outside of
2043         task_lock mutex region.
2044         (GOMP_task): Likewise.
2046 2011-12-06  Jakub Jelinek  <jakub@redhat.com>
2048         PR libgomp/51132
2049         * testsuite/libgomp.graphite/force-parallel-1.c: Move large arrays
2050         to file scope.
2051         * testsuite/libgomp.graphite/force-parallel-3.c: Likewise.
2052         * testsuite/libgomp.graphite/force-parallel-6.c: Likewise.
2053         * testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
2054         * testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
2055         * testsuite/libgomp.graphite/force-parallel-9.c: Likewise.
2057 2011-12-02  Alan Modra  <amodra@gmail.com>
2059         * config/linux/affinity.c: Use atomic rather than sync builtin.
2060         * config/linux/lock.c: Likewise.
2061         * config/linux/ptrlock.h: Likewise.
2062         * config/linux/ptrlock.c: Likewise.
2063         * config/linux/ptrlock.h (gomp_ptrlock_set): Always write here..
2064         * config/linux/ptrlock.c (gomp_ptrlock_set_slow): ..not here.
2065         * config/linux/futex.h (atomic_write_barrier): Delete unused function.
2066         * config/linux/alpha/futex.h (atomic_write_barrier): Likewise.
2067         * config/linux/ia64/futex.h (atomic_write_barrier): Likewise.
2068         * config/linux/mips/futex.h (atomic_write_barrier): Likewise.
2069         * config/linux/powerpc/futex.h (atomic_write_barrier): Likewise.
2070         * config/linux/s390/futex.h (atomic_write_barrier): Likewise.
2071         * config/linux/sparc/futex.h (atomic_write_barrier): Likewise.
2072         * config/linux/x86/futex.h (atomic_write_barrier): Likewise.
2074 2011-11-30  Alan Modra  <amodra@gmail.com>
2076         PR libgomp/51298
2077         * config/linux/bar.h: Use atomic rather than sync builtins.
2078         * config/linux/bar.c: Likewise.  Add missing acquire
2079         synchronisation on generation field.
2080         * task.c (gomp_barrier_handle_tasks): Regain lock so as to not
2081         double unlock.
2083 2011-11-30  Alan Modra  <amodra@gmail.com>
2085         * ordered.c (gomp_ordered_sync): Add MEMMODEL_ACQ_REL fence.
2086         * critical.c (GOMP_critical_start): Add MEMMODEL_RELEASE fence.
2087         * config/linux/mutex.h: Use atomic rather than sync builtins.
2088         * config/linux/mutex.c: Likewise.  Comment.  Use -1 for waiting state.
2089         * config/linux/omp-lock.h: Comment fix.
2090         * config/linux/arm/mutex.h: Delete.
2091         * config/linux/powerpc/mutex.h: Delete.
2092         * config/linux/ia64/mutex.h: Delete.
2093         * config/linux/mips/mutex.h: Delete.
2095 2011-11-30  Alan Modra  <amodra@gmail.com>
2097         PR libgomp/51249
2098         * config/linux/sem.h: Rewrite.
2099         * config/linux/sem.c: Rewrite.
2101 2011-11-28  Richard Henderson  <rth@redhat.com>
2103         * libgomp.h (enum memmodel): New.
2105 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
2107         * configure: Regenerate.
2109 2011-10-10  Matthias Klose  <doko@ubuntu.com>
2111         * config/posix95: Remove empty directory.
2113 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
2115         * testsuite/libgomp.fortran/threadprivate4.f90: New test.
2117 2011-08-19  Jakub Jelinek  <jakub@redhat.com>
2119         PR fortran/49792
2120         * testsuite/libgomp.fortran/pr49792-1.f90: New test.
2121         * testsuite/libgomp.fortran/pr49792-2.f90: New test.
2123 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2125         * config/posix95/lock.c, posix95/omp-lock.h: Remove.
2127 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2129         PR libgomp/49965
2130         * testsuite/libgomp.c++/task-8.C: Replaced err by errval.
2132 2011-08-03  Uros Bizjak  <ubizjak@gmail.com>
2134         * config/linux/proc.h: New.
2135         * config/linux/proc.c: Include "proc.h".  Do not include <sched.h>.
2136         (gomp_cpuset_popcount): Rename from cpuset_popcount.  No more static.
2137         (gomp_init_num_threads): Update call to cpuset_popcount.
2138         (get_num_procs): Ditto.
2139         * config/linux/affinity.c (gomp_init_affinity): Call
2140         gomp_cpuset_popcount.
2142 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
2144         PR fortran/42041
2145         PR fortran/46752
2146         * omp.h.in (omp_in_final): New prototype.
2147         * omp_lib.f90.in (omp_in_final): New interface.
2148         (omp_integer_kind, omp_logical_kind): Remove
2149         and replace all its uses in the module with 4.
2150         (openmp_version): Change to 201107.
2151         * omp_lib.h.in (omp_sched_static, omp_sched_dynamic,
2152         omp_sched_guided, omp_sched_auto): Use omp_sched_kind
2153         kind for the parameters.
2154         (omp_in_final): New external.
2155         (openmp_version): Change to 201107.
2156         * task.c (omp_in_final): New function.
2157         (gomp_init_task): Initialize final_task.
2158         (GOMP_task): Remove unused attribute from flags.  Handle final
2159         tasks.
2160         (GOMP_taskyield): New function.
2161         (omp_in_final): Return true if if (false) or final (true) task
2162         or descendant of final (true).
2163         * fortran.c (omp_in_final_): New function.
2164         * libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_.
2165         (GOMP_3.0): Export GOMP_taskyield.
2166         * env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New
2167         variables.
2168         (parse_unsigned_long_list): New function.
2169         (initialize_env): Use it for OMP_NUM_THREADS.  Call parse_boolean
2170         with "OMP_PROC_BIND".  If OMP_PROC_BIND=true, call gomp_init_affinity
2171         even if parse_affinity returned false.
2172         * config/linux/affinity.c (gomp_init_affinity): Handle
2173         gomp_cpu_affinity_len == 0.
2174         * libgomp_g.h (GOMP_taskyield): New prototype.
2175         * libgomp.h (struct gomp_task): Add final_task field.
2176         (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs.
2177         * team.c (gomp_team_start): Override new task's nthreads_var icv
2178         if list form OMP_NUM_THREADS has been used and it has value for
2179         the new nesting level.
2181         * testsuite/libgomp.c/atomic-11.c: New test.
2182         * testsuite/libgomp.c/atomic-12.c: New test.
2183         * testsuite/libgomp.c/atomic-13.c: New test.
2184         * testsuite/libgomp.c/atomic-14.c: New test.
2185         * testsuite/libgomp.c/reduction-6.c: New test.
2186         * testsuite/libgomp.c/task-5.c: New test.
2187         * testsuite/libgomp.c++/atomic-2.C: New test.
2188         * testsuite/libgomp.c++/atomic-3.C: New test.
2189         * testsuite/libgomp.c++/atomic-4.C: New test.
2190         * testsuite/libgomp.c++/atomic-5.C: New test.
2191         * testsuite/libgomp.c++/atomic-6.C: New test.
2192         * testsuite/libgomp.c++/atomic-7.C: New test.
2193         * testsuite/libgomp.c++/atomic-8.C: New test.
2194         * testsuite/libgomp.c++/atomic-9.C: New test.
2195         * testsuite/libgomp.c++/task-8.C: New test.
2196         * testsuite/libgomp.c++/reduction-4.C: New test.
2197         * testsuite/libgomp.fortran/allocatable7.f90: New test.
2198         * testsuite/libgomp.fortran/allocatable8.f90: New test.
2199         * testsuite/libgomp.fortran/crayptr3.f90: New test.
2200         * testsuite/libgomp.fortran/omp_atomic3.f90: New test.
2201         * testsuite/libgomp.fortran/omp_atomic4.f90: New test.
2202         * testsuite/libgomp.fortran/pointer1.f90: New test.
2203         * testsuite/libgomp.fortran/pointer2.f90: New test.
2204         * testsuite/libgomp.fortran/task4.f90: New test.
2206 2011-08-02  Tobias Burnus  <burnus@net-b.de>
2208         * libgomp.texi: Update OpenMP spec references to 3.1.
2209         (omp_in_final,OMP_PROC_BIND): New sections.
2210         (OMP_NUM_THREADS): Document that the value can be now a list.
2211         (GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref.
2213 2011-08-02  H.J. Lu  <hongjiu.lu@intel.com>
2215         * config/linux/x86/futex.h: Check __x86_64__ instead of
2216         __LP64__.
2218 2011-07-29  Jakub Jelinek  <jakub@redhat.com>
2220         PR middle-end/49897
2221         PR middle-end/49898
2222         * testsuite/libgomp.c/pr49897-1.c: New test.
2223         * testsuite/libgomp.c/pr49897-2.c: New test.
2224         * testsuite/libgomp.c/pr49898-1.c: New test.
2225         * testsuite/libgomp.c/pr49898-2.c: New test.
2227 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
2229         * testsuite/lib/libgomp.exp (libgomp_init): Add -march=i486
2230         for ia32 instead of ilp32.
2232         * testsuite/libgomp.c/atomic-1.c: Require ia32 instead of ilp32.
2233         * testsuite/libgomp.c/atomic-6.c: Likewise.
2235 2011-07-23  Sebastian Pop  <sebastian.pop@amd.com>
2237         * testsuite/libgomp.graphite/force-parallel-1.c: Un-xfail.
2238         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust pattern.
2240 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2242         PR libgomp/45351
2243         * config/osf/sem.h: New file.
2244         * configure.tgt (alpha*-dec-osf*): Prepend osf to config_path.
2246 2011-07-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2248         PR target/49541
2249         * testsuite/lib/libgomp.exp (libgomp_init): Don't add -lgomp to
2250         ldflags.
2252 2011-07-15  Jakub Jelinek  <jakub@redhat.com>
2254         * config/linux/wait.h (do_spin): New inline, largely copied
2255         from do_wait, just don't do futex_wait here, instead return true if
2256         it should be done.
2257         (do_wait): Implement using do_spin.
2258         * config/linux/mutex.h (gomp_mutex_lock_slow): Add an int argument
2259         to prototype.
2260         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
2261         __sync_bool_compare_and_swap, pass the oldval to
2262         gomp_mutex_lock_slow.
2263         * config/linux/mutex.c (gomp_mutex_lock_slow): Add oldval argument.
2264         If all mutex contenders are just spinning and not sleeping, don't
2265         change state to 2 unnecessarily.  Optimize the loop when state has
2266         already become 2 to use just one atomic operation per loop instead
2267         of two.
2268         * config/linux/ia64/mutex.h (gomp_mutex_lock_slow): Add an int argument
2269         to prototype.
2270         (gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
2271         __sync_bool_compare_and_swap, pass the oldval to
2272         gomp_mutex_lock_slow.
2274 2011-06-22  Jakub Jelinek  <jakub@redhat.com>
2276         PR libgomp/49490
2277         * iter.c (gomp_iter_static_next): For chunk size 0
2278         only use n ceil/ nthreads size for the first
2279         n % nthreads threads in the team instead of
2280         all threads except for the last few ones which
2281         get less work or none at all.
2282         * iter_ull.c (gomp_iter_ull_static_next): Likewise.
2283         * env.c (parse_schedule): If OMP_SCHEDULE doesn't have
2284         chunk argument, set run_sched_modifier to 0 for static
2285         resp. 1 for other kinds.  If chunk argument is 0
2286         and not static, set value to 1.
2288 2011-05-19  Jakub Jelinek  <jakub@redhat.com>
2290         PR c++/49043
2291         * testsuite/libgomp.c++/pr49043.C: New test.
2293         PR c++/48869
2294         * testsuite/libgomp.c++/pr48869.C: New test.
2296 2011-05-06  Jakub Jelinek  <jakub@redhat.com>
2298         PR fortran/48894
2299         * fortran.c: Include limits.h.
2300         (TO_INT): Define.
2301         (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
2302         *set.
2303         (omp_set_num_threads_8_, omp_set_schedule_8_,
2304         omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
2305         omp_get_team_size_8_): Use TO_INT macro.
2306         * testsuite/libgomp.fortran/pr48894.f90: New test.
2308 2011-04-13  Jakub Jelinek  <jakub@redhat.com>
2310         PR middle-end/48591
2311         * testsuite/libgomp.c/pr48591.c: New test.
2313 2011-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2315         PR bootstrap/48135
2316         * acinclude.m4 (enable_symvers): Handle --disable-symvers.
2317         * configure: Regenerate.
2319 2011-02-27  Jakub Jelinek  <jakub@redhat.com>
2321         PR fortran/47886
2322         * testsuite/libgomp.fortran/task3.f90: New test.
2324 2011-02-24  Tobias Burnus  <burnus@net-b.de>
2326         * libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.
2328 2011-02-23  Jakub Jelinek  <jakub@redhat.com>
2330         PR libgomp/47854
2331         * libgomp.texi (omp_get_wtime): Don't say time in the past
2332         must be Unix Epoch.
2334 2011-02-18  Jakub Jelinek  <jakub@redhat.com>
2336         PR libgomp/47804
2337         * testsuite/libgomp.fortran/fortran.exp: Check for both
2338         libquadmath.a and libquadmath.${shlib_ext}.  If neither exists,
2339         but $blddir != "", still append ${blddir}/${lang_library_path}
2340         to ld_library_path.
2342 2011-02-16  Tobias Burnus  <burnus@net-b.de>
2344         PR libgomp/47758
2345         * testsuite/libgomp.fortran/fortran.exp: Check for the existence
2346         of libquadmath.a before adding its libpath to ldflags.
2348 2011-02-14  Jakub Jelinek  <jakub@redhat.com>
2350         PR libgomp/47731
2351         * config/linux/futex.h (futex_wait): Pass NULL as timeout argument
2352         to FUTEX_WAIT futex syscall.
2353         * config/linux/wait.h: Include <futex.h> instead of "futex.h".
2355 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2357         * configure: Regenerate.
2359 2011-01-20  Benjamin Kosnik  <bkoz@redhat.com>
2361         PR libstdc++/36104
2362         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Accept gnu variants.
2364 2011-01-16  Gerald Pfeifer
2366         * configure.tgt (*-*-freebsd*): Add -lpthread to XLDFLAGS.
2368 2010-12-14  Jakub Jelinek  <jakub@redhat.com>
2370         PR fortran/46874
2371         * libgomp.fortran/allocatable6.f90: New test.
2373 2010-12-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2375         * acinclude.m4 (symvers_renaming): Also set if enable_symvers = no.
2376         * configure: Regenerate.
2378 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
2380         PR target/40125
2381         PR lto/46695
2382         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
2383         * Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags.
2384         * aclocal.m4: Regenerate.
2385         * configure: Regenerate.
2386         * Makefile.in: Regenerate.
2387         * testsuite/Makefile.in: Regenerate.
2389 2010-12-02  Jakub Jelinek  <jakub@redhat.com>
2391         PR fortran/46753
2392         * libgomp.fortran/pr46753.f90: New test.
2394         PR libgomp/43706
2395         * env.c (initialize_env): Default to spin count 300000
2396         instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
2397         is specified.
2399         PR libgomp/45240
2400         * parallel.c (GOMP_parallel_end): Unlock gomp_remaining_threads_lock
2401         at the end if sync builtins aren't supported.
2403 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2405         * configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
2407 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2409         * testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0.
2411 2010-11-24  Iain Sandoe  <iains@gcc.gnu.org>
2413         * testsuite/libgomp.fortran/fortran.exp: Add paths for libquadmath.
2415 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2416             Tobias Burnus  <burnus@net-b.de>
2418         PR fortran/32049
2419         * configure.ac:
2420         * configure: Regenerate.
2422 2010-10-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>
2424         * config/linux/futex.h: New.
2425         * config/linux/arm/mutex.h: New.
2426         * configure.tgt (arm*-*-linux*): Add config path.
2428 2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
2430         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
2432 2010-09-23  Tobias Burnus  <burnus@net-b.de>
2434         * libgomp.texi (omp_get_nested, omp_set_nested, omp_set_dynamic):
2435         Change Fortran datatype to LOGICAL.
2436         (omp_set_lock, omp_test_lock, omp_unset_lock, omp_set_nested_lock,
2437         omp_unset_nested_lock): Use intent(inout) instead of intent(out).
2439 2010-08-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2441         * configure: Regenerate.
2443 2010-07-26  Jakub Jelinek  <jakub@redhat.com>
2445         * libgomp.texi: Add function keyword to a couple of Fortran
2446         interfaces, use integer instead of int for Fortran.
2448 2010-07-26  Aldy Hernandez  <aldyh@redhat.com>
2450         * libgomp.texi: Fix spelling and pasto problems throughout.
2451         Adjust prototypes to match code.
2453 2010-07-24  Tobias Burnus  <burnus@net-b.de>
2455         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: Add -w to
2456         silence -fwhole-file warning.
2458 2010-07-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2460         * configure.tgt (*-*-solaris2.[56]*): Removed.
2462 2010-07-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2464         * acinclude.m4 (LIBGOMP_ENABLE_SYMVERS): Handle sun style.
2465         Define LIBGOMP_BUILD_VERSIONED_SHLIB_GNU,
2466         LIBGOMP_BUILD_VERSIONED_SHLIB_SUN automake conditionals.
2467         (HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT): Define unless
2468         targetting solaris2*.
2469         * configure: Regenerate.
2470         * config.h.in: Regenerate.
2472         * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB]: Protect
2473         libgomp_version_script with LIBGOMP_BUILD_VERSIONED_SHLIB_GNU.
2474         Add libgomp_version_dep.
2475         [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]: Handle Sun symbol
2476         versioning.
2477         [!LIBGOMP_BUILD_VERSIONED_SHLIB]: Add libgomp_version_dep.
2478         (libgomp_la_DEPENDENCIES): Set to $(libgomp_version_dep).
2479         * Makefile.in: Regenerate.
2481         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef unless
2482         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
2483         * libgomp.map (OMP_1.0): Move symbols both in OMP_1.0 and OMP_3.0
2484         to common block, protected by
2485         HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT.
2487 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
2489         * libgomp.texi: Move to GFDL version 1.3.  Update copyright years.
2491 2010-06-09  Iain Sandoe  <iains@gcc.gnu.org>
2493         PR bootstrap/43170
2494         * configure: Regenerate.
2496 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2498         PR other/43620
2499         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
2500         * configure: Regenerate.
2501         * Makefile.in: Regenerate.
2502         * testsuite/Makefile.in: Regenerate.
2504 2010-04-26  Jakub Jelinek  <jakub@redhat.com>
2506         PR c/43893
2507         * testsuite/libgomp.c/pr43893.c: New test.
2508         * testsuite/libgomp.c++/pr43893.C: New test.
2510 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
2512         PR middle-end/43570
2513         * testsuite/libgomp.fortran/vla8.f90: New test.
2515 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
2517         PR libgomp/43706
2518         * config/linux/affinity.c (gomp_init_affinity): Decrease
2519         gomp_available_cpus if affinity mask confines the process to fewer
2520         CPUs.
2521         * config/linux/proc.c (get_num_procs): If gomp_cpu_affinity is
2522         non-NULL, just return gomp_available_cpus.
2524         PR libgomp/43569
2525         * sections.c (gomp_sections_init): Initialize ws->mode.
2527 2010-04-14  Uros Bizjak  <ubizjak@gmail.com>
2529         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Remove set but
2530         not unused bar variable.
2531         * configure: Regenerate.
2533 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2535         * Makefile.in: Regenerate.
2536         * aclocal.m4: Regenerate.
2537         * testsuite/Makefile.in: Regenerate.
2539 2010-03-22  Jakub Jelinek  <jakub@redhat.com>
2541         PR libgomp/42942
2542         * env.c (parse_unsigned_long): Add ALLOW_ZERO argument.
2543         (initialize_env): Adjust callers.
2544         (omp_set_max_active_levels): Set gomp_max_active_levels_var even
2545         when the argument is 0.
2547         * testsuite/libgomp.c/pr42942.c: New test.
2549 2010-03-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2551         PR middle-end/42644
2552         PR middle-end/42130
2553         * testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
2554         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust.
2556 2010-01-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2558         * testsuite/libgomp.c++/task-1.C: Renamed err to e.
2559         * testsuite/libgomp.c++/task-6.C: Likewise.
2561 2010-01-28  Steve Ellcey  <sje@cup.hp.com>
2563         * configure.tgt (*-*-hpux*): Add -frandom-seed flag.
2565 2010-01-26  Paolo Bonzini  <bonzini@gnu.org>
2567         * configure.ac: Test for executability of _the first word_ of GFORTRAN.
2568         * configure: Regenerate.
2570 2010-01-26  Jakub Jelinek  <jakub@redhat.com>
2572         PR fortran/42866
2573         * testsuite/libgomp.fortran/allocatable5.f90: New test.
2575 2010-01-20  Paolo Bonzini  <bonzini@gnu.org>
2577         * configure.ac: Test for executability of GFORTRAN.
2578         * configure: Regenerate.
2580 2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2582         * configure: Regenerate.
2584 2010-01-04  H.J. Lu  <hongjiu.lu@intel.com>
2586         PR libgomp/42602
2587         * libgomp.fortran/recursion1.f90 (sub): Make 's' atomic.
2589 2010-01-03  Richard Guenther  <rguenther@suse.de>
2591         * testsuite/libgomp.fortran/recursion1.f90: New testcase.
2593 2009-12-23  Sebastian Pop  <sebpop@gmail.com>
2595         * testsuite/libgomp.graphite/pr4118.c: New.
2597 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
2599         * testsuite/libgomp.fortran/crayptr2.f90: Remove forced static linkage
2600         for darwin, protect the test with require-effective-target tls_runtime.
2601         * testsuite/libgomp.fortran/pr32550.f90: Ditto.
2603 2009-12-22  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
2605         PR target/41605
2606         * testsuite/lib/libgomp.exp: Provide -B options to allow for
2607         link spec %s substitutions for static libraries.
2609 2009-12-18  Jack Howarth <howarth@bromo.med.uc.edu>
2611         PR testsuite/42135
2612         * libgomp.graphite/force-parallel-2.c: Reduce array size.
2614 2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2616         * Makefile.in: Regenerate.
2617         * configure: Regenerate.
2618         * testsuite/Makefile.in: Regenerate.
2620 2009-11-30  Dave Korn  <dave.korn.cygwin@gmail.com>
2622         * testsuite/lib/libgomp.exp (libgomp_init): Add host-dependent
2623         settings for LC_ALL and LANG.
2625 2009-11-25  Jakub Jelinek  <jakub@redhat.com>
2627         PR fortran/42162
2628         * testsuite/libgomp.fortran/pr42162.f90: New test.
2630 2009-11-13  Jakub Jelinek  <jakub@redhat.com>
2632         PR middle-end/42029
2633         * testsuite/libgomp.c/pr42029.c: New test.
2635 2009-10-26  Jakub Jelinek  <jakub@redhat.com>
2637         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
2638         *s.  Accept ld version without text in ()s.
2639         * configure: Regenerated.
2641 2009-10-22  Razya Ladelsky  <razya@il.ibm.com>
2643         * testsuite/libgomp.graphite/force-parallel-2.c: Adjust scan.
2645 2009-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2647         PR libgomp/41418
2648         * configure.ac: Set FC to "no" if $GFORTRAN starts with "no"
2649         or a hyphen (happens with fortran language disabled).
2650         * configure: Regenerate.
2652 2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2654         * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid 'head',
2655         use sed script portable to Solaris /bin/sed for extracting ld
2656         version.
2657         * configure: Regenerate.
2659 2009-09-17  Alexander Monakov  <amonakov@ispras.ru>
2661         * testsuite/libgomp.graphite/bounds.c: New test.
2663 2009-09-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2665         * Makefile.am (libgomp_la_LINK): New.
2666         * Makefile.in: Regenerate.
2668 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2670         * configure.ac (AC_PREREQ): Bump to 2.64.
2672 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2674         * Makefile.am (install-html, install-pdf): Remove.
2675         * Makefile.in: Regenerate.
2677         * Makefile.in: Regenerate.
2678         * aclocal.m4: Regenerate.
2679         * config.h.in: Regenerate.
2680         * configure: Regenerate.
2681         * testsuite/Makefile.in: Regenerate.
2683 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2685         * Makefile.am (LINK): Add $(AM_LIBTOOLFLAGS) and $(LIBTOOLFLAGS).
2686         * Makefile.in: Regenerate.
2688 2009-08-20  Dave Korn  <dave.korn.cygwin@gmail.com>
2690         * Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
2691         * Makefile.in: Regenerate.
2693 2009-08-19  Tobias Burnus  <burnus@net-b.de>
2695         PR fortran/41102
2696         omp_lib.h.in: Fix -std=f95 errors.
2699 2009-08-14  David Edelsohn  <edelsohn@gnu.org>
2701         * testsuite/libgomp.graphite: Move from gcc.dg/graphite.
2702         * testsuite/libgomp.graphite/graphite_autopar.exp: Delete.
2703         * testsuite/libgomp.graphite/graphite.exp: New.
2705 2009-08-05  Andreas Tobler  <a.tobler@schweiz.org>
2707         * testsuite/libgomp.fortran/fortran.exp: Add flags in case of shared
2708         only build.
2710 2009-08-04  David Daney  <ddaney@caviumnetworks.com>
2712         * config/linux/mutex.h (gomp_mutex_unlock): Add comment about
2713         needed memory barrier semantics.
2714         * config/linux/mips/mutex.h: New file.
2716 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2718         * configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
2720 2009-07-16  Joseph Myers  <joseph@codesourcery.com>
2722         * configure: Regenerate.
2724 2009-07-11  Richard Sandiford  <rdsandiford@googlemail.com>
2726         PR testsuite/40699
2727         PR testsuite/40707
2728         PR testsuite/40709
2729         * testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
2730         * testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
2731         testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.
2733 2009-07-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
2735         * testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
2736         options when choosing a multilib.
2738 2009-06-30  Richard Sandiford  <r.sandiford@uk.ibm.com>
2740         * testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
2741         ld_library_path.  Use add_path.  Add just find_libgcc_s to
2742         ld_library_path, not every libgcc multilib directory.
2743         * testsuite/libgomp.c/c.exp (ld_library_path): Don't call
2744         gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
2745         * testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
2746         Use add_path.
2747         * testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.
2749 2009-06-09  Nathan Froyd  <froydnj@codesourcery.com>
2751         * Makefile.am (LTLDFLAGS): Define.
2752         (LINK): Define.
2753         * Makefile.in: Regenerate.
2755 2009-05-27  Janne Blomqvist  <jb@gcc.gnu.org>
2757         PR fortran/39718
2758         * testsuite/libgomp.fortran/fortran.exp: Don't link with
2759         libgfortranbegin, check existence of libgfortran.a instead of
2760         libgfortranbegin.a.
2762 2009-05-20  Jakub Jelinek  <jakub@redhat.com>
2764         PR libgomp/40174
2765         * team.c (gomp_thread_start): Destroy thr->release semaphore.
2766         (gomp_free_pool_helper): Likewise.
2768 2009-04-20  Vasilis Liaskovitis  <vliaskov@gmail.com>
2769             Jakub Jelinek  <jakub@redhat.com>
2771         PR fortran/35423
2772         * testsuite/libgomp.fortran/workshare2.f90: New test.
2774 2009-04-09  Nick Clifton  <nickc@redhat.com>
2776         * iter.c: Change copyright header to refer to version 3 of the
2777         GNU General Public License with version 3.1 of the GCC Runtime
2778         Library Exception and to point readers at the COPYING3 and
2779         COPYING3.RUNTIME files and the FSF's license web page.
2780         * alloc.c: Likewise.
2781         * barrier.c: Likewise.
2782         * config/bsd/proc.c: Likewise.
2783         * config/linux/affinity.c: Likewise.
2784         * config/linux/alpha/futex.h: Likewise.
2785         * config/linux/bar.c: Likewise.
2786         * config/linux/bar.h: Likewise.
2787         * config/linux/ia64/futex.h: Likewise.
2788         * config/linux/ia64/mutex.h: Likewise.
2789         * config/linux/lock.c: Likewise.
2790         * config/linux/mips/futex.h: Likewise.
2791         * config/linux/mutex.c: Likewise.
2792         * config/linux/mutex.h: Likewise.
2793         * config/linux/powerpc/futex.h: Likewise.
2794         * config/linux/proc.c: Likewise.
2795         * config/linux/ptrlock.c: Likewise.
2796         * config/linux/ptrlock.h: Likewise.
2797         * config/linux/s390/futex.h: Likewise.
2798         * config/linux/sem.c: Likewise.
2799         * config/linux/sem.h: Likewise.
2800         * config/linux/sparc/futex.h: Likewise.
2801         * config/linux/wait.h: Likewise.
2802         * config/linux/x86/futex.h: Likewise.
2803         * config/mingw32/proc.c: Likewise.
2804         * config/mingw32/time.c: Likewise.
2805         * config/posix/affinity.c: Likewise.
2806         * config/posix/bar.c: Likewise.
2807         * config/posix/bar.h: Likewise.
2808         * config/posix/lock.c: Likewise.
2809         * config/posix/mutex.h: Likewise.
2810         * config/posix/proc.c: Likewise.
2811         * config/posix/ptrlock.h: Likewise.
2812         * config/posix/sem.c: Likewise.
2813         * config/posix/sem.h: Likewise.
2814         * config/posix/time.c: Likewise.
2815         * config/posix95/lock.c: Likewise.
2816         * critical.c: Likewise.
2817         * env.c: Likewise.
2818         * error.c: Likewise.
2819         * fortran.c: Likewise.
2820         * iter_ull.c: Likewise.
2821         * libgomp.h: Likewise.
2822         * libgomp_f.h.in: Likewise.
2823         * libgomp_g.h: Likewise.
2824         * loop.c: Likewise.
2825         * loop_ull.c: Likewise.
2826         * omp.h.in: Likewise.
2827         * omp_lib.f90.in: Likewise.
2828         * omp_lib.h.in: Likewise.
2829         * ordered.c: Likewise.
2830         * parallel.c: Likewise.
2831         * sections.c: Likewise.
2832         * single.c: Likewise.
2833         * task.c: Likewise.
2834         * team.c: Likewise.
2835         * work.c: Likewise.
2837 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
2839         * testsuite/config/default.exp: Change copyright header to refer to
2840         version 3 of the GNU General Public License and to point readers
2841         at the COPYING3 file and the FSF's license web page.
2843 2009-04-08  Jakub Jelinek  <jakub@redhat.com>
2845         PR middle-end/39573
2846         * libgomp.c++/pr39573.C: New test.
2848 2009-04-01  Jakub Jelinek  <jakub@redhat.com>
2850         PR other/39591
2851         * testsuite/libgomp.c/pr39591-1.c: New test.
2852         * testsuite/libgomp.c/pr39591-2.c: New test.
2853         * testsuite/libgomp.c/pr39591-3.c: New test.
2855 2009-03-25  Uros Bizjak  <ubizjak@gmail.com>
2857         * testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
2858         * testsuite/libgomp.c/atomic-6.c: Ditto.
2860 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
2862         PR c/39495
2863         * testsuite/libgomp.c/loop-12.c: New test.
2864         * testsuite/libgomp.c/loop-11.c: New test.
2865         * testsuite/libgomp.c++/loop-11.C: New test.
2866         * testsuite/libgomp.c++/loop-12.C: New test.
2867         * testsuite/libgomp.c++/for-8.C: New test.
2869 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2871         * configure: Regenerate.
2873 2009-02-11  Jakub Jelinek  <jakub@redhat.com>
2875         PR middle-end/39154
2876         * testsuite/libgomp.c/pr39154.c: New test.
2878 2009-01-30  Ian Lance Taylor  <iant@google.com>
2880         * acinclude.m4 (LIBCOMP_CHECK_LINKER_FEATURES): Set
2881         libgomp_ld_is_gold.  Get gold version number.
2882         (LIBGOMP_ENABLE_SYMVERS): Gold always support symbol versioning.
2883         * configure: Rebuild.
2885 2009-01-19  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
2887         * testsuite/lib/libgomp.exp: Add -B option for targets that
2888         use libgfortran.a%s in their specs.
2890 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
2892         PR libgomp/38086
2893         * acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New check.
2894         * libgomp.h (LIBGOMP_GNU_SYMBOL_VERSIONING): Undefine if
2895         HAVE_AS_SYMVER_DIRECTIVE is not defined.
2896         * configure: Regenerated.
2897         * config.h.in: Likewise.
2899 2008-12-28  Jakub Jelinek  <jakub@redhat.com>
2901         PR c++/38650
2902         * testsuite/libgomp.c/pr38650.c: New test.
2903         * testsuite/libgomp.c++/pr38650.C: New test.
2905 2008-12-27  Jakub Jelinek  <jakub@redhat.com>
2907         * testsuite/libgomp.c/collapse-1.c (main): Add private(k) clause.
2909 2008-12-26  Uros Bizjak  <ubizjak@gmail.com>
2911         * testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.
2913 2008-12-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2915         * configure: Regenerate.
2917 2008-12-08  Jakub Jelinek  <jakub@redhat.com>
2919         PR middle-end/36802
2920         * testsuite/libgomp.c/pr36802-1.c: New test.
2921         * testsuite/libgomp.c/pr36802-2.c: New test.
2922         * testsuite/libgomp.c/pr36802-3.c: New test.
2924 2008-12-01  Janis Johnson  <janis187@us.ibm.com>
2926         PR libgomp/38270
2927         * config/linux/powerpc/mutex.h: New.
2929 2008-12-01  Jakub Jelinek  <jakub@redhat.com>
2931         PR c++/38257
2932         * testsuite/libgomp.c++/for-7.C: New test.
2934         PR c++/38348
2935         * testsuite/libgomp.c++/for-6.C: New test.
2937 2008-11-26  Janis Johnson  <janis187@us.ibm.com>
2939         PR testsuite/28870
2940         * testsuite/lib/libgomp.exp: Include new timeout library files.
2941         (libgomp_target_compile): Set timeout value from new proc.
2943 2008-11-13  Steve Ellcey  <sje@cup.hp.com>
2945         PR libgomp/37938
2946         * config/linux/ia64/mutex.h: New.
2948 2008-11-04  Tobias Burnus  <burnus@net-b.de>
2950         PR libgomp/37935
2951         * libgomp.texi (Runtime library routines, environment variables):
2952         Update for OpenMP version 3.0.
2954 2008-09-26  Peter O'Gorman  <pogma@thewrittenword.com>
2955             Steve Ellcey  <sje@cup.hp.com>
2957         * configure: Regenerate for new libtool.
2958         * Makefile.in: Ditto.
2959         * testsuite/Makefile.in: Ditto.
2961 2008-09-19  Jakub Jelinek  <jakub@redhat.com>
2962             Andreas Tobler  <a.tobler@schweiz.org>
2964         * config/bsd/proc.c: New file.
2965         * configure.tgt (*-*-darwin*): Use config_path "bsd posix".
2966         * configure.ac: Check for header <sys/sysctl.h>
2967         * configure: Regenerate.
2968         * config.h.in: Likewise.
2970 2008-09-05  Janis Johnson  <janis187@us.ibm.com>
2972         * testsuite/ligbomp.c/c.exp: Unset lang_test_file only if it exists.
2974 2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
2976         * Makefile.am (libgomp_la_LDFLAGS): Add -no-undefined.
2977         * Makefile.in: Regenerated.
2978         * testsuite/Makefile.in: Regenerated.
2980 2008-08-21  Nathan Froyd  <froydnj@codesourcery.com>
2982         * testsuite/lib/libgomp.exp (libgomp_init): Only set things that
2983         depend on blddir if blddir exists.
2984         (libgomp_target_compile): Likewise.
2985         * testsuite/libgomp.c++/c++.exp: Likewise.
2986         * testsuite/libgomp.fortran/fortran.exp: Likewise.
2988 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2990         * libgomp.texi: Update to GFDL 1.2.  Update copyright years.
2991         Do not list GPL as Invariant Section.
2993 2008-07-28  Ilie Garbacea  <ilie@mips.com>
2994             Chao-ying Fu  <fu@mips.com>
2996         * configure.tgt: Enable futex for MIPS.
2997         * config/linux/mips/futex.h: New file.
2999 2008-07-16  Jakub Jelinek  <jakub@redhat.com>
3001         * team.c (gomp_team_end): Free team immediately if it has
3002         just one thread.
3004 2008-07-08  David Edelsohn  <edelsohn@gnu.org>
3006         * testsuite/libgomp.c++/c++.exp: Append multilib library path.
3007         * testsuite/libgomp.fortran/fortran.exp: Same.
3008         * testsuite/libgomp.c/c.exp: Same.
3009         * testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
3010         directory to library path first.
3012 2008-06-29  Krister Walfridsson  <krister.walfridsson@gmail.com>
3014         * env.c (parse_stacksize): Add cast to avoid warning.
3015         (parse_spincount): Likewise.
3017 2008-06-27  Jakub Jelinek  <jakub@redhat.com>
3019         * testsuite/libgomp.c/loop-10.c: New test.
3020         * libgomp.c/loop-3.c (main): Add lastprivate clause.
3021         * libgomp.c++/loop-6.C (main): Likewise.
3023         PR debug/36617
3024         * testsuite/libgomp.c/debug-1.c: New test.
3026 2008-06-19  Jakub Jelinek  <jakub@redhat.com>
3028         * testsuite/libgomp.c/nqueens-1.c: New test.
3030         PR c++/36523
3031         * testsuite/libgomp.c++/task-7.C: New function.
3033 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3035         * configure: Regenerate.
3037 2008-06-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3039         * env.c (initialize_env): Always initialize gomp_remaining_threads_lock
3040         mutex when HAVE_SYNC_BUILTINS isn't defined.
3042 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3044         * libgomp.texi (omp_test_lock): Fix typo.
3046 2008-06-12  Tobias Burnus  <burnus@net-b.de>
3048         * omp_lib.f90.in: Add "implicit none".
3050 2008-06-12  Jakub Jelinek  <jakub@redhat.com>
3052         PR middle-end/36506
3053         * testsuite/libgomp.c/reduction-5.c: New test.
3055 2008-06-11  Jakub Jelinek  <jakub@redhat.com>
3057         * libgomp.h (struct gomp_task): Add in_tied_task field.
3058         * task.c (gomp_init_task): Initialize it.
3059         (GOMP_task): Likewise.  Call gomp_team_barrier_set_task_pending
3060         unconditionally.  Don't call gomp_team_barrier_wake if
3061         current task is implicit or if(0) from implicit and number of
3062         running tasks is equal to nthreads - 1.
3064         PR libgomp/36471
3065         * omp_lib.f90.in (omp_get_ancestor_thread_num_8,
3066         omp_get_team_size_8): Fix pastos.
3068         PR libgomp/36469
3069         * configure.ac: Add AC_CHECK_FUNCS (strtoull).
3070         * configure: Regenerated.
3071         * config.h.in: Regenerated.
3072         * env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
3073         defined.
3075 2008-06-06  Andreas Tobler  <a.tobler@schweiz.org>
3077         PR bootstrap/36452
3078         * loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
3079         (GOMP_loop_ull_dynamic_start): Likewise.
3080         (GOMP_loop_ull_guided_start): Likewise.
3081         (GOMP_loop_ull_ordered_static_start): Likewise.
3082         (GOMP_loop_ull_ordered_dynamic_start): Likewise.
3083         (GOMP_loop_ull_ordered_guided_start): Likewise.
3085 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
3086             Richard Henderson  <rth@redhat.com>
3087             Ulrich Drepper  <drepper@redhat.com>
3088             Jakob Blomer  <jakob.blomer@ira.uka.de>
3090         * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
3091         Substitute also OMP_*LOCK_25*.
3092         * configure: Regenerated.
3093         * config.h.in: Regenerated.
3094         * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
3095         ptrlock.c and task.c.
3096         * Makefile.in: Regenerated.
3097         * testsuite/Makefile.in: Regenerated.
3098         * task.c: New file.
3099         * loop_ull.c: New file.
3100         * iter_ull.c: New file.
3101         * libgomp.h: Include ptrlock.h.
3102         (enum gomp_task_kind): New type.
3103         (struct gomp_team): Add task_lock, task_queue, task_count,
3104         task_running_count, single_count fields.  Add
3105         work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
3106         Remove work_share_lock, generation_mask,
3107         oldest_live_gen, num_live_gen and init_work_shares fields, add
3108         work work_share_list_alloc, work_share_list_free and work_share_chunk
3109         fields.  Change work_shares from pointer to pointers into an array.
3110         Change ordered_release field into gomp_sem_t ** from flexible array
3111         member.  Add implicit_task and initial_work_shares fields.
3112         Move close to the end of the struct.
3113         (struct gomp_team_state): Add single_count, last_work_share,
3114         active_level and level fields, remove work_share_generation.
3115         (gomp_barrier_handle_tasks): New prototype.
3116         (gomp_finish_task): New inline function.
3117         (struct gomp_work_share): Move chunk_size, end, incr into
3118         transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
3119         next_ll fields.  Reshuffle fields.  Add next_alloc,
3120         next_ws, next_free and inline_ordered_team_ids fields, change
3121         ordered_team_ids into pointer from flexible array member.
3122         Add mode field.  Put lock and next into a different cache line
3123         from most of the write-once fields.
3124         (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
3125         gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
3126         gomp_iter_ull_guided_next): New prototypes.
3127         (gomp_new_icv): New prototype.
3128         (struct gomp_thread): Add thread_pool and task fields.
3129         (struct gomp_thread_pool): New type.
3130         (gomp_new_team): New prototype.
3131         (gomp_team_start): Change type of last argument.
3132         (gomp_new_work_share): Removed.
3133         (gomp_init_work_share, gomp_fini_work_share): New prototypes.
3134         (gomp_work_share_init_done): New static inline.
3135         (gomp_throttled_spin_count_var, gomp_available_cpus,
3136         gomp_managed_threads): New extern decls.
3137         (gomp_init_task): New prototype.
3138         (gomp_spin_count_var): New extern var decl.
3139         (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
3140         or no alias support, or if not PIC.
3141         (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
3142         gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
3143         gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
3144         gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
3145         gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
3146         gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
3147         gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
3148         gomp_test_nest_lock_25): New prototypes.
3149         (omp_lock_symver, strong_alias): Define.
3150         (gomp_remaining_threads_count, gomp_remaining_threads_lock): New
3151         decls.
3152         (gomp_end_task): New.
3153         (struct gomp_task_icv, gomp_global_icv): New.
3154         (gomp_thread_limit_var, gomp_max_active_levels_var): New.
3155         (struct gomp_task): New.
3156         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
3157         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
3158         (gomp_icv): New.
3159         (gomp_schedule_type): Reorder enum to match
3160         omp_sched_t.
3161         * team.c (struct gomp_thread_start_data): Add thread_pool and task
3162         fields.
3163         (gomp_thread_start): Add gomp_team_barrier_wait call.
3164         For non-nested case remove clearing of docked thread thr fields.
3165         Use pool fields instead of global gomp_* variables.  Use
3166         gomp_barrier_wait_last when needed.  Initialize ts.active_level.
3167         Create tasks for each member thread.
3168         (free_team): Only destroy team barrier, task_lock here and free it.
3169         (gomp_free_thread): Free last_team if non-NULL.
3170         (gomp_team_end): Call gomp_team_barrier_wait instead of
3171         gomp_barrier_wait.  For nested case call one extra
3172         gomp_barrier_wait.  Move here some destruction from free_team.
3173         Call free_team on pool->last_team if any, rather than freeing
3174         current team.  Destroy work_share_list_free_lock ifndef
3175         HAVE_SYNC_BUILTINS.
3176         (gomp_new_icv): New function.
3177         (gomp_threads, gomp_threads_size, gomp_threads_used,
3178         gomp_threads_dock): Removed.
3179         (gomp_thread_destructor): New variable.
3180         (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
3181         functions.
3182         (gomp_team_start): Create new pool if current thread doesn't have
3183         one.  Use pool fields instead of global gomp_* variables.
3184         Initialize thread_pool field for new threads.  Clear single_count.
3185         Change last argument from ws to team, don't create
3186         new team, set ts.work_share to &team->work_shares[0] and clear
3187         ts.last_work_share.  Don't clear ts.work_share_generation.
3188         If number of threads changed, adjust atomically gomp_managed_threads.
3189         Use gomp_init_task instead of gomp_new_task,
3190         set thr->task to the corresponding implicit_task array entry.
3191         Create tasks for each member thread.  Initialize ts.level.
3192         (initialize_team): Call pthread_key_create on
3193         gomp_thread_destructor.
3194         (team_destructor): New function.
3195         (new_team): Removed.
3196         (gomp_new_team): New function.
3197         (free_team): Free gomp_work_share blocks chained through next_alloc,
3198         instead of freeing work_shares and destroying work_share_lock.
3199         (gomp_team_end): Call gomp_fini_work_share.  If number of threads
3200         changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
3201         * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
3202         of gomp_barrier_wait.
3203         * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
3204         instead of gomp_barrier_wait.  Call gomp_work_share_init_done
3205         if gomp_work_share_start returned true.  Don't unlock ws->lock.
3206         (GOMP_single_copy_end): Call gomp_team_barrier_wait instead
3207         of gomp_barrier_wait.
3208         (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
3209         gomp_work_share_init_done if gomp_work_share_start returned true.
3210         Don't unlock ws->lock.
3211         * work.c: Include stddef.h.
3212         (free_work_share): Use work_share_list_free_lock instead
3213         of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
3214         Call gomp_fini_work_share and then either free ws if orphaned, or
3215         put it into work_share_list_free list of the current team.
3216         (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
3217         functions.
3218         (gomp_work_share_start, gomp_work_share_end,
3219         gomp_work_share_end_nowait): Rewritten.
3220         * omp_lib.f90.in Change some tabs to spaces to prevent warnings.
3221         (openmp_version): Set to 200805.
3222         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
3223         omp_sched_guided, omp_sched_auto): New parameters.
3224         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
3225         omp_set_max_active_levels, omp_get_max_active_levels,
3226         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
3227         omp_get_active_level): New interfaces.
3228         * omp_lib.h.in (openmp_version): Set to 200805.
3229         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
3230         omp_sched_guided, omp_sched_auto): New parameters.
3231         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
3232         omp_set_max_active_levels, omp_get_max_active_levels,
3233         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
3234         omp_get_active_level): New externals.
3235         * loop.c: Include limits.h.
3236         (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
3237         GFS_AUTO.
3238         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
3239         Likewise.  Use gomp_icv.
3240         (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
3241         ts.static_trip here.
3242         (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
3243         gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
3244         (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
3245         gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
3246         don't unlock ws->lock, otherwise lock it.
3247         (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
3248         gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
3249         (gomp_parallel_loop_start): Call gomp_new_team instead of
3250         gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
3251         Adjust gomp_team_start caller.  Pass 0 as second argument to
3252         gomp_resolve_num_threads.
3253         (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
3254         If adding ws->chunk_size nthreads + 1 times after end won't
3255         overflow, set ws->mode to 1.
3256         * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
3257         GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
3258         GOMP_loop_ull_ordered_static_start,
3259         GOMP_loop_ull_ordered_dynamic_start,
3260         GOMP_loop_ull_ordered_guided_start,
3261         GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
3262         GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
3263         GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
3264         GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
3265         GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
3266         prototypes.
3267         * libgomp.map: Export lock routines also @@OMP_2.0.
3268         (GOMP_loop_ordered_dynamic_first,
3269         GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
3270         GOMP_loop_ordered_static_first): Remove.
3271         (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
3272         GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
3273         GOMP_loop_ull_ordered_dynamic_next,
3274         GOMP_loop_ull_ordered_dynamic_start,
3275         GOMP_loop_ull_ordered_guided_next,
3276         GOMP_loop_ull_ordered_guided_start,
3277         GOMP_loop_ull_ordered_runtime_next,
3278         GOMP_loop_ull_ordered_runtime_start,
3279         GOMP_loop_ull_ordered_static_next,
3280         GOMP_loop_ull_ordered_static_start,
3281         GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
3282         GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
3283         GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
3284         (omp_set_schedule, omp_get_schedule,
3285         omp_get_thread_limit, omp_set_max_active_levels,
3286         omp_get_max_active_levels, omp_get_level,
3287         omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
3288         omp_set_schedule_, omp_set_schedule_8_,
3289         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
3290         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
3291         omp_get_max_active_levels_, omp_get_level_,
3292         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
3293         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
3294         New exports @@OMP_3.0.
3295         * omp.h.in (omp_sched_t): New type.
3296         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
3297         omp_set_max_active_levels, omp_get_max_active_levels,
3298         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
3299         omp_get_active_level): New prototypes.
3300         * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
3301         gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
3302         gomp_thread_limit_var, gomp_remaining_threads_count,
3303         gomp_remaining_threads_lock): New variables.
3304         (parse_spincount): New function.
3305         (initialize_env): Call gomp_init_num_threads unconditionally.
3306         Initialize gomp_available_cpus.  Call parse_spincount,
3307         initialize gomp_{,throttled_}spin_count_var
3308         depending on presence and value of OMP_WAIT_POLICY and
3309         GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
3310         Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
3311         OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
3312         for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
3313         gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
3314         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
3315         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
3316         (gomp_global_icv): New.
3317         (parse_schedule): Use it.  Parse "auto".
3318         (omp_set_num_threads): Use gomp_icv.
3319         (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
3320         Likewise.
3321         (omp_get_max_threads): Move from parallel.c.
3322         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
3323         omp_set_max_active_levels, omp_get_max_active_levels): New functions,
3324         add ialias.
3325         (parse_stacksize, parse_wait_policy): New functions.
3326         * fortran.c: Rewrite lock wrappers, if symbol versioning provide
3327         both wrappers for compatibility and new locks.
3328         (omp_set_schedule, omp_get_schedule,
3329         omp_get_thread_limit, omp_set_max_active_levels,
3330         omp_get_max_active_levels, omp_get_level,
3331         omp_get_ancestor_thread_num, omp_get_team_size,
3332         omp_get_active_level): New ialias_redirect.
3333         (omp_set_schedule_, omp_set_schedule_8_,
3334         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
3335         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
3336         omp_get_max_active_levels_, omp_get_level_,
3337         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
3338         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
3339         New functions.
3340         * parallel.c: Include limits.h.
3341         (gomp_resolve_num_threads): Add count argument.  Rewritten.
3342         (GOMP_parallel_start): Call gomp_new_team and pass that as last
3343         argument to gomp_team_start.  Pass 0 as second argument to
3344         gomp_resolve_num_threads.
3345         (GOMP_parallel_end): Decrease gomp_remaining_threads_count
3346         if gomp_thread_limit_var != ULONG_MAX.
3347         (omp_in_parallel): Implement using ts.active_level.
3348         (omp_get_max_threads): Move to env.c.
3349         (omp_get_level, omp_get_ancestor_thread_num,
3350         omp_get_team_size, omp_get_active_level): New functions,
3351         add ialias.
3352         * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
3353         after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
3354         gomp_iter_dynamic_next instead of the _locked variant and don't take
3355         lock around it, otherwise acquire it before calling
3356         gomp_iter_dynamic_next_locked.
3357         (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
3358         gomp_iter_dynamic_next instead of the _locked variant and don't take
3359         lock around it.
3360         (GOMP_parallel_sections_start): Call gomp_new_team instead of
3361         gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
3362         Adjust gomp_team_start caller.  Pass count as second argument to
3363         gomp_resolve_num_threads, don't adjust num_threads after the call.
3364         Use gomp_icv.
3365         * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
3366         ws->chunk_size by incr.
3367         (gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
3368         code.
3369         * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
3370         types.
3371         (omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
3372         (omp_check_defines): Check even the compat defines.
3373         * config/linux/ptrlock.c: New file.
3374         * config/linux/ptrlock.h: New file.
3375         * config/linux/wait.h: New file.
3376         * config/posix/ptrlock.c: New file.
3377         * config/posix/ptrlock.h: New file.
3378         * config/linux/bar.h (gomp_team_barrier_wait,
3379         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
3380         (gomp_team_barrier_set_task_pending,
3381         gomp_team_barrier_clear_task_pending,
3382         gomp_team_barrier_set_waiting_for_tasks,
3383         gomp_team_barrier_waiting_for_tasks,
3384         gomp_team_barrier_done): New inlines.
3385         (gomp_barrier_t): Rewritten.
3386         (gomp_barrier_state_t): New typedef.
3387         (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
3388         gomp_barrier_wait_start): Rewritten.
3389         (gomp_barrier_wait_end): Change second argument to
3390         gomp_barrier_state_t.
3391         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
3392         inlines.
3393         * config/linux/bar.c: Include wait.h instead of libgomp.h and
3394         futex.h.
3395         (gomp_barrier_wait_end): Rewritten.
3396         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
3397         gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
3398         * config/posix/bar.h (gomp_barrier_t): Add generation field.
3399         (gomp_barrier_state_t): New typedef.
3400         (gomp_team_barrier_wait,
3401         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
3402         (gomp_barrier_wait_start): Or all but low 2 bits from generation
3403         into the return value.  Return gomp_barrier_state_t.
3404         (gomp_team_barrier_set_task_pending,
3405         gomp_team_barrier_clear_task_pending,
3406         gomp_team_barrier_set_waiting_for_tasks,
3407         gomp_team_barrier_waiting_for_tasks,
3408         gomp_team_barrier_done): New inlines.
3409         (gomp_barrier_wait_end): Change second argument to
3410         gomp_barrier_state_t.
3411         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
3412         inlines.
3413         * config/posix/bar.c (gomp_barrier_init): Clear generation field.
3414         (gomp_barrier_wait_end): Change second argument to
3415         gomp_barrier_state_t.
3416         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
3417         gomp_team_barrier_wake): New functions.
3418         * config/linux/mutex.c: Include wait.h instead of libgomp.h and
3419         futex.h.
3420         (gomp_futex_wake, gomp_futex_wait): New variables.
3421         (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
3422         * config/linux/lock.c: Rewrite to make locks task owned,
3423         for backwards compatibility provide the old entrypoints
3424         if symbol versioning.  Include wait.h instead of libgomp.h and
3425         futex.h.
3426         (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
3427         * config/posix95/lock.c: Rewrite to make locks task owned,
3428         for backwards compatibility provide the old entrypoints
3429         if symbol versioning.
3430         * config/posix/lock.c: Rewrite to make locks task owned,
3431         for backwards compatibility provide the old entrypoints
3432         if symbol versioning.
3433         * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
3434         (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
3435         * config/posix/proc.c, config/mingw32/proc.c: Similarly.
3436         * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
3437         (sys_futex0): Return error code.
3438         (futex_wake, futex_wait): If ENOSYS was returned, clear
3439         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
3440         (cpu_relax, atomic_write_barrier): New static inlines.
3441         * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
3442         (futex_wake, futex_wait): If ENOSYS was returned, clear
3443         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
3444         (cpu_relax, atomic_write_barrier): New static inlines.
3445         * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
3446         (sys_futex0): Return error code.
3447         (futex_wake, futex_wait): If ENOSYS was returned, clear
3448         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
3449         (cpu_relax, atomic_write_barrier): New static inlines.
3450         * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
3451         (sys_futex0): Return error code.
3452         (futex_wake, futex_wait): If ENOSYS was returned, clear
3453         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
3454         (cpu_relax, atomic_write_barrier): New static inlines.
3455         * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
3456         (sys_futex0): Return error code.
3457         (futex_wake, futex_wait): If ENOSYS was returned, clear
3458         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
3459         (cpu_relax, atomic_write_barrier): New static inlines.
3460         * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
3461         (sys_futex0): Return error code.
3462         (futex_wake, futex_wait): If ENOSYS was returned, clear
3463         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
3464         (cpu_relax, atomic_write_barrier): New static inlines.
3465         * config/linux/sem.c: Include wait.h instead of libgomp.h and
3466         futex.h.
3467         (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
3468         * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
3469         * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
3470         types.
3471         (omp_nest_lock_t): Change owner into void *, add lock field.
3472         * config/posix95/omp-lock.h: Include semaphore.h.
3473         (omp_lock_25_t, omp_nest_lock_25_t): New types.
3474         (omp_lock_t): Use sem_t instead of mutex if semaphores
3475         aren't broken.
3476         (omp_nest_lock_t): Likewise.  Change owner to void *.
3477         * config/posix/omp-lock.h: Include semaphore.h.
3478         (omp_lock_25_t, omp_nest_lock_25_t): New types.
3479         (omp_lock_t): Use sem_t instead of mutex if semaphores
3480         aren't broken.
3481         (omp_nest_lock_t): Likewise.  Add owner field.
3483 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
3485         * testsuite/libgomp.c/collapse-1.c: New test.
3486         * testsuite/libgomp.c/collapse-2.c: New test.
3487         * testsuite/libgomp.c/collapse-3.c: New test.
3488         * testsuite/libgomp.c/icv-1.c: New test.
3489         * testsuite/libgomp.c/icv-2.c: New test.
3490         * testsuite/libgomp.c/lib-2.c: New test.
3491         * testsuite/libgomp.c/lock-1.c: New test.
3492         * testsuite/libgomp.c/lock-2.c: New test.
3493         * testsuite/libgomp.c/lock-3.c: New test.
3494         * testsuite/libgomp.c/loop-4.c: New test.
3495         * testsuite/libgomp.c/loop-5.c: New test.
3496         * testsuite/libgomp.c/loop-6.c: New test.
3497         * testsuite/libgomp.c/loop-7.c: New test.
3498         * testsuite/libgomp.c/loop-8.c: New test.
3499         * testsuite/libgomp.c/loop-9.c: New test.
3500         * testsuite/libgomp.c/nested-3.c: New test.
3501         * testsuite/libgomp.c/nestedfn-6.c: New test.
3502         * testsuite/libgomp.c/sort-1.c: New test.
3503         * testsuite/libgomp.c/task-1.c: New test.
3504         * testsuite/libgomp.c/task-2.c: New test.
3505         * testsuite/libgomp.c/task-3.c: New test.
3506         * testsuite/libgomp.c/task-4.c: New test.
3507         * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
3508         to C++ testsuite default compiler options.
3509         * testsuite/libgomp.c++/collapse-1.C: New test.
3510         * testsuite/libgomp.c++/collapse-2.C: New test.
3511         * testsuite/libgomp.c++/ctor-10.C: New test.
3512         * testsuite/libgomp.c++/for-1.C: New test.
3513         * testsuite/libgomp.c++/for-2.C: New test.
3514         * testsuite/libgomp.c++/for-3.C: New test.
3515         * testsuite/libgomp.c++/for-4.C: New test.
3516         * testsuite/libgomp.c++/for-5.C: New test.
3517         * testsuite/libgomp.c++/loop-8.C: New test.
3518         * testsuite/libgomp.c++/loop-9.C: New test.
3519         * testsuite/libgomp.c++/loop-10.C: New test.
3520         * testsuite/libgomp.c++/task-1.C: New test.
3521         * testsuite/libgomp.c++/task-2.C: New test.
3522         * testsuite/libgomp.c++/task-3.C: New test.
3523         * testsuite/libgomp.c++/task-4.C: New test.
3524         * testsuite/libgomp.c++/task-5.C: New test.
3525         * testsuite/libgomp.c++/task-6.C: New test.
3526         * testsuite/libgomp.fortran/allocatable1.f90: New test.
3527         * testsuite/libgomp.fortran/allocatable2.f90: New test.
3528         * testsuite/libgomp.fortran/allocatable3.f90: New test.
3529         * testsuite/libgomp.fortran/allocatable4.f90: New test.
3530         * testsuite/libgomp.fortran/collapse1.f90: New test.
3531         * testsuite/libgomp.fortran/collapse2.f90: New test.
3532         * testsuite/libgomp.fortran/collapse3.f90: New test.
3533         * testsuite/libgomp.fortran/collapse4.f90: New test.
3534         * testsuite/libgomp.fortran/lastprivate1.f90: New test.
3535         * testsuite/libgomp.fortran/lastprivate2.f90: New test.
3536         * testsuite/libgomp.fortran/lib4.f90: New test.
3537         * testsuite/libgomp.fortran/lock-1.f90: New test.
3538         * testsuite/libgomp.fortran/lock-2.f90: New test.
3539         * testsuite/libgomp.fortran/nested1.f90: New test.
3540         * testsuite/libgomp.fortran/nestedfn4.f90: New test.
3541         * testsuite/libgomp.fortran/strassen.f90: New test.
3542         * testsuite/libgomp.fortran/tabs1.f90: New test.
3543         * testsuite/libgomp.fortran/tabs2.f: New test.
3544         * testsuite/libgomp.fortran/task1.f90: New test.
3545         * testsuite/libgomp.fortran/task2.f90: New test.
3546         * testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
3547         * testsuite/libgomp.fortran/vla5.f90: Likewise.
3548         * testsuite/libgomp.c/pr26943-2.c: Likewise.
3549         * testsuite/libgomp.c/pr26943-3.c: Likewise.
3550         * testsuite/libgomp.c/pr26943-4.c: Likewise.
3552 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
3554         PR c++/36308
3555         * testsuite/libgomp.c++/ctor-11.C: New test.
3556         * testsuite/libgomp.c++/ctor-12.C: New test.
3558 2008-05-15  Janis Johnson  <janis187@us.ibm.com>
3560         * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.
3562 2008-05-07  Jakub Jelinek  <jakub@redhat.com>
3564         PR middle-end/36106
3565         * testsuite/libgomp.c/atomic-5.c: New test.
3566         * testsuite/libgomp.c/atomic-6.c: New test.
3567         * testsuite/libgomp.c/autopar-1.c: New test.
3569 2008-04-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3571         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
3572         (LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
3573         (LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
3574         (LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
3575         * configure: Regenerate.
3576         * Makefile.in, testsuite/Makefile.in: Likewise.
3578 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
3580         PR bootstrap/35457
3581         * aclocal.m4: Regenerate.
3582         * configure: Regenerate.
3584 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
3586         PR middle-end/35611
3587         * testsuite/libgomp.c/atomic-4.c: New test.
3589         PR libgomp/35625
3590         * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
3591         (gomp_iter_guided_next): Likewise.
3592         * testsuite/libgomp.c/pr35625.c: New test.
3594 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3596         * aclocal.m4: Regenerate.
3597         * configure: Likewise.
3598         * Makefile.in: Likewise.
3599         * testsuite/Makefile.in: Likewise.
3601 2008-03-13  Jakub Jelinek  <jakub@redhat.com>
3603         PR middle-end/35185
3604         * testsuite/libgomp.c++/pr35185.C: New test.
3606 2008-03-12  Jakub Jelinek  <jakub@redhat.com>
3608         PR middle-end/35549
3609         * testsuite/libgomp.c/pr35549.c: New test.
3611 2008-03-06  Jakub Jelinek  <jakub@redhat.com>
3613         * testsuite/libgomp.c/atomic-3.c: New test.
3615 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3617         PR fortran/33197
3618         * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
3619         .F08 file suffixes.
3621 2008-03-03  Peter O'Gorman  <pogma@thewrittenword.com>
3623         PR libgomp/33131
3624         * configure.ac: Add ACX_HEADER_STRING.
3625         * env.c: Include strings.h.
3626         * aclocal.m4: Regenerate.
3627         * config.h.in: Regenerate.
3628         * configure: Regenerate.
3629         * Makefile.in: Regenerate.
3630         * testsuite/Makefile.in: Regenerate.
3632 2008-02-15  Jakub Jelinek  <jakub@redhat.com>
3634         PR middle-end/35196
3635         * testsuite/libgomp.c/pr35196.c: New test.
3637         PR middle-end/35130
3638         * testsuite/libgomp.fortran/pr35130.f90: New test.
3639         * testsuite/libgomp.c/pr35130.c: New test.
3641 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
3643         PR middle-end/33880
3644         * testsuite/libgomp.c/pr33880.c: New test.
3645         * testsuite/libgomp.fortran/pr33880.f90: New test.
3647 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
3649         * configure: Regenerate.
3651 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
3653         * configure.ac: Move futex checking into ../config/futex.m4.
3654         * configure: Rebuilt.
3655         * aclocal.m4: Rebuilt.
3656         * Makefile.in: Rebuilt.
3658         * configure.tgt: Rename have_tls to gcc_cv_have_tls to match
3659         2007-10-15 ../config/tls.m4 change.
3661 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
3663         PR c++/34513
3664         * testsuite/libgomp.c/pr34513.c: New test.
3665         * testsuite/libgomp.c++/pr34513.C: New test.
3667 2007-12-17  Jack Howarth  <howarth@bromo.med.uc.edu>
3669         PR target/32765
3670         * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
3672 2007-12-04  Jakub Jelinek  <jakub@redhat.com>
3674         * omp.h.in (__GOMP_NOTHROW): Define.  Use it on omp_* prototypes.
3676 2007-12-03  Jakub Jelinek  <jakub@redhat.com>
3678         * testsuite/libgomp.c/private-1.c: New test.
3680 2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>
3681             Paolo Bonzini  <bonzini@gnu.org>
3683         * Makefile.am: Use space as vpath separator.  Use 'vpath %'
3684         instead of 'VPATH ='.
3685         * Makefile.in: Regenerate.
3687 2007-11-23  Matthias Klose  <doko@ubuntu.com>
3689         * configure.ac: Adjust makeinfo version check.
3690         * configure: Regenerate.
3692 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
3694         PR fortran/34020
3695         * testsuite/libgomp.fortran/pr34020.f90: New test.
3697 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
3699         PR c++/33894
3700         * testsuite/libgomp.c++/atomic-1.C: New test.
3702 2007-10-25  Jakub Jelinek  <jakub@redhat.com>
3704         PR libgomp/33275
3705         * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
3706         Make x and y integers rather than (implicit) reals.  Add private (j)
3707         clause to the last omp parallel.
3709 2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
3711         * configure: Regenerate following changes to ../config/tls.m4.
3713 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
3715         * testsuite/libgomp.fortran/stack.f90: New test.
3717 2007-09-10  Danny Smith  <dannysmith@users.sourceforge.net>
3719         * config/mingw32/proc.c: New file.
3721 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
3723         * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
3724         (main): Use __get_cpuid to get i386 target fetaures.
3725         * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
3726         (main): Use __get_cpuid to get x86_64 target fetaures.
3728 2007-08-15  Jack Howarth  <howarth@bromo.med.uc.edu>
3730         PR target/32765
3731         * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
3732         * testsuite/libgomp.fortran/crayptr2.f90: Likwise.
3734 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
3736         PR fortran/32550
3737         * testsuite/libgomp.fortran/pr32550.f90: New test.
3738         * testsuite/libgomp.fortran/crayptr2.f90: New test.
3740 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
3742         * aclocal.m4: Regenerated.
3744 2007-07-05  Tobias Burnus  <burnus@net-b.de>
3746         PR fortran/32359
3747         * testsuite/libgomp.fortran/pr32359.f90: New.
3749 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
3751         PR libgomp/32468
3752         * sections.c (GOMP_parallel_sections_start): Only decrease
3753         number of threads to COUNT if dyn_var is true.
3754         * testsuite/libgomp.c/pr32468.c: New test.
3756 2007-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3758         PR libgomp/26308
3759         * config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.
3761 2007-06-21  Jakub Jelinek  <jakub@redhat.com>
3763         PR middle-end/32362
3764         * testsuite/libgomp.c/pr32362-1.c: New test.
3765         * testsuite/libgomp.c/pr32362-2.c: New test.
3766         * testsuite/libgomp.c/pr32362-3.c: New test.
3768 2007-06-07  Jakub Jelinek  <jakub@redhat.com>
3770         * team.c (gomp_team_start): Fix setting up thread_attr
3771         stack size.
3773 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
3775         * configure: Regenerate.
3777 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
3779         * Makefile.in: Regenerate.
3780         * configure: Regenerate.
3781         * aclocal.m4: Regenerate.
3782         * testsuite/Makefile.in: Regenerate.
3784 2007-05-04  Jakub Jelinek  <jakub@redhat.com>
3786         * config/linux/proc.c: New file.
3788         PR libgomp/28482
3789         * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
3791 2007-04-19  Daniel Franke  <franke.daniel@gmail.com>
3793         * libgomp.texi (GOMP_CPU_AFFINITY): Updated.
3795 2007-04-16  Matthias Klose  <doko@debian.org>
3797         * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
3798         flags if not building with -m64.
3799         * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
3800         flag for i?86-*-* targets, if current target matches -m64.
3802 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
3804         * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
3805         * Makefile.in: Regenerate.
3807 2007-04-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3809         PR testsuite/31369
3810         * testsuite/libgomp.c++/c++.exp: Don't use concat when setting
3811         ld_library_path.
3812         * testsuite/libgomp.fortran/fortran.exp: Likewise.
3814 2007-04-04  Jakub Jelinek  <jakub@redhat.com>
3816         * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
3817         decls.
3818         (gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
3819         * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
3820         (parse_affinity): New function.
3821         (initialize_env): Call it and gomp_init_affinity.
3822         * team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
3823         create new pthread_attr_t and call gomp_init_thread_affinity
3824         on it for each thread before passing the attribute to pthread_create.
3825         * config/linux/affinity.c: New file.
3826         * config/posix/affinity.c: New file.
3827         * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
3828         * configure: Rebuilt.
3829         * config.h.in: Rebuilt.
3830         * Makefile.am (libgomp_la_SOURCES): Add affinity.c.
3831         * Makefile.in: Rebuilt.
3833 2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>
3835         * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
3836         *-*-darwin*.
3837         * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
3838         and use it if found.
3840 2007-03-18  Uros Bizjak  <ubizjak@gmail.com>
3842         * testsuite/config/default.exp: New file.
3843         * testsuite/lib/libgomp.exp: New file.
3844         * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
3845         libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
3846         load_lib *, load_gcc_lib *): Move to libgomp.exp.
3847         (libgomp_load): Remove.
3848         * testsuite/lib/libgomp.exp (libgomp_init): Compute
3849         always_ld_library_path, not ld_library_path.  Set additional_flags
3850         to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
3851         (target_compile): Do not call libgomp_init.  Append lang_library_path
3852         and lang_link_flags to options.
3853         * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
3854         ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
3855         here.
3856         * testsuite/libgomp.c++/c++.exp: Set ld_library_path from
3857         always_ld_library_path.  Set LD_LIBRARY_PATH here.
3858         * testsuite/libgomp.fortran/fortran.exp: Ditto.
3859         * testsuite/libgomp.c/atomic-1.c: Set dg-options to
3860         "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
3861         CX8 flag.
3862         * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
3863         lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
3864         * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
3865         * testsuite/libgomp.c/pr29947-1.c: Ditto.
3866         * testsuite/libgomp.c/atomic-10.c: Ditto.
3868 2007-03-21  Jakub Jelinek  <jakub@redhat.com>
3870         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
3871         dg-final cleanup-modules line.
3872         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
3873         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
3874         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
3875         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
3876         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
3877         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
3878         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
3880 2007-03-18  Andreas Schwab  <schwab@suse.de>
3882         * acinclude.m4: Adjust regular expression for ld version
3883         extraction.
3884         * configure: Regenerate.
3886 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
3888         * Makefile.am: Add install-pdf target as copied from
3889         automake v1.10 rules.
3890         * Makefile.in: Regenerate
3892 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
3894         PR libgomp/28486
3895         * configure: Regenerate.
3897         PR c++/30703
3898         * testsuite/libgomp.c++/pr30703.C: New test.
3900 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
3902         Revert:
3903         2006-07-05  Eric Christopher  <echristo@apple.com>
3904         * configure.ac: Depend addition of -pthread on host OS.
3905         * configure: Regenerate.
3907 2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3909         * libgomp.texi: Fix spacing after abbreviations.
3911 2007-01-31  Daniel Franke <franke.daniel@gmail.com>
3913         PR libgomp/30546
3914         * configure.ac: Add check for makeinfo
3915         * Makefile.am: Redefined target libgomp.info, build libgomp.info only
3916         if an appropiate version of makeinfo is found.
3917         * aclocal.m4: Regenerated.
3918         * configure: Regenerated.
3919         * Makefile.in: Regenerated.
3920         * testsuite/Makefile.in: Regenerated.
3922 2007-01-29  Daniel Franke <franke.daniel@gmail.com>
3924         PR libgomp/30540
3925         * libgomp.texi: More about implementation-dependent settings.
3927 2007-01-26  Tobias Burnus  <burnus@net-b.de>
3929         * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
3931 2007-01-24  Jakub Jelinek  <jakub@redhat.com>
3933         PR middle-end/30494
3934         * testsuite/libgomp.c/pr30494.c: New test.
3936 2007-01-15  Tom Tromey  <tromey@redhat.com>
3938         * configure: Rebuilt.
3939         * configure.ac: Fixed comment.
3941 2007-01-14  Daniel Franke  <franke.daniel@gmail.com>
3943         * libgomp.texi: Document implementation specific default values of
3944         environment variables.
3946 2006-12-21  Daniel Franke  <franke.daniel@gmail.com>
3948         PR libgomp/28209
3949         * libgomp.texi: New file.
3950         * configure.ac: Add --enable-generated-files-in-srcdir option.
3951         * Makefile.am: Add info, dvi, pdf, html targets. On request, copy
3952         files to srcdir.
3953         * Makefile.in: Regenerated.
3954         * config.h.in: Regenerated.
3955         * testsuite/Makefile.in: Regenerated.
3956         * NOTES: Removed.
3958 2006-12-04  Daniel Franke  <franke.daniel@gmail.com>
3960         PR libgomp/29949
3961         * env.c (omp_set_num_threads): Set illegal thread count to 1.
3963 2006-12-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
3965         * configure: Regenerate.
3967 2006-12-04  Jakub Jelinek  <jakub@redhat.com>
3969         PR libgomp/29947
3970         * loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
3971         start if there shouldn't be any loop iterations.
3972         (gomp_loop_ordered_static_start): Remove start == end test.
3973         * testsuite/libgomp.c/pr29947-1.c: New test.
3974         * testsuite/libgomp.c/pr29947-2.c: New test.
3976 2006-12-02  Eric Botcazou  <ebotcazou@libertysurf.fr>
3978         * configure.tgt: Force initial-exec TLS model on Linux only.
3980 2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
3982         * configure: Regenerated.
3984 2006-11-09  Uros Bizjak  <ubizjak@gmail.com>
3986         * env.c (parse_schedule): Reject out of range values.
3987         (parse_unsigned_long): Reject out of range, negative or zero values.
3989 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
3991         PR fortran/29629
3992         * testsuite/libgomp.fortran/pr29629.f90: New test.
3994 2006-10-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
3996         PR libgomp/29494
3997         * configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
3998         * config/posix95: New directory.
3999         * config/posix95/omp-lock.h: New file.
4000         * config/posix95/lock.c: Likewise.
4002 2006-10-14  Geoffrey Keating  <geoffk@apple.com>
4004         * aclocal.m4: Regenerate.
4005         * configure: Regenerate.
4007 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
4009         * testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
4010         '<' to '<='.
4012 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
4014         * acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from
4015         test.
4016         * configure: Regenerate.
4017         * fortran.c  (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.
4019 2006-09-26  Jakub Jelinek  <jakub@redhat.com>
4021         PR middle-end/25261
4022         PR middle-end/28790
4023         * testsuite/libgomp.c/nestedfn-4.c: New test.
4024         * testsuite/libgomp.c/nestedfn-5.c: New test.
4025         * testsuite/libgomp.fortran/nestedfn3.f90: New test.
4027         PR fortran/29097
4028         * testsuite/libgomp.fortran/condinc1.f: New test.
4029         * testsuite/libgomp.fortran/condinc2.f: New test.
4030         * testsuite/libgomp.fortran/condinc3.f90: New test.
4031         * testsuite/libgomp.fortran/condinc4.f90: New test.
4032         * testsuite/libgomp.fortran/condinc1.inc: New file.
4034 2006-09-18  Tom Tromey  <tromey@redhat.com>
4036         * configure: Rebuilt.
4038 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
4040         PR c/28768
4041         PR preprocessor/14634
4042         * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
4043         to AC_DEFINE.
4044         * configure: Regenerate.
4046 2006-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
4048         * testsuite/libgomp.fortran/reduction3.f90: Change
4049         -2147483648 to -huge(i)-1 to avoid overflow.
4050         * testsuite/libgomp.fortran/reduction4.f90: Change
4051         Z'ffffffff' to not(0) to avoid overflow.
4053 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
4055         PR libgomp/25938
4056         * Makefile.am (libsubincludedir): New.
4057         (nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
4058         * Makefile.in: Regenerate.
4060 2006-08-17  Jakub Jelinek  <jakub@redhat.com>
4062         PR libgomp/28725
4063         * env.c: Include ctype.h.
4064         (parse_schedule, parse_unsigned_long, parse_boolean): Allow
4065         leading and/or trailing whitespace and compare strings case
4066         insensitively.
4068 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
4070         PR fortran/28390
4071         * testsuite/libgomp.fortran/pr28390.f: New test.
4073 2006-07-05  Eric Christopher  <echristo@apple.com>
4075         * configure.ac: Depend addition of -pthread on host OS.
4076         * configure: Regenerate.
4078 2006-06-21  Jakub Jelinek  <jakub@redhat.com>
4080         * critical.c (GOMP_critical_name_start): Fix *pptr initialization
4081         when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
4082         defined.
4084 2006-06-20  Jakub Jelinek  <jakub@redhat.com>
4086         PR libgomp/26175
4087         PR libgomp/26477
4088         * configure.ac: If neither --enable-linux-futex nor
4089         --disable-linux-futex is passed, determine the default by checking
4090         for compiling and/or running against NPTL.  With --enable-linux-futex,
4091         check if SYS_gettid and SYS_futex are defined.
4092         * configure: Rebuilt.
4094 2006-06-14  Richard Henderson  <rth@redhat.com>
4096         PR libgomp/28008
4097         * env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
4098         undefined.  Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.
4100 2006-06-09  Richard Henderson  <rth@redhat.com>
4102         * env.c (gomp_nthreads_var): Change to unsigned long.
4103         (gomp_run_sched_chunk): Likewise.
4104         (parse_unsigned_long): Rename from parse_num_threads and generalize.
4105         (initialize_env): Initialize gomp_thread_attr.
4106         * libgomp.h (gomp_nthreads_var): Update decl.
4107         (gomp_run_sched_chunk): Likewise.
4108         (gomp_thread_attr): Declare.
4109         * team.c (gomp_thread_attr): Export.
4110         (initialize_team): Don't initialize it.
4112 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
4114         PR fortran/27916
4115         * testsuite/libgomp.fortran/pr27916-1.f90: New test.
4116         * testsuite/libgomp.fortran/pr27916-2.f90: New test.
4118 2006-06-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4120         * config/mingw32/time.c: New file.
4121         * configure.tgt: Use it.
4123 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
4125         * Makefile.am: Add install-html target. Add install-html to .PHONY
4126         * Makefile.in: Regenerate.
4128 2006-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4130         PR libgomp/27612
4131         * testsuite/libgomp.c/sections-1.c: Require sync_int_long.
4132         * testsuite/libgomp.c/critical-1.c: Likewise.
4133         * testsuite/libgomp.c/loop-1.c: Likewise.
4134         * testsuite/libgomp.c/loop-2.c: Likewise.
4135         * testsuite/libgomp.c/single-1.c: Likewise.
4136         * testsuite/libgomp.c/ordered-1.c: Likewise.
4137         * testsuite/libgomp.c/ordered-2.c: Likewise.
4139 2006-05-15  Jakub Jelinek  <jakub@redhat.com>
4141         PR middle-end/27416
4142         * libgomp.fortran/pr27416-1.f90: New test.
4144 2006-05-03  Jakub Jelinek  <jakub@redhat.com>
4146         PR fortran/27395
4147         * testsuite/libgomp.fortran/pr27395-1.f90: New test.
4148         * testsuite/libgomp.fortran/pr27395-2.f90: New test.
4150 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
4152         PR c++/26943
4153         * testsuite/libgomp.c/pr26943-1.c: New test.
4154         * testsuite/libgomp.c/pr26943-2.c: New test.
4155         * testsuite/libgomp.c/pr26943-3.c: New test.
4156         * testsuite/libgomp.c/pr26943-4.c: New test.
4157         * testsuite/libgomp.c++/pr27337.C: Remove barrier.
4158         * testsuite/libgomp.c++/pr26943.C: New test.
4160 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
4162         PR middle-end/27337
4163         * testsuite/libgomp.c++/pr27337.C: New test.
4165 2006-04-26  Jakub Jelinek  <jakub@redhat.com>
4167         PR c/26171
4168         * testsuite/libgomp.c/pr26171.c: New test.
4170 2006-04-25  Richard Henderson  <rth@redhat.com>
4172         PR libgomp/25865
4173         * configure.ac: Use GCC_CHECK_TLS.
4174         * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
4175         * Makefile.in, aclocal.m4, configure: Regenerate.
4177 2006-04-10  Matthias Klose  <doko@debian.org>
4179         * testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib
4180         directory names containing underscores.
4182 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
4184         PR c++/26691
4185         * testsuite/libgomp.c++/pr26691.C: New test.
4187 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
4189         * testsuite/libgomp.fortran/retval2.f90: New test.
4191 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
4193         * testsuite/libgomp.c++: New directory.
4195 2006-02-25  Shantonu Sen  <ssen@opendarwin.org>
4197         * config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
4198         * config/posix/sem.c: Implement the above.
4200 2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>
4202         * configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
4203         define HAVE_BROKEN_POSIX_SEMAPHORES.
4204         * configure: Rebuilt.
4205         * config.h.in: Rebuilt.
4207 2006-02-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4209         PR bootstrap/26161
4210         * configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
4211         for the other pthread check.
4212         * configure: Regenerate.
4213         * config.h.in: Regenerate.
4215 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
4217         PR libgomp/25938
4218         PR libgomp/25984
4219         * Makefile.am (fincludedir): New variable.
4220         (nodist_include_HEADERS): Remove Fortran files.
4221         (nodist_finclude_HEADERS): New variable.
4222         * Makefile.in: Regenerated.
4224 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4226         * testsuite/libgomp.fortran/vla7.f90: Add -w to options.
4227         Remove tests for returning assumed character length arrays.
4229 2006-02-12  Roger Sayle  <roger@eyesopen.com>
4230             John David Anglin  <dave@hiauly1.hia.nrc.ca>
4232         PR libgomp/25936
4233         * configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
4235 2006-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
4237         * testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
4239 2006-02-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
4241         * testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
4242         part of LD_LIBRARY_PATH manually.
4244 2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>
4246         PR libgomp/25852
4247         * testsuite/lib/libgomp-dg.exp (blddir): Set it in
4248         libgomp_init.
4250 2005-01-25  Paolo Bonzini  <bonzini@gnu.org>
4252         PR libgomp/25884
4253         * Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
4254         * configure.ac (PERL): Don't set.
4255         (gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
4256         (OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
4257         OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
4258         * omp.h.in: Wrap the new configure substitutions with @ characters.
4259         * omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
4260         * aclocal.m4, configure, Makefile.in: Regenerate.
4261         * mkomp_h.pl: Delete.
4263 2005-01-24  Paolo Bonzini  <bonzini@gnu.org>
4265         PR libgomp/25259
4266         * configure.ac: Use GCC_HEADER_STDINT.
4267         * libgomp.h: Include gstdint.h.
4268         * libgomp_f.h.in: Don't include stdint.h or inttypes.h.
4269         * configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.
4271 2006-01-24  Richard Henderson  <rth@redhat.com>
4273         PR libgomp/25942
4274         * configure.ac: Add AM_MAINTAINER_MODE.
4275         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.
4277 2006-01-24  Diego Novillo  <dnovillo@redhat.com>
4279         * Makefile.in: Regenerate.
4280         * testsuite/Makefile.in: Regenerate.
4281         * aclocal.m4: Regenerate.
4283 2006-01-23  Andreas Tobler  <a.tobler@schweiz.ch>
4285         * config/posix/proc.c: Conditional include of sys/loadavg.h for
4286         Solaris.
4287         * configure.ac: Add check for loadavg.h.
4288         (link_gomp): Adjust comment.
4289         * configure: Regenerate.
4290         * config.h.in: Regenerate.
4292 2006-01-21  Steve Ellcey  <sje@cup.hp.com>
4294         PR libgomp/25877
4295         * configure.ac: Remove check for alloca.h.
4296         * configure: Regenerate.
4297         * config.h.in: Regenerate.
4298         * libgomp.h: define gomp_alloca to be __builtin_alloca.
4299         * team.c: Remove use of alloca.h.
4300         Call gomp_alloca instead of alloca.
4302 2006-01-20  Steve Ellcey  <sje@cup.hp.com>
4304         PR libgomp/25877
4305         * team.c: Add include of alloca.h.
4306         * configure.ac: Add check for alloca.h.
4307         * configure: Regenerate.
4308         * config.h.in: Regenerate.
4310 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
4312         PR fortran/25219
4313         * testsuite/libgomp.fortran/pr25219.f90: New test.
4315 2005-12-05  Uros Bizjak  <uros@kss-loka.si>
4317         * testsuite/libgomp.c/pr24455.c, testsuite/libgomp.c/copyin-1.c,
4318         testsuite/libgomp.c/copyin-2.c, testsuite/libgomp.c/copyin-3.c,
4319         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
4320         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
4321         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455.C,
4322         testsuite/libgomp.fortran/threadprivate1.f90,
4323         testsuite/libgomp.fortran/threadprivate2.f90,
4324         testsuite/libgomp.fortran/threadprivate3.f90,
4325         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
4326         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
4327         testsuite/libgomp.fortran/omp_parse3.f90: Change required
4328         effective-target to TLS runtime.
4330         * testsuite/libgomp.fortran/pr25162.f: Require
4331         effective-target TLS runtime.
4333 2005-12-01  Jakub Jelinek  <jakub@redhat.com>
4335         * testsuite/libgomp.fortran/nestedfn2.f90: New test.
4336         * testsuite/libgomp.c/nestedfn-3.c: New test.
4338 2005-11-30  Jakub Jelinek  <jakub@redhat.com>
4340         PR fortran/25162
4341         * testsuite/libgomp.fortran/pr25162.f: New test.
4343 2005-11-28  Jakub Jelinek  <jakub@redhat.com>
4345         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Fall back to
4346         CLOCK_REALTIME if clock_* (CLOCK_MONOTONIC, &ts) call failed.
4348 2005-11-25  Jakub Jelinek  <jakub@redhat.com>
4350         * alloc.c, barrier.c, critical.c, env.c, error.c, fortran.c, iter.c,
4351         libgomp.h, libgomp_f.h.in, libgomp_g.h, loop.c, mkomp_h.pl, omp.h.in,
4352         omp_lib.f90.in, omp_lib.h.in, ordered.c, parallel.c, sections.c,
4353         single.c, team.c, work.c, config/linux/alpha/futex.h,
4354         config/linux/bar.c, config/linux/bar.h, config/linux/ia64/futex.h,
4355         config/linux/lock.c, config/linux/mutex.c, config/linux/mutex.h,
4356         config/linux/powerpc/futex.h, config/linux/s390/futex.h,
4357         config/linux/sem.c, config/linux/sem.h, config/linux/sparc/futex.h,
4358         config/linux/x86/futex.h, config/posix/bar.c, config/posix/bar.h,
4359         config/posix/lock.c, config/posix/mutex.h, config/posix/proc.c,
4360         config/posix/sem.c, config/posix/sem.h, config/posix/time.c: Update
4361         FSF address.
4363 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
4365         * Makefile.am: Move libgomp_f.h from nodist_include_HEADERS
4366         to nodist_noinst_HEADERS.
4367         * Makefile.in: Rebuilt.
4369         * config/posix/omp-lock.h (omp_nest_lock_t): Change into struct,
4370         add integer count field.
4371         * config/posix/lock.c (omp_destroy_nest_lock): Adjust for
4372         omp_nest_lock_t type change.
4373         (omp_init_nest_lock): Likewise.  Initialize count to 0.
4374         (omp_set_nest_lock): Adjust for omp_nest_lock_t type change.
4375         Increment count.
4376         (omp_unset_nest_lock): Adjust for omp_nest_lock_t type change.
4377         Decrement count.
4378         (omp_test_nest_lock): Adjust for omp_nest_lock_t type change.
4379         Increment count if successful and return the new nesting level.
4380         * config/linux/lock.c (omp_test_nest_lock): Return new nesting level.
4381         * omp_lib.f90.in (omp_test_lock): Fix LOCK argument type.
4382         * testsuite/libgomp.c/lib-1.c: New test.
4383         * testsuite/libgomp.fortran/lib1.f90: New test.
4384         * testsuite/libgomp.fortran/lib2.f: New test.
4385         * testsuite/libgomp.fortran/lib3.f: New test.
4387 2005-11-17  Richard Henderson  <rth@redhat.com>
4389         PR 24845
4390         * Makefile.am (nodist_toolexeclib_HEADERS): New.
4391         * configure.ac (link_gomp): New.  Substitute it.
4392         (AC_CONFIG_FILES): Add libgomp.spec.
4393         * libgomp.spec.in: New file.
4394         * Makefile.in, testsuite/Makefile.in, configure: Rebuild.
4395         * testsuite/lib/libgomp-dg.exp: Add -B${blddir}/ to flags.
4397 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
4399         * testsuite/libgomp.fortran/reduction1.f90: Adjust for
4400         reduction(-:var) behaving the same as reduction(+:var).
4401         * testsuite/libgomp.c/reduction-4.c: New test.
4403 2005-11-15  Uros Bizjak  <uros@kss-loka.si>
4405         * testsuite/libgomp.c/pr24455-1.c, testsuite/libgomp.c/pr24455.c,
4406         testsuite/libgomp.c/copyin-1.c, testsuite/libgomp.c/copyin-2.c,
4407         testsuite/libgomp.c/copyin-3.c,
4408         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
4409         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
4410         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455-1.C,
4411         testsuite/libgomp.c++/pr24455.C,
4412         testsuite/libgomp.fortran/threadprivate1.f90,
4413         testsuite/libgomp.fortran/threadprivate2.f90,
4414         testsuite/libgomp.fortran/threadprivate3.f90,
4415         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
4416         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
4417         testsuite/libgomp.fortran/omp_parse3.f90: Require
4418         effective-target TLS.
4420 2005-11-14  Diego Novillo  <dnovillo@redhat.com>
4422         * HEADER: Remove.
4424 2005-11-13  Jakub Jelinek  <jakub@redhat.com>
4426         PR libgomp/24797
4427         * team.c (initialize_team): Pass NULL rather than free as
4428         pthread_key_create destructor.  Initialize thread specific data
4429         pointer in initial thread to a static local variable rather than
4430         malloced memory.
4432 2005-11-11  Uros Bizjak  <uros@kss-loka.si>
4434         * testsuite/lib/libgomp-dg.exp: Locate libgcc.a and append
4435         its location to ld_library_path.
4437 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
4439         * testsuite/libgomp.c/c.exp: Rename from dg.exp.
4441 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
4443         * testsuite/libgomp.c: Rename from libgomp.dg.
4445 2005-11-09  Diego Novillo  <dnovillo@redhat.com>
4447         * testsuite/libgomp.c++/pr24455.C: Add copyin clause for
4448         threadprivate variable 'i'.
4450 2005-11-09  Jakub Jelinek  <jakub@redhat.com>
4452         * config/linux/s390/futex.h: New file.
4453         * configure.tgt: Use it.
4455         * testsuite/libgomp.fortran/omp_parse4.f90: Move n initialization
4456         before the parallel.
4458 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
4460         PR c++/24734
4461         * testsuite/libgomp.c++/master-1.C: New test.
4463 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
4465         * testsuite/libgomp.dg/copyin-3.c: New test.
4467 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
4469         * testsuite/libgomp.fortran/retval1.f90: New test.
4470         * testsuite/libgomp.fortran/vla7.f90: New test.
4472 2005-11-06  Jakub Jelinek  <jakub@redhat.com>
4474         * testsuite/libgomp.fortran/vla2.f90: New test.
4475         * testsuite/libgomp.fortran/vla3.f90: New test.
4476         * testsuite/libgomp.fortran/vla4.f90: New test.
4477         * testsuite/libgomp.fortran/vla5.f90: New test.
4478         * testsuite/libgomp.fortran/vla6.f90: New test.
4480 2005-11-01  Jakub Jelinek  <jakub@redhat.com>
4482         * config/linux/sparc/futex.h: New file.
4483         * configure.tgt: Use it.
4484         * testsuite/lib/libgomp-dg.exp: Use -mcpu=v9 for sparc testing.
4486         * critical.c: Include stdlib.h.
4487         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Avoid warnings about
4488         ignoring return value.
4489         * configure.ac: Don't put -Wc,-pthread into XCFLAGS until after
4490         LIBGOMP_CHECK_SYNC_BUILTINS check.
4491         * configure: Rebuilt.
4493 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
4495         * testsuite/libgomp.fortran/vla1.f90: New test.
4497 2005-10-31  Richard Henderson  <rth@redhat.com>
4499         * testsuite/libgomp.fortran/character2.f90: Fix race condition
4500         setting 's' in different threads.
4502 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
4504         * libgomp.h (attribute_hidden, ialias): Define.
4505         * config/posix/proc.c (omp_get_num_procs): Add ialias.
4506         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Likewise.
4507         * config/posix/lock.c (omp_init_lock, omp_init_nest_lock,
4508         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
4509         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
4510         omp_test_lock, omp_test_nest_lock): Likewise.
4511         * config/linux/lock.c (omp_init_lock, omp_init_nest_lock,
4512         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
4513         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
4514         omp_test_lock, omp_test_nest_lock): Likewise.
4515         * env.c (omp_set_dynamic, omp_set_nested, omp_set_num_threads,
4516         omp_get_dynamic, omp_get_nested): Likewise.
4517         * parallel.c (omp_get_num_threads, omp_get_max_threads,
4518         omp_get_thread_num, omp_in_parallel): Likewise.
4519         * fortran.c (ialias_redirect): Define.
4520         (omp_init_lock, omp_init_nest_lock, omp_destroy_lock,
4521         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock,
4522         omp_unset_lock, omp_unset_nest_lock, omp_test_lock,
4523         omp_test_nest_lock, omp_set_dynamic, omp_set_nested,
4524         omp_set_num_threads, omp_get_dynamic, omp_get_nested,
4525         omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
4526         omp_get_num_threads, omp_get_thread_num, omp_get_wtick,
4527         omp_get_wtime): Add ialias_redirect.
4529 2005-10-30  Jakub Jelinek  <jakub@redhat.com>
4531         * fortran.c: Include stdlib.h.
4533 2005-10-29  Jakub Jelinek  <jakub@redhat.com>
4535         * Makefile.am (env.o, env.lo): Depend on libgomp_f.h.
4536         * Makefile.in: Regenerated.
4538 2005-10-28  Jakub Jelinek  <jakub@redhat.com>
4540         * mkomp_h.pl: Remove all -Wc, option prefixes in $COMPILE.
4541         * libgomp_f.h.in (omp_check_defines): New function.
4542         * env.c: Include libgomp_f.h.
4543         (initialize_env): Call omp_check_defines.
4545         * testsuite/libgomp.dg/copyin-2.c: New test.
4546         * testsuite/libgomp.c++/copyin-2.C: New test.
4547         * testsuite/libgomp.fortran/threadprivate3.f90: New test.
4549         * testsuite/libgomp.fortran/threadprivate2.f90: New test.
4550         * testsuite/libgomp.fortran/sharing2.f90: New test.
4552         * testsuite/libgomp.dg/copyin-1.c: New test.
4553         * testsuite/libgomp.c++/copyin-1.C: New test.
4555 2005-10-26  Jakub Jelinek  <jakub@redhat.com>
4557         * testsuite/libgomp.fortran/crayptr1.f90: New test.
4559         * testsuite/libgomp.fortran/workshare1.f90: New test.
4561         * libgomp.fortran/appendix-a/a.28.5.f90: Change into compile
4562         only test.
4563         * libgomp.fortran/sharing1.f90: New test.
4565 2005-10-24  Jakub Jelinek  <jakub@redhat.com>
4567         PR c++/24502
4568         * testsuite/libgomp.c++/loop-7.C: New test.
4570         * testsuite/libgomp.dg/nestedfn-2.c: New test.
4572         * testsuite/libgomp.dg/nestedfn-1.c: New test.
4573         * testsuite/libgomp.fortran/reduction6.f90: New test.
4574         * testsuite/libgomp.fortran/nestedfn1.f90: New test.
4576 2005-10-23  Richard Henderson  <rth@redhat.com>
4578         * testsuite/libgomp.c++/ctor-1.C: New.
4579         * testsuite/libgomp.c++/ctor-2.C: New.
4580         * testsuite/libgomp.c++/ctor-3.C: New.
4581         * testsuite/libgomp.c++/ctor-4.C: New.
4582         * testsuite/libgomp.c++/ctor-5.C: New.
4583         * testsuite/libgomp.c++/ctor-6.C: New.
4584         * testsuite/libgomp.c++/ctor-7.C: New.
4585         * testsuite/libgomp.c++/ctor-8.C: New.
4586         * testsuite/libgomp.c++/ctor-9.C: New.
4588 2005-10-21  Diego Novillo  <dnovillo@redhat.com>
4590         PR 24455
4591         * testsuite/libgomp.c++/pr24455-1.C: New test.
4592         * testsuite/libgomp.c++/pr24455.C: New test.
4593         * testsuite/libgomp.dg/pr24455-1.c: New test.
4594         * testsuite/libgomp.dg/pr24455.c: New test.
4596 2005-10-20  Richard Henderson  <rth@redhat.com>
4598         * testsuite/libgomp.c++/loop-6.C: New.
4599         * testsuite/libgomp.dg/loop-3.c: New.
4601 2005-10-20  Jakub Jelinek  <jakub@redhat.com>
4603         * testsuite/libgomp.fortran/jacobi.f: Don't make i and j
4604         explicitly private.
4605         * testsuite/libgomp.fortran/omp_parse1.f90 (test_do): Make i
4606         explicitly shared.
4608 2005-10-19  Diego Novillo  <dnovillo@redhat.com>
4610         * testsuite/libgomp.fortran/jacobi.f: New test.
4612 2005-10-19  Richard Henderson  <rth@redhat.com>
4614         * configure.tgt (i?86-linux): Default to with_arch instead of
4615         CFLAGS.  Add -mtune to match target_cpu.
4616         (x86_64-linux): Tune to i686.
4618         * fortran.c (omp_test_nest_lock_): Fix typo.
4620 2005-10-19  Jakub Jelinek  <jakub@redhat.com>
4622         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
4623         gomp_ordered_sync): Do nothing if team->nthreads == 1.
4624         * testsuite/libgomp.dg/ordered-3.c: New test.
4626         * testsuite/libgomp.dg/appendix-a/a.18.1.c: Remove unconditional abort.
4627         Remove volatile keyword.
4629         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Reorder variables
4630         in COMMON block to avoid warnings on 64-bit targets.
4632 2005-10-18  Diego Novillo  <dnovillo@redhat.com>
4634         * testsuite/libgomp.dg/shared-3.c: New test.
4636 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
4638         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: Removed.
4639         * testsuite/libgomp.fortran/reduction5.f90: New test.
4641 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
4643         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Add -ffixed-form to
4644         dg-options.
4645         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.  Enable
4646         flush loop now that __sync_synchronize has proper memory barrier.
4647         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: Fix a typo.
4648         Add -ffixed-form to dg-options.
4650 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
4652         * testsuite/libgomp.fortran/fortran.exp: Also gather tests
4653         from subdirectories.
4654         * testsuite/libgomp.fortran/appendix-a/a.15.1.f90: New test.
4655         * testsuite/libgomp.fortran/appendix-a/a.16.1.f90: New test.
4656         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: New test.
4657         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: New test.
4658         * testsuite/libgomp.fortran/appendix-a/a.2.1.f90: New test.
4659         * testsuite/libgomp.fortran/appendix-a/a.21.1.f90: New test.
4660         * testsuite/libgomp.fortran/appendix-a/a.22.7.f90: New test.
4661         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: New test.
4662         * testsuite/libgomp.fortran/appendix-a/a.26.1.f90: New test.
4663         * testsuite/libgomp.fortran/appendix-a/a.28.1.f90: New test.
4664         * testsuite/libgomp.fortran/appendix-a/a.28.2.f90: New test.
4665         * testsuite/libgomp.fortran/appendix-a/a.28.3.f90: New test.
4666         * testsuite/libgomp.fortran/appendix-a/a.28.4.f90: New test.
4667         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: New test.
4668         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: New test.
4669         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: New test.
4670         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: New test.
4671         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: New test.
4672         * testsuite/libgomp.fortran/appendix-a/a.33.3.f90: New test.
4673         * testsuite/libgomp.fortran/appendix-a/a.38.1.f90: New test.
4674         * testsuite/libgomp.fortran/appendix-a/a.39.1.f90: New test.
4675         * testsuite/libgomp.fortran/appendix-a/a.4.1.f90: New test.
4676         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: New test.
4677         * testsuite/libgomp.fortran/appendix-a/a.5.1.f90: New test.
4678         * testsuite/libgomp.fortran/appendix-a/a10.1.f90: New test.
4680 2005-10-17  Jakub Jelinek  <jakub@redhat.com>
4682         * testsuite/libgomp.dg/dg.exp: Only unset lang_* if
4683         lang_library_path exists.  Use find instead of glob to gather tests.
4684         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: Removed.
4686 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
4688         * testsuite/libgomp.dg/appendix-a/a.15.1.c: New test.
4689         * testsuite/libgomp.dg/appendix-a/a.16.1.c: New test.
4690         * testsuite/libgomp.dg/appendix-a/a.18.1.c: New test.
4691         * testsuite/libgomp.dg/appendix-a/a.19.1.c: New test.
4692         * testsuite/libgomp.dg/appendix-a/a.2.1.c: New test.
4693         * testsuite/libgomp.dg/appendix-a/a.21.1.c: New test.
4694         * testsuite/libgomp.dg/appendix-a/a.26.1.c: New test.
4695         * testsuite/libgomp.dg/appendix-a/a.29.1.c: New test.
4696         * testsuite/libgomp.dg/appendix-a/a.3.1.c: New test.
4697         * testsuite/libgomp.dg/appendix-a/a.39.1.c: New test.
4698         * testsuite/libgomp.dg/appendix-a/a.4.1.c: New test.
4699         * testsuite/libgomp.dg/appendix-a/a.5.1.c: New test.
4700         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: New file.
4702 2005-10-15  Jakub Jelinek  <jakub@redhat.com>
4704         * testsuite/libgomp.dg/vla-1.c: New test.
4706         * testsuite/libgomp.fortran/reference2.f90: New test.
4708         * testsuite/libgomp.fortran/character2.f90: Remove explicit
4709         declaration of omp_get_thread_num.
4710         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.  Add
4711         use omp_lib.
4713         * testsuite/libgomp.fortran/reduction1.f90: New test.
4714         * testsuite/libgomp.fortran/reduction2.f90: New test.
4715         * testsuite/libgomp.fortran/reduction3.f90: New test.
4716         * testsuite/libgomp.fortran/reduction4.f90: New test.
4718 2005-10-13  Richard Henderson  <rth@redhat.com>
4720         * Makefile.am (libgomp_la_SOURCES): Add bar.c.
4721         * Makefile.in: Regenerate.
4722         * barrier.c (GOMP_barrier): Use gomp_barrier_wait.
4723         * libgomp.h: Include bar.h.
4724         (struct gomp_barrier): Remove.
4725         (struct gomp_team): Add barrier.  Replace master_barrier with
4726         master_release.  Replace threads with ordered_release.
4727         (struct gomp_thread): Replace barrier with release.
4728         * ordered.c (gomp_ordered_first): Update for ordered_release change.
4729         (gomp_ordered_last, gomp_ordered_next, gomp_ordered_static_init,
4730         gomp_ordered_static_next, gomp_ordered_sync): Likewise.
4731         * single.c (GOMP_single_copy_start): Use gomp_barrier_wait.
4732         (GOMP_single_copy_end): Likewise.
4733         * team.c (gomp_threads_dock): New.
4734         (gomp_barrier_init, gomp_barrier_destroy): Remove.
4735         (gomp_thread_start): Use gomp_barrier_wait.
4736         (new_team, free_team): Update for gomp_team changes.
4737         (gomp_team_start): Use gomp_barrier_wait and gomp_barrier_reinit.
4738         (gomp_team_end): Use gomp_barrier_wait.
4739         (initialize_team): Update for gomp_thread changes.
4740         * work.c (gomp_work_share_end): Use gomp_barrier_wait_start.
4741         (gomp_work_share_end_nowait): Use atomic ops when available.
4742         * config/linux/bar.c, config/linux/bar.h: New files.
4743         * config/posix/bar.c, config/posix/bar.h: New files.
4745 2005-10-13  Jakub Jelinek  <jakub@redhat.com>
4747         * single.c (GOMP_single_copy_end): Don't segfault if team is NULL.
4748         * testsuite/libgomp.dg/single-2.c: New test.
4750         * testsuite/libgomp.dg/dg.exp (lang_library_path, lang_test_file,
4751         lang_link_flags): Unset, so that they aren't inherited from previously
4752         sourced *.exp.
4754         * testsuite/libgomp.fortran/threadprivate1.f90: New test.
4756 2005-10-12  Richard Henderson  <rth@redhat.com>
4758         * testsuite/lib/libgomp-dg.exp: Set blddir at toplevel.
4759         (libgomp_init): Use lang_test_file, lang_library_path, and
4760         lang_link_flags, set by the subdirectory files.  Add -fopenmp here.
4762         * testsuite/libgomp.fortran/fortran.exp (lang_library_path): New.
4763         (lang_test_file, lang_link_flags): New.
4764         (DEFAULT_FFLAGS, ALWAYS_CFLAGS, multilibs, blddir): Remove.
4766         * testsuite/libgomp.c++/c++.exp, testsuite/libgomp.c++/loop-1.C,
4767         testsuite/libgomp.c++/loop-2.C, testsuite/libgomp.c++/loop-3.C,
4768         testsuite/libgomp.c++/loop-4.C, testsuite/libgomp.c++/nested-1.C,
4769         testsuite/libgomp.c++/parallel-1.C,
4770         testsuite/libgomp.c++/reduction-1.C,
4771         testsuite/libgomp.c++/reduction-2.C,
4772         testsuite/libgomp.c++/reduction-3.C,
4773         testsuite/libgomp.c++/sections-1.C, testsuite/libgomp.c++/shared-1.C,
4774         testsuite/libgomp.c++/shared-2.C, testsuite/libgomp.c++/single-1.C,
4775         testsuite/libgomp.c++/single-2.C, testsuite/libgomp.c++/single-3.C:
4776         New files, largely cribbed from the C testsuite.
4778 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
4780         * testsuite/libgomp.fortran/character1.f90: New test.
4781         * testsuite/libgomp.fortran/character2.f90: New test.
4783         * testsuite/libgomp.dg/nested-1.c: New test.
4784         * testsuite/libgomp.dg/nested-2.c: New test.
4785         * testsuite/libgomp.fortran/do1.f90: New test.
4786         * testsuite/libgomp.fortran/do2.f90: New test.
4788         * testsuite/libgomp.fortran/reference1.f90: New test.
4790 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
4792         * testsuite/libgomp.dg/reduction-1.c: New test.
4793         * testsuite/libgomp.dg/reduction-2.c: New test.
4794         * testsuite/libgomp.dg/reduction-3.c: New test.
4796 2005-10-10  Jakub Jelinek  <jakub@redhat.com>
4798         * testsuite/libgomp.dg/atomic-1.c: New test.
4799         * testsuite/libgomp.dg/atomic-2.c: New test.
4801 2005-10-09  Richard Henderson  <rth@redhat.com>
4803         * critical.c (atomic_lock): New.
4804         (initialize_critical): Initialize it.
4805         (GOMP_atomic_start, GOMP_atomic_end): New.
4806         * libgomp.map: Export them.
4807         * libgomp_g.h: Declare them.
4809         * testsuite/libgomp.dg/atomic-10.c: Move from gcc testsuite.
4811 2005-10-02  Richard Henderson  <rth@redhat.com>
4813         * configure.ac: Move save_CFLAGS hack earlier.  Append -Wall/-Werror
4814         to XCFLAGS instead of CFLAGS.
4816 2005-09-30  Richard Henderson  <rth@redhat.com>
4818         * configure.ac: Determine whether -pthread or -lpthread is needed.
4819         * Makefile.am (libgomp_la_LDFLAGS): Remove explicit -lpthread.
4820         * Makefine.in, configure: Rebuild.
4822 2005-09-28  Richard Henderson  <rth@redhat.com>
4824         * testsuite/libgomp.dg/omp-loop03.c: Fix return code.
4825         * testsuite/libgomp.dg/omp-single-3.c: New test.
4827 2005-09-28  Diego Novillo  <dnovillo@redhat.com>
4829         * testsuite/libgomp.dg/omp-single-2.c: New test.
4830         * testsuite/libgomp.dg/shared-2.c: Fix return code.
4832 2005-09-27  Richard Henderson  <rth@redhat.com>
4834         * testsuite/libgomp.dg/omp-loop03.c: Add initial barrier.
4835         * testsuite/libgomp.dg/omp-parallel-for.c: Specify static schedule.
4837 2005-09-27  Jakub Jelinek  <jakub@redhat.com>
4839         * testsuite/libgomp.dg/omp-loop03.c: New test.
4841 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
4843         * testsuite/libgomp.dg/omp-parallel-for.c: New test.
4845 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
4847         * testsuite/libgomp.dg/omp-single-1.c: New test.
4848         * testsuite/libgomp.dg/shared-1.c: Return 0.
4849         Add prototype for abort.
4850         * testsuite/libgomp.dg/shared-2.c: Likewise.
4852 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
4854         * testsuite/libgomp.fortran/omp_parse3.f90: Fix non-conforming
4855         constructs.
4857 2005-09-26  Diego Novillo  <dnovillo@redhat.com>
4859         * testsuite/libgomp.dg/shared-1.c: New test.
4860         * testsuite/libgomp.dg/shared-2.c: New test.
4862 2005-09-24  Richard Henderson  <rth@redhat.com>
4864         * testsuite/libgomp.dg/omp_workshare3.c: Mark dg-error.
4866 2005-09-24  Richard Henderson  <rth@redhat.com>
4868         * iter.c (gomp_iter_static_next): Round up when computing number
4869         of iterations.  Don't bother distributing a remainder equally.
4871         * testsuite/libgomp.dg/omp-loop01.c (main1): Rename from main.
4872         Don't call srand.  Zero b before testing.
4873         (main): New.
4875 2005-09-24  Jakub Jelinek  <jakub@redhat.com>
4877         * testsuite/libgomp.fortran/omp_atomic1.f90: New test.
4878         * testsuite/libgomp.fortran/omp_atomic2.f90: New test.
4880 2005-09-23  Jakub Jelinek  <jakub@redhat.com>
4882         * testsuite/libgomp.fortran/omp_parse1.f90: Add a test for !$omp do
4883         without !$omp end do, followed immediately by subroutine end.
4885 2005-09-23  Diego Novillo  <dnovillo@redhat.com>
4887         * testsuite/libgomp.dg/omp-parallel-if.c: New test.
4889 2005-09-22  Richard Henderson  <rth@redhat.com>
4891         * critical.c (GOMP_critical_name_start): Change argument to void**.
4892         Reuse the pointer space if the mutex fits.
4893         (GOMP_critical_name_end): Likewise.
4894         (initialize_critical): Don't define if GOMP_MUTEX_INIT_0.
4895         * libgomp_g.h (GOMP_critical_name_start): Update decl.
4896         (GOMP_critical_name_end): Likewise.
4897         * config/linux/mutex.h (GOMP_MUTEX_INIT_0): New.
4898         * config/posix/mutex.h (GOMP_MUTEX_INIT_0): New.
4900 2005-09-20  Richard Henderson  <rth@redhat.com>
4902         * critical.c (GOMP_critical_name_start, GOMP_critical_name_end): New.
4903         (create_lock_lock): New.
4904         (initialize_critical): Initialize it.
4905         * libgomp.map (GOMP_critical_name_start, GOMP_critical_name_end): New.
4906         * libgomp_g.h (GOMP_ordered_start, GOMP_ordered_end): Declare.
4908 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
4910         * testsuite/libgom.dg/omp-loop01.c: Include stdio.h.
4912 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
4914         * testsuite/libgomp.dg/omp-loop01.c: New test.
4915         * testsuite/libgomp.dg/omp-loop02.c: New test.
4917 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
4919         * configure.ac (AC_PROG_FC): Add.
4920         (USE_FORTRAN): New automake conditional.
4921         * configure: Rebuilt.
4922         * Makefile.am (libgomp_la_SOURCES): Add fortran.c.
4923         (nodist_include_HEADERS): Add omp_lib.h, omp_lib.f90 and libgomp_f.h.
4924         If USE_FORTRAN, add also omp_lib.mod and omp_lib_kinds.mod.
4925         Add rules to build them.
4926         * Makefile.in: Rebuilt.
4927         * mkomp_h.pl: Compute and replace also OMP_LOCK_KIND and
4928         OMP_NEST_LOCK_KIND.
4929         * libgomp.map: Add Fortran wrappers.
4930         * libgomp_f.h.in: New file.
4931         * omp_lib.h.in: New file.
4932         * omp_lib.f90.in: New file.
4933         * fortran.c: New file.
4934         * testsuite/lib/libgomp-dg.exp: Load a few more .exp files.
4935         Append libgfortran directory to LD_LIBRARY_PATH if it exists.
4936         Add -Lpath_to_libgfortran and -lgfortran -lgfortranbegin if
4937         libgfortran has been built.
4938         * testsuite/libgomp.fortran/fortran.exp: New file.
4939         * testsuite/libgomp.fortran/omp_cond1.f: New test.
4940         * testsuite/libgomp.fortran/omp_cond2.f: New test.
4941         * testsuite/libgomp.fortran/omp_cond3.F90: New test.
4942         * testsuite/libgomp.fortran/omp_cond4.F90: New test.
4943         * testsuite/libgomp.fortran/omp_hello.f: New test.
4944         * testsuite/libgomp.fortran/omp_orphan.f: New test.
4945         * testsuite/libgomp.fortran/omp_parse1.f90: New test.
4946         * testsuite/libgomp.fortran/omp_parse2.f90: New test.
4947         * testsuite/libgomp.fortran/omp_parse3.f90: New test.
4948         * testsuite/libgomp.fortran/omp_parse4.f90: New test.
4949         * testsuite/libgomp.fortran/omp_reduction.f: New test.
4950         * testsuite/libgomp.fortran/omp_workshare1.f: New test.
4951         * testsuite/libgomp.fortran/omp_workshare2.f: New test.
4953 2005-08-30  Richard Henderson  <rth@redhat.com>
4955         * loop.c (GOMP_loop_static_start): Provide fallback wrapper
4956         function for when aliases are not usable.
4957         (GOMP_loop_dynamic_start, GOMP_loop_guided_start,
4958         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
4959         GOMP_loop_ordered_guided_start, GOMP_loop_static_next,
4960         GOMP_loop_dynamic_next, GOMP_loop_guided_next,
4961         GOMP_loop_ordered_static_next, GOMP_loop_ordered_dynamic_next,
4962         GOMP_loop_ordered_guided_next): Likewise.
4963         * ordered.c (GOMP_ordered_start): Likewise.
4965 2005-08-01  Diego Novillo  <dnovillo@redhat.com>
4967         * testsuite/libgomp.dg/dg.exp: Use -O2 for now.
4968         * testsuite/libgomp.dg/omp_hello.c: Fix return code
4969         * testsuite/libgomp.dg/omp_matvec.c: Likewise.
4970         * testsuite/libgomp.dg/omp_orphan.c: Likewise
4971         * testsuite/libgomp.dg/omp_reduction.c: Likewise
4972         * testsuite/libgomp.dg/omp_workshare1.c: Likewise
4973         * testsuite/libgomp.dg/omp_workshare2.c: Likewise
4974         * testsuite/libgomp.dg/omp_workshare3.c: Likewise
4975         * testsuite/libgomp.dg/omp_workshare4.c: Likewise
4977 2005-07-07  Eric Christopher  <echristo@redhat.com>
4978             Diego Novillo  <dnovillo@redhat.com>
4980         * testsuite/libgomp.dg/dg.exp: Add -fopenmp to DEFAULT_CFLAGS.
4981         * testsuite/libgomp.dg/omp_hello.c: Add standard includes, fix
4982         up code.
4983         * testsuite/libgomp.dg/omp_matvec.c: Ditto.
4984         * testsuite/libgomp.dg/omp_orphan.c: Ditto.
4985         * testsuite/libgomp.dg/omp_reduction.c: Ditto.
4986         * testsuite/libgomp.dg/omp_workshare1.c: Ditto.
4987         * testsuite/libgomp.dg/omp_workshare2.c: Ditto.
4988         * testsuite/libgomp.dg/omp_workshare3.c: Ditto.
4989         * testsuite/libgomp.dg/omp_workshare4.c: Ditto.
4991 2005-06-13  Diego Novillo  <dnovillo@redhat.com>
4993         * TOPLEVEL.patch: Remove.
4995 2005-05-16  Richard Henderson  <rth@redhat.com>
4997         * configure.ac: Test for clock_gettime.
4998         * config.h.in, configure: Rebuild.
4999         * config/posix/time.c: Use recommended TIME_WITH_SYS_TIME pattern.
5000         (omp_get_wtime): Use clock_gettime if available.
5001         (omp_get_wtick): Use clock_getres if available.
5003 2005-05-11  Richard Henderson  <rth@redhat.com>
5005         * config/linux/ia64/futex.h: New file.
5006         * configure.tgt: Use it.
5008         * team.c (gomp_barrier_init, gomp_barrier_destroy): Mark inline.
5010 2005-05-07  Richard Henderson  <rth@redhat.com>
5012         * config/linux/powerpc/futex.h: New file.
5013         * configure.tgt: Use it.
5015         * config/linux/i486/futex.h: Merge ...
5016         * config/linux/x86_64/futex.h: ... into ...
5017         * config/linux/x86/futex.h: ... here.
5018         * configure.tgt: Update to match.
5020 2005-05-06  Richard Henderson  <rth@redhat.com>
5022         * config/linux/alpha/futex.h: Conditionally define SYS_futex.
5023         * config/linux/i486/futex.h: Likewise.
5024         * config/linux/x86_64/futex.h: Likewise.
5026         * config/linux/lock.c: New file.
5027         * config/linux/omp-lock.h: New file.
5029         * critical.c, env.h: Don't include omp.h
5030         * config/posix/lock.c: Include libgomp.h instead of omp.h.
5031         * config/posix/time.c: Likewise.
5032         * config/posix/omp-lock.h: New file.
5033         * libgomp.h: Include omp-lock.h and omp.h.
5034         * Makefile.am (nodist_include_HEADERS): New.
5035         (omp.h): New rule.
5036         * configure.ac (PERL): New.
5037         * mkomp_h.pl: New file.
5038         * omp.h.in: Rename from omp.h; replace omp_lock_t and omp_nest_lock_t
5039         with templates.
5040         * Makefile.in, configure, testsuite/Makefile.in: Rebuild.
5042         * testsuite/lib/libgomp-dg.exp (libgomp_init): Add include into
5043         build directory.  Re-add -march=i486 hack.
5045         * testsuite/lib/libgomp-dg.exp (libgomp_compile_flags): Remove.
5046         (libgomp_link_flags): Remove.
5047         (libgomp_initialized): Remove.
5048         (libgomp_init): Don't protect from reinitialization.  Copy code
5049         from libstdc++ for getting the multilib set correctly.
5051 2005-05-05  Richard Henderson  <rth@redhat.com>
5053         * config/linux/alpha/futex.h: New file.
5054         * configure.tgt (alpha*-*-linux*): Use it.
5056         * config/posix/mutex.c: New file.
5057         * config/posix/sem.c: Use libgomp.h.
5059         * configure.tgt (x86_64-linux): Also test CC for -m32.
5060         * config/linux/x86_64/futex.h (futex_wait): Fix r10 usage.
5062         * testsuite/lib/libgomp-dg.exp (libgomp_link_flags): Add /
5063         after $gccpath.
5065         * Makefile.am (SUBDIRS): New.
5066         (libgomp_la_LDFLAGS): Add -lpthread.
5067         * configure.ac (AM_INIT_AUTOMAKE): Enable dependencies.
5068         * Makefile.in, aclocal.m4, config.h.in, configure: Rebuild.
5070         * libgomp_g.h: New file.
5071         * libgomp.h: Split out all public declarations to libgomp_g.h.
5072         Use pragma GCC visibility instead of ATTRIBUTE_HIDDEN.
5073         * config/linux/mutex.h: Remove ATTRIBUTE_HIDDEN.
5074         * config/linux/sem.h: Likewise.
5075         * config/posix/sem.h: Likewise.
5077         * Makefile.am (AM_LDFLAGS): New.
5078         (libgomp_version_script): Split out from ...
5079         (libgomp_la_LDFLAGS): ... here.
5080         (libgomp_version_info): New.
5081         * acinclude.m4 (LIBGOMP_CHECK_TLS): Use LIBGOMP_ENABLE.
5082         (LIBGOMP_ENABLE): New.
5083         (LIBGOMP_CHECK_LINKER_FEATURES): New.
5084         (LIBGOMP_ENABLE_SYMVERS): New.
5085         * configure.ac (AC_INIT): Version 1.0.
5086         (enable-version-specific-runtime-libs): Use LIBGOMP_ENABLE.
5087         (enable-linux-futex): Likewise.  Rename from enable-futex.
5088         (libtool_VERSION): New.
5089         (LIBGOMP_ENABLE_SYMVERS): Use it.
5090         * configure.tgt: Check with_gnu_ld wrt have_tls optimizations.
5091         * Makefile.in, aclocal.m4, configure: Rebuild.
5093         * config/linux/mutex.c: Include libgomp.h instead of mutex.h.
5094         (gomp_mutex_unlock_slow): Fix typo.
5095         * config/linux/sem.c: Similarly.
5096         (gomp_sem_post_slow): Fix typo.
5097         * config/linux/sem.h (gomp_sem_post_slow): Fix typo.
5098         * config/linux/i486/futex.h: Remove USE_LINUX_SYSENTER code.
5099         [__PIC__] (sys_futex0): Don't use tmp output in asm.
5101         * Makefile.am (AM_CFLAGS): Expand with XCFLAGS.
5102         (libgomp_la_LDFLAGS): Add top_srcdir to path.
5103         * acinclude.m4: Copy libtool.m4 stuff from libgfortran.
5104         * configure.ac: Check for getloadavg.  Substitute XCFLAGS and
5105         XLDFLAGS.  Add XCFLAGS to CFLAGS around LIBGOMP_CHECK_SYNC_BUILTINS.
5106         * configure.tgt: Set XCFLAGS and XLDFLAGS instead of CFLAGS and
5107         LDFLAGS.  Pull enable_futex check to top-level.
5108         * libgomp.h: Fix sem.h and mutex.h includes.  Define ATTRIBUTE_HIDDEN.
5109         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
5111         First attempt at real configury.
5112         * Makefile, config.h: Remove file.
5113         * Makefile.am, Makefile.in: New file.
5114         * acinclude.m4 aclocal.m4: New file.
5115         * configure.ac, configure.tgt, configure: New file.
5117         * config/posix/lock.c: Rename from sys-lock.c.
5118         * config/posix/mutex.h: Rename from sys-mutex.h.
5119         * config/posix/sem.c: Rename from sys-sem.c.
5120         * config/posix/sem.h: Rename from sys-sem.h.
5121         * config/posix/proc.c: Rename from sys-proc.c.
5122         * config/posix/time.c: Rename from sys-proc.c.
5124         * config/linux/mutex.c: New file.
5125         * config/linux/mutex.h: New file.
5126         * config/linux/sem.c: New file.
5127         * config/linux/sem.h: New file.
5128         * config/linux/i486/futex.h: New file.
5129         * config/linux/x86_64/futex.h: New file.
5131 2005-05-04  Richard Henderson  <rth@redhat.com>
5133         * iter.c (gomp_iter_dynamic_next, gomp_iter_guided_next): New.
5134         * libgomp.h: Declare them.
5135         * loop.c (gomp_loop_dynamic_start, gomp_loop_guided_start,
5136         gomp_loop_dynamic_next, gomp_loop_guided_next): Use them.
5138 2005-05-04  Richard Henderson  <rth@redhat.com>
5140         * libgomp-1 code drop
5142 2005-05-04  Richard Henderson  <rth@redhat.com>
5144         * iter.c (gomp_iter_static_next): Return tri-state on 0.
5145         * ordered.c (gomp_ordered_static_next): Remove not_last argument.
5146         * libgomp.h (struct gomp_team_state): Make static_trip unsigned.
5147         (gomp_iter_static_next): Update.
5148         (gomp_ordered_static_next): Update.
5149         * loop.c (gomp_loop_static_start): Update for gomp_iter_static_next.
5150         (gomp_loop_ordered_static_start): Likewise.  Exit early for a
5151         totally empty range.
5152         (gomp_loop_ordered_static_next): Refine test for calling
5153         gomp_ordered_static_next.
5154         * testsuite/ordered-1.c: Add case for more threads than iterations.
5156         * iter.c (gomp_iter_runtime_next_locked): Remove.
5157         * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start,
5158         gomp_loop_guided_start, gomp_loop_ordered_static_start,
5159         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
5160         gomp_loop_static_next, gomp_loop_dynamic_next, gomp_loop_guided_next,
5161         gomp_loop_ordered_static_next, gomp_loop_ordered_dynamic_next,
5162         gomp_loop_ordered_guided_next): Downcase name, make static, add
5163         an external alias with the old name.
5164         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
5165         GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Use a
5166         switch and call one of the above static functions.
5167         * libgomp.h: Update.
5169         * work.c (gomp_work_share_start): Lock the mutex for !first too.
5170         * loop.c (GOMP_loop_static_start, GOMP_loop_dynamic_start,
5171         GOMP_loop_guided_start, GOMP_loop_runtime_start,
5172         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
5173         GOMP_loop_ordered_guided_start): Update to match.
5174         * sections.c (GOMP_sections_start): Likewise.
5175         * single.c (GOMP_single_start, GOMP_single_copy_start): Likewise.
5177         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
5178         gomp_ordered_static_init, gomp_ordered_static_next): Rename s/_loop//.
5179         Use bounds check instead of modulus.
5180         (gomp_ordered_sync): Split out of GOMP_ordered_start.
5181         (gomp_ordered_last): Don't sync with ordered_owner here.
5182         (gomp_ordered_next): Likewise.
5183         (gomp_ordered_static_loop_next): Likewise.
5184         * loop.c, libgomp.h: Update to match.
5186         * libgomp.h (GOMP_barrier): Declare.
5188         * testsuite/barrier-1.c: New file.
5189         * testsuite/critical-1.c: New file.
5190         * testsuite/ordered-2.c: New file.
5191         * testsuite/ordered-1.c: New file.
5192         * testsuite/sections-1.c: New file.
5193         * testsuite/single-1.c: New file.
5194         * testsuite/Makefile (TESTS): Add them.
5196 2005-05-04  Richard Henderson  <rth@redhat.com>
5198         * libgomp.h (struct gomp_work_share): Add ordered_owner.
5199         * loop.c (GOMP_loop_static_start): If not the startup thread,
5200         acquire the mutex to wait for initialization complete.
5201         (GOMP_loop_ordered_static_start): Likewise.
5202         (GOMP_loop_ordered_runtime_start): Likewise.
5203         (GOMP_loop_ordered_static_first): Remove.
5204         (GOMP_loop_ordered_dynamic_first): Remove.
5205         (GOMP_loop_ordered_guided_first): Remove.
5206         (GOMP_loop_ordered_runtime_first): Remove.
5207         * ordered.c (gomp_ordered_loop_first): Post to own release when
5208         we're the first thread.
5209         (gomp_ordered_loop_last): Wait on release if not owner.
5210         (gomp_ordered_loop_next): Likewise.
5211         (gomp_ordered_static_loop_init): New.
5212         (gomp_ordered_static_loop_next): Use ordered_owner.
5213         (GOMP_ordered_start): Likewise.
5214         * work.c (gomp_new_work_share): Initialize ordered_owner.
5216 2005-05-03  Richard Henderson  <rth@redhat.com>
5218         * Makefile (OPT): New.
5219         (CFLAGS): Use it.
5221         * loop.c (GOMP_loop_end, GOMP_loop_end_nowait): New.
5222         * sections.c (GOMP_sections_end, GOMP_sections_end_nowait): New.
5223         * libgomp.h, libgomp.map, NOTES: Update to match.
5225         * team.c (struct gomp_thread_start_data): Remove ts, fn, data.
5226         Add initialized and thr members.
5227         (gomp_thread_start): Pause when initially spawned to wait for
5228         the whole team to be created.
5229         (gomp_team_start): Release team members at the end.
5231         * testsuite/loop-1.c (N): New.  Use it instead of hardcoded 100.
5232         (f_foo_1): Use GOMP_loop_end.
5233         (f_foo_2): Use GOMP_loop_end_nowait.
5235         * testsuite/loop-2.c: New file.
5236         * testsuite/Makefile (TESTS): Add it.
5238 2005-05-03  Richard Henderson  <rth@redhat.com>
5240         * iter.c (gomp_iter_static_next): Fix overflow check typo.
5241         (gomp_iter_dynamic_next_locked): Fix overflow check thinko.
5242         * team.c (new_team): Initialize oldest_live_gen to 1 if no
5243         initial work_share.
5245         * testsuite/Makefile: New file.
5246         * testsuite/loop-1.c: New file.
5248 2005-05-03  Richard Henderson  <rth@redhat.com>
5250         Initial implementation and checkin.