team.c (gomp_team_end): Free team immediately if it has just one thread.
[platform/upstream/gcc.git] / libgomp / ChangeLog
1 2008-07-16  Jakub Jelinek  <jakub@redhat.com>
2
3         * team.c (gomp_team_end): Free team immediately if it has
4         just one thread.
5
6 2008-07-08  David Edelsohn  <edelsohn@gnu.org>
7
8         * testsuite/libgomp.c++/c++.exp: Append multilib library path.
9         * testsuite/libgomp.fortran/fortran.exp: Same.
10         * testsuite/libgomp.c/c.exp: Same.
11         * testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib
12         directory to library path first.
13
14 2008-06-29  Krister Walfridsson  <krister.walfridsson@gmail.com>
15
16         * env.c (parse_stacksize): Add cast to avoid warning.
17         (parse_spincount): Likewise.
18
19 2008-06-27  Jakub Jelinek  <jakub@redhat.com>
20
21         * testsuite/libgomp.c/loop-10.c: New test.
22         * libgomp.c/loop-3.c (main): Add lastprivate clause.
23         * libgomp.c++/loop-6.C (main): Likewise.
24
25         PR debug/36617
26         * testsuite/libgomp.c/debug-1.c: New test.
27
28 2008-06-19  Jakub Jelinek  <jakub@redhat.com>
29
30         * testsuite/libgomp.c/nqueens-1.c: New test.
31
32         PR c++/36523
33         * testsuite/libgomp.c++/task-7.C: New function.
34
35 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
36
37         * configure: Regenerate.
38
39 2008-06-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
40
41         * env.c (initialize_env): Always initialize gomp_remaining_threads_lock
42         mutex when HAVE_SYNC_BUILTINS isn't defined.
43
44 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
45
46         * libgomp.texi (omp_test_lock): Fix typo.
47
48 2008-06-12  Tobias Burnus  <burnus@net-b.de>
49
50         * omp_lib.f90.in: Add "implicit none".
51
52 2008-06-12  Jakub Jelinek  <jakub@redhat.com>
53
54         PR middle-end/36506
55         * testsuite/libgomp.c/reduction-5.c: New test.
56
57 2008-06-11  Jakub Jelinek  <jakub@redhat.com>
58
59         * libgomp.h (struct gomp_task): Add in_tied_task field.
60         * task.c (gomp_init_task): Initialize it.
61         (GOMP_task): Likewise.  Call gomp_team_barrier_set_task_pending
62         unconditionally.  Don't call gomp_team_barrier_wake if
63         current task is implicit or if(0) from implicit and number of
64         running tasks is equal to nthreads - 1.
65
66         PR libgomp/36471
67         * omp_lib.f90.in (omp_get_ancestor_thread_num_8,
68         omp_get_team_size_8): Fix pastos.
69
70         PR libgomp/36469
71         * configure.ac: Add AC_CHECK_FUNCS (strtoull).
72         * configure: Regenerated.
73         * config.h.in: Regenerated.
74         * env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
75         defined.
76
77 2008-06-06  Andreas Tobler  <a.tobler@schweiz.org>
78
79         PR bootstrap/36452
80         * loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
81         (GOMP_loop_ull_dynamic_start): Likewise.
82         (GOMP_loop_ull_guided_start): Likewise.
83         (GOMP_loop_ull_ordered_static_start): Likewise.
84         (GOMP_loop_ull_ordered_dynamic_start): Likewise.
85         (GOMP_loop_ull_ordered_guided_start): Likewise.
86
87 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
88             Richard Henderson  <rth@redhat.com>
89             Ulrich Drepper  <drepper@redhat.com>
90             Jakob Blomer  <jakob.blomer@ira.uka.de>
91
92         * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
93         Substitute also OMP_*LOCK_25*.
94         * configure: Regenerated.
95         * config.h.in: Regenerated.
96         * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
97         ptrlock.c and task.c.
98         * Makefile.in: Regenerated.
99         * testsuite/Makefile.in: Regenerated.
100         * task.c: New file.
101         * loop_ull.c: New file.
102         * iter_ull.c: New file.
103         * libgomp.h: Include ptrlock.h.
104         (enum gomp_task_kind): New type.
105         (struct gomp_team): Add task_lock, task_queue, task_count,
106         task_running_count, single_count fields.  Add
107         work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
108         Remove work_share_lock, generation_mask,
109         oldest_live_gen, num_live_gen and init_work_shares fields, add
110         work work_share_list_alloc, work_share_list_free and work_share_chunk
111         fields.  Change work_shares from pointer to pointers into an array.
112         Change ordered_release field into gomp_sem_t ** from flexible array
113         member.  Add implicit_task and initial_work_shares fields.
114         Move close to the end of the struct.
115         (struct gomp_team_state): Add single_count, last_work_share,
116         active_level and level fields, remove work_share_generation.
117         (gomp_barrier_handle_tasks): New prototype.
118         (gomp_finish_task): New inline function.
119         (struct gomp_work_share): Move chunk_size, end, incr into
120         transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
121         next_ll fields.  Reshuffle fields.  Add next_alloc,
122         next_ws, next_free and inline_ordered_team_ids fields, change
123         ordered_team_ids into pointer from flexible array member.
124         Add mode field.  Put lock and next into a different cache line
125         from most of the write-once fields.
126         (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
127         gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
128         gomp_iter_ull_guided_next): New prototypes.
129         (gomp_new_icv): New prototype.
130         (struct gomp_thread): Add thread_pool and task fields.
131         (struct gomp_thread_pool): New type.
132         (gomp_new_team): New prototype.
133         (gomp_team_start): Change type of last argument.
134         (gomp_new_work_share): Removed.
135         (gomp_init_work_share, gomp_fini_work_share): New prototypes.
136         (gomp_work_share_init_done): New static inline.
137         (gomp_throttled_spin_count_var, gomp_available_cpus,
138         gomp_managed_threads): New extern decls.
139         (gomp_init_task): New prototype.
140         (gomp_spin_count_var): New extern var decl.
141         (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
142         or no alias support, or if not PIC.
143         (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
144         gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
145         gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
146         gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
147         gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
148         gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
149         gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
150         gomp_test_nest_lock_25): New prototypes.
151         (omp_lock_symver, strong_alias): Define.
152         (gomp_remaining_threads_count, gomp_remaining_threads_lock): New
153         decls.
154         (gomp_end_task): New.
155         (struct gomp_task_icv, gomp_global_icv): New.
156         (gomp_thread_limit_var, gomp_max_active_levels_var): New.
157         (struct gomp_task): New.
158         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
159         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
160         (gomp_icv): New.
161         (gomp_schedule_type): Reorder enum to match
162         omp_sched_t.
163         * team.c (struct gomp_thread_start_data): Add thread_pool and task
164         fields.
165         (gomp_thread_start): Add gomp_team_barrier_wait call.
166         For non-nested case remove clearing of docked thread thr fields.
167         Use pool fields instead of global gomp_* variables.  Use
168         gomp_barrier_wait_last when needed.  Initialize ts.active_level.
169         Create tasks for each member thread.
170         (free_team): Only destroy team barrier, task_lock here and free it.
171         (gomp_free_thread): Free last_team if non-NULL.
172         (gomp_team_end): Call gomp_team_barrier_wait instead of
173         gomp_barrier_wait.  For nested case call one extra
174         gomp_barrier_wait.  Move here some destruction from free_team.
175         Call free_team on pool->last_team if any, rather than freeing
176         current team.  Destroy work_share_list_free_lock ifndef
177         HAVE_SYNC_BUILTINS.
178         (gomp_new_icv): New function.
179         (gomp_threads, gomp_threads_size, gomp_threads_used,
180         gomp_threads_dock): Removed.
181         (gomp_thread_destructor): New variable.
182         (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
183         functions.
184         (gomp_team_start): Create new pool if current thread doesn't have
185         one.  Use pool fields instead of global gomp_* variables. 
186         Initialize thread_pool field for new threads.  Clear single_count.
187         Change last argument from ws to team, don't create
188         new team, set ts.work_share to &team->work_shares[0] and clear
189         ts.last_work_share.  Don't clear ts.work_share_generation.
190         If number of threads changed, adjust atomically gomp_managed_threads.
191         Use gomp_init_task instead of gomp_new_task,
192         set thr->task to the corresponding implicit_task array entry.
193         Create tasks for each member thread.  Initialize ts.level.
194         (initialize_team): Call pthread_key_create on
195         gomp_thread_destructor.
196         (team_destructor): New function.
197         (new_team): Removed.
198         (gomp_new_team): New function.
199         (free_team): Free gomp_work_share blocks chained through next_alloc,
200         instead of freeing work_shares and destroying work_share_lock.
201         (gomp_team_end): Call gomp_fini_work_share.  If number of threads
202         changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
203         * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
204         of gomp_barrier_wait.
205         * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
206         instead of gomp_barrier_wait.  Call gomp_work_share_init_done
207         if gomp_work_share_start returned true.  Don't unlock ws->lock.
208         (GOMP_single_copy_end): Call gomp_team_barrier_wait instead
209         of gomp_barrier_wait.
210         (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
211         gomp_work_share_init_done if gomp_work_share_start returned true.
212         Don't unlock ws->lock.
213         * work.c: Include stddef.h.
214         (free_work_share): Use work_share_list_free_lock instead
215         of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
216         Call gomp_fini_work_share and then either free ws if orphaned, or
217         put it into work_share_list_free list of the current team.
218         (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
219         functions.
220         (gomp_work_share_start, gomp_work_share_end,
221         gomp_work_share_end_nowait): Rewritten.
222         * omp_lib.f90.in Change some tabs to spaces to prevent warnings.
223         (openmp_version): Set to 200805.
224         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
225         omp_sched_guided, omp_sched_auto): New parameters.
226         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
227         omp_set_max_active_levels, omp_get_max_active_levels,
228         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
229         omp_get_active_level): New interfaces.
230         * omp_lib.h.in (openmp_version): Set to 200805.
231         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
232         omp_sched_guided, omp_sched_auto): New parameters.
233         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
234         omp_set_max_active_levels, omp_get_max_active_levels,
235         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
236         omp_get_active_level): New externals.
237         * loop.c: Include limits.h.
238         (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
239         GFS_AUTO.
240         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
241         Likewise.  Use gomp_icv.
242         (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
243         ts.static_trip here.
244         (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
245         gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
246         (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
247         gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
248         don't unlock ws->lock, otherwise lock it.
249         (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
250         gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
251         (gomp_parallel_loop_start): Call gomp_new_team instead of
252         gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
253         Adjust gomp_team_start caller.  Pass 0 as second argument to
254         gomp_resolve_num_threads.
255         (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
256         If adding ws->chunk_size nthreads + 1 times after end won't
257         overflow, set ws->mode to 1.
258         * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
259         GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
260         GOMP_loop_ull_ordered_static_start,
261         GOMP_loop_ull_ordered_dynamic_start,
262         GOMP_loop_ull_ordered_guided_start,
263         GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
264         GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
265         GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
266         GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
267         GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
268         prototypes.
269         * libgomp.map: Export lock routines also @@OMP_2.0.
270         (GOMP_loop_ordered_dynamic_first,
271         GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
272         GOMP_loop_ordered_static_first): Remove.
273         (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
274         GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
275         GOMP_loop_ull_ordered_dynamic_next,
276         GOMP_loop_ull_ordered_dynamic_start,
277         GOMP_loop_ull_ordered_guided_next,
278         GOMP_loop_ull_ordered_guided_start,
279         GOMP_loop_ull_ordered_runtime_next,
280         GOMP_loop_ull_ordered_runtime_start,
281         GOMP_loop_ull_ordered_static_next,
282         GOMP_loop_ull_ordered_static_start,
283         GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
284         GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
285         GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
286         (omp_set_schedule, omp_get_schedule,
287         omp_get_thread_limit, omp_set_max_active_levels,
288         omp_get_max_active_levels, omp_get_level,
289         omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
290         omp_set_schedule_, omp_set_schedule_8_,
291         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
292         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
293         omp_get_max_active_levels_, omp_get_level_,
294         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
295         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
296         New exports @@OMP_3.0.
297         * omp.h.in (omp_sched_t): New type.
298         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
299         omp_set_max_active_levels, omp_get_max_active_levels,
300         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
301         omp_get_active_level): New prototypes.
302         * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
303         gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
304         gomp_thread_limit_var, gomp_remaining_threads_count,
305         gomp_remaining_threads_lock): New variables.
306         (parse_spincount): New function.
307         (initialize_env): Call gomp_init_num_threads unconditionally.
308         Initialize gomp_available_cpus.  Call parse_spincount,
309         initialize gomp_{,throttled_}spin_count_var
310         depending on presence and value of OMP_WAIT_POLICY and
311         GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
312         Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
313         OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
314         for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
315         gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
316         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
317         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
318         (gomp_global_icv): New.
319         (parse_schedule): Use it.  Parse "auto".
320         (omp_set_num_threads): Use gomp_icv.
321         (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
322         Likewise.
323         (omp_get_max_threads): Move from parallel.c.
324         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
325         omp_set_max_active_levels, omp_get_max_active_levels): New functions,
326         add ialias.
327         (parse_stacksize, parse_wait_policy): New functions.
328         * fortran.c: Rewrite lock wrappers, if symbol versioning provide
329         both wrappers for compatibility and new locks.
330         (omp_set_schedule, omp_get_schedule,
331         omp_get_thread_limit, omp_set_max_active_levels,
332         omp_get_max_active_levels, omp_get_level,
333         omp_get_ancestor_thread_num, omp_get_team_size,
334         omp_get_active_level): New ialias_redirect.
335         (omp_set_schedule_, omp_set_schedule_8_,
336         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
337         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
338         omp_get_max_active_levels_, omp_get_level_,
339         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
340         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
341         New functions.
342         * parallel.c: Include limits.h.
343         (gomp_resolve_num_threads): Add count argument.  Rewritten.
344         (GOMP_parallel_start): Call gomp_new_team and pass that as last
345         argument to gomp_team_start.  Pass 0 as second argument to
346         gomp_resolve_num_threads.
347         (GOMP_parallel_end): Decrease gomp_remaining_threads_count
348         if gomp_thread_limit_var != ULONG_MAX.
349         (omp_in_parallel): Implement using ts.active_level.
350         (omp_get_max_threads): Move to env.c.
351         (omp_get_level, omp_get_ancestor_thread_num,
352         omp_get_team_size, omp_get_active_level): New functions,
353         add ialias.
354         * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
355         after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
356         gomp_iter_dynamic_next instead of the _locked variant and don't take
357         lock around it, otherwise acquire it before calling
358         gomp_iter_dynamic_next_locked.
359         (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
360         gomp_iter_dynamic_next instead of the _locked variant and don't take
361         lock around it.
362         (GOMP_parallel_sections_start): Call gomp_new_team instead of
363         gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
364         Adjust gomp_team_start caller.  Pass count as second argument to
365         gomp_resolve_num_threads, don't adjust num_threads after the call.
366         Use gomp_icv.
367         * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
368         ws->chunk_size by incr.
369         (gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
370         code.
371         * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
372         types.
373         (omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
374         (omp_check_defines): Check even the compat defines.
375         * config/linux/ptrlock.c: New file.
376         * config/linux/ptrlock.h: New file.
377         * config/linux/wait.h: New file.
378         * config/posix/ptrlock.c: New file.
379         * config/posix/ptrlock.h: New file.
380         * config/linux/bar.h (gomp_team_barrier_wait,
381         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
382         (gomp_team_barrier_set_task_pending,
383         gomp_team_barrier_clear_task_pending,
384         gomp_team_barrier_set_waiting_for_tasks,
385         gomp_team_barrier_waiting_for_tasks,
386         gomp_team_barrier_done): New inlines.
387         (gomp_barrier_t): Rewritten.
388         (gomp_barrier_state_t): New typedef.
389         (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
390         gomp_barrier_wait_start): Rewritten.
391         (gomp_barrier_wait_end): Change second argument to
392         gomp_barrier_state_t.
393         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
394         inlines.
395         * config/linux/bar.c: Include wait.h instead of libgomp.h and
396         futex.h.
397         (gomp_barrier_wait_end): Rewritten.
398         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
399         gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
400         * config/posix/bar.h (gomp_barrier_t): Add generation field.
401         (gomp_barrier_state_t): New typedef.
402         (gomp_team_barrier_wait,
403         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
404         (gomp_barrier_wait_start): Or all but low 2 bits from generation
405         into the return value.  Return gomp_barrier_state_t.
406         (gomp_team_barrier_set_task_pending,
407         gomp_team_barrier_clear_task_pending,
408         gomp_team_barrier_set_waiting_for_tasks,
409         gomp_team_barrier_waiting_for_tasks,
410         gomp_team_barrier_done): New inlines.
411         (gomp_barrier_wait_end): Change second argument to
412         gomp_barrier_state_t.
413         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
414         inlines.
415         * config/posix/bar.c (gomp_barrier_init): Clear generation field.
416         (gomp_barrier_wait_end): Change second argument to
417         gomp_barrier_state_t. 
418         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
419         gomp_team_barrier_wake): New functions.
420         * config/linux/mutex.c: Include wait.h instead of libgomp.h and
421         futex.h.
422         (gomp_futex_wake, gomp_futex_wait): New variables.
423         (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
424         * config/linux/lock.c: Rewrite to make locks task owned,
425         for backwards compatibility provide the old entrypoints
426         if symbol versioning.  Include wait.h instead of libgomp.h and
427         futex.h.
428         (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
429         * config/posix95/lock.c: Rewrite to make locks task owned,
430         for backwards compatibility provide the old entrypoints
431         if symbol versioning.
432         * config/posix/lock.c: Rewrite to make locks task owned,
433         for backwards compatibility provide the old entrypoints
434         if symbol versioning.
435         * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
436         (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
437         * config/posix/proc.c, config/mingw32/proc.c: Similarly.
438         * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
439         (sys_futex0): Return error code.
440         (futex_wake, futex_wait): If ENOSYS was returned, clear
441         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
442         (cpu_relax, atomic_write_barrier): New static inlines.
443         * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
444         (futex_wake, futex_wait): If ENOSYS was returned, clear
445         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
446         (cpu_relax, atomic_write_barrier): New static inlines.
447         * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
448         (sys_futex0): Return error code.
449         (futex_wake, futex_wait): If ENOSYS was returned, clear
450         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
451         (cpu_relax, atomic_write_barrier): New static inlines.
452         * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
453         (sys_futex0): Return error code.
454         (futex_wake, futex_wait): If ENOSYS was returned, clear
455         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
456         (cpu_relax, atomic_write_barrier): New static inlines.
457         * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
458         (sys_futex0): Return error code.
459         (futex_wake, futex_wait): If ENOSYS was returned, clear
460         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
461         (cpu_relax, atomic_write_barrier): New static inlines.
462         * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
463         (sys_futex0): Return error code.
464         (futex_wake, futex_wait): If ENOSYS was returned, clear
465         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
466         (cpu_relax, atomic_write_barrier): New static inlines.
467         * config/linux/sem.c: Include wait.h instead of libgomp.h and
468         futex.h.
469         (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
470         * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
471         * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
472         types.
473         (omp_nest_lock_t): Change owner into void *, add lock field.
474         * config/posix95/omp-lock.h: Include semaphore.h.
475         (omp_lock_25_t, omp_nest_lock_25_t): New types.
476         (omp_lock_t): Use sem_t instead of mutex if semaphores
477         aren't broken.
478         (omp_nest_lock_t): Likewise.  Change owner to void *.
479         * config/posix/omp-lock.h: Include semaphore.h.
480         (omp_lock_25_t, omp_nest_lock_25_t): New types.
481         (omp_lock_t): Use sem_t instead of mutex if semaphores
482         aren't broken.
483         (omp_nest_lock_t): Likewise.  Add owner field.
484
485 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
486
487         * testsuite/libgomp.c/collapse-1.c: New test.
488         * testsuite/libgomp.c/collapse-2.c: New test.
489         * testsuite/libgomp.c/collapse-3.c: New test.
490         * testsuite/libgomp.c/icv-1.c: New test.
491         * testsuite/libgomp.c/icv-2.c: New test.
492         * testsuite/libgomp.c/lib-2.c: New test.
493         * testsuite/libgomp.c/lock-1.c: New test.
494         * testsuite/libgomp.c/lock-2.c: New test.
495         * testsuite/libgomp.c/lock-3.c: New test.
496         * testsuite/libgomp.c/loop-4.c: New test.
497         * testsuite/libgomp.c/loop-5.c: New test.
498         * testsuite/libgomp.c/loop-6.c: New test.
499         * testsuite/libgomp.c/loop-7.c: New test.
500         * testsuite/libgomp.c/loop-8.c: New test.
501         * testsuite/libgomp.c/loop-9.c: New test.
502         * testsuite/libgomp.c/nested-3.c: New test.
503         * testsuite/libgomp.c/nestedfn-6.c: New test.
504         * testsuite/libgomp.c/sort-1.c: New test.
505         * testsuite/libgomp.c/task-1.c: New test.
506         * testsuite/libgomp.c/task-2.c: New test.
507         * testsuite/libgomp.c/task-3.c: New test.
508         * testsuite/libgomp.c/task-4.c: New test.
509         * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
510         to C++ testsuite default compiler options.
511         * testsuite/libgomp.c++/collapse-1.C: New test.
512         * testsuite/libgomp.c++/collapse-2.C: New test.
513         * testsuite/libgomp.c++/ctor-10.C: New test.
514         * testsuite/libgomp.c++/for-1.C: New test.
515         * testsuite/libgomp.c++/for-2.C: New test.
516         * testsuite/libgomp.c++/for-3.C: New test.
517         * testsuite/libgomp.c++/for-4.C: New test.
518         * testsuite/libgomp.c++/for-5.C: New test.
519         * testsuite/libgomp.c++/loop-8.C: New test.
520         * testsuite/libgomp.c++/loop-9.C: New test.
521         * testsuite/libgomp.c++/loop-10.C: New test.
522         * testsuite/libgomp.c++/task-1.C: New test.
523         * testsuite/libgomp.c++/task-2.C: New test.
524         * testsuite/libgomp.c++/task-3.C: New test.
525         * testsuite/libgomp.c++/task-4.C: New test.
526         * testsuite/libgomp.c++/task-5.C: New test.
527         * testsuite/libgomp.c++/task-6.C: New test.
528         * testsuite/libgomp.fortran/allocatable1.f90: New test.
529         * testsuite/libgomp.fortran/allocatable2.f90: New test.
530         * testsuite/libgomp.fortran/allocatable3.f90: New test.
531         * testsuite/libgomp.fortran/allocatable4.f90: New test.
532         * testsuite/libgomp.fortran/collapse1.f90: New test.
533         * testsuite/libgomp.fortran/collapse2.f90: New test.
534         * testsuite/libgomp.fortran/collapse3.f90: New test.
535         * testsuite/libgomp.fortran/collapse4.f90: New test.
536         * testsuite/libgomp.fortran/lastprivate1.f90: New test.
537         * testsuite/libgomp.fortran/lastprivate2.f90: New test.
538         * testsuite/libgomp.fortran/lib4.f90: New test.
539         * testsuite/libgomp.fortran/lock-1.f90: New test.
540         * testsuite/libgomp.fortran/lock-2.f90: New test.
541         * testsuite/libgomp.fortran/nested1.f90: New test.
542         * testsuite/libgomp.fortran/nestedfn4.f90: New test.
543         * testsuite/libgomp.fortran/strassen.f90: New test.
544         * testsuite/libgomp.fortran/tabs1.f90: New test.
545         * testsuite/libgomp.fortran/tabs2.f: New test.
546         * testsuite/libgomp.fortran/task1.f90: New test.
547         * testsuite/libgomp.fortran/task2.f90: New test.
548         * testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
549         * testsuite/libgomp.fortran/vla5.f90: Likewise.
550         * testsuite/libgomp.c/pr26943-2.c: Likewise.
551         * testsuite/libgomp.c/pr26943-3.c: Likewise.
552         * testsuite/libgomp.c/pr26943-4.c: Likewise.
553
554 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
555
556         PR c++/36308
557         * testsuite/libgomp.c++/ctor-11.C: New test.
558         * testsuite/libgomp.c++/ctor-12.C: New test.
559
560 2008-05-15  Janis Johnson  <janis187@us.ibm.com>
561
562         * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.
563
564 2008-05-07  Jakub Jelinek  <jakub@redhat.com>
565
566         PR middle-end/36106
567         * testsuite/libgomp.c/atomic-5.c: New test.
568         * testsuite/libgomp.c/atomic-6.c: New test.
569         * testsuite/libgomp.c/autopar-1.c: New test.
570
571 2008-04-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
572
573         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
574         (LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
575         (LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
576         (LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
577         * configure: Regenerate.
578         * Makefile.in, testsuite/Makefile.in: Likewise.
579
580 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
581
582         PR bootstrap/35457
583         * aclocal.m4: Regenerate.
584         * configure: Regenerate.
585
586 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
587
588         PR middle-end/35611
589         * testsuite/libgomp.c/atomic-4.c: New test.
590
591         PR libgomp/35625
592         * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
593         (gomp_iter_guided_next): Likewise.
594         * testsuite/libgomp.c/pr35625.c: New test.
595
596 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
597
598         * aclocal.m4: Regenerate.
599         * configure: Likewise.
600         * Makefile.in: Likewise.
601         * testsuite/Makefile.in: Likewise.
602
603 2008-03-13  Jakub Jelinek  <jakub@redhat.com>
604
605         PR middle-end/35185
606         * testsuite/libgomp.c++/pr35185.C: New test.
607
608 2008-03-12  Jakub Jelinek  <jakub@redhat.com>
609
610         PR middle-end/35549
611         * testsuite/libgomp.c/pr35549.c: New test.
612
613 2008-03-06  Jakub Jelinek  <jakub@redhat.com>
614
615         * testsuite/libgomp.c/atomic-3.c: New test.
616
617 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
618
619         PR fortran/33197
620         * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
621         .F08 file suffixes.
622
623 2008-03-03  Peter O'Gorman  <pogma@thewrittenword.com>
624
625         PR libgomp/33131
626         * configure.ac: Add ACX_HEADER_STRING.
627         * env.c: Include strings.h.
628         * aclocal.m4: Regenerate.
629         * config.h.in: Regenerate.
630         * configure: Regenerate.
631         * Makefile.in: Regenerate.
632         * testsuite/Makefile.in: Regenerate.
633
634 2008-02-15  Jakub Jelinek  <jakub@redhat.com>
635
636         PR middle-end/35196
637         * testsuite/libgomp.c/pr35196.c: New test.
638
639         PR middle-end/35130
640         * testsuite/libgomp.fortran/pr35130.f90: New test.
641         * testsuite/libgomp.c/pr35130.c: New test.
642
643 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
644
645         PR middle-end/33880
646         * testsuite/libgomp.c/pr33880.c: New test.
647         * testsuite/libgomp.fortran/pr33880.f90: New test.
648
649 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
650
651         * configure: Regenerate.
652
653 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
654
655         * configure.ac: Move futex checking into ../config/futex.m4.
656         * configure: Rebuilt.
657         * aclocal.m4: Rebuilt.
658         * Makefile.in: Rebuilt.
659
660         * configure.tgt: Rename have_tls to gcc_cv_have_tls to match
661         2007-10-15 ../config/tls.m4 change.
662
663 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
664
665         PR c++/34513
666         * testsuite/libgomp.c/pr34513.c: New test.
667         * testsuite/libgomp.c++/pr34513.C: New test.
668
669 2007-12-17  Jack Howarth  <howarth@bromo.med.uc.edu>
670
671         PR target/32765
672         * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
673
674 2007-12-04  Jakub Jelinek  <jakub@redhat.com>
675
676         * omp.h.in (__GOMP_NOTHROW): Define.  Use it on omp_* prototypes.
677
678 2007-12-03  Jakub Jelinek  <jakub@redhat.com>
679
680         * testsuite/libgomp.c/private-1.c: New test.
681
682 2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>
683             Paolo Bonzini  <bonzini@gnu.org>
684
685         * Makefile.am: Use space as vpath separator.  Use 'vpath %'
686         instead of 'VPATH ='.
687         * Makefile.in: Regenerate.
688
689 2007-11-23  Matthias Klose  <doko@ubuntu.com>
690
691         * configure.ac: Adjust makeinfo version check.
692         * configure: Regenerate.
693
694 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
695
696         PR fortran/34020
697         * testsuite/libgomp.fortran/pr34020.f90: New test.
698
699 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
700
701         PR c++/33894
702         * testsuite/libgomp.c++/atomic-1.C: New test.
703
704 2007-10-25  Jakub Jelinek  <jakub@redhat.com>
705
706         PR libgomp/33275
707         * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
708         Make x and y integers rather than (implicit) reals.  Add private (j)
709         clause to the last omp parallel.
710
711 2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
712
713         * configure: Regenerate following changes to ../config/tls.m4.
714
715 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
716
717         * testsuite/libgomp.fortran/stack.f90: New test.
718
719 2007-09-10  Danny Smith  <dannysmith@users.sourceforge.net>
720
721         * config/mingw32/proc.c: New file.
722
723 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
724
725         * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
726         (main): Use __get_cpuid to get i386 target fetaures.
727         * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
728         (main): Use __get_cpuid to get x86_64 target fetaures.
729
730 2007-08-15  Jack Howarth  <howarth@bromo.med.uc.edu>
731
732         PR target/32765
733         * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
734         * testsuite/libgomp.fortran/crayptr2.f90: Likwise.
735
736 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
737
738         PR fortran/32550
739         * testsuite/libgomp.fortran/pr32550.f90: New test.
740         * testsuite/libgomp.fortran/crayptr2.f90: New test.
741
742 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
743
744         * aclocal.m4: Regenerated.
745
746 2007-07-05  Tobias Burnus  <burnus@net-b.de>
747
748         PR fortran/32359
749         * testsuite/libgomp.fortran/pr32359.f90: New.
750
751 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
752
753         PR libgomp/32468
754         * sections.c (GOMP_parallel_sections_start): Only decrease
755         number of threads to COUNT if dyn_var is true.
756         * testsuite/libgomp.c/pr32468.c: New test.
757
758 2007-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
759
760         PR libgomp/26308
761         * config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.
762
763 2007-06-21  Jakub Jelinek  <jakub@redhat.com>
764
765         PR middle-end/32362
766         * testsuite/libgomp.c/pr32362-1.c: New test.
767         * testsuite/libgomp.c/pr32362-2.c: New test.
768         * testsuite/libgomp.c/pr32362-3.c: New test.
769
770 2007-06-07  Jakub Jelinek  <jakub@redhat.com>
771
772         * team.c (gomp_team_start): Fix setting up thread_attr
773         stack size.
774
775 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
776
777         * configure: Regenerate.
778
779 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
780
781         * Makefile.in: Regenerate.
782         * configure: Regenerate.
783         * aclocal.m4: Regenerate.
784         * testsuite/Makefile.in: Regenerate.
785
786 2007-05-04  Jakub Jelinek  <jakub@redhat.com>
787
788         * config/linux/proc.c: New file.
789
790         PR libgomp/28482
791         * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
792
793 2007-04-19  Daniel Franke  <franke.daniel@gmail.com>
794
795         * libgomp.texi (GOMP_CPU_AFFINITY): Updated.
796
797 2007-04-16  Matthias Klose  <doko@debian.org>
798
799         * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
800         flags if not building with -m64.
801         * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
802         flag for i?86-*-* targets, if current target matches -m64.
803
804 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
805
806         * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
807         * Makefile.in: Regenerate.
808
809 2007-04-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
810
811         PR testsuite/31369
812         * testsuite/libgomp.c++/c++.exp: Don't use concat when setting
813         ld_library_path.
814         * testsuite/libgomp.fortran/fortran.exp: Likewise.
815
816 2007-04-04  Jakub Jelinek  <jakub@redhat.com>
817
818         * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
819         decls.
820         (gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
821         * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
822         (parse_affinity): New function.
823         (initialize_env): Call it and gomp_init_affinity.
824         * team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
825         create new pthread_attr_t and call gomp_init_thread_affinity
826         on it for each thread before passing the attribute to pthread_create.
827         * config/linux/affinity.c: New file.
828         * config/posix/affinity.c: New file.
829         * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
830         * configure: Rebuilt.
831         * config.h.in: Rebuilt.
832         * Makefile.am (libgomp_la_SOURCES): Add affinity.c.
833         * Makefile.in: Rebuilt.
834
835 2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>
836
837         * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
838         *-*-darwin*.
839         * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
840         and use it if found.
841
842 2007-03-18  Uros Bizjak  <ubizjak@gmail.com>
843
844         * testsuite/config/default.exp: New file.
845         * testsuite/lib/libgomp.exp: New file.
846         * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
847         libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
848         load_lib *, load_gcc_lib *): Move to libgomp.exp.
849         (libgomp_load): Remove.
850         * testsuite/lib/libgomp.exp (libgomp_init): Compute
851         always_ld_library_path, not ld_library_path.  Set additional_flags
852         to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
853         (target_compile): Do not call libgomp_init.  Append lang_library_path
854         and lang_link_flags to options.
855         * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
856         ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
857         here.
858         * testsuite/libgomp.c++/c++.exp: Set ld_library_path from
859         always_ld_library_path.  Set LD_LIBRARY_PATH here.
860         * testsuite/libgomp.fortran/fortran.exp: Ditto.
861         * testsuite/libgomp.c/atomic-1.c: Set dg-options to
862         "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
863         CX8 flag.
864         * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
865         lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
866         * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
867         * testsuite/libgomp.c/pr29947-1.c: Ditto.
868         * testsuite/libgomp.c/atomic-10.c: Ditto.
869
870 2007-03-21  Jakub Jelinek  <jakub@redhat.com>
871
872         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
873         dg-final cleanup-modules line.
874         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
875         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
876         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
877         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
878         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
879         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
880         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
881
882 2007-03-18  Andreas Schwab  <schwab@suse.de>
883
884         * acinclude.m4: Adjust regular expression for ld version
885         extraction.
886         * configure: Regenerate.
887
888 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
889
890         * Makefile.am: Add install-pdf target as copied from
891         automake v1.10 rules.
892         * Makefile.in: Regenerate
893
894 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
895
896         PR libgomp/28486
897         * configure: Regenerate.
898
899         PR c++/30703
900         * testsuite/libgomp.c++/pr30703.C: New test.
901
902 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
903
904         Revert:
905         2006-07-05  Eric Christopher  <echristo@apple.com>
906         * configure.ac: Depend addition of -pthread on host OS.
907         * configure: Regenerate.
908
909 2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
910
911         * libgomp.texi: Fix spacing after abbreviations.
912
913 2007-01-31  Daniel Franke <franke.daniel@gmail.com>
914
915         PR libgomp/30546
916         * configure.ac: Add check for makeinfo
917         * Makefile.am: Redefined target libgomp.info, build libgomp.info only
918         if an appropiate version of makeinfo is found.
919         * aclocal.m4: Regenerated.
920         * configure: Regenerated.
921         * Makefile.in: Regenerated.
922         * testsuite/Makefile.in: Regenerated.
923
924 2007-01-29  Daniel Franke <franke.daniel@gmail.com>
925
926         PR libgomp/30540
927         * libgomp.texi: More about implementation-dependent settings.
928
929 2007-01-26  Tobias Burnus  <burnus@net-b.de>
930
931         * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
932
933 2007-01-24  Jakub Jelinek  <jakub@redhat.com>
934
935         PR middle-end/30494
936         * testsuite/libgomp.c/pr30494.c: New test.
937
938 2007-01-15  Tom Tromey  <tromey@redhat.com>
939
940         * configure: Rebuilt.
941         * configure.ac: Fixed comment.
942
943 2007-01-14  Daniel Franke  <franke.daniel@gmail.com>
944
945         * libgomp.texi: Document implementation specific default values of
946         environment variables.
947
948 2006-12-21  Daniel Franke  <franke.daniel@gmail.com>
949
950         PR libgomp/28209
951         * libgomp.texi: New file.
952         * configure.ac: Add --enable-generated-files-in-srcdir option.
953         * Makefile.am: Add info, dvi, pdf, html targets. On request, copy
954         files to srcdir.
955         * Makefile.in: Regenerated.
956         * config.h.in: Regenerated.
957         * testsuite/Makefile.in: Regenerated.
958         * NOTES: Removed.
959
960 2006-12-04  Daniel Franke  <franke.daniel@gmail.com>
961
962         PR libgomp/29949
963         * env.c (omp_set_num_threads): Set illegal thread count to 1.
964
965 2006-12-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
966
967         * configure: Regenerate.
968
969 2006-12-04  Jakub Jelinek  <jakub@redhat.com>
970
971         PR libgomp/29947
972         * loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
973         start if there shouldn't be any loop iterations.
974         (gomp_loop_ordered_static_start): Remove start == end test.
975         * testsuite/libgomp.c/pr29947-1.c: New test.
976         * testsuite/libgomp.c/pr29947-2.c: New test.
977
978 2006-12-02  Eric Botcazou  <ebotcazou@libertysurf.fr>
979
980         * configure.tgt: Force initial-exec TLS model on Linux only.
981
982 2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
983
984         * configure: Regenerated.
985
986 2006-11-09  Uros Bizjak  <ubizjak@gmail.com>
987
988         * env.c (parse_schedule): Reject out of range values.
989         (parse_unsigned_long): Reject out of range, negative or zero values.
990
991 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
992
993         PR fortran/29629
994         * testsuite/libgomp.fortran/pr29629.f90: New test.
995
996 2006-10-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
997
998         PR libgomp/29494
999         * configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
1000         * config/posix95: New directory.
1001         * config/posix95/omp-lock.h: New file.
1002         * config/posix95/lock.c: Likewise.
1003
1004 2006-10-14  Geoffrey Keating  <geoffk@apple.com>
1005
1006         * aclocal.m4: Regenerate.
1007         * configure: Regenerate.
1008
1009 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
1010
1011         * testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
1012         '<' to '<='.
1013
1014 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
1015
1016         * acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from
1017         test.
1018         * configure: Regenerate.
1019         * fortran.c  (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.
1020
1021 2006-09-26  Jakub Jelinek  <jakub@redhat.com>
1022
1023         PR middle-end/25261
1024         PR middle-end/28790
1025         * testsuite/libgomp.c/nestedfn-4.c: New test.
1026         * testsuite/libgomp.c/nestedfn-5.c: New test.
1027         * testsuite/libgomp.fortran/nestedfn3.f90: New test.
1028
1029         PR fortran/29097
1030         * testsuite/libgomp.fortran/condinc1.f: New test.
1031         * testsuite/libgomp.fortran/condinc2.f: New test.
1032         * testsuite/libgomp.fortran/condinc3.f90: New test.
1033         * testsuite/libgomp.fortran/condinc4.f90: New test.
1034         * testsuite/libgomp.fortran/condinc1.inc: New file.
1035
1036 2006-09-18  Tom Tromey  <tromey@redhat.com>
1037
1038         * configure: Rebuilt.
1039
1040 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
1041
1042         PR c/28768
1043         PR preprocessor/14634
1044         * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
1045         to AC_DEFINE.
1046         * configure: Regenerate.
1047
1048 2006-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1049
1050         * testsuite/libgomp.fortran/reduction3.f90: Change
1051         -2147483648 to -huge(i)-1 to avoid overflow.
1052         * testsuite/libgomp.fortran/reduction4.f90: Change
1053         Z'ffffffff' to not(0) to avoid overflow.
1054
1055 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
1056
1057         PR libgomp/25938
1058         * Makefile.am (libsubincludedir): New.
1059         (nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
1060         * Makefile.in: Regenerate.
1061
1062 2006-08-17  Jakub Jelinek  <jakub@redhat.com>
1063
1064         PR libgomp/28725
1065         * env.c: Include ctype.h.
1066         (parse_schedule, parse_unsigned_long, parse_boolean): Allow
1067         leading and/or trailing whitespace and compare strings case
1068         insensitively.
1069
1070 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
1071
1072         PR fortran/28390
1073         * testsuite/libgomp.fortran/pr28390.f: New test.
1074
1075 2006-07-05  Eric Christopher  <echristo@apple.com>
1076
1077         * configure.ac: Depend addition of -pthread on host OS.
1078         * configure: Regenerate.
1079
1080 2006-06-21  Jakub Jelinek  <jakub@redhat.com>
1081
1082         * critical.c (GOMP_critical_name_start): Fix *pptr initialization
1083         when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
1084         defined.
1085
1086 2006-06-20  Jakub Jelinek  <jakub@redhat.com>
1087
1088         PR libgomp/26175
1089         PR libgomp/26477
1090         * configure.ac: If neither --enable-linux-futex nor
1091         --disable-linux-futex is passed, determine the default by checking
1092         for compiling and/or running against NPTL.  With --enable-linux-futex,
1093         check if SYS_gettid and SYS_futex are defined.
1094         * configure: Rebuilt.
1095
1096 2006-06-14  Richard Henderson  <rth@redhat.com>
1097
1098         PR libgomp/28008
1099         * env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
1100         undefined.  Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.
1101
1102 2006-06-09  Richard Henderson  <rth@redhat.com>
1103
1104         * env.c (gomp_nthreads_var): Change to unsigned long.
1105         (gomp_run_sched_chunk): Likewise.
1106         (parse_unsigned_long): Rename from parse_num_threads and generalize.
1107         (initialize_env): Initialize gomp_thread_attr.
1108         * libgomp.h (gomp_nthreads_var): Update decl.
1109         (gomp_run_sched_chunk): Likewise.
1110         (gomp_thread_attr): Declare.
1111         * team.c (gomp_thread_attr): Export.
1112         (initialize_team): Don't initialize it.
1113
1114 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
1115
1116         PR fortran/27916
1117         * testsuite/libgomp.fortran/pr27916-1.f90: New test.
1118         * testsuite/libgomp.fortran/pr27916-2.f90: New test.
1119
1120 2006-06-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1121
1122         * config/mingw32/time.c: New file.
1123         * configure.tgt: Use it.
1124
1125 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
1126
1127         * Makefile.am: Add install-html target. Add install-html to .PHONY
1128         * Makefile.in: Regenerate.
1129
1130 2006-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1131
1132         PR libgomp/27612
1133         * testsuite/libgomp.c/sections-1.c: Require sync_int_long.
1134         * testsuite/libgomp.c/critical-1.c: Likewise.
1135         * testsuite/libgomp.c/loop-1.c: Likewise.
1136         * testsuite/libgomp.c/loop-2.c: Likewise.
1137         * testsuite/libgomp.c/single-1.c: Likewise.
1138         * testsuite/libgomp.c/ordered-1.c: Likewise.
1139         * testsuite/libgomp.c/ordered-2.c: Likewise.
1140
1141 2006-05-15  Jakub Jelinek  <jakub@redhat.com>
1142
1143         PR middle-end/27416
1144         * libgomp.fortran/pr27416-1.f90: New test.
1145
1146 2006-05-03  Jakub Jelinek  <jakub@redhat.com>
1147
1148         PR fortran/27395
1149         * testsuite/libgomp.fortran/pr27395-1.f90: New test.
1150         * testsuite/libgomp.fortran/pr27395-2.f90: New test.
1151
1152 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
1153
1154         PR c++/26943
1155         * testsuite/libgomp.c/pr26943-1.c: New test.
1156         * testsuite/libgomp.c/pr26943-2.c: New test.
1157         * testsuite/libgomp.c/pr26943-3.c: New test.
1158         * testsuite/libgomp.c/pr26943-4.c: New test.
1159         * testsuite/libgomp.c++/pr27337.C: Remove barrier.
1160         * testsuite/libgomp.c++/pr26943.C: New test.
1161
1162 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
1163
1164         PR middle-end/27337
1165         * testsuite/libgomp.c++/pr27337.C: New test.
1166
1167 2006-04-26  Jakub Jelinek  <jakub@redhat.com>
1168
1169         PR c/26171
1170         * testsuite/libgomp.c/pr26171.c: New test.
1171
1172 2006-04-25  Richard Henderson  <rth@redhat.com>
1173
1174         PR libgomp/25865
1175         * configure.ac: Use GCC_CHECK_TLS.
1176         * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
1177         * Makefile.in, aclocal.m4, configure: Regenerate.
1178
1179 2006-04-10  Matthias Klose  <doko@debian.org>
1180
1181         * testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib
1182         directory names containing underscores.
1183
1184 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
1185
1186         PR c++/26691
1187         * testsuite/libgomp.c++/pr26691.C: New test.
1188
1189 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
1190
1191         * testsuite/libgomp.fortran/retval2.f90: New test.
1192
1193 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
1194
1195         * testsuite/libgomp.c++: New directory.
1196
1197 2006-02-25  Shantonu Sen  <ssen@opendarwin.org>
1198
1199         * config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
1200         * config/posix/sem.c: Implement the above.
1201
1202 2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>
1203
1204         * configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
1205         define HAVE_BROKEN_POSIX_SEMAPHORES.
1206         * configure: Rebuilt.
1207         * config.h.in: Rebuilt.
1208
1209 2006-02-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1210
1211         PR bootstrap/26161
1212         * configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
1213         for the other pthread check.
1214         * configure: Regenerate.
1215         * config.h.in: Regenerate.
1216
1217 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
1218
1219         PR libgomp/25938
1220         PR libgomp/25984
1221         * Makefile.am (fincludedir): New variable.
1222         (nodist_include_HEADERS): Remove Fortran files.
1223         (nodist_finclude_HEADERS): New variable.
1224         * Makefile.in: Regenerated.
1225
1226 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
1227
1228         * testsuite/libgomp.fortran/vla7.f90: Add -w to options.
1229         Remove tests for returning assumed character length arrays.
1230
1231 2006-02-12  Roger Sayle  <roger@eyesopen.com>
1232             John David Anglin  <dave@hiauly1.hia.nrc.ca>
1233
1234         PR libgomp/25936
1235         * configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
1236
1237 2006-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
1238
1239         * testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
1240
1241 2006-02-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
1242
1243         * testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
1244         part of LD_LIBRARY_PATH manually.
1245
1246 2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>
1247
1248         PR libgomp/25852
1249         * testsuite/lib/libgomp-dg.exp (blddir): Set it in
1250         libgomp_init.
1251
1252 2005-01-25  Paolo Bonzini  <bonzini@gnu.org>
1253
1254         PR libgomp/25884
1255         * Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
1256         * configure.ac (PERL): Don't set.
1257         (gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
1258         (OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
1259         OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
1260         * omp.h.in: Wrap the new configure substitutions with @ characters.
1261         * omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
1262         * aclocal.m4, configure, Makefile.in: Regenerate.
1263         * mkomp_h.pl: Delete.
1264
1265 2005-01-24  Paolo Bonzini  <bonzini@gnu.org>
1266
1267         PR libgomp/25259
1268         * configure.ac: Use GCC_HEADER_STDINT.
1269         * libgomp.h: Include gstdint.h.
1270         * libgomp_f.h.in: Don't include stdint.h or inttypes.h.
1271         * configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.
1272
1273 2006-01-24  Richard Henderson  <rth@redhat.com>
1274
1275         PR libgomp/25942
1276         * configure.ac: Add AM_MAINTAINER_MODE.
1277         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.
1278
1279 2006-01-24  Diego Novillo  <dnovillo@redhat.com>
1280
1281         * Makefile.in: Regenerate.
1282         * testsuite/Makefile.in: Regenerate.
1283         * aclocal.m4: Regenerate.
1284
1285 2006-01-23  Andreas Tobler  <a.tobler@schweiz.ch>
1286
1287         * config/posix/proc.c: Conditional include of sys/loadavg.h for
1288         Solaris.
1289         * configure.ac: Add check for loadavg.h.
1290         (link_gomp): Adjust comment.
1291         * configure: Regenerate.
1292         * config.h.in: Regenerate.
1293
1294 2006-01-21  Steve Ellcey  <sje@cup.hp.com>
1295
1296         PR libgomp/25877
1297         * configure.ac: Remove check for alloca.h.
1298         * configure: Regenerate.
1299         * config.h.in: Regenerate.
1300         * libgomp.h: define gomp_alloca to be __builtin_alloca.
1301         * team.c: Remove use of alloca.h.
1302         Call gomp_alloca instead of alloca.
1303
1304 2006-01-20  Steve Ellcey  <sje@cup.hp.com>
1305
1306         PR libgomp/25877
1307         * team.c: Add include of alloca.h.
1308         * configure.ac: Add check for alloca.h.
1309         * configure: Regenerate.
1310         * config.h.in: Regenerate.
1311
1312 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
1313
1314         PR fortran/25219
1315         * testsuite/libgomp.fortran/pr25219.f90: New test.
1316
1317 2005-12-05  Uros Bizjak  <uros@kss-loka.si>
1318
1319         * testsuite/libgomp.c/pr24455.c, testsuite/libgomp.c/copyin-1.c,
1320         testsuite/libgomp.c/copyin-2.c, testsuite/libgomp.c/copyin-3.c,
1321         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
1322         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
1323         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455.C,
1324         testsuite/libgomp.fortran/threadprivate1.f90,
1325         testsuite/libgomp.fortran/threadprivate2.f90,
1326         testsuite/libgomp.fortran/threadprivate3.f90,
1327         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
1328         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
1329         testsuite/libgomp.fortran/omp_parse3.f90: Change required
1330         effective-target to TLS runtime.
1331
1332         * testsuite/libgomp.fortran/pr25162.f: Require
1333         effective-target TLS runtime.
1334
1335 2005-12-01  Jakub Jelinek  <jakub@redhat.com>
1336
1337         * testsuite/libgomp.fortran/nestedfn2.f90: New test.
1338         * testsuite/libgomp.c/nestedfn-3.c: New test.
1339
1340 2005-11-30  Jakub Jelinek  <jakub@redhat.com>
1341
1342         PR fortran/25162
1343         * testsuite/libgomp.fortran/pr25162.f: New test.
1344
1345 2005-11-28  Jakub Jelinek  <jakub@redhat.com>
1346
1347         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Fall back to
1348         CLOCK_REALTIME if clock_* (CLOCK_MONOTONIC, &ts) call failed.
1349
1350 2005-11-25  Jakub Jelinek  <jakub@redhat.com>
1351
1352         * alloc.c, barrier.c, critical.c, env.c, error.c, fortran.c, iter.c,
1353         libgomp.h, libgomp_f.h.in, libgomp_g.h, loop.c, mkomp_h.pl, omp.h.in,
1354         omp_lib.f90.in, omp_lib.h.in, ordered.c, parallel.c, sections.c,
1355         single.c, team.c, work.c, config/linux/alpha/futex.h,
1356         config/linux/bar.c, config/linux/bar.h, config/linux/ia64/futex.h,
1357         config/linux/lock.c, config/linux/mutex.c, config/linux/mutex.h,
1358         config/linux/powerpc/futex.h, config/linux/s390/futex.h,
1359         config/linux/sem.c, config/linux/sem.h, config/linux/sparc/futex.h,
1360         config/linux/x86/futex.h, config/posix/bar.c, config/posix/bar.h,
1361         config/posix/lock.c, config/posix/mutex.h, config/posix/proc.c,
1362         config/posix/sem.c, config/posix/sem.h, config/posix/time.c: Update
1363         FSF address.
1364
1365 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
1366
1367         * Makefile.am: Move libgomp_f.h from nodist_include_HEADERS
1368         to nodist_noinst_HEADERS.
1369         * Makefile.in: Rebuilt.
1370
1371         * config/posix/omp-lock.h (omp_nest_lock_t): Change into struct,
1372         add integer count field.
1373         * config/posix/lock.c (omp_destroy_nest_lock): Adjust for
1374         omp_nest_lock_t type change.
1375         (omp_init_nest_lock): Likewise.  Initialize count to 0.
1376         (omp_set_nest_lock): Adjust for omp_nest_lock_t type change.
1377         Increment count.
1378         (omp_unset_nest_lock): Adjust for omp_nest_lock_t type change.
1379         Decrement count.
1380         (omp_test_nest_lock): Adjust for omp_nest_lock_t type change.
1381         Increment count if successful and return the new nesting level.
1382         * config/linux/lock.c (omp_test_nest_lock): Return new nesting level.
1383         * omp_lib.f90.in (omp_test_lock): Fix LOCK argument type.
1384         * testsuite/libgomp.c/lib-1.c: New test.
1385         * testsuite/libgomp.fortran/lib1.f90: New test.
1386         * testsuite/libgomp.fortran/lib2.f: New test.
1387         * testsuite/libgomp.fortran/lib3.f: New test.
1388
1389 2005-11-17  Richard Henderson  <rth@redhat.com>
1390
1391         PR 24845
1392         * Makefile.am (nodist_toolexeclib_HEADERS): New.
1393         * configure.ac (link_gomp): New.  Substitute it.
1394         (AC_CONFIG_FILES): Add libgomp.spec.
1395         * libgomp.spec.in: New file.
1396         * Makefile.in, testsuite/Makefile.in, configure: Rebuild.
1397         * testsuite/lib/libgomp-dg.exp: Add -B${blddir}/ to flags.
1398
1399 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
1400
1401         * testsuite/libgomp.fortran/reduction1.f90: Adjust for
1402         reduction(-:var) behaving the same as reduction(+:var).
1403         * testsuite/libgomp.c/reduction-4.c: New test.
1404
1405 2005-11-15  Uros Bizjak  <uros@kss-loka.si>
1406
1407         * testsuite/libgomp.c/pr24455-1.c, testsuite/libgomp.c/pr24455.c,
1408         testsuite/libgomp.c/copyin-1.c, testsuite/libgomp.c/copyin-2.c,
1409         testsuite/libgomp.c/copyin-3.c,
1410         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
1411         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
1412         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455-1.C,
1413         testsuite/libgomp.c++/pr24455.C,
1414         testsuite/libgomp.fortran/threadprivate1.f90,
1415         testsuite/libgomp.fortran/threadprivate2.f90,
1416         testsuite/libgomp.fortran/threadprivate3.f90,
1417         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
1418         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
1419         testsuite/libgomp.fortran/omp_parse3.f90: Require
1420         effective-target TLS.
1421
1422 2005-11-14  Diego Novillo  <dnovillo@redhat.com>
1423
1424         * HEADER: Remove.
1425
1426 2005-11-13  Jakub Jelinek  <jakub@redhat.com>
1427
1428         PR libgomp/24797
1429         * team.c (initialize_team): Pass NULL rather than free as
1430         pthread_key_create destructor.  Initialize thread specific data
1431         pointer in initial thread to a static local variable rather than
1432         malloced memory.
1433
1434 2005-11-11  Uros Bizjak  <uros@kss-loka.si>
1435
1436         * testsuite/lib/libgomp-dg.exp: Locate libgcc.a and append
1437         its location to ld_library_path.
1438
1439 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
1440
1441         * testsuite/libgomp.c/c.exp: Rename from dg.exp.
1442
1443 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
1444
1445         * testsuite/libgomp.c: Rename from libgomp.dg.
1446
1447 2005-11-09  Diego Novillo  <dnovillo@redhat.com>
1448
1449         * testsuite/libgomp.c++/pr24455.C: Add copyin clause for
1450         threadprivate variable 'i'.
1451
1452 2005-11-09  Jakub Jelinek  <jakub@redhat.com>
1453
1454         * config/linux/s390/futex.h: New file.
1455         * configure.tgt: Use it.
1456
1457         * testsuite/libgomp.fortran/omp_parse4.f90: Move n initialization
1458         before the parallel.
1459
1460 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
1461
1462         PR c++/24734
1463         * testsuite/libgomp.c++/master-1.C: New test.
1464
1465 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
1466
1467         * testsuite/libgomp.dg/copyin-3.c: New test.
1468
1469 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
1470
1471         * testsuite/libgomp.fortran/retval1.f90: New test.
1472         * testsuite/libgomp.fortran/vla7.f90: New test.
1473
1474 2005-11-06  Jakub Jelinek  <jakub@redhat.com>
1475
1476         * testsuite/libgomp.fortran/vla2.f90: New test.
1477         * testsuite/libgomp.fortran/vla3.f90: New test.
1478         * testsuite/libgomp.fortran/vla4.f90: New test.
1479         * testsuite/libgomp.fortran/vla5.f90: New test.
1480         * testsuite/libgomp.fortran/vla6.f90: New test.
1481
1482 2005-11-01  Jakub Jelinek  <jakub@redhat.com>
1483
1484         * config/linux/sparc/futex.h: New file.
1485         * configure.tgt: Use it.
1486         * testsuite/lib/libgomp-dg.exp: Use -mcpu=v9 for sparc testing.
1487
1488         * critical.c: Include stdlib.h.
1489         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Avoid warnings about
1490         ignoring return value.
1491         * configure.ac: Don't put -Wc,-pthread into XCFLAGS until after
1492         LIBGOMP_CHECK_SYNC_BUILTINS check.
1493         * configure: Rebuilt.
1494
1495 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
1496
1497         * testsuite/libgomp.fortran/vla1.f90: New test.
1498
1499 2005-10-31  Richard Henderson  <rth@redhat.com>
1500
1501         * testsuite/libgomp.fortran/character2.f90: Fix race condition
1502         setting 's' in different threads.
1503
1504 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
1505
1506         * libgomp.h (attribute_hidden, ialias): Define.
1507         * config/posix/proc.c (omp_get_num_procs): Add ialias.
1508         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Likewise.
1509         * config/posix/lock.c (omp_init_lock, omp_init_nest_lock,
1510         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
1511         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
1512         omp_test_lock, omp_test_nest_lock): Likewise.
1513         * config/linux/lock.c (omp_init_lock, omp_init_nest_lock,
1514         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
1515         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
1516         omp_test_lock, omp_test_nest_lock): Likewise.
1517         * env.c (omp_set_dynamic, omp_set_nested, omp_set_num_threads,
1518         omp_get_dynamic, omp_get_nested): Likewise.
1519         * parallel.c (omp_get_num_threads, omp_get_max_threads,
1520         omp_get_thread_num, omp_in_parallel): Likewise.
1521         * fortran.c (ialias_redirect): Define.
1522         (omp_init_lock, omp_init_nest_lock, omp_destroy_lock,
1523         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock,
1524         omp_unset_lock, omp_unset_nest_lock, omp_test_lock,
1525         omp_test_nest_lock, omp_set_dynamic, omp_set_nested,
1526         omp_set_num_threads, omp_get_dynamic, omp_get_nested,
1527         omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
1528         omp_get_num_threads, omp_get_thread_num, omp_get_wtick,
1529         omp_get_wtime): Add ialias_redirect.
1530
1531 2005-10-30  Jakub Jelinek  <jakub@redhat.com>
1532
1533         * fortran.c: Include stdlib.h.
1534
1535 2005-10-29  Jakub Jelinek  <jakub@redhat.com>
1536
1537         * Makefile.am (env.o, env.lo): Depend on libgomp_f.h.
1538         * Makefile.in: Regenerated.
1539
1540 2005-10-28  Jakub Jelinek  <jakub@redhat.com>
1541
1542         * mkomp_h.pl: Remove all -Wc, option prefixes in $COMPILE.
1543         * libgomp_f.h.in (omp_check_defines): New function.
1544         * env.c: Include libgomp_f.h.
1545         (initialize_env): Call omp_check_defines.
1546
1547         * testsuite/libgomp.dg/copyin-2.c: New test.
1548         * testsuite/libgomp.c++/copyin-2.C: New test.
1549         * testsuite/libgomp.fortran/threadprivate3.f90: New test.
1550
1551         * testsuite/libgomp.fortran/threadprivate2.f90: New test.
1552         * testsuite/libgomp.fortran/sharing2.f90: New test.
1553
1554         * testsuite/libgomp.dg/copyin-1.c: New test.
1555         * testsuite/libgomp.c++/copyin-1.C: New test.
1556
1557 2005-10-26  Jakub Jelinek  <jakub@redhat.com>
1558
1559         * testsuite/libgomp.fortran/crayptr1.f90: New test.
1560
1561         * testsuite/libgomp.fortran/workshare1.f90: New test.
1562
1563         * libgomp.fortran/appendix-a/a.28.5.f90: Change into compile
1564         only test.
1565         * libgomp.fortran/sharing1.f90: New test.
1566
1567 2005-10-24  Jakub Jelinek  <jakub@redhat.com>
1568
1569         PR c++/24502
1570         * testsuite/libgomp.c++/loop-7.C: New test.
1571
1572         * testsuite/libgomp.dg/nestedfn-2.c: New test.
1573
1574         * testsuite/libgomp.dg/nestedfn-1.c: New test.
1575         * testsuite/libgomp.fortran/reduction6.f90: New test.
1576         * testsuite/libgomp.fortran/nestedfn1.f90: New test.
1577
1578 2005-10-23  Richard Henderson  <rth@redhat.com>
1579
1580         * testsuite/libgomp.c++/ctor-1.C: New.
1581         * testsuite/libgomp.c++/ctor-2.C: New.
1582         * testsuite/libgomp.c++/ctor-3.C: New.
1583         * testsuite/libgomp.c++/ctor-4.C: New.
1584         * testsuite/libgomp.c++/ctor-5.C: New.
1585         * testsuite/libgomp.c++/ctor-6.C: New.
1586         * testsuite/libgomp.c++/ctor-7.C: New.
1587         * testsuite/libgomp.c++/ctor-8.C: New.
1588         * testsuite/libgomp.c++/ctor-9.C: New.
1589
1590 2005-10-21  Diego Novillo  <dnovillo@redhat.com>
1591
1592         PR 24455
1593         * testsuite/libgomp.c++/pr24455-1.C: New test.
1594         * testsuite/libgomp.c++/pr24455.C: New test.
1595         * testsuite/libgomp.dg/pr24455-1.c: New test.
1596         * testsuite/libgomp.dg/pr24455.c: New test.
1597
1598 2005-10-20  Richard Henderson  <rth@redhat.com>
1599
1600         * testsuite/libgomp.c++/loop-6.C: New.
1601         * testsuite/libgomp.dg/loop-3.c: New.
1602
1603 2005-10-20  Jakub Jelinek  <jakub@redhat.com>
1604
1605         * testsuite/libgomp.fortran/jacobi.f: Don't make i and j
1606         explicitly private.
1607         * testsuite/libgomp.fortran/omp_parse1.f90 (test_do): Make i
1608         explicitly shared.
1609
1610 2005-10-19  Diego Novillo  <dnovillo@redhat.com>
1611
1612         * testsuite/libgomp.fortran/jacobi.f: New test.
1613
1614 2005-10-19  Richard Henderson  <rth@redhat.com>
1615
1616         * configure.tgt (i?86-linux): Default to with_arch instead of
1617         CFLAGS.  Add -mtune to match target_cpu.
1618         (x86_64-linux): Tune to i686.
1619
1620         * fortran.c (omp_test_nest_lock_): Fix typo.
1621
1622 2005-10-19  Jakub Jelinek  <jakub@redhat.com>
1623
1624         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
1625         gomp_ordered_sync): Do nothing if team->nthreads == 1.
1626         * testsuite/libgomp.dg/ordered-3.c: New test.
1627
1628         * testsuite/libgomp.dg/appendix-a/a.18.1.c: Remove unconditional abort.
1629         Remove volatile keyword.
1630
1631         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Reorder variables
1632         in COMMON block to avoid warnings on 64-bit targets.
1633
1634 2005-10-18  Diego Novillo  <dnovillo@redhat.com>
1635
1636         * testsuite/libgomp.dg/shared-3.c: New test.
1637
1638 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
1639
1640         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: Removed.
1641         * testsuite/libgomp.fortran/reduction5.f90: New test.
1642
1643 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
1644
1645         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Add -ffixed-form to
1646         dg-options.
1647         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.  Enable
1648         flush loop now that __sync_synchronize has proper memory barrier.
1649         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: Fix a typo.
1650         Add -ffixed-form to dg-options.
1651
1652 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
1653
1654         * testsuite/libgomp.fortran/fortran.exp: Also gather tests
1655         from subdirectories.
1656         * testsuite/libgomp.fortran/appendix-a/a.15.1.f90: New test.
1657         * testsuite/libgomp.fortran/appendix-a/a.16.1.f90: New test.
1658         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: New test.
1659         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: New test.
1660         * testsuite/libgomp.fortran/appendix-a/a.2.1.f90: New test.
1661         * testsuite/libgomp.fortran/appendix-a/a.21.1.f90: New test.
1662         * testsuite/libgomp.fortran/appendix-a/a.22.7.f90: New test.
1663         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: New test.
1664         * testsuite/libgomp.fortran/appendix-a/a.26.1.f90: New test.
1665         * testsuite/libgomp.fortran/appendix-a/a.28.1.f90: New test.
1666         * testsuite/libgomp.fortran/appendix-a/a.28.2.f90: New test.
1667         * testsuite/libgomp.fortran/appendix-a/a.28.3.f90: New test.
1668         * testsuite/libgomp.fortran/appendix-a/a.28.4.f90: New test.
1669         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: New test.
1670         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: New test.
1671         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: New test.
1672         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: New test.
1673         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: New test.
1674         * testsuite/libgomp.fortran/appendix-a/a.33.3.f90: New test.
1675         * testsuite/libgomp.fortran/appendix-a/a.38.1.f90: New test.
1676         * testsuite/libgomp.fortran/appendix-a/a.39.1.f90: New test.
1677         * testsuite/libgomp.fortran/appendix-a/a.4.1.f90: New test.
1678         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: New test.
1679         * testsuite/libgomp.fortran/appendix-a/a.5.1.f90: New test.
1680         * testsuite/libgomp.fortran/appendix-a/a10.1.f90: New test.
1681
1682 2005-10-17  Jakub Jelinek  <jakub@redhat.com>
1683
1684         * testsuite/libgomp.dg/dg.exp: Only unset lang_* if
1685         lang_library_path exists.  Use find instead of glob to gather tests.
1686         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: Removed.
1687
1688 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
1689
1690         * testsuite/libgomp.dg/appendix-a/a.15.1.c: New test.
1691         * testsuite/libgomp.dg/appendix-a/a.16.1.c: New test.
1692         * testsuite/libgomp.dg/appendix-a/a.18.1.c: New test.
1693         * testsuite/libgomp.dg/appendix-a/a.19.1.c: New test.
1694         * testsuite/libgomp.dg/appendix-a/a.2.1.c: New test.
1695         * testsuite/libgomp.dg/appendix-a/a.21.1.c: New test.
1696         * testsuite/libgomp.dg/appendix-a/a.26.1.c: New test.
1697         * testsuite/libgomp.dg/appendix-a/a.29.1.c: New test.
1698         * testsuite/libgomp.dg/appendix-a/a.3.1.c: New test.
1699         * testsuite/libgomp.dg/appendix-a/a.39.1.c: New test.
1700         * testsuite/libgomp.dg/appendix-a/a.4.1.c: New test.
1701         * testsuite/libgomp.dg/appendix-a/a.5.1.c: New test.
1702         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: New file.
1703
1704 2005-10-15  Jakub Jelinek  <jakub@redhat.com>
1705
1706         * testsuite/libgomp.dg/vla-1.c: New test.
1707
1708         * testsuite/libgomp.fortran/reference2.f90: New test.
1709
1710         * testsuite/libgomp.fortran/character2.f90: Remove explicit
1711         declaration of omp_get_thread_num.
1712         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.  Add
1713         use omp_lib.
1714
1715         * testsuite/libgomp.fortran/reduction1.f90: New test.
1716         * testsuite/libgomp.fortran/reduction2.f90: New test.
1717         * testsuite/libgomp.fortran/reduction3.f90: New test.
1718         * testsuite/libgomp.fortran/reduction4.f90: New test.
1719
1720 2005-10-13  Richard Henderson  <rth@redhat.com>
1721
1722         * Makefile.am (libgomp_la_SOURCES): Add bar.c.
1723         * Makefile.in: Regenerate.
1724         * barrier.c (GOMP_barrier): Use gomp_barrier_wait.
1725         * libgomp.h: Include bar.h.
1726         (struct gomp_barrier): Remove.
1727         (struct gomp_team): Add barrier.  Replace master_barrier with
1728         master_release.  Replace threads with ordered_release.
1729         (struct gomp_thread): Replace barrier with release.
1730         * ordered.c (gomp_ordered_first): Update for ordered_release change.
1731         (gomp_ordered_last, gomp_ordered_next, gomp_ordered_static_init,
1732         gomp_ordered_static_next, gomp_ordered_sync): Likewise.
1733         * single.c (GOMP_single_copy_start): Use gomp_barrier_wait.
1734         (GOMP_single_copy_end): Likewise.
1735         * team.c (gomp_threads_dock): New.
1736         (gomp_barrier_init, gomp_barrier_destroy): Remove.
1737         (gomp_thread_start): Use gomp_barrier_wait.
1738         (new_team, free_team): Update for gomp_team changes.
1739         (gomp_team_start): Use gomp_barrier_wait and gomp_barrier_reinit.
1740         (gomp_team_end): Use gomp_barrier_wait.
1741         (initialize_team): Update for gomp_thread changes.
1742         * work.c (gomp_work_share_end): Use gomp_barrier_wait_start.
1743         (gomp_work_share_end_nowait): Use atomic ops when available.
1744         * config/linux/bar.c, config/linux/bar.h: New files.
1745         * config/posix/bar.c, config/posix/bar.h: New files.
1746
1747 2005-10-13  Jakub Jelinek  <jakub@redhat.com>
1748
1749         * single.c (GOMP_single_copy_end): Don't segfault if team is NULL.
1750         * testsuite/libgomp.dg/single-2.c: New test.
1751
1752         * testsuite/libgomp.dg/dg.exp (lang_library_path, lang_test_file,
1753         lang_link_flags): Unset, so that they aren't inherited from previously
1754         sourced *.exp.
1755
1756         * testsuite/libgomp.fortran/threadprivate1.f90: New test.
1757
1758 2005-10-12  Richard Henderson  <rth@redhat.com>
1759
1760         * testsuite/lib/libgomp-dg.exp: Set blddir at toplevel.
1761         (libgomp_init): Use lang_test_file, lang_library_path, and
1762         lang_link_flags, set by the subdirectory files.  Add -fopenmp here.
1763
1764         * testsuite/libgomp.fortran/fortran.exp (lang_library_path): New.
1765         (lang_test_file, lang_link_flags): New.
1766         (DEFAULT_FFLAGS, ALWAYS_CFLAGS, multilibs, blddir): Remove.
1767
1768         * testsuite/libgomp.c++/c++.exp, testsuite/libgomp.c++/loop-1.C,
1769         testsuite/libgomp.c++/loop-2.C, testsuite/libgomp.c++/loop-3.C,
1770         testsuite/libgomp.c++/loop-4.C, testsuite/libgomp.c++/nested-1.C,
1771         testsuite/libgomp.c++/parallel-1.C,
1772         testsuite/libgomp.c++/reduction-1.C,
1773         testsuite/libgomp.c++/reduction-2.C,
1774         testsuite/libgomp.c++/reduction-3.C,
1775         testsuite/libgomp.c++/sections-1.C, testsuite/libgomp.c++/shared-1.C,
1776         testsuite/libgomp.c++/shared-2.C, testsuite/libgomp.c++/single-1.C,
1777         testsuite/libgomp.c++/single-2.C, testsuite/libgomp.c++/single-3.C:
1778         New files, largely cribbed from the C testsuite.
1779
1780 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
1781
1782         * testsuite/libgomp.fortran/character1.f90: New test.
1783         * testsuite/libgomp.fortran/character2.f90: New test.
1784
1785         * testsuite/libgomp.dg/nested-1.c: New test.
1786         * testsuite/libgomp.dg/nested-2.c: New test.
1787         * testsuite/libgomp.fortran/do1.f90: New test.
1788         * testsuite/libgomp.fortran/do2.f90: New test.
1789
1790         * testsuite/libgomp.fortran/reference1.f90: New test.
1791
1792 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
1793
1794         * testsuite/libgomp.dg/reduction-1.c: New test.
1795         * testsuite/libgomp.dg/reduction-2.c: New test.
1796         * testsuite/libgomp.dg/reduction-3.c: New test.
1797
1798 2005-10-10  Jakub Jelinek  <jakub@redhat.com>
1799
1800         * testsuite/libgomp.dg/atomic-1.c: New test.
1801         * testsuite/libgomp.dg/atomic-2.c: New test.
1802
1803 2005-10-09  Richard Henderson  <rth@redhat.com>
1804
1805         * critical.c (atomic_lock): New.
1806         (initialize_critical): Initialize it.
1807         (GOMP_atomic_start, GOMP_atomic_end): New.
1808         * libgomp.map: Export them.
1809         * libgomp_g.h: Declare them.
1810
1811         * testsuite/libgomp.dg/atomic-10.c: Move from gcc testsuite.
1812
1813 2005-10-02  Richard Henderson  <rth@redhat.com>
1814
1815         * configure.ac: Move save_CFLAGS hack earlier.  Append -Wall/-Werror
1816         to XCFLAGS instead of CFLAGS.
1817
1818 2005-09-30  Richard Henderson  <rth@redhat.com>
1819
1820         * configure.ac: Determine whether -pthread or -lpthread is needed.
1821         * Makefile.am (libgomp_la_LDFLAGS): Remove explicit -lpthread.
1822         * Makefine.in, configure: Rebuild.
1823
1824 2005-09-28  Richard Henderson  <rth@redhat.com>
1825
1826         * testsuite/libgomp.dg/omp-loop03.c: Fix return code.
1827         * testsuite/libgomp.dg/omp-single-3.c: New test.
1828
1829 2005-09-28  Diego Novillo  <dnovillo@redhat.com>
1830
1831         * testsuite/libgomp.dg/omp-single-2.c: New test.
1832         * testsuite/libgomp.dg/shared-2.c: Fix return code.
1833
1834 2005-09-27  Richard Henderson  <rth@redhat.com>
1835
1836         * testsuite/libgomp.dg/omp-loop03.c: Add initial barrier.
1837         * testsuite/libgomp.dg/omp-parallel-for.c: Specify static schedule.
1838
1839 2005-09-27  Jakub Jelinek  <jakub@redhat.com>
1840
1841         * testsuite/libgomp.dg/omp-loop03.c: New test.
1842
1843 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
1844
1845         * testsuite/libgomp.dg/omp-parallel-for.c: New test.
1846
1847 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
1848
1849         * testsuite/libgomp.dg/omp-single-1.c: New test.
1850         * testsuite/libgomp.dg/shared-1.c: Return 0.
1851         Add prototype for abort.
1852         * testsuite/libgomp.dg/shared-2.c: Likewise.
1853
1854 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
1855
1856         * testsuite/libgomp.fortran/omp_parse3.f90: Fix non-conforming
1857         constructs.
1858
1859 2005-09-26  Diego Novillo  <dnovillo@redhat.com>
1860
1861         * testsuite/libgomp.dg/shared-1.c: New test.
1862         * testsuite/libgomp.dg/shared-2.c: New test.
1863
1864 2005-09-24  Richard Henderson  <rth@redhat.com>
1865
1866         * testsuite/libgomp.dg/omp_workshare3.c: Mark dg-error.
1867
1868 2005-09-24  Richard Henderson  <rth@redhat.com>
1869
1870         * iter.c (gomp_iter_static_next): Round up when computing number
1871         of iterations.  Don't bother distributing a remainder equally.
1872
1873         * testsuite/libgomp.dg/omp-loop01.c (main1): Rename from main.
1874         Don't call srand.  Zero b before testing.
1875         (main): New.
1876
1877 2005-09-24  Jakub Jelinek  <jakub@redhat.com>
1878
1879         * testsuite/libgomp.fortran/omp_atomic1.f90: New test.
1880         * testsuite/libgomp.fortran/omp_atomic2.f90: New test.
1881
1882 2005-09-23  Jakub Jelinek  <jakub@redhat.com>
1883
1884         * testsuite/libgomp.fortran/omp_parse1.f90: Add a test for !$omp do
1885         without !$omp end do, followed immediately by subroutine end.
1886
1887 2005-09-23  Diego Novillo  <dnovillo@redhat.com>
1888
1889         * testsuite/libgomp.dg/omp-parallel-if.c: New test.
1890
1891 2005-09-22  Richard Henderson  <rth@redhat.com>
1892
1893         * critical.c (GOMP_critical_name_start): Change argument to void**.
1894         Reuse the pointer space if the mutex fits.
1895         (GOMP_critical_name_end): Likewise.
1896         (initialize_critical): Don't define if GOMP_MUTEX_INIT_0.
1897         * libgomp_g.h (GOMP_critical_name_start): Update decl.
1898         (GOMP_critical_name_end): Likewise.
1899         * config/linux/mutex.h (GOMP_MUTEX_INIT_0): New.
1900         * config/posix/mutex.h (GOMP_MUTEX_INIT_0): New.
1901
1902 2005-09-20  Richard Henderson  <rth@redhat.com>
1903
1904         * critical.c (GOMP_critical_name_start, GOMP_critical_name_end): New.
1905         (create_lock_lock): New.
1906         (initialize_critical): Initialize it.
1907         * libgomp.map (GOMP_critical_name_start, GOMP_critical_name_end): New.
1908         * libgomp_g.h (GOMP_ordered_start, GOMP_ordered_end): Declare.
1909
1910 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
1911
1912         * testsuite/libgom.dg/omp-loop01.c: Include stdio.h.
1913
1914 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
1915
1916         * testsuite/libgomp.dg/omp-loop01.c: New test.
1917         * testsuite/libgomp.dg/omp-loop02.c: New test.
1918
1919 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
1920
1921         * configure.ac (AC_PROG_FC): Add.
1922         (USE_FORTRAN): New automake conditional.
1923         * configure: Rebuilt.
1924         * Makefile.am (libgomp_la_SOURCES): Add fortran.c.
1925         (nodist_include_HEADERS): Add omp_lib.h, omp_lib.f90 and libgomp_f.h.
1926         If USE_FORTRAN, add also omp_lib.mod and omp_lib_kinds.mod.
1927         Add rules to build them.
1928         * Makefile.in: Rebuilt.
1929         * mkomp_h.pl: Compute and replace also OMP_LOCK_KIND and
1930         OMP_NEST_LOCK_KIND.
1931         * libgomp.map: Add Fortran wrappers.
1932         * libgomp_f.h.in: New file.
1933         * omp_lib.h.in: New file.
1934         * omp_lib.f90.in: New file.
1935         * fortran.c: New file.
1936         * testsuite/lib/libgomp-dg.exp: Load a few more .exp files.
1937         Append libgfortran directory to LD_LIBRARY_PATH if it exists.
1938         Add -Lpath_to_libgfortran and -lgfortran -lgfortranbegin if
1939         libgfortran has been built.
1940         * testsuite/libgomp.fortran/fortran.exp: New file.
1941         * testsuite/libgomp.fortran/omp_cond1.f: New test.
1942         * testsuite/libgomp.fortran/omp_cond2.f: New test.
1943         * testsuite/libgomp.fortran/omp_cond3.F90: New test.
1944         * testsuite/libgomp.fortran/omp_cond4.F90: New test.
1945         * testsuite/libgomp.fortran/omp_hello.f: New test.
1946         * testsuite/libgomp.fortran/omp_orphan.f: New test.
1947         * testsuite/libgomp.fortran/omp_parse1.f90: New test.
1948         * testsuite/libgomp.fortran/omp_parse2.f90: New test.
1949         * testsuite/libgomp.fortran/omp_parse3.f90: New test.
1950         * testsuite/libgomp.fortran/omp_parse4.f90: New test.
1951         * testsuite/libgomp.fortran/omp_reduction.f: New test.
1952         * testsuite/libgomp.fortran/omp_workshare1.f: New test.
1953         * testsuite/libgomp.fortran/omp_workshare2.f: New test.
1954
1955 2005-08-30  Richard Henderson  <rth@redhat.com>
1956
1957         * loop.c (GOMP_loop_static_start): Provide fallback wrapper
1958         function for when aliases are not usable.
1959         (GOMP_loop_dynamic_start, GOMP_loop_guided_start,
1960         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
1961         GOMP_loop_ordered_guided_start, GOMP_loop_static_next,
1962         GOMP_loop_dynamic_next, GOMP_loop_guided_next,
1963         GOMP_loop_ordered_static_next, GOMP_loop_ordered_dynamic_next,
1964         GOMP_loop_ordered_guided_next): Likewise.
1965         * ordered.c (GOMP_ordered_start): Likewise.
1966
1967 2005-08-01  Diego Novillo  <dnovillo@redhat.com>
1968
1969         * testsuite/libgomp.dg/dg.exp: Use -O2 for now.
1970         * testsuite/libgomp.dg/omp_hello.c: Fix return code
1971         * testsuite/libgomp.dg/omp_matvec.c: Likewise.
1972         * testsuite/libgomp.dg/omp_orphan.c: Likewise
1973         * testsuite/libgomp.dg/omp_reduction.c: Likewise
1974         * testsuite/libgomp.dg/omp_workshare1.c: Likewise
1975         * testsuite/libgomp.dg/omp_workshare2.c: Likewise
1976         * testsuite/libgomp.dg/omp_workshare3.c: Likewise
1977         * testsuite/libgomp.dg/omp_workshare4.c: Likewise
1978
1979 2005-07-07  Eric Christopher  <echristo@redhat.com>
1980             Diego Novillo  <dnovillo@redhat.com>
1981
1982         * testsuite/libgomp.dg/dg.exp: Add -fopenmp to DEFAULT_CFLAGS.
1983         * testsuite/libgomp.dg/omp_hello.c: Add standard includes, fix
1984         up code.
1985         * testsuite/libgomp.dg/omp_matvec.c: Ditto.
1986         * testsuite/libgomp.dg/omp_orphan.c: Ditto.
1987         * testsuite/libgomp.dg/omp_reduction.c: Ditto.
1988         * testsuite/libgomp.dg/omp_workshare1.c: Ditto.
1989         * testsuite/libgomp.dg/omp_workshare2.c: Ditto.
1990         * testsuite/libgomp.dg/omp_workshare3.c: Ditto.
1991         * testsuite/libgomp.dg/omp_workshare4.c: Ditto.
1992
1993 2005-06-13  Diego Novillo  <dnovillo@redhat.com>
1994
1995         * TOPLEVEL.patch: Remove.
1996
1997 2005-05-16  Richard Henderson  <rth@redhat.com>
1998
1999         * configure.ac: Test for clock_gettime.
2000         * config.h.in, configure: Rebuild.
2001         * config/posix/time.c: Use recommended TIME_WITH_SYS_TIME pattern.
2002         (omp_get_wtime): Use clock_gettime if available.
2003         (omp_get_wtick): Use clock_getres if available.
2004
2005 2005-05-11  Richard Henderson  <rth@redhat.com>
2006
2007         * config/linux/ia64/futex.h: New file.
2008         * configure.tgt: Use it.
2009
2010         * team.c (gomp_barrier_init, gomp_barrier_destroy): Mark inline.
2011
2012 2005-05-07  Richard Henderson  <rth@redhat.com>
2013
2014         * config/linux/powerpc/futex.h: New file.
2015         * configure.tgt: Use it.
2016
2017         * config/linux/i486/futex.h: Merge ...
2018         * config/linux/x86_64/futex.h: ... into ...
2019         * config/linux/x86/futex.h: ... here.
2020         * configure.tgt: Update to match.
2021
2022 2005-05-06  Richard Henderson  <rth@redhat.com>
2023
2024         * config/linux/alpha/futex.h: Conditionally define SYS_futex.
2025         * config/linux/i486/futex.h: Likewise.
2026         * config/linux/x86_64/futex.h: Likewise.
2027
2028         * config/linux/lock.c: New file.
2029         * config/linux/omp-lock.h: New file.
2030
2031         * critical.c, env.h: Don't include omp.h
2032         * config/posix/lock.c: Include libgomp.h instead of omp.h.
2033         * config/posix/time.c: Likewise.
2034         * config/posix/omp-lock.h: New file.
2035         * libgomp.h: Include omp-lock.h and omp.h.
2036         * Makefile.am (nodist_include_HEADERS): New.
2037         (omp.h): New rule.
2038         * configure.ac (PERL): New.
2039         * mkomp_h.pl: New file.
2040         * omp.h.in: Rename from omp.h; replace omp_lock_t and omp_nest_lock_t
2041         with templates.
2042         * Makefile.in, configure, testsuite/Makefile.in: Rebuild.
2043
2044         * testsuite/lib/libgomp-dg.exp (libgomp_init): Add include into
2045         build directory.  Re-add -march=i486 hack.
2046
2047         * testsuite/lib/libgomp-dg.exp (libgomp_compile_flags): Remove.
2048         (libgomp_link_flags): Remove.
2049         (libgomp_initialized): Remove.
2050         (libgomp_init): Don't protect from reinitialization.  Copy code
2051         from libstdc++ for getting the multilib set correctly.
2052
2053 2005-05-05  Richard Henderson  <rth@redhat.com>
2054
2055         * config/linux/alpha/futex.h: New file.
2056         * configure.tgt (alpha*-*-linux*): Use it.
2057
2058         * config/posix/mutex.c: New file.
2059         * config/posix/sem.c: Use libgomp.h.
2060
2061         * configure.tgt (x86_64-linux): Also test CC for -m32.
2062         * config/linux/x86_64/futex.h (futex_wait): Fix r10 usage.
2063
2064         * testsuite/lib/libgomp-dg.exp (libgomp_link_flags): Add /
2065         after $gccpath.
2066
2067         * Makefile.am (SUBDIRS): New.
2068         (libgomp_la_LDFLAGS): Add -lpthread.
2069         * configure.ac (AM_INIT_AUTOMAKE): Enable dependencies.
2070         * Makefile.in, aclocal.m4, config.h.in, configure: Rebuild.
2071
2072         * libgomp_g.h: New file.
2073         * libgomp.h: Split out all public declarations to libgomp_g.h.
2074         Use pragma GCC visibility instead of ATTRIBUTE_HIDDEN.
2075         * config/linux/mutex.h: Remove ATTRIBUTE_HIDDEN.
2076         * config/linux/sem.h: Likewise.
2077         * config/posix/sem.h: Likewise.
2078
2079         * Makefile.am (AM_LDFLAGS): New.
2080         (libgomp_version_script): Split out from ...
2081         (libgomp_la_LDFLAGS): ... here.
2082         (libgomp_version_info): New.
2083         * acinclude.m4 (LIBGOMP_CHECK_TLS): Use LIBGOMP_ENABLE.
2084         (LIBGOMP_ENABLE): New.
2085         (LIBGOMP_CHECK_LINKER_FEATURES): New.
2086         (LIBGOMP_ENABLE_SYMVERS): New.
2087         * configure.ac (AC_INIT): Version 1.0.
2088         (enable-version-specific-runtime-libs): Use LIBGOMP_ENABLE.
2089         (enable-linux-futex): Likewise.  Rename from enable-futex.
2090         (libtool_VERSION): New.
2091         (LIBGOMP_ENABLE_SYMVERS): Use it.
2092         * configure.tgt: Check with_gnu_ld wrt have_tls optimizations.
2093         * Makefile.in, aclocal.m4, configure: Rebuild.
2094
2095         * config/linux/mutex.c: Include libgomp.h instead of mutex.h.
2096         (gomp_mutex_unlock_slow): Fix typo.
2097         * config/linux/sem.c: Similarly.
2098         (gomp_sem_post_slow): Fix typo.
2099         * config/linux/sem.h (gomp_sem_post_slow): Fix typo.
2100         * config/linux/i486/futex.h: Remove USE_LINUX_SYSENTER code.
2101         [__PIC__] (sys_futex0): Don't use tmp output in asm.
2102
2103         * Makefile.am (AM_CFLAGS): Expand with XCFLAGS.
2104         (libgomp_la_LDFLAGS): Add top_srcdir to path.
2105         * acinclude.m4: Copy libtool.m4 stuff from libgfortran.
2106         * configure.ac: Check for getloadavg.  Substitute XCFLAGS and
2107         XLDFLAGS.  Add XCFLAGS to CFLAGS around LIBGOMP_CHECK_SYNC_BUILTINS.
2108         * configure.tgt: Set XCFLAGS and XLDFLAGS instead of CFLAGS and
2109         LDFLAGS.  Pull enable_futex check to top-level.
2110         * libgomp.h: Fix sem.h and mutex.h includes.  Define ATTRIBUTE_HIDDEN.
2111         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
2112
2113         First attempt at real configury.
2114         * Makefile, config.h: Remove file.
2115         * Makefile.am, Makefile.in: New file.
2116         * acinclude.m4 aclocal.m4: New file.
2117         * configure.ac, configure.tgt, configure: New file.
2118
2119         * config/posix/lock.c: Rename from sys-lock.c.
2120         * config/posix/mutex.h: Rename from sys-mutex.h.
2121         * config/posix/sem.c: Rename from sys-sem.c.
2122         * config/posix/sem.h: Rename from sys-sem.h.
2123         * config/posix/proc.c: Rename from sys-proc.c.
2124         * config/posix/time.c: Rename from sys-proc.c.
2125
2126         * config/linux/mutex.c: New file.
2127         * config/linux/mutex.h: New file.
2128         * config/linux/sem.c: New file.
2129         * config/linux/sem.h: New file.
2130         * config/linux/i486/futex.h: New file.
2131         * config/linux/x86_64/futex.h: New file.
2132
2133 2005-05-04  Richard Henderson  <rth@redhat.com>
2134
2135         * iter.c (gomp_iter_dynamic_next, gomp_iter_guided_next): New.
2136         * libgomp.h: Declare them.
2137         * loop.c (gomp_loop_dynamic_start, gomp_loop_guided_start,
2138         gomp_loop_dynamic_next, gomp_loop_guided_next): Use them.
2139
2140 2005-05-04  Richard Henderson  <rth@redhat.com>
2141
2142         * libgomp-1 code drop
2143
2144 2005-05-04  Richard Henderson  <rth@redhat.com>
2145
2146         * iter.c (gomp_iter_static_next): Return tri-state on 0.
2147         * ordered.c (gomp_ordered_static_next): Remove not_last argument.
2148         * libgomp.h (struct gomp_team_state): Make static_trip unsigned.
2149         (gomp_iter_static_next): Update.
2150         (gomp_ordered_static_next): Update.
2151         * loop.c (gomp_loop_static_start): Update for gomp_iter_static_next.
2152         (gomp_loop_ordered_static_start): Likewise.  Exit early for a
2153         totally empty range.
2154         (gomp_loop_ordered_static_next): Refine test for calling
2155         gomp_ordered_static_next.
2156         * testsuite/ordered-1.c: Add case for more threads than iterations.
2157
2158         * iter.c (gomp_iter_runtime_next_locked): Remove.
2159         * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start,
2160         gomp_loop_guided_start, gomp_loop_ordered_static_start,
2161         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
2162         gomp_loop_static_next, gomp_loop_dynamic_next, gomp_loop_guided_next,
2163         gomp_loop_ordered_static_next, gomp_loop_ordered_dynamic_next,
2164         gomp_loop_ordered_guided_next): Downcase name, make static, add
2165         an external alias with the old name.
2166         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
2167         GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Use a
2168         switch and call one of the above static functions.
2169         * libgomp.h: Update.
2170
2171         * work.c (gomp_work_share_start): Lock the mutex for !first too.
2172         * loop.c (GOMP_loop_static_start, GOMP_loop_dynamic_start,
2173         GOMP_loop_guided_start, GOMP_loop_runtime_start,
2174         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
2175         GOMP_loop_ordered_guided_start): Update to match.
2176         * sections.c (GOMP_sections_start): Likewise.
2177         * single.c (GOMP_single_start, GOMP_single_copy_start): Likewise.
2178
2179         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
2180         gomp_ordered_static_init, gomp_ordered_static_next): Rename s/_loop//.
2181         Use bounds check instead of modulus.
2182         (gomp_ordered_sync): Split out of GOMP_ordered_start.
2183         (gomp_ordered_last): Don't sync with ordered_owner here.
2184         (gomp_ordered_next): Likewise.
2185         (gomp_ordered_static_loop_next): Likewise.
2186         * loop.c, libgomp.h: Update to match.
2187
2188         * libgomp.h (GOMP_barrier): Declare.
2189
2190         * testsuite/barrier-1.c: New file.
2191         * testsuite/critical-1.c: New file.
2192         * testsuite/ordered-2.c: New file.
2193         * testsuite/ordered-1.c: New file.
2194         * testsuite/sections-1.c: New file.
2195         * testsuite/single-1.c: New file.
2196         * testsuite/Makefile (TESTS): Add them.
2197
2198 2005-05-04  Richard Henderson  <rth@redhat.com>
2199
2200         * libgomp.h (struct gomp_work_share): Add ordered_owner.
2201         * loop.c (GOMP_loop_static_start): If not the startup thread,
2202         acquire the mutex to wait for initialization complete.
2203         (GOMP_loop_ordered_static_start): Likewise.
2204         (GOMP_loop_ordered_runtime_start): Likewise.
2205         (GOMP_loop_ordered_static_first): Remove.
2206         (GOMP_loop_ordered_dynamic_first): Remove.
2207         (GOMP_loop_ordered_guided_first): Remove.
2208         (GOMP_loop_ordered_runtime_first): Remove.
2209         * ordered.c (gomp_ordered_loop_first): Post to own release when
2210         we're the first thread.
2211         (gomp_ordered_loop_last): Wait on release if not owner.
2212         (gomp_ordered_loop_next): Likewise.
2213         (gomp_ordered_static_loop_init): New.
2214         (gomp_ordered_static_loop_next): Use ordered_owner.
2215         (GOMP_ordered_start): Likewise.
2216         * work.c (gomp_new_work_share): Initialize ordered_owner.
2217
2218 2005-05-03  Richard Henderson  <rth@redhat.com>
2219
2220         * Makefile (OPT): New.
2221         (CFLAGS): Use it.
2222
2223         * loop.c (GOMP_loop_end, GOMP_loop_end_nowait): New.
2224         * sections.c (GOMP_sections_end, GOMP_sections_end_nowait): New.
2225         * libgomp.h, libgomp.map, NOTES: Update to match.
2226
2227         * team.c (struct gomp_thread_start_data): Remove ts, fn, data.
2228         Add initialized and thr members.
2229         (gomp_thread_start): Pause when initially spawned to wait for
2230         the whole team to be created.
2231         (gomp_team_start): Release team members at the end.
2232
2233         * testsuite/loop-1.c (N): New.  Use it instead of hardcoded 100.
2234         (f_foo_1): Use GOMP_loop_end.
2235         (f_foo_2): Use GOMP_loop_end_nowait.
2236
2237         * testsuite/loop-2.c: New file.
2238         * testsuite/Makefile (TESTS): Add it.
2239
2240 2005-05-03  Richard Henderson  <rth@redhat.com>
2241
2242         * iter.c (gomp_iter_static_next): Fix overflow check typo.
2243         (gomp_iter_dynamic_next_locked): Fix overflow check thinko.
2244         * team.c (new_team): Initialize oldest_live_gen to 1 if no
2245         initial work_share.
2246
2247         * testsuite/Makefile: New file.
2248         * testsuite/loop-1.c: New file.
2249
2250 2005-05-03  Richard Henderson  <rth@redhat.com>
2251
2252         Initial implementation and checkin.