1 2006-02-06 Jakub Jelinek <jakub@redhat.com>
3 * trans-decl.c (create_function_arglist): Handle dummy functions.
5 2006-01-26 Diego Novillo <dnovillo@redhat.com>
7 * trans-openmp.c: Call build_omp_clause instead of
8 make_node when creating OMP_CLAUSE_* trees.
9 (gfc_trans_omp_reduction_list): Remove argument 'code'.
12 2006-01-19 Diego Novillo <dnovillo@redhat.com>
14 * trans.h (build4_v): Define.
15 * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
16 Call build3_v to create OMP_SECTIONS nodes.
18 2006-01-16 Jakub Jelinek <jakub@redhat.com>
20 * trans-decl.c (gfc_get_symbol_decl): Fix a merge glitch.
22 2006-01-13 Diego Novillo <dnovillo@redhat.com>
24 * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
27 2005-12-05 Jakub Jelinek <jakub@redhat.com>
30 * trans-decl.c (gfc_get_symbol_decl): Revert 2005-11-30 and
32 (gfc_trans_vla_type_sizes): Also "gimplify"
33 GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
34 * trans-array.c (gfc_trans_deferred_array): Call
35 gfc_trans_vla_type_sizes.
37 2005-11-30 Jakub Jelinek <jakub@redhat.com>
40 * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
41 on all symbols added to the variable list.
43 2005-11-18 Jakub Jelinek <jakub@redhat.com>
45 * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
46 procedure symbol in REDUCTION.
48 * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
49 for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
51 2005-11-15 Jakub Jelinek <jakub@redhat.com>
53 * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument. If PBLOCK
54 is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
56 (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
57 for non-ordered non-static combined loops.
58 (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.
60 2005-11-10 Diego Novillo <dnovillo@redhat.com>
62 * openmp.c: Include target.h and toplev.h.
63 (gfc_match_omp_threadprivate): Emit diagnostic if target does
65 * Make-lang.in (fortran/openmp.o): Add dependencies on
66 target.h and toplev.h.
68 2005-11-07 Jakub Jelinek <jakub@redhat.com>
70 * trans-decl.c (saved_function_decls, saved_parent_function_decls):
71 Remove unnecessary initialization.
72 (create_function_arglist): Make sure __result has complete type.
73 (gfc_get_fake_result_decl): Change current_fake_result_decl into
74 a tree chain. For entry master, create a separate variable
75 for each result name. For BT_CHARACTER results, call
76 gfc_finish_var_decl on length even if it has been already created,
78 (gfc_trans_vla_type_sizes): For function/entry result, adjust
79 result value type, not the FUNCTION_TYPE.
80 (gfc_generate_function_code): Adjust for current_fake_result_decl
82 (gfc_trans_deferred_vars): Likewise. Call gfc_trans_vla_type_sizes
83 even on result if it is assumed-length character.
84 * trans-openmp.c (gfc_omp_privatize_by_reference): Make
85 DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
86 (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
87 (gfc_trans_omp_variable): New function.
88 (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
89 * trans.h (GFC_DECL_RESULT): Define.
91 * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
92 * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
93 * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.
95 2005-11-06 Jakub Jelinek <jakub@redhat.com>
97 * trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
98 Call gfc_trans_vla_type_sizes.
99 (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
100 (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
101 gfc_trans_vla_type_sizes): New functions.
102 (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
103 callers. Call gfc_trans_vla_type_sizes on assumed-length
104 character parameters.
105 * trans-array.c (gfc_trans_array_bounds,
106 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
107 gfc_trans_vla_type_sizes.
108 * trans.h (gfc_trans_vla_type_sizes): New prototype.
110 * trans-openmp.c (gfc_omp_privatize_by_reference): Return
111 true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
112 (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
114 (gfc_trans_omp_clauses): Add WHERE argument. Call
115 gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
117 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
118 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
119 gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
120 gfc_trans_omp_clauses callers.
122 2005-11-03 Jakub Jelinek <jakub@redhat.com>
124 * openmp.c (omp_current_do_code): New var.
125 (gfc_resolve_omp_do_blocks): New function.
126 (gfc_resolve_omp_parallel_blocks): Call it.
127 (gfc_resolve_do_iterator): Add CODE argument. Don't propagate
128 predetermination if argument is !$omp do or !$omp parallel do
130 * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
131 for EXEC_OMP_DO. Adjust gfc_resolve_do_iterator caller.
132 * fortran.h (gfc_resolve_omp_do_blocks): New prototype.
133 (gfc_resolve_do_iterator): Add CODE argument.
135 2005-11-01 Jakub Jelinek <jakub@redhat.com>
137 * trans.h (gfc_omp_predetermined_sharing,
138 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
140 (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
141 * trans-openmp.c (gfc_omp_predetermined_sharing,
142 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
144 * trans-common.c (build_equiv_decl, build_common_decl,
145 create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
146 * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
148 * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
149 LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
150 LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
152 2005-10-28 Jakub Jelinek <jakub@redhat.com>
154 * openmp.c (resolve_omp_clauses): Remove extraneous comma.
156 2005-10-26 Jakub Jelinek <jakub@redhat.com>
158 * symbol.c (check_conflict): Add conflict between cray_pointee and
160 * openmp.c (gfc_match_omp_threadprivate): Fail if
161 gfc_add_threadprivate returned FAILURE.
162 (resolve_omp_clauses): Diagnose Cray pointees in SHARED,
163 {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
164 {FIRST,LAST}PRIVATE and REDUCTION clauses.
166 * resolve.c (omp_workshare_flag): New variable.
167 (resolve_function): Diagnose use of non-ELEMENTAL user defined
168 function in WORKSHARE construct.
169 (resolve_code): Cleanup forall_save use. Make sure omp_workshare_flag
170 is set to correct value in different contexts.
172 * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
174 (resolve_omp_atomic): Likewise.
176 2005-10-24 Jakub Jelinek <jakub@redhat.com>
179 * scanner.c (skip_free_comments): Set at_bol at the beginning of the
181 (skip_fixed_comments): Handle ! comments in the middle of line here
183 (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
185 (gfc_next_char_literal): Fix expected canonicalized *$omp string.
187 2005-10-22 Jakub Jelinek <jakub@redhat.com>
189 * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
190 initialization to build OMP_FOR instead of build.
192 2005-10-21 Jakub Jelinek <jakub@redhat.com>
194 * trans-decl.c (gfc_build_qualified_array): For non-assumed-size
195 arrays without constant size, create also an index var for
196 GFC_TYPE_ARRAY_SIZE (type). If the type is incomplete, complete
198 (gfc_create_string_length): Don't call gfc_defer_symbol_init
199 if just creating DECL_ARGUMENTS.
200 (gfc_get_symbol_decl): Call gfc_finish_var_decl and
201 gfc_defer_symbol_init even if ts.cl->backend_decl is already
202 set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
203 (create_function_arglist): Rework, so that hidden length
204 arguments for CHARACTER parameters are created together with
205 the parameters. Resolve ts.cl->backend_decl for CHARACTER
206 parameters. If the argument is a non-constant length array
207 or CHARACTER, ensure PARM_DECL has different type than
209 (generate_local_decl): Call gfc_get_symbol_decl even
210 for non-referenced non-constant length CHARACTER parameters
211 after optionally issuing warnings.
212 * trans-array.c (gfc_trans_array_bounds): Set last stride
213 to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
214 (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
217 2005-10-20 Richard Henderson <rth@redhat.com>
219 * trans-decl.c (gfc_gimplify_function): Invoke
220 diagnose_omp_structured_block_errors.
222 2005-10-20 Richard Henderson <rth@redhat.com>
224 * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
225 (gfc_trans_omp_ordered): Use OMP_ORDERED.
227 2005-10-19 Jakub Jelinek <jakub@redhat.com>
229 * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
230 gfc_resolve_omp_parallel_blocks): New prototypes.
231 * resolve.c (resolve_blocks): Renamed to...
232 (gfc_resolve_blocks): ... this. Remove static.
233 (gfc_resolve_forall): Adjust caller.
234 (resolve_code): Only call gfc_resolve_blocks if code->block != 0
235 and not for EXEC_OMP_PARALLEL* directives. Call
236 gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
237 Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
239 * openmp.c: Include pointer-set.h.
240 (omp_current_ctx): New variable.
241 (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
243 * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.
245 * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
246 look up symbol if it exists, use its name instead and, if it is not
247 INTRINSIC, issue diagnostics.
249 2005-10-18 Jakub Jelinek <jakub@redhat.com>
251 * parse.c (parse_omp_do): Handle implied end do properly.
252 (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
253 return it instead of continuing.
255 2005-10-18 Richard Henderson <rth@redhat.com>
257 * trans-openmp.c (gfc_trans_omp_critical): Update for changed
259 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
260 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
261 gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.
263 2005-10-18 Jakub Jelinek <jakub@redhat.com>
265 * trans.h (gfc_omp_privatize_by_reference): New prototype.
266 * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
267 to gfc_omp_privatize_by_reference.
268 * trans-openmp.c (gfc_omp_privatize_by_reference): New function.
270 * trans-stmt.h (gfc_trans_omp_directive): Add comment.
272 2005-10-15 Jakub Jelinek <jakub@redhat.com>
274 * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
275 Disallow COMMON matching if it is set.
276 (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
277 (resolve_omp_clauses): Show locus in error messages. Check that
278 variable types in reduction clauses are appropriate for reduction
281 2005-10-13 Jakub Jelinek <jakub@redhat.com>
283 * resolve.c (resolve_symbol): Don't error if a threadprivate module
284 variable isn't SAVEd.
286 2005-10-12 Jakub Jelinek <jakub@redhat.com>
288 * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
289 Fix typo in condition. Fix DOVAR initialization.
291 2005-10-11 Jakub Jelinek <jakub@redhat.com>
293 * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
294 rather than .min. etc.
296 * trans-openmpc.c (omp_not_yet): Remove.
297 (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
298 Force creation of BIND_EXPR around the workshare construct.
299 (gfc_trans_omp_parallel_sections): Likewise.
300 (gfc_trans_omp_parallel_workshare): Likewise.
302 2005-10-10 Jakub Jelinek <jakub@redhat.com>
304 * types.def (BT_I16, BT_FN_I16_VPTR_I16,
305 BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
307 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
308 (gfc_trans_omp_code): New function.
309 (gfc_trans_omp_do): Use it, remove omp_not_yet uses.
310 (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
311 (gfc_trans_omp_sections): Likewise. Only treat empty last section
312 specially if lastprivate clause is present.
313 * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
316 2005-10-08 Jakub Jelinek <jakub@redhat.com>
318 * trans-expr.c (gfc_conv_expr_val): Fix comment typo.
320 2005-10-08 Richard Henderson <rth@redhat.com>
322 * trans-openmp.c (gfc_trans_omp_variable_list): Update for
323 OMP_CLAUSE_DECL name change.
324 (gfc_trans_omp_do): Likewise.
326 2005-09-28 Jakub Jelinek <jakub@redhat.com>
328 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
330 (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
331 sync builtins directly.
332 (gfc_trans_omp_single): Build OMP_SINGLE statement.
334 2005-09-28 Richard Henderson <rth@redhat.com>
336 * trans-openmp.c (gfc_trans_add_clause): New.
337 (gfc_trans_omp_variable_list): Take a tree code and build the clause
338 node here. Link it to the head of a list.
339 (gfc_trans_omp_clauses): Update to match.
340 (gfc_trans_omp_do): Use gfc_trans_add_clause.
342 2005-09-27 Jakub Jelinek <jakub@redhat.com>
344 * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
345 gfc_omp_clauses *. Use gfc_evaluate_now instead of creating
347 (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
348 (gfc_trans_omp_do): New function.
349 (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
350 (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
352 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
353 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
354 gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
355 (gfc_trans_omp_directive): Use them.
356 * trans-stmt.c (gfc_trans_simple_do): Fix comment.
357 * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
358 * openmp.c (resolve_omp_clauses): Check for list items present
360 (resolve_omp_do): Check that iteration variable is not THREADPRIVATE
361 and is not present in any clause variable lists other than PRIVATE
364 2005-09-26 Jakub Jelinek <jakub@redhat.com>
366 * gfortran.h (symbol_attribute): Add threadprivate bit.
367 (gfc_common_head): Add threadprivate member, change use_assoc
368 and saved into char to save space.
369 (gfc_add_threadprivate): New prototype.
370 * symbol.c (check_conflict): Handle threadprivate.
371 (gfc_add_threadprivate): New function.
372 (gfc_copy_attr): Copy threadprivate.
373 * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
374 if IF or NUM_THREADS is constant. Create OMP_CLAUSE_SCHEDULE and
376 * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
377 outside a module and not in COMMON has is not SAVEd.
378 (resolve_equivalence): Ensure THREADPRIVATE objects don't get
380 * trans-common.c: Include target.h and rtl.h.
381 (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
382 * trans-decl.c: Include rtl.h.
383 (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
384 * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
385 * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
386 (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
387 * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
388 is from current namespace.
389 (gfc_match_omp_threadprivate): Rewrite.
390 (resolve_omp_clauses): Check some clause restrictions.
391 * module.c (ab_attribute): Add AB_THREADPRIVATE.
392 (attr_bits): Add THREADPRIVATE.
393 (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
394 (load_commons, write_common, write_blank_common): Adjust for type
395 change of saved, store/load threadprivate bit from the integer
398 2005-09-25 Richard Henderson <rth@redhat.com>
400 * types.def (BT_FN_UINT_UINT): New.
401 (BT_FN_VOID_UINT_UINT): Remove.
403 2005-09-24 Jakub Jelinek <jakub@redhat.com>
405 * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
406 gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
407 gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
408 (gfc_trans_omp_directive): Use them.
410 * openmp.c (expr_references_sym): Add SE argument, don't look
412 (is_conversion): New function.
413 (resolve_omp_atomic): Adjust expr_references_sym callers. Handle
414 promoted expressions.
415 * trans-openmp.c (gfc_trans_omp_atomic): New function.
416 (gfc_trans_omp_directive): Call it.
418 * f95-lang.c (builtin_type_for_size): New function.
419 (gfc_init_builtin_functions): Initialize synchronization and
421 * types.def: New file.
422 * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
425 2005-09-23 Diego Novillo <dnovillo@redhat.com>
427 * trans-openmp.c: Rename GOMP_* tree codes into OMP_*.
429 2005-09-23 Jakub Jelinek <jakub@redhat.com>
431 * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
434 * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
436 (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.
438 * parse.c (parse_omp_do): Call pop_state before next_statement.
439 * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
441 (gfc_resolve_omp_directive): Call them.
442 * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
443 leaves an OpenMP structured block or if EXIT terminates !$omp do
446 2005-09-20 Jakub Jelinek <jakub@redhat.com>
448 * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
449 (F95_OBJS): Add fortran/trans-openmp.o.
450 (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
451 * lang.opt: Add -fopenmp option.
452 * options.c (gfc_init_options): Initialize it.
453 (gfc_handle_option): Handle it.
454 * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
455 ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
456 ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
457 ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
458 ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
459 ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
460 ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
461 ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
462 ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
464 (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
465 OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
466 OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
467 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
468 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
469 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM):
470 New OpenMP variable list types.
471 (gfc_omp_clauses): New typedef.
472 (gfc_get_omp_clauses): Define.
473 (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
474 EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
475 EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
476 EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
477 EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
478 EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
479 (struct gfc_code): Add omp_clauses, omp_name, omp_namelist
480 and omp_bool fields to ext union.
481 (flag_openmp): Declare.
482 (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
483 * scanner.c (openmp_flag, openmp_locus): New variables.
484 (skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
485 Handle OpenMP directive lines and conditional compilation magic
487 * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
488 * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
489 parse_omp_structured_block): New functions.
490 (next_free, next_fixed): Parse OpenMP directives.
491 (case_executable, case_exec_markers, case_decl): Add ST_OMP_*
493 (gfc_ascii_statement): Handle ST_OMP_* codes.
494 (parse_executable): Rearrange the loop slightly, so that
495 parse_omp_do can return next_statement.
496 * match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
497 gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
498 gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
499 gfc_match_omp_parallel, gfc_match_omp_parallel_do,
500 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
501 gfc_match_omp_sections, gfc_match_omp_single,
502 gfc_match_omp_threadprivate, gfc_match_omp_workshare,
503 gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
504 * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
505 (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
507 * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
508 EXEC_OMP_* directives.
509 * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
510 * trans-stmt.h (gfc_trans_omp_directive): New prototype.
511 * openmp.c: New file.
512 * trans-openmp.c: New file.