1 2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
3 * parser.c (cp_parser_oacc_cache): Generate OACC_CACHE.
4 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE__CACHE_.
6 * parser.c (cp_parser_omp_var_list_no_open) <OMP_CLAUSE__CACHE_>:
7 Remove explicit mark_exp_read invocations.
9 * parser.c (cp_parser_omp_clause_name): Also look for "pcopy",
10 "pcopyin", "pcopyout", "pcreate". Look for "wait" instead of
13 2014-11-03 Cesar Philippidis <cesar@codesourcery.com>
15 * parser.c (cp_parser_omp_clause_name): Also consider CPP_KEYWORD
16 typed tokens as clauses for delete.
17 (OACC_ENTER_DATA_CLAUSE_MASK): New macro.
18 (OACC_EXIT_DATA_CLAUSE_MASK): New macro.
19 (cp_parser_oacc_enter_exit_data): New function.
20 (cp_parser_omp_construct): Handle PRAGMA_OACC_ENTER_DATA and
21 PRAGMA_OACC_EXIT_DATA.
22 (cp_parser_pragma): Likewise.
24 2014-10-21 Cesar Philippidis <cesar@codesourcery.com>
26 * parser.c (cp_parser_omp_clause_name): Don't parse the
27 identifier for RID_DELETE.
29 2014-10-20 Cesar Philippidis <cesar@codesourcery.com>
31 * parser.c (cp_parser_omp_clause_name): Consider CPP_KEYWORD
32 typed tokens as clauses for delete.
34 2014-10-15 James Norris <jnorris@codesourcery.com>
35 Cesar Philippidis <cesar@codesourcery.com>
36 Ilmir Usmanov <i.usmanov@samsung.com>
38 * cp-tree.h (finish_oacc_data, finish_oacc_kernels,
39 finish_oacc_parallel): New prototypes.
40 * parser.c (cp_parser_omp_clause_name): Add parsing of OpenACC clauses.
41 (cp_parser_omp_var_list_no_open): Add handling of array specifier.
42 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr,
43 cp_parser_oacc_vector_length, cp_parser_oacc_wait_list,
44 cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs,
45 cp_parser_omp_clause_num_workers): New functions.
46 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
47 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT.
48 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
51 2013-11-21 Jakub Jelinek <jakub@redhat.com>
53 * semantics.c (finish_omp_clauses): Use maybe_constant_value on
54 OMP_CLAUSE_LINEAR in #pragma omp declare simd.
56 2013-11-07 Thomas Schwinge <thomas@codesourcery.com>
58 * parser.c (cp_parser_omp_all_clauses): Make a parser error
59 message suitable for OpenACC, too.
61 2013-10-10 Jakub Jelinek <jakub@redhat.com>
63 * decl.c (grokfndecl): If omp declare simd has any clauses,
64 store them into TREE_VALUE of an extra TREE_LIST pointed out
65 by TREE_VALUE of the attribute.
66 * pt.c (apply_late_template_attributes): Likewise.
67 * parser.c (cp_parser_late_parsing_omp_declare_simd): Likewise.
68 (cp_parser_omp_declare_target, cp_parser_omp_end_declare_target):
69 Use scope_chain->omp_declare_target_attribute instead of
70 current_omp_declare_target_attribute.
71 * cp-tree.h (struct saved_scope): Add omp_declare_target_attribute
73 (current_omp_declare_target_attribute): Remove.
74 * cp-gimplify.c (cp_genericize_r) <case OMP_CLAUSE_REDUCTION>: Add
76 * decl2.c (current_omp_declare_target_attribute): Remove.
77 (is_late_template_attribute): Fix up comment about "omp declare simd"
79 (cp_check_const_attributes): Don't expect TREE_VALUEs other
80 than NULL_TREE or TREE_LIST.
81 (cplus_decl_attributes): Use scope_chain->omp_declare_target_attribute
82 instead of current_omp_declare_target_attribute. Use
83 DECL_CLASS_SCOPE_P and DECL_FUNCTION_SCOPE_P macros.
84 * semantics.c (handle_omp_array_sections_1): Change wording
85 of errors requesting specification of length.
86 (finish_omp_reduction_clause): Static cast omp_{out,in,priv,orig}
87 to reference type and convert_from_reference, instead of
88 taking address, static cast to pointer type and INDIRECT_REF.
89 (finish_omp_clauses): For error about non-integral non-pointer
90 linear clause include type in the diagnostic message.
92 * decl.c (decls_match): Revert DECL_OMP_DECLARE_REDUCTION_P
94 (duplicate_decls): Move DECL_OMP_DECLARE_REDUCTION_P case
96 * parser.c (cp_parser_omp_declare_reduction): Fix spelling
97 of some error messages. Set DECL_CONTEXT (fndecl) to
98 global_namespace first.
99 * decl2.c (mark_used): Force immediate instantiation of
100 DECL_OMP_DECLARE_REDUCTION_P decls.
101 * semantics.c (omp_reduction_lookup): Add baselinkp and
102 ambiguousp arguments, diagnose ambiguities, perform access
103 check only if non-ambiguous.
104 (finish_omp_reduction_clause): Adjust omp_reduction_lookup
105 caller, if it returned error_mark_node, just return true,
106 use mark_used instead of instantiate_decl.
108 2013-10-08 Jakub Jelinek <jakub@redhat.com>
110 * semantics.c (finish_omp_clauses): Remove name variable, use
111 omp_clause_code_name[OMP_CLAUSE_CODE (c) instead.
113 2013-10-07 Jakub Jelinek <jakub@redhat.com>
115 * parser.c (cp_parser_omp_declare_reduction_exprs): Document the
116 statements in the artificial function body of UDRs.
117 * pt.c (tsubst_expr): Use DECL_FUNCTION_SCOPE_P macro for UDRs.
118 (tsubst_omp_udr): Refer to cp_parser_omp_declare_reduction_exprs
120 (finish_omp_reduction_clause): New function.
121 (finish_omp_clauses): Use it.
122 * cp-gimplify.c (cxx_omp_privatize_by_reference): Fix up formatting.
124 * parser.c (cp_parser_omp_declare_reduction): Use different wording
125 of error message between function/method/array type and reference type.
126 Include %qT in the type related error messages.
127 * semantics.c (cp_check_omp_declare_reduction): Likewise.
128 * pt.c (tsubst_decl): Use reference type specific wording of error
129 message. Include %qT in the type related error messages.
131 2013-09-25 Jakub Jelinek <jakub@redhat.com>
133 * parser.c (cp_parser_omp_taskgroup): Return tree. Use
134 c_finish_omp_taskgroup.
135 (cp_parser_omp_construct): Adjust caller.
136 * cp-array-notation.c (expand_array_notation_exprs): Handle
138 * pt.c (tsubst_expr): Handle OMP_TASKGROUP.
139 * semantics.c (finish_omp_taskgroup): Remove.
140 * cp-tree.h (finish_omp_taskgroup): Remove.
142 2013-09-18 Jakub Jelinek <jakub@redhat.com>
144 * cp-tree.h (lang_decl_fn): Add omp_declare_reduction_p bitfield.
145 (DECL_OMP_DECLARE_REDUCTION_P): Define.
146 (omp_reduction_id, cp_remove_omp_priv_cleanup_stmt,
147 cp_check_omp_declare_reduction): New prototypes.
148 (cxx_omp_create_clause_info): Add another bool argument.
149 * decl.c (decls_match): For DECL_OMP_DECLARE_REDUCTION_P decls,
150 ignore template and context mismatches.
151 (duplicate_decls): Error out for redeclaration of UDRs.
152 * parser.c (cp_parser_class_specifier_1): Handle UDRs before all
153 other function bodies.
154 (cp_parser_late_parsing_for_member): Handle UDRs.
155 (cp_parser_omp_clause_reduction): Handle UDRs.
156 (cp_parser_omp_declare_reduction_exprs,
157 cp_parser_omp_declare_reduction): New functions.
158 (cp_parser_omp_declare): Uncomment parsing of UDRs.
159 (cp_debug_parser): Print colon_doesnt_start_class_def_p.
160 (cp_parser_next_token_starts_class_definition_p): Don't allow
161 CPP_COLON if colon_doesnt_start_class_def_p flag is true.
162 * parser.h (struct cp_parser): Add colon_doesnt_start_class_def_p
164 * pt.c (instantiate_class_template_1): Call
165 cp_check_omp_declare_reduction on UDRs.
166 (tsubst_decl): Diagnose UDRs on reference types.
167 (tsubst_omp_clauses): Subst OMP_CLAUSE_REDUCTION_PLACEHOLDER
169 (tsubst_expr): Handle UDRs.
170 (tsubst_omp_udr): New function.
171 (instantiate_decl): Handle UDRs.
172 * cp-gimplify.c (cp_genericize_r): Handle invisiref parm decls
173 in OMP_CLAUSE_REDUCTION.
174 (cxx_omp_privatize_by_reference): Return true also for decls with
176 (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info caller.
177 * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument.
178 Use it instead of need_default_ctor || need_copy_ctor for dtor
180 (omp_reduction_id, omp_reduction_lookup,
181 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
182 cp_check_omp_declare_reduction, clone_omp_udr,
183 find_omp_placeholder_r): New functions.
184 (struct cp_check_omp_declare_reduction_data): New type.
185 (finish_omp_clauses): Adjust cxx_omp_create_clause_info caller.
186 Handle UDRs. Handle decls with REFERENCE_TYPE type.
188 2013-09-05 Jakub Jelinek <jakub@redhat.com>
190 * semantics.c (handle_omp_array_sections): Fix up handling
191 of reference to array and reference to pointer based array
193 (finish_omp_clauses): Don't report errors about non-decl
194 in OMP_CLAUSE_DECL for OMP_CLAUSE_MAP_POINTER.
196 * parser.c (cp_parser_omp_target_data, cp_parser_omp_target): Call
197 keep_next_level (true).
198 * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
199 * semantics.c (handle_omp_array_sections_1): Remove pointer_based_p
200 argument. Do cp_save_expr on low bound unconditionally.
201 (handle_omp_array_sections): Adjust caller. Add OMP_CLAUSE_MAP_POINTER
202 map clause even for array based array sections.
203 (finish_omp_clauses): Don't complain about non-mappable types
204 for OMP_CLAUSE_MAP_POINTER. Check for duplicates even for map
207 2013-07-14 Jakub Jelinek <jakub@redhat.com>
209 * decl.c (declare_simd_adjust_this): New function.
210 (grokfndecl): Remove omp_declare_simd_clauses argument.
211 Don't call finish_omp_declare_simd, instead just call
212 c_omp_declare_simd_clauses_to_numbers.
213 (grokdeclarator): Don't pass omp_declare_simd_clauses to
215 * parser.c (cp_ensure_no_omp_declare_simd): Adjust for
216 change from omp_declare_simd_clauses vector to omp_declare_simd
218 (cp_finish_omp_declare_simd): Renamed to...
219 (cp_finalize_omp_declare_simd): ... this. Adjust for
220 change from omp_declare_simd_clauses vector to omp_declare_simd
221 pointer, remove declspecs argument.
222 (cp_parser_init_declarator, cp_parser_member_declaration,
223 cp_parser_function_definition_from_specifiers_and_declarator,
224 cp_parser_save_member_function_body): Don't copy
225 omp_declare_simd_clauses vector to declspecs. Call
226 cp_finalize_omp_declare_simd instead of cp_finish_omp_declare_simd.
227 (cp_parser_late_return_type_opt): Add declarator argument. On
228 cdk_id declarator call cp_parser_late_parsing_omp_declare_simd
229 if declare simd pragma has been seen.
230 (cp_parser_direct_declarator): Adjust cp_parser_late_return_type_opt
232 (cp_parser_omp_var_list_no_open): Don't special-case lookup in
233 omp declare simd clauses.
234 (OMP_DECLARE_SIMD_CLAUSE_MASK): Remove OMP_CLAUSE_REDUCTION.
235 (cp_parser_omp_declare_simd): Don't set up omp_declare_simd_clauses
236 vector, don't parse omp clauses here. Instead remember tokens
237 from #pragma omp declare simd till end of pragma line and populate
238 omp_declare_simd_data structure.
239 (cp_parser_late_parsing_omp_declare_simd): New function.
240 * pt.c (apply_late_template_attributes): Adjust
241 c_omp_declare_simd_clauses_to_numbers caller.
242 * cp-tree.h (struct cp_decl_specifier_seq): Remove
243 omp_declare_simd_clauses field.
244 (finish_omp_declare_simd): Remove.
245 * parser.h (cp_omp_declare_simd_data): New structure.
246 (struct cp_parser): Remove omp_declare_simd_clauses field,
247 add omp_declare_simd field instead.
248 * semantics.c (finish_omp_declare_simd): Remove.
250 2013-07-09 Jakub Jelinek <jakub@redhat.com>
252 * semantics.c (finish_omp_cancel): Pass two arguments to GOMP_cancel
253 rather than just one, if no OMP_CLAUSE_IF, pass true, otherwise pass
254 if clause argument. Emit the call unconditionally.
256 2013-07-06 Jakub Jelinek <jakub@redhat.com>
258 * parser.c (cp_parser_omp_end_declare_target): Diagnose if
259 #pragma omp end isn't followed by declare target.
260 (cp_parser_omp_declare): Adjust expected keyword diagnostics.
262 2013-07-03 Jakub Jelinek <jakub@redhat.com>
264 * parser.c (cp_parser_omp_atomic): Disallow seq_cst before
265 atomic-clause, disallow comma in between atomic-clause and
267 (cp_parser_omp_sections_scope): If section-sequence doesn't
268 start with #pragma omp section, require exactly one structured-block
269 instead of sequence of statements.
270 * semantics.c (finish_omp_clauses): Diagnose copyprivate clause
271 appearing together with nowait clause.
273 2013-06-21 Jakub Jelinek <jakub@redhat.com>
275 * decl2.c (cplus_decl_attributes): Only add attribute
277 * parser.c (cp_parser_omp_distribute): Don't reject
278 #pragma omp teams distribute simd and
279 #pragma omp target teams distribute simd. Consume
280 simd or parallel token.
282 2013-06-14 Jakub Jelinek <jakub@redhat.com>
284 * parser.c (cp_parser_omp_all_clauses): Add defaulted finish_p
285 argument. Don't call finish_omp_clauses if it is false.
286 (cp_parser_omp_for_loop): Change last argument to cclauses,
287 and adjust uses to grab parallel clauses from the array of all
289 (cp_omp_split_clauses): New function.
290 (cp_parser_omp_simd): Add p_name, mask and cclauses arguments.
291 Allow the function to be called also when parsing combined constructs.
292 (cp_parser_omp_sections): Likewise.
293 (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
294 Allow the function to be called also when parsing combined constructs,
295 and call cp_parser_omp_simd when parsing for simd.
296 (cp_parser_omp_parallel): Likewise.
297 (cp_parser_omp_distribute): Likewise.
298 (cp_parser_omp_teams): Likewise.
299 (cp_parser_omp_target): If next token is teams, call
300 cp_parser_omp_teams and parse it as combined construct.
301 (cp_parser_omp_declare_simd): Pass false as last argument to
302 cp_parser_omp_all_clauses.
303 (cp_parser_omp_construct): Adjust callers of cp_parser_omp_simd,
304 cp_parser_omp_sections, cp_parser_omp_for, cp_parser_omp_parallel,
305 cp_parser_omp_distribute and cp_parser_omp_teams.
306 * pt.c (tsubst_expr): Don't handle OMP_FOR_SIMD. Handle NULL
308 * semantics.c (finish_omp_for): Don't handle OMP_FOR_SIMD.
309 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Adjust comment.
310 * cp-gimplify.c (cp_gimplify_expr, cp_genericize_r): Don't handle
313 * decl2.c (cp_omp_mappable_type): No longer static. Handle array
314 types and recurse for FIELD_DECL types.
315 * semantics.c (handle_omp_array_sections_1): Call
316 convert_from_reference before testing for pointer_based_p.
317 (finish_omp_clauses): Complain if OMP_CLAUSE_{MAP,TO,FROM}
318 decls or array sections don't have cp_omp_mappable_type.
319 * cp-tree.h (cp_omp_mappable_type): New prototype.
321 2013-06-12 Jakub Jelinek <jakub@redhat.com>
323 * semantics.c (finish_omp_clause): Don't mark references addressable.
324 For OMP_CLAUSE_{TO,FROM} detect same decl appearing more than once
326 * parser.c (cp_parser_omp_var_list_no_open): Handle [ expression ]
327 notation in array section specification.
328 (cp_parser_omp_all_clauses): Don't require to/from clauses to be
330 (cp_parser_omp_target_update): Adjust diagnostics.
332 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_THREAD_LIMIT.
333 * parser.c (cp_parser_omp_clause_name): Handle thread_limit clause.
334 (cp_parser_omp_clause_thread_limit): New function.
335 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
336 (OMP_TEAMS_CLAUSE_MASK): Replace PRAGMA_OMP_CLAUSE_NUM_THREADS
337 with PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
338 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_THREAD_LIMIT.
340 2013-06-04 Jakub Jelinek <jakub@redhat.com>
342 * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections):
344 (finish_omp_clauses): Handle array sections on
345 OMP_CLAUSE_{MAP,TO,FROM,DEPEND}. If not array sections, mark the decl
347 * parser.c (cp_parser_omp_var_list_no_open): Parse array sections
348 on OMP_CLAUSE_{MAP,TO,FROM,DEPEND} clauses.
350 2013-05-29 Jakub Jelinek <jakub@redhat.com>
352 * parser.c (cp_parser_omp_declare_target,
353 cp_parser_omp_end_declare_target): New functions.
354 (cp_parser_omp_declare): For target keyword call
355 cp_parser_omp_declare_target.
356 (cp_parser_pragma): Handle PRAGMA_OMP_END_DECLARE_TARGET.
357 * cp-tree.h (current_omp_declare_target_attribute): Declare.
358 * decl2.c (current_omp_declare_target_attribute): New variable.
359 (cp_omp_mappable_type): New function.
360 (cplus_decl_attributes): Handle addition of "omp declare target"
361 attribute for decls in #pragma omp declare target region. Complain
364 2013-05-27 Jakub Jelinek <jakub@redhat.com>
366 * parser.c (cp_parser_omp_clause_cancelkind): Remove diagnostics.
367 (cp_parser_omp_all_clauses): Require that OMP_CLAUSE_{TO,FROM}
368 and OMP_CLAUSE_{PARALLEL,FOR,SECTIONS,TASKGROUP} must be first in
370 (OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
371 OMP_TARGET_DATA_CLAUSE_MASK, OMP_TARGET_UPDATE_CLAUSE_MASK,
372 OMP_DISTRIBUTE_CLAUSE_MASK): Define.
373 (cp_parser_omp_teams, cp_parser_omp_target, cp_parser_omp_target_data,
374 cp_parser_omp_target_update, cp_parser_omp_distribute): New functions.
375 (cp_parser_omp_construct): Handle PRAGMA_OMP_DISTRIBUTE and
377 (cp_parser_pragma): Handle PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_TEAMS
378 and PRAGMA_OMP_TARGET.
379 * pt.c (tsubst_expr): Handle OMP_TEAMS, OMP_TARGET, OMP_TARGET_DATA
380 and OMP_TARGET_UPDATE.
382 2013-05-09 Jakub Jelinek <jakub@redhat.com>
384 * cp-tree.h (cp_decl_specifier_seq): Add omp_declare_simd_clauses
386 (finish_omp_declare_simd): Declare.
387 * decl2.c (is_late_template_attribute): Return true for
388 "omp declare simd" attribute.
389 (cp_check_const_attributes): Don't check TREE_VALUE of arg if
390 arg isn't a TREE_LIST.
391 * decl.c (grokfndecl): Add omp_declare_simd_clauses argument, call
392 finish_omp_declare_simd if non-NULL.
393 (grokdeclarator): Pass it declspecs->omp_declare_simd_clauses
395 * pt.c (apply_late_template_attributes): Handle "omp declare simd"
397 (tsubst_omp_clauses): Add declare_simd argument, don't call
398 finish_omp_clauses if it is set. Handle OpenMP 4.0 clauses.
399 (tsubst_expr): Adjust tsubst_omp_clauses callers.
400 * semantics.c (finish_omp_clauses): Diagnose inbranch notinbranch.
401 (finish_omp_declare_simd): New function.
402 * parser.h (struct cp_parser): Add omp_declare_simd_clauses field.
403 * parser.c (cp_ensure_no_omp_declare_simd,
404 cp_finish_omp_declare_simd): New functions.
405 (enum pragma_context): Add pragma_member and pragma_objc_icode.
406 (cp_parser_linkage_specification, cp_parser_namespace_definition,
407 cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
408 (cp_parser_init_declarator, cp_parser_member_declaration,
409 cp_parser_function_definition_from_specifiers_and_declarator,
410 cp_parser_save_member_function_body): Copy
411 parser->omp_declare_simd_clauses to
412 decl_specifiers->omp_declare_simd_clauses, call
413 cp_finish_omp_declare_simd.
414 (cp_parser_member_specification_opt): Pass pragma_member instead
415 of pragma_external to cp_parser_pragma.
416 (cp_parser_objc_interstitial_code): Pass pragma_objc_icode instead
417 of pragma_external to cp_parser_pragma.
418 (cp_parser_omp_var_list_no_open): If parser->omp_declare_simd_clauses,
419 just cp_parser_identifier the argument names.
420 (cp_parser_omp_all_clauses): Don't call finish_omp_clauses for
421 parser->omp_declare_simd_clauses.
422 (OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
423 (cp_parser_omp_declare_simd, cp_parser_omp_declare): New functions.
424 (cp_parser_pragma): Call cp_ensure_no_omp_declare_simd. Handle
425 PRAGMA_OMP_DECLARE_REDUCTION. Replace == pragma_external with
426 != pragma_stmt and != pragma_compound.
428 2013-04-30 Jakub Jelinek <jakub@redhat.com>
430 * pt.c (tsubst_expr): Pass OMP_ATOMIC_SEQ_CST to finish_omp_atomic.
431 * semantics.c (finish_omp_atomic): Add seq_cst argument, pass
432 it through to c_finish_omp_atomic or store into OMP_ATOMIC_SEQ_CST.
433 * cp-tree.h (finish_omp_atomic): Adjust prototype.
434 * parser.c (cp_parser_omp_atomic): Parse seq_cst clause, pass
435 true if it is present to finish_omp_atomic.
437 2013-04-24 Jakub Jelinek <jakub@redhat.com>
439 * parser.c (cp_parser_omp_clause_name): Add missing break after
441 (cp_parser_omp_cancellation_point): Diagnose error if
442 #pragma omp cancellation isn't followed by point.
443 * semantics.c (finish_omp_clauses): Complain also about zero
444 in alignment of aligned directive or safelen/simdlen expressions.
445 (finish_omp_cancel): Fix up diagnostics wording.
447 2013-04-23 Jakub Jelinek <jakub@redhat.com>
449 * semantics.c (finish_omp_clauses): On OMP_CLAUSE_LINEAR clauses
450 verify OMP_CLAUSE_DECL has integral or pointer type, and handle
451 linear steps for pointer type decls. FIx up handling of
454 2013-04-19 Jakub Jelinek <jakub@redhat.com>
456 * cp-tree.h (CP_OMP_CLAUSE_INFO): Also allow it on OMP_CLAUSE_LINEAR.
457 * parser.c (cp_parser_omp_var_list_no_open): If colon is non-NULL,
458 temporarily disable colon_corrects_to_scope_p during the parsing
459 of the variable list.
460 (cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen): New
462 (cp_parser_omp_all_clauses): Handle OMP_CLAUSE_SAFELEN and
464 * semantics.c (finish_omp_clauses): Allow NULL_TREE in
465 OMP_CLAUSE_ALIGNED_ALIGNMENT.
467 2013-04-10 Jakub Jelinek <jakub@redhat.com>
469 * cp-tree.h (finish_omp_taskgroup): New prototype.
470 * parser.c (cp_parser_omp_clause_proc_bind): Require ) instead of
471 colon at the end of the clause.
472 (cp_parser_omp_taskgroup): New function.
473 (cp_parser_omp_construct, cp_parser_pragma): Handle
474 PRAGMA_OMP_TASKGROUP.
475 * semantics.c (finish_omp_taskgroup): New function.
477 2013-04-05 Jakub Jelinek <jakub@redhat.com>
479 * semantics.c (finish_omp_for): Disallow class iterators for
480 OMP_SIMD and OMP_FOR_SIMD loops.
482 2013-03-27 Jakub Jelinek <jakub@redhat.com>
484 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK instead of
486 (finish_omp_for): Add enum tree_code second argument.
487 (finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
488 * cp-gimplify.c (cp_gimplify_expr, cp_genericize_r): Handle
489 OMP_SIMD, OMP_FOR_SIMD and OMP_DISTRIBUTE.
490 * semantics.c (finish_omp_clauses): Handle new OpenMP 4.0 clauses.
491 (finish_omp_for): Add code argument, pass it down to make_node
493 (finish_omp_cancel, finish_omp_cancellation_point): New functions.
494 * parser.c (cp_parser_omp_clause_name): Add parsing of new
496 (cp_parser_omp_var_list_no_open): Add COLON argument, if non-NULL,
497 accept termination by colon instead of closing paren.
498 (cp_parser_omp_var_list, cp_parser_omp_clause_reduction): Adjust
500 (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
501 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_aligned,
502 cp_parser_omp_clause_linear, cp_parser_omp_clause_depend,
503 cp_parser_omp_clause_map, cp_parser_omp_clause_device,
504 cp_parser_omp_clause_dist_schedule, cp_parser_omp_clause_proc_bind):
506 (cp_parser_omp_all_clauses): Change mask argument's type to
507 omp_clause_mask from unsigned. Fix c_name for
508 PRAGMA_OMP_CLAUSE_UNTIED. Handle new OpenMP 4.0 clauses.
509 (cp_parser_omp_for_loop): Add code argument. Pass it down to
511 (OMP_SIMD_CLAUSE_MASK): Define.
512 (cp_parser_omp_simd): New function.
513 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
514 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
515 OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
516 (cp_parser_omp_for): Handle parsing of #pragma omp for simd.
517 (cp_parser_omp_parallel): Handle parsing of
518 #pragma omp parallel for simd. Use omp_clause_mask type
519 instead of unsigned for mask, use OMP_CLAUSE_MASK_1 instead
521 (OMP_CANCEL_CLAUSE_MASK, OMP_CANCELLATION_POINT_CLAUSE_MASK): Define.
522 (cp_parser_omp_cancel, cp_parser_omp_cancellation_point): New
524 (cp_parser_omp_construct): Handle PRAGMA_OMP_SIMD, PRAGMA_OMP_CANCEL
525 and PRAGMA_OMP_CANCELLATION_POINT.
526 (cp_parser_pragma): Handle PRAGMA_OMP_SIMD.
527 * pt.c (tsubst_expr): Handle OMP_SIMD, OMP_FOR_SIMD and
528 OMP_DISTRIBUTE. Pass down TREE_CODE to finish_omp_for.
530 2013-03-20 Jakub Jelinek <jakub@redhat.com>
532 * parser.c (cp_parser_omp_atomic): Never restart unless
533 structured_block is true.
535 * parser.c (cp_parser_binary_expression): Handle no_toplevel_fold_p
536 even for binary operations other than comparison.
537 (cp_parser_omp_atomic): Handle parsing OpenMP 4.0 atomics.
538 * pt.c (tsubst_expr) <case OMP_ATOMIC>: Handle atomic exchange.
539 * semantics.c (finish_omp_atomic): Use cp_tree_equal to diagnose
540 expression mismatches and to find out if c_finish_omp_atomic
541 should be called with swapped set to true or false.
543 Copyright (C) 2013 Free Software Foundation, Inc.
545 Copying and distribution of this file, with or without modification,
546 are permitted in any medium without royalty provided the copyright
547 notice and this notice are preserved.