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