Dead
[official-gcc.git] / gomp-20050608-branch / gcc / cp / ChangeLog.gomp
blob615659ca5bac9a248a15aa7ba0f6f9cf526765d9
1 2006-02-02  Diego Novillo  <dnovillo@redhat.com>
3         * decl.c (pop_labels_1): Use appropriate pointer casting.
4         (poplevel_named_label_1): Likewise.
5         (named_label_entry_hash): Likewise.
6         (named_label_entry_eq): Likewise.
7         (check_goto): Likewise.
8         (define_label): Likewise.
10 2006-01-26  Diego Novillo  <dnovillo@redhat.com>
12         * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
13         of TREE_BLOCK.
14         * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
15         instead of TREE_CODE/TREE_OPERAND.
16         * semantics.c: Likewise.
17         * parser.c: Likewise.
19 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
21         * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
22         target does not support TLS.
24 2005-11-09  Jakub Jelinek  <jakub@redhat.com>
26         * decl.c (redeclaration_error_message): Don't error about
27         DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P (olddecl).
29 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
31         PR c++/24735
32         * semantics.c (finish_omp_barrier, finish_omp_flush): New functions.
33         * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
34         (cp_parser_omp_flush): Call finish_omp_flush.
35         * cp-tree.h (finish_omp_barrier, finish_omp_flush): New prototypes.
37         PR c++/24734
38         * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
40 2005-11-03  Jakub Jelinek  <jakub@redhat.com>
42         * semantics.c (finish_omp_threadprivate): Error on class-scope
43         variables.
45 2005-11-02  Jakub Jelinek  <jakub@redhat.com>
47         * parser.c (cp_parser_omp_all_clauses): If some clause type is not
48         allowed, don't remove just one of the clauses, but all clauses
49         added in that loop round.
50         * semantics.c (finish_omp_clauses): Fix function comment.
51         Don't handle non-const or mutable specially, as const and not mutable
52         is predetermined shared and that leads to double error.
53         Don't ICE if copyin var is PARM_DECL.
55         PR c++/24613
56         * parser.c (cp_parser_pragma): Diagnose PRAGMA_OMP_SECTION outside
57         of PRAGMA_OMP_SECTIONS construct.
59         * semantics.c (finish_omp_threadprivate): Error if V is automatic
60         variable or has incomplete type.
62 2005-11-01  Diego Novillo  <dnovillo@redhat.com>
64         * parser.c (cp_parser_omp_all_clauses): Use
65         OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
67 2005-11-01  Diego Novillo  <dnovillo@redhat.com>
69         * parser.c (cp_parser_omp_all_clauses): When emitting an
70         error message, remove the invalid clause from the list.
72 2005-10-31  Diego Novillo  <dnovillo@redhat.com>
74         * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
75         combined parallel+workshare directives.
77 2005-10-31  Richard Henderson  <rth@redhat.com>
79         * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
80         Use cxx_omp_clause_dtor.
81         * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
82         (cxx_omp_clause_dtor): New.
83         * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
84         (cxx_omp_clause_default_ctor): Use it.
85         (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op): Likewise.
86         (cxx_omp_clause_dtor): New.
87         * semantics.c (finish_omp_clauses): Rewrite cdtor checking to
88         fill in CP_OMP_CLAUSE_INFO.  Don't specialcase LASTPRIVATE for
89         removal.
90         (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
91         cxx_omp_clause_assign_op): Move to cp-gimplify.c.
93 2005-10-28  Jakub Jelinek  <jakub@redhat.com>
95         * semantics.c (finish_omp_threadprivate): If DECL_RTL_SET_P,
96         call make_decl_rtl again so that encode_section_info can update
97         SYMBOL_REF's flags.
99 2005-10-26  Jakub Jelinek  <jakub@redhat.com>
101         * semantics.c (finish_omp_for): Don't segfault if COND or INCR
102         is NULL.  If not calling c_finish_omp_for right away and one of
103         COND and INCR is NULL, issue error and don't expand anything.
105         PR c++/24512
106         * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
107         * semantics.c (finish_omp_for): Likewise.  Set OMP_FOR_PRE_BODY
108         to PRE_BODY if deferring, add it into the current statement list
109         if not processing template decl or pass it to c_finish_omp_for.
110         * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
111         into PRE_BODY statement list.  Pass it to finish_omp_for.
112         * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also OMP_FOR_PRE_BODY
113         into PRE_BODY stmt list, pass it to finish_omp_for.  Put all the
114         statements into sk_omp scope.
116 2005-10-25  Jakub Jelinek  <jakub@redhat.com>
118         PR c++/24516
119         * parser.c (struct cp_parser): Rename in_iteration_statement
120         field to in_statement.
121         (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
122         (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
123         (cp_parser_new, cp_parser_begin_omp_structured_block,
124         cp_parser_end_omp_structured_block, cp_parser_omp_for_loop): Adjust
125         for in_iteration_statement renaming.
126         (cp_parser_selection_statement): Save parser->in_iteration, or it
127         temporarily with IN_SWITCH_STMT for the
128         cp_parser_implicitly_scoped_statement call.
129         (cp_parser_iteration_statement): Adjust for in_iteration_statement
130         renaming.  Use IN_ITERATION_STMT rather than true.
131         (cp_parser_jump_statement): Adjust for in_iteration_statement
132         renaming and new values.  Don't error on break in a switch statement
133         within OMP_FOR or OpenMP structured block.
135         PR c++/24513
136         * parser.c (cp_parser_cache_group): Don't stop if next token
137         is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as well.  If current
138         token is CPP_PRAGMA, consume everything until CPP_PRAGMA_EOL
139         inclusive.
141 2005-10-24  Jakub Jelinek  <jakub@redhat.com>
143         PR c++/24502
144         * semantics.c (finish_omp_for): Handle MODOP_EXPR in addition to
145         MODIFY_EXPR.
147 2005-10-23  Richard Henderson  <rth@redhat.com>
149         * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
150         (bc_label): New.
151         (begin_bc_block, finish_bc_block): Use it.
152         (push_context, pop_context): Remove.
153         (cp_genericize): Don't use them.  Assert bc_label is null.
154         * semantics.c (finish_omp_clauses): Create a fake data element
155         of TYPE for probing ctors.
157 2005-10-23  Richard Henderson  <rth@redhat.com>
159         * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
160         (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
161         (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
162         (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
163         * semantics.c (finish_omp_clauses): Look through arrays when
164         looking up special member calls.  Also remove FIRSTPRIVATE when
165         LASTPRIVATE fails.
166         (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
167         (cxx_omp_clause_assign_op): New.
168         * cp-tree.h: Declare them.
170 2005-10-21  Richard Henderson  <rth@redhat.com>
172         * decl.c (check_previous_goto_1): Return false if error.
173         (check_switch_goto): Likewise.
174         (finish_case_label): Don't emit the case label on error.
175         * parser.c (struct cp_parser): Revert in_switch_statement_p changes.
176         (cp_parser_labeled_statement, cp_parser_selection_statement): Likewise.
177         (cp_parser_begin_omp_structured_block): Don't save...
178         (cp_parser_end_omp_structured_block): or restore in_switch_statement_p.
180 2005-10-21  Richard Henderson  <rth@redhat.com>
182         * semantics.c (finish_omp_threadprivate): Set decl_flags.u2sel
183         when necessary.
185 2005-10-21  Richard Henderson  <rth@redhat.com>
187         * decl.c (poplevel_named_label_1): Restore creation of the
188         bad_decls list.
189         (decl_jump_unsafe): Check for error_mark_node types.
190         (check_goto): Don't check cdtor_label.  Don't use identify_goto.
191         * semantics.c (finish_return_stmt): Do check_omp_return before
192         converting to cdtor_label goto.
194 2005-10-21  Richard Henderson  <rth@redhat.com>
196         PR c++/24451
197         * decl.c (check_omp_return): Return false on error.
198         * cp-tree.h (check_omp_return): Update decl.
199         * semantics.c (finish_return_stmt): Avoid adding return on error.
201 2005-10-21  Richard Henderson  <rth@redhat.com>
203         * cp-tree.h (struct language_function): Remove x_named_label_uses.
204         Change x_named_labels to a hashtable.
205         (check_omp_return): Declare.
206         * decl.c (struct named_label_use_entry): Rename from 
207         named_label_use_list.  Remove label_decl.
208         (struct named_label_entry): Rename from named_label_list.  Remove
209         old_value and next.  Change in_try_scope and in_catch_scope to bool.
210         Add in_omp_scope.
211         (pop_labels_1): New.
212         (pop_labels): Use it.
213         (pop_local_label, poplevel_named_label_1): New.
214         (poplevel): Use them.
215         (named_label_entry_hash, named_label_entry_eq): New.
216         (make_label_decl): Create named_labels.  Move label creation
217         bits from lookup_label.
218         (declare_local_label): Tidy.
219         (identify_goto): Split out from ...
220         (check_previous_goto_1): Add exited_omp argument.  Handle omp scopes.
221         (use_label): Merge into...
222         (check_goto): ... here.  Handle omp scopes.
223         (check_omp_return): New.
224         (check_previous_gotos): Merge into...
225         (define_label): ... here.
226         (save_function_data): Remove x_named_label_uses reference.
227         (finish_function): Likewise.
228         * name-lookup.h (sk_omp): New.
229         * name-lookup.c (begin_scope): Handle it.
230         * parser.c (cp_parser_omp_for): Don't create extra compound stmt.
231         (cp_parser_omp_sections): Likewise.
232         * semantics.c (finish_return_stmt): Call check_omp_return.
233         (begin_omp_structured_block): Use sk_omp.
234         (finish_omp_structured_block): Use do_poplevel.  Don't build a
235         MUST_NOT_THROW expression here.
236         (begin_omp_parallel, finish_omp_parallel): Don't create extra
237         compound statements.
239 2005-10-21  Diego Novillo  <dnovillo@redhat.com>
241         PR 24455
242         * cp/cp-tree.h (struct lang_decl_flags): Add field
243         threadprivate_p.
244         (CP_DECL_IS_THREADPRIVATE): Define.
245         * cp/semantics.c (finish_omp_threadprivate): Set.
246         Do not error out if CP_DECL_IS_THREADPRIVATE is set already.
247         * cp/decl.c (duplicate_decls): Merge CP_DECL_THREADPRIVATE_P.
249 2005-10-20  Richard Henderson  <rth@redhat.com>
251         * cp-gimplify.c (cp_gimplify_omp_for): New.
252         (cp_gimplify_expr): Call it.
253         * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
254         * parser.c (struct cp_parser): Rename in_iteration_statement_p
255         to in_iteration_statement and change to unsigned char.  Similarly
256         with in_switch_statement.  Update all users.
257         (IN_OMP_BLOCK, IN_OMP_FOR): New.
258         (cp_parser_labeled_statement): Diagnose case labels binding closer
259         to an openmp block nested than the switch.
260         (cp_parser_jump_statement): Diagnose break and continue labels
261         binding closer to an openmp block than an iteration or switch.
262         (cp_parser_omp_for_loop): Mark in_iteration_statement for an omp for.
263         (cp_parser_begin_omp_structured_block): New.
264         (cp_parser_end_omp_structured_block): New.
265         (cp_parser_omp_structured_block): Use them.
266         (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
267         (cp_parser_omp_parallel): Likewise.
269 2005-10-20  Richard Henderson  <rth@redhat.com>
271         * semantics.c (begin_omp_structured_block): New.
272         (finish_omp_structured_block): New.
273         (begin_omp_parallel, finish_omp_parallel): Use them.
274         * parser.c (cp_parser_omp_structured_block): Likewise.
275         (cp_parser_omp_for): Likewise.
276         (cp_parser_omp_sections_scope): Likewise.
277         * cp-tree.h: Declare them.
279 2005-10-20  Richard Henderson  <rth@redhat.com>
281         * parser.c (cp_parser_omp_master): Return the statement.
282         (cp_parser_omp_ordered): Likewise.
283         (cp_parser_omp_construct): Set the locus for them.
285 2005-10-19  Richard Henderson  <rth@redhat.com>
287         * semantics.c (finish_omp_atomic): Revert to uses_template_parms.
289 2005-10-19  Richard Henderson  <rth@redhat.com>
291         * semantics.c (finish_omp_clauses): Avoid DECL_THREAD_LOCAL_P
292         on a PARM_DECL.  Remove some stub asserts guaranteed to fail.
294 2005-10-19  Richard Henderson  <rth@redhat.com>
296         * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
297         (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
298         * parser.c (cp_parser_omp_clause_copyin): Remove.
299         (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
300         Call finish_omp_clauses.
301         (cp_parser_omp_clause_if): Don't do error checking here.
302         (cp_parser_omp_clause_num_threads): Likewise.
303         (cp_parser_omp_clause_schedule): Likewise.
304         (cp_parser_omp_atomic): Use finish_omp_atomic.
305         (cp_parser_omp_for_loop): Don't discard DECL_EXPR.  Don't decompose
306         assignment statment here.  Use finish_omp_for.
307         * pt.c (tsubst_omp_clauses): New.
308         (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
309         OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
310         * semantics.c (finish_omp_clauses): New.
311         (begin_omp_parallel, finish_omp_parallel): Know Less about the
312         internals of the stmt_list stack.
313         (finish_omp_for, finish_omp_atomic): New.
315 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
317         * semantics.c (cxx_omp_predetermined_sharing): New function.
318         * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
319         * cp-objcp-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
321 2005-10-18  Richard Henderson  <rth@redhat.com>
323         * parser.c (cp_parser_omp_single): Use make_node and accessors
324         instead of build.
326 2005-10-17  Richard Henderson  <rth@redhat.com>
328         * parser.c (cp_parser_omp_for_loop): Handle declarations.
330 2005-10-12  Richard Henderson  <rth@redhat.com>
332         * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
333         * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
334         (finish_omp_threadprivate): Declare.
335         * parser.c (struct cp_lexer): Add in_pragma.
336         (cp_lexer_consume_token): Don't consume a PRAGMA_EOL when in_pragma.
337         (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
338         (cp_parser_skip_to_end_of_statement): Likewise.
339         (cp_parser_skip_to_end_of_block_or_statement): Likewise.
340         (cp_parser_skip_to_closing_brace): Likewise.
341         (cp_parser_skip_to_pragma_eol): Reset in_pragma.
342         (cp_parser_require_pragma_eol): New.
343         (cp_parser_statement): Add in_compound argument; update all callers.
344         Restart if a non-statement pragma seen outside a compound.
345         (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
346         (cp_parser_declaration_seq_opt): Likewise.
347         (cp_parser_member_specification_opt): Likewise.
348         (cp_parser_function_definition_after_decl): Likewise.
349         (cp_parser_skip_until_found): Likewise.
350         (cp_parser_cache_group): Likewise.
351         (enum pragma_omp_clause, cp_parser_omp_clause_name,
352         check_no_duplicate_clause, cp_parser_omp_var_list_no_open, 
353         cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
354         cp_parser_omp_clause_default, cp_parser_omp_clause_if,
355         cp_parser_omp_clause_nowait, cp_parser_omp_clause_num_threads,
356         cp_parser_omp_clause_ordered, cp_parser_omp_clause_reduction,
357         cp_parser_omp_clause_schedule, cp_parser_omp_all_clauses,
358         cp_parser_omp_structured_block, cp_parser_omp_atomic,
359         cp_parser_omp_barrier, cp_parser_omp_critical, cp_parser_omp_flush,
360         cp_parser_omp_for_loop, cp_parser_omp_for, cp_parser_omp_master,
361         cp_parser_omp_ordered, cp_parser_omp_sections_scope, 
362         cp_parser_omp_sections, cp_parser_omp_parallel, cp_parser_omp_single,
363         cp_parser_omp_threadprivate, cp_parser_omp_construct): New.
364         (cp_parser_pragma): Handle OpenMP pragmas.
365         * semantics.c (finish_omp_threadprivate): New.
366         (begin_omp_parallel, finish_omp_parallel): New.
368 2005-10-11  Richard Henderson  <rth@redhat.com>
370         * parser.c (struct cp_token): Add pragma_kind.
371         (eof_token): Initialize it.
372         (cp_lexer_handle_pragma): Remove.
373         (cp_parser_initial_pragma): New.
374         (cp_lexer_new_main): Use it.
375         (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
376         (cp_lexer_print_token): Don't handle CPP_PRAGMA.
377         (cp_parser_skip_to_pragma_eol): New.
378         (cp_parser_error): Use it.
379         (pragma_lex): New.
381 2005-10-09  Richard Henderson  <rth@redhat.com>
383         * lex.c (parse_strconst_pragma): Update for c_lex name change.
384         (handle_pragma_java_exceptions): Likewise.
385         * parser.c (cp_lexer_new_main): Likewise.
387 2005-10-06  Richard Henderson  <rth@redhat.com>
389         * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
390         (cp_lexer_handle_pragma): Comment out cpp_handle_deferred_pragma.
392 2005-10-01  Richard Henderson  <rth@redhat.com>
394         * name-lookup.c (lookup_name): Remove prefer_type argument.
395         (lookup_name_prefer_type): New function.
396         * name-lookup.h (lookup_name_prefer_type): Declare it.
397         * decl.c (lookup_and_check_tag): Use it.
398         * pt.c (tsubst_friend_class): Likewise. Update for lookup_name change.
399         (lookup_template_class, tsubst_copy_and_build): Likewise.