PR fortran/61138
[official-gcc.git] / gcc / fortran / ChangeLog
blob10cba1aba1a9a1934af5fb0c18e9cc32fa286ad1
1 2015-03-21  Mikael Morin  <mikael@gcc.gnu.org>
3         PR fortran/61138
4         * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
5         field before reusing LSE.
7 2015-03-19  Paul Thomas  <pault@gcc.gnu.org>
9         Backport from mainline
10         PR fortran/59198
11         * trans-types.c (gfc_get_derived_type): If an abstract derived
12         type with procedure pointer components has no other type of
13         component, return the backend_decl. Otherwise build the
14         components if any of the non-procedure pointer components have
15         no backend_decl.
17 2015-03-12  Mikael Morin  <mikael@gcc.gnu.org>
19         PR fortran/60898
20         * resolve.c (resolve_symbol): Check that the symbol found by
21         name lookup really is the current symbol being resolved.
23 2015-03-10  Paul Thomas  <pault@gcc.gnu.org>
25         Backported from mainline
26         PR fortran/65024
27         * trans-expr.c (gfc_conv_component_ref): If the component
28         backend declaration is missing and the derived type symbol is
29         available in the reference, call gfc_build_derived_type.
31 2015-02-13  Mikael Morin  <mikael@gcc.gnu.org>
33         PR fortran/63744
34         * module.c (check_for_ambiguous): Change argument type
35         from gfc_symbol to gfc_symtree.  Check local (symtree) name
36         instead of original (symbol) name.
37         (read_module): Update caller.
39 2015-02-12  Paul Thomas  <pault@gcc.gnu.org>
41         Backported from mainline
42         2015-02-12  Paul Thomas  <pault@gcc.gnu.org>
44         PR fortran/64932
45         * trans-stmt.c (gfc_trans_deallocate): If a component array
46         expression is not a descriptor type and it is a derived type
47         that has allocatable components and is not finalizable, then
48         deallocate the allocatable components.
50 2015-02-03  Steven G. Kargl  <kargl@gcc.gnu.org>
52         * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
54 2015-01-27  Paul Thomas  <pault@gcc.gnu.org>
56         Backport from mainline
57         PR fortran/62044
58         * resolve.c (resolve_allocate_expr): If the default initializer
59         is NULL, keep the original MOLD expression so that the correct
60         typespec is available.
62 2015-01-27  Tobias Burnus  <burnus@net-b.de>
64         PR fortran/64771
65         * interface.c (check_dummy_characteristics): Fix coarray handling.
67 2015-01-26  Janus Weil  <janus@gcc.gnu.org>
69         Backport from mainline
70         PR fortran/64230
71         * class.c (finalize_component): New argument 'sub_ns'. Insert code to
72         check if 'expr' is associated.
73         (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
74         'ptr2'. Pass 'sub_ns' to finalize_component.
76 2015-01-24  Thomas Koenig  <tkoenig@netcologne.de>
78         Backport from trunk
79         PR fortran/57023
80         * dependency.c (callback_dummy_intent_not_int):  New function.
81         (dummy_intent_not_in):  New function.
82         (gfc_full_array_ref_p):  Use dummy_intent_not_in.
84 2015-01-24  Janus Weil  <janus@gcc.gnu.org>
86         Backport from mainline
87         PR fortran/60922
88         * class.c (finalize_component): Apply the check for 'fini_coarray' only
89         to coarray components.
91 2015-01-14  Jakub Jelinek  <jakub@redhat.com>
93         Backported from mainline
94         2015-01-13  Jakub Jelinek  <jakub@redhat.com>
96         PR fortran/64528
97         * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
98         on dummy args with VALUE attribute.
100 2015-01-12  Janus Weil  <janus@gcc.gnu.org>
102         Backport from mainline
103         PR fortran/63733
104         * interface.c (gfc_extend_expr): Look for type-bound operators before
105         non-typebound ones.
107 2015-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
109         Backport from trunk
110         PR fortran/56867
111         * trans-array.c (gfc_conv_resolve_dependencies):  Also check
112         dependencies when there may be substrings of character arrays.
114 2014-12-23  Janus Weil  <janus@gcc.gnu.org>
116         Backport from mainline
117         PR fortran/64244
118         * resolve.c (resolve_typebound_call): New argument to pass out the
119         non-overridable attribute of the specific procedure.
120         (resolve_typebound_subroutine): Get overridable flag from
121         resolve_typebound_call.
123 2014-11-28  Jakub Jelinek  <jakub@redhat.com>
125         Backported from mainline
126         2014-11-24  Jakub Jelinek  <jakub@redhat.com>
128         PR fortran/63938
129         * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
130         simple enough for goa_lhs_expr_p.
132 2014-10-30  Release Manager
134         * GCC 4.9.2 released.
136 2014-10-10  Jakub Jelinek  <jakub@redhat.com>
138         PR fortran/59488
139         * trans-openmp.c (gfc_omp_predetermined_sharing): Return
140         OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
142 2014-09-03  Marek Polacek  <polacek@redhat.com>
144         Backport from trunk
145         PR fortran/62270
146         * interface.c (compare_parameter): Fix condition.
147         * trans-expr.c (gfc_conv_procedure_call): Likewise.
149 2014-08-29  Jeffrey Armstrong  <jeffrey.armstrong@approximatrix.com>
151         Backport from trunk
152         PR fortran/62215
153         * module.c (gfc_dump_module): Unlink old module file before
154         renaming new one.
156 2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
158         Backport from trunk
159         PR fortran/62214
160         * frontend-passes.c (optimize_binop_array_assignment):
161         Do not try to optimize the array assignment for string
162         concatenation.
164 2014-08-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
166         Backport from trunk
167         PR fortran/62142
168         * trans-expr.c (is_runtime_conformable):  Add NULL pointer checks.
170 2014-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
172         Backport from trunk
173         PR fortran/62106
174         * gfortran.h (symbol_attribute):  Add fe_temp flag.
175         * frontend-passes.c (is_fe_temp):  New function.
176         (create_var):  Don't add a temporary for an already
177         created variable or for a constant.
178         (combine_ARRAY_constructor):  Remove special handling
179         for constants.
181 2014-08-15  Jakub Jelinek  <jakub@redhat.com>
182             Tobias Burnus  <burnus@net-b.de>
184         PR fortran/62131
185         * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr
186         is allocatable, rather than whenever var->attr.allocatable.
188 2014-08-15  Jakub Jelinek  <jakub@redhat.com>
190         PR fortran/62107
191         * trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
192         or allocatable passed by reference.
193         (gfc_trans_omp_clauses) <case OMP_LIST_MAP>: Likewise.
195 2014-08-14  Jakub Jelinek  <jakub@redhat.com>
197         PR fortran/62076
198         * openmp.c (gfc_match_omp_clauses): When failed to match
199         operator name, defined op name or name, set buffer to
200         empty string.  Don't call gfc_find_omp_udr if buffer is empty
201         string.
202         (gfc_match_omp_declare_reduction): Call gfc_undo_symbols ()
203         before calling gfc_free_omp_udr.
205 2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
207         Backport from trunk
208         PR fortran/61999
209         * simplify.c (gfc_simplify_dot_product): Convert types of
210         vectors before calculating the result.
212 2014-07-19  Paul Thomas  <pault@gcc.gnu.org>
214         Backport from mainline
215         PR fortran/61780
216         * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
217         that elements are skipped. This then correctly aligns 'reverse'
218         with the scalarizer loops.
220 2014-07-16  Release Manager
222         * GCC 4.9.1 released.
224 2014-07-07  Paul Thomas  <pault@gcc.gnu.org>
226         PR fortran/61459
227         PR fortran/58883
228         * trans-expr.c (fcncall_realloc_result): Use the natural type
229         for the address expression of 'res_desc'.
231 2014-07-07  Dominique d'Humieres <dominiq@lps.ens.fr>
232             Mikael Morin <mikael@gcc.gnu.org>
234         PR fortran/41936
235         * trans-expr.c (gfc_conv_expr_reference): Deallocate array
236         components.
238 2014-07-02  Jakub Jelinek  <jakub@redhat.com>
239             Fritz Reese  <Reese-Fritz@zai.com>
241         * decl.c (variable_decl): Reject old style initialization
242         for derived type components.
244 2014-06-30  Jakub Jelinek  <jakub@redhat.com>
246         * module.c (MOD_VERSION): Revert back to 12.
247         (MOD_VERSION_OMP4): Define.
248         (module_omp4): New variable.
249         (mio_symbol): Call mio_omp_declare_simd only if module_omp4.
250         (read_module): Load omp udrs only if module_omp4.
251         (write_module): Write omp udrs only if module_omp4.
252         (find_omp_declare_simd): New function.
253         (gfc_dump_module): Compute module_omp4.  Use MOD_VERSION_OMP4
254         if module_omp4.
255         (gfc_use_module): Handle MOD_VERSION_OMP4, set module_omp4.
257         Backported from mainline
258         2014-06-25  Jakub Jelinek  <jakub@redhat.com>
260         * trans.h (gfc_omp_clause_linear_ctor): New prototype.
261         * trans-openmp.c (gfc_omp_linear_clause_add_loop,
262         gfc_omp_clause_linear_ctor): New functions.
263         (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
264         correct type.  Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
265         * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
267         2014-06-24  Jakub Jelinek  <jakub@redhat.com>
269         * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
270         of n->udr.
271         * f95-lang.c (gfc_init_builtin_functions): Initialize
272         BUILT_IN_ASSUME_ALIGNED.
273         * gfortran.h (gfc_omp_namelist): Change udr field type to
274         struct gfc_omp_namelist_udr.
275         (gfc_omp_namelist_udr): New type.
276         (gfc_get_omp_namelist_udr): Define.
277         (gfc_resolve_code): New prototype.
278         * match.c (gfc_free_omp_namelist): Free name->udr.
279         * module.c (intrinsics): Add INTRINSIC_USER.
280         (fix_mio_expr): Likewise.
281         (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
282         * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
283         (gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
284         Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
285         (struct resolve_omp_udr_callback_data): New type.
286         (resolve_omp_udr_callback, resolve_omp_udr_callback2,
287         resolve_omp_udr_clause): New functions.
288         (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
289         here.
290         (omp_udr_callback): Don't check for implicitly declared functions
291         here.
292         (gfc_resolve_omp_udr): Don't call gfc_resolve.  Don't check for
293         implicitly declared subroutines here.
294         * resolve.c (resolve_function): If value.function.isym is non-NULL,
295         consider it already resolved.
296         (resolve_code): Renamed to ...
297         (gfc_resolve_code): ... this.  No longer static.
298         (gfc_resolve_blocks, generate_component_assignments, resolve_codes):
299         Adjust callers.
300         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
301         by reference type (C_PTR) variables.
302         (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
303         (gfc_trans_omp_udr_expr): Remove.
304         (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
305         Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
306         expand it as assignment or subroutine call.  Don't initialize
307         value.function.isym.
309         2014-06-18  Tobias Burnus  <burnus@net-b.de>
311         * gfortran.texi (OpenMP): Update refs to OpenMP 4.0.
312         * intrinsic.texi (OpenMP Modules): Ditto.
314         2014-06-18  Jakub Jelinek  <jakub@redhat.com>
316         * cpp.c (cpp_define_builtins): Change _OPENMP macro to
317         201307.
318         * dump-parse-tree.c (show_omp_namelist): Add list_type
319         argument.  Adjust for rop being u.reduction_op now,
320         handle depend_op or map_op.
321         (show_omp_node): Adjust callers.  Print some new
322         OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
323         becoming a single OMP_LIST_DEPEND.
324         * f95-lang.c (gfc_handle_omp_declare_target_attribute): New
325         function.
326         (gfc_attribute_table): New variable.
327         (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
328         * frontend-passes.c (gfc_code_walker): Handle new OpenMP target
329         EXEC_OMP_* codes and new clauses.
330         * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
331         ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
332         ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
333         ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
334         ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
335         ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
336         ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
337         ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
338         ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
339         ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
340         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
341         ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
342         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
343         ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
344         ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
345         ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
346         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
347         ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
348         ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
349         ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
350         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
351         (symbol_attribute): Add omp_declare_target field.
352         (gfc_omp_depend_op, gfc_omp_map_op): New enums.
353         (gfc_omp_namelist): Replace rop field with union
354         containing reduction_op, depend_op and map_op.
355         (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
356         (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
357         (gfc_omp_clauses): Add num_teams, device, thread_limit,
358         dist_sched_kind, dist_chunk_size fields.
359         (gfc_common_head): Add omp_declare_target field.
360         (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
361         EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
362         EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
363         EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
364         EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
365         EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
366         EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
367         EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
368         EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
369         EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
370         EXEC_OMP_TARGET_UPDATE.
371         (gfc_add_omp_declare_target): New prototype.
372         * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
373         gfc_match_omp_distribute_parallel_do,
374         gfc_match_omp_distribute_parallel_do_simd,
375         gfc_match_omp_distribute_simd, gfc_match_omp_target,
376         gfc_match_omp_target_data, gfc_match_omp_target_teams,
377         gfc_match_omp_target_teams_distribute,
378         gfc_match_omp_target_teams_distribute_parallel_do,
379         gfc_match_omp_target_teams_distribute_parallel_do_simd,
380         gfc_match_omp_target_teams_distribute_simd,
381         gfc_match_omp_target_update, gfc_match_omp_teams,
382         gfc_match_omp_teams_distribute,
383         gfc_match_omp_teams_distribute_parallel_do,
384         gfc_match_omp_teams_distribute_parallel_do_simd,
385         gfc_match_omp_teams_distribute_simd): New prototypes.
386         * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
387         (attr_bits): Likewise.
388         (mio_symbol_attribute): Handle omp_declare_target attribute.
389         (gfc_free_omp_clauses): Free num_teams, device, thread_limit
390         and dist_chunk_size expressions.
391         (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
392         OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN,
393         OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
394         OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED,
395         OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL,
396         OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND,
397         OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH,
398         OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN,
399         OMP_CLAUSE_UNIFORM): Use 1U instead of 1.
400         (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
401         OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
402         OMP_CLAUSE_DIST_SCHEDULE): Define.
403         (gfc_match_omp_clauses): Change mask parameter to unsigned int.
404         Adjust for rop becoming u.reduction_op.  Disallow inbranch with
405         notinbranch.  For depend clause, always create OMP_LIST_DEPEND
406         and fill in u.depend_op.  Handle num_teams, device, map,
407         to, from, thread_limit and dist_schedule clauses.
408         (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
409         OMP_CLAUSE_NOTINBRANCH.
410         (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
411         OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
412         OMP_DISTRIBUTE_CLAUSES): Define.
413         (match_omp): New function.
414         (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
415         gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
416         gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
417         gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
418         gfc_match_omp_task): Rewritten using match_omp.
419         (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
420         Diagnose if the directives are followed by unexpected junk.
421         (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
422         gfc_match_omp_distribute_parallel_do_simd,
423         gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
424         gfc_match_omp_target, gfc_match_omp_target_data,
425         gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
426         gfc_match_omp_target_teams_distribute_parallel_do,
427         gfc_match_omp_target_teams_distribute_parallel_do_simd,
428         gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
429         gfc_match_omp_teams, gfc_match_omp_teams_distribute,
430         gfc_match_omp_teams_distribute_parallel_do,
431         gfc_match_omp_teams_distribute_parallel_do_simd,
432         gfc_match_omp_teams_distrbute_simd): New functions.
433         * openmp.c (resolve_omp_clauses): Adjust for
434         OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND.  Handle
435         OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
436         dist_chunk_size and thread_limit.
437         (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
438         ctx.sharing_clauses.  Call gfc_resolve_omp_do_blocks for various
439         new EXEC_OMP_* codes.
440         (resolve_omp_do): Handle various new EXEC_OMP_* codes.
441         (gfc_resolve_omp_directive): Likewise.
442         (gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
443         * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
444         offloading related directives.
445         (case_executable): Add ST_OMP_TARGET_UPDATE.
446         (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
447         ST_OMP_DISTRIBUTE*.
448         (case_decl): Add ST_OMP_DECLARE_TARGET.
449         (gfc_ascii_statement): Handle new ST_OMP_* codes.
450         (parse_omp_do): Handle various new ST_OMP_* codes.
451         (parse_executable): Likewise.
452         * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
453         codes.
454         (resolve_code): Likewise.
455         (resolve_symbol): Change that !$OMP DECLARE TARGET variables
456         are saved.
457         * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
458         * symbol.c (check_conflict): Check omp_declare_target conflicts.
459         (gfc_add_omp_declare_target): New function.
460         (gfc_copy_attr): Copy omp_declare_target.
461         * trans.c (trans_code): Handle various new EXEC_OMP_* codes.
462         * trans-common.c (build_common_decl): Add "omp declare target"
463         attribute if needed.
464         * trans-decl.c (add_attributes_to_decl): Likewise.
465         * trans.h (gfc_omp_finish_clause): New prototype.
466         * trans-openmp.c (gfc_omp_finish_clause): New function.
467         (gfc_trans_omp_reduction_list): Adjust for rop being renamed
468         to u.reduction_op.
469         (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
470         change to OMP_LIST_DEPEND and fix up depend handling.
471         Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
472         thread_limit, device, dist_chunk_size and dist_sched_kind.
473         (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
474         (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
475         GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
476         GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
477         (gfc_split_omp_clauses): Handle splitting of clauses for new
478         EXEC_OMP_* codes.
479         (gfc_trans_omp_do_simd): Add pblock argument, adjust for being
480         callable for combined constructs.
481         (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
482         (gfc_trans_omp_distribute, gfc_trans_omp_teams,
483         gfc_trans_omp_target, gfc_trans_omp_target_data,
484         gfc_trans_omp_target_update): New functions.
485         (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
486         new EXEC_OMP_* codes.
488         2014-06-10  Jakub Jelinek  <jakub@redhat.com>
490         PR fortran/60928
491         * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
492         like -fopenmp.
493         * openmp.c (resolve_omp_clauses): Remove allocatable components
494         diagnostics.  Add associate-name and intent(in) pointer
495         diagnostics for various clauses, diagnose procedure pointers in
496         reduction clause.
497         * parse.c (match_word_omp_simd): New function.
498         (matchs, matcho): New macros.
499         (decode_omp_directive): Change match macros to either matchs
500         or matcho.  Handle -fopenmp-simd.
501         (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
502         * scanner.c (skip_free_comments, skip_fixed_comments, include_line):
503         Likewise.
504         * trans-array.c (get_full_array_size): Rename to...
505         (gfc_full_array_size): ... this.  No longer static.
506         (duplicate_allocatable): Adjust caller.  Add NO_MEMCPY argument
507         and handle it.
508         (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
509         duplicate_allocatable callers.
510         (gfc_duplicate_allocatable_nocopy): New function.
511         (structure_alloc_comps): Adjust g*_full_array_size and
512         duplicate_allocatable caller.
513         * trans-array.h (gfc_full_array_size,
514         gfc_duplicate_allocatable_nocopy): New prototypes.
515         * trans-common.c (create_common): Call gfc_finish_decl_attrs.
516         * trans-decl.c (gfc_finish_decl_attrs): New function.
517         (gfc_finish_var_decl, create_function_arglist,
518         gfc_get_fake_result_decl): Call it.
519         (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
520         don't allocate it again.
521         (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
522         associate-names.
523         * trans.h (gfc_finish_decl_attrs): New prototype.
524         (struct lang_decl): Add scalar_allocatable and scalar_pointer
525         bitfields.
526         (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
527         GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
528         GFC_DECL_ASSOCIATE_VAR_P): Define.
529         (GFC_POINTER_TYPE_P): Remove.
530         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
531         GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
532         GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
533         (gfc_omp_predetermined_sharing): Associate-names are predetermined.
534         (enum walk_alloc_comps): New.
535         (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
536         gfc_walk_alloc_comps): New functions.
537         (gfc_omp_private_outer_ref): Return true for scalar allocatables or
538         decls with allocatable components.
539         (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
540         gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
541         allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
542         allocatables and decls with allocatable components.
543         (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
544         arrays here.
545         (gfc_trans_omp_reduction_list): Call
546         gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
547         (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
548         (gfc_trans_omp_parallel_do_simd): Likewise.
549         * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
550         (gfc_get_derived_type): Call gfc_finish_decl_attrs.
552         2014-06-06  Jakub Jelinek  <jakub@redhat.com>
554         * dump-parse-tree.c (show_omp_namelist): Dump reduction
555         id in each list item.
556         (show_omp_node): Only handle OMP_LIST_REDUCTION, not
557         OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST.  Don't
558         dump reduction id here.
559         * frontend-passes.c (dummy_code_callback): Renamed to...
560         (gfc_dummy_code_callback): ... this.  No longer static.
561         (optimize_reduction): Use gfc_dummy_code_callback instead of
562         dummy_code_callback.
563         * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
564         (symbol_attribute): Add omp_udr_artificial_var bitfield.
565         (gfc_omp_reduction_op): New enum.
566         (gfc_omp_namelist): Add rop and udr fields.
567         (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
568         OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
569         OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
570         OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
571         (OMP_LIST_REDUCTION): New.
572         (gfc_omp_udr): New type.
573         (gfc_get_omp_udr): Define.
574         (gfc_symtree): Add n.omp_udr field.
575         (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
576         (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
577         gfc_dummy_code_callback): New prototypes.
578         * match.h (gfc_match_omp_declare_reduction): New prototype.
579         * module.c (MOD_VERSION): Increase to 13.
580         (omp_declare_reduction_stmt): New array.
581         (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
582         New functions.
583         (read_module): Read OpenMP user defined reductions.
584         (write_module): Write OpenMP user defined reductions.
585         * openmp.c: Include arith.h.
586         (gfc_free_omp_udr, gfc_find_omp_udr): New functions.
587         (gfc_match_omp_clauses): Handle user defined reductions.
588         Store reduction kind into gfc_omp_namelist instead of using
589         several OMP_LIST_* entries.
590         (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
591         gfc_match_omp_declare_reduction): New functions.
592         (resolve_omp_clauses): Adjust for reduction clauses being only
593         in OMP_LIST_REDUCTION list.  Diagnose missing UDRs.
594         (struct omp_udr_callback_data): New type.
595         (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
596         functions.
597         * parse.c (decode_omp_directive): Handle !$omp declare reduction.
598         (case_decl): Add ST_OMP_DECLARE_REDUCTION.
599         (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
600         * resolve.c (resolve_fl_variable): Allow len=: or len=* on
601         sym->attr.omp_udr_artificial_var symbols.
602         (resolve_types): Call gfc_resolve_omp_udrs.
603         * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
604         use parent ns instead of gfc_current_ns.
605         (gfc_get_sym_tree): Don't insert symbols into
606         namespaces with omp_udr_ns set.
607         (free_omp_udr_tree): New function.
608         (gfc_free_namespace): Call it.
609         * trans-openmp.c (struct omp_udr_find_orig_data): New type.
610         (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
611         (gfc_trans_omp_array_reduction): Renamed to...
612         (gfc_trans_omp_array_reduction_or_udr): ... this.  Remove SYM
613         argument, instead pass gfc_omp_namelist pointer N.  Handle
614         user defined reductions.
615         (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
616         Handle user defined reductions and reduction ops in gfc_omp_namelist.
617         (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
618         list.
619         (gfc_split_omp_clauses): Likewise.
621         2014-05-12  Tobias Burnus  <burnus@net-b.de>
623         PR fortran/60127
624         * openmp.c (resolve_omp_do): Reject do concurrent loops.
626         2014-05-11  Jakub Jelinek  <jakub@redhat.com>
628         * gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
629         ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
630         ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
631         ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
632         ST_OMP_DECLARE_SIMD.
633         (gfc_omp_namelist): New typedef.
634         (gfc_get_omp_namelist): Define.
635         (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
636         OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
637         (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
638         (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
639         Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
640         simdlen_expr fields.
641         (gfc_omp_declare_simd): New typedef.
642         (gfc_get_omp_declare_simd): Define.
643         (gfc_namespace): Add omp_declare_simd field.
644         (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
645         EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
646         EXEC_OMP_PARALLEL_DO_SIMD.
647         (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
648         and GFC_OMP_ATOMIC_SWAP.
649         (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
650         (gfc_free_omp_namelist, gfc_free_omp_declare_simd,
651         gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
652         prototypes.
653         * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
654         * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
655         * openmp.c (gfc_free_omp_clauses): Free safelen_expr and
656         simdlen_expr.  Use gfc_free_omp_namelist instead of
657         gfc_free_namelist.
658         (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
659         functions.
660         (gfc_match_omp_variable_list): Add end_colon, headp and
661         allow_sections arguments.  Handle parsing of array sections.
662         Use *omp_namelist* instead of *namelist* data structure and
663         functions/macros.  Allow termination at : character.
664         (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
665         OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
666         OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
667         (gfc_match_omp_clauses): Change first and needs_space variables
668         into arguments with default values.  Parse inbranch, notinbranch,
669         proc_bind, safelen, simdlen, uniform, linear, aligned and
670         depend clauses.
671         (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
672         (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
673         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
674         (gfc_match_omp_do_simd): New function.
675         (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
676         data structure and functions/macros.
677         (gfc_match_omp_simd, gfc_match_omp_declare_simd,
678         gfc_match_omp_parallel_do_simd): New functions.
679         (gfc_match_omp_atomic): Handle seq_cst clause.  Handle atomic swap.
680         (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
681         gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
682         functions.
683         (resolve_omp_clauses): Add where, omp_clauses and ns arguments.
684         Use *omp_namelist* instead of *namelist* data structure and
685         functions/macros.  Resolve uniform, aligned, linear, depend,
686         safelen and simdlen clauses.
687         (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
688         addition, recognize atomic swap.
689         (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
690         of gfc_namelist.  Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
691         EXEC_OMP_PARALLEL_DO.
692         (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
693         data structure and functions/macros.
694         (resolve_omp_do): Likewise.  Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
695         EXEC_OMP_PARALLEL_DO_SIMD.
696         (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
697         EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL.  Adjust
698         resolve_omp_clauses caller.
699         (gfc_resolve_omp_declare_simd): New function.
700         * parse.c (decode_omp_directive): Parse cancellation point, cancel,
701         declare simd, end do simd, end simd, end parallel do simd,
702         end taskgroup, parallel do simd, simd and taskgroup directives.
703         (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
704         (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
705         ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
706         (case_decl): Add ST_OMP_DECLARE_SIMD.
707         (gfc_ascii_statement): Handle ST_OMP_CANCEL,
708         ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
709         ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
710         ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
711         ST_OMP_DECLARE_SIMD.
712         (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
713         ST_OMP_PARALLEL_DO_SIMD.
714         (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
715         (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
716         ST_OMP_PARALLEL_DO_SIMD.
717         (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
718         ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
719         * trans-decl.c (gfc_get_extern_function_decl,
720         gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
721         needed.
722         * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
723         EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD.  Walk
724         safelen_expr and simdlen_expr.  Walk expressions in gfc_omp_namelist
725         of depend, aligned and linear clauses.
726         * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
727         and EXEC_OMP_PARALLEL_DO_SIMD.
728         (gfc_free_omp_namelist): New function.
729         * dump-parse-tree.c (show_namelist): Removed.
730         (show_omp_namelist): New function.
731         (show_omp_node): Handle OpenMP 4.0 additions.
732         (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
733         EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
734         EXEC_OMP_TASKGROUP.
735         * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
736         gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
737         gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
738         gfc_match_omp_taskgroup): New prototypes.
739         * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
740         argument, handle it.  Allow current_function_decl to be NULL.
741         (gfc_trans_omp_variable_list): Add declare_simd argument, pass
742         it through to gfc_trans_omp_variable and disregard whether
743         sym is referenced if declare_simd is true.  Work on gfc_omp_namelist
744         instead of gfc_namelist.
745         (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
746         gfc_namelist.  Adjust gfc_trans_omp_variable caller.
747         (gfc_trans_omp_clauses): Add declare_simd argument, pass it through
748         to gfc_trans_omp_variable{,_list} callers.  Work on gfc_omp_namelist
749         instead of gfc_namelist.  Handle inbranch, notinbranch, safelen,
750         simdlen, depend, uniform, linear, proc_bind and aligned clauses.
751         Handle cancel kind.
752         (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
753         adjust for GFC_OMP_ATOMIC_* changes.
754         (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
755         functions.
756         (gfc_trans_omp_do): Add op argument, handle simd translation into
757         generic.
758         (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
759         GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
760         GFC_OMP_MASK_PARALLEL): New.
761         (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
762         (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
763         (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
764         functions.
765         (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
766         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
767         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
768         Adjust gfc_trans_omp_do caller.
769         (gfc_trans_omp_declare_simd): New function.
770         * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
771         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
772         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
773         For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
774         gfc_free_namelist.
775         * module.c (omp_declare_simd_clauses): New variable.
776         (mio_omp_declare_simd): New function.
777         (mio_symbol): Call it.
778         * trans.c (trans_code): Handle EXEC_OMP_CANCEL,
779         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
780         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
781         * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
782         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
783         (resolve_code): Handle EXEC_OMP_CANCEL,
784         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
785         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
786         (resolve_types): Call gfc_resolve_omp_declare_simd.
788 2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
790         Backport from trunk.
791         PR fortran/45187
792         * trans-decl.c (gfc_create_module_variable): Don't create
793         Cray-pointee decls twice.
795 2014-06-09  Paul Thomas  <pault@gcc.gnu.org>
797         Backport from trunk.
798         PR fortran/61406
799         * trans-stmt.c (trans_associate_var): Check that array
800         constructors are constant for direct reference.
802 2014-06-05  Richard Biener  <rguenther@suse.de>
804         PR fortran/61418
805         * gfortranspec.c (spec_file): Remove.
806         (find_spec_file): Likewise.
807         (lang_specific_driver): Do not look for specs file in -L
808         or append -specs command line argument.
809         (lang_specific_pre_link): Always %:include libgfortran.spec.
811 2014-05-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
813         PR fortran/60834
814         Backport from mainline
815         * frontend-passes.c (in_assoc_list):  New variable.
816         (optimize_namespace):  Initialize in_assoc_list
817         (combine_array_constructor): Don't try to combine
818         assoc lists.
819         (gfc_code_walker):  Keep track of in_assoc_list.
821 2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
823         Backport from mainline
824         PR libfortran/61310
825         * intrinsics.texi (CTIME): Remove mention of locale-dependent
826         behavior.
828 2014-04-22  Tobias Burnus  <burnus@net-b.de>
830         Backport from mainline
831         2014-04-11  Tobias Burnus  <burnus@net-b.de>
833         PR fortran/58880
834         PR fortran/60495
835         * resolve.c (gfc_resolve_finalizers): Ensure that vtables
836         and finalization wrappers are generated.
838 2014-04-22  Release Manager
840         * GCC 4.9.0 released.
842 2014-04-13  Paul Thomas  <pault@gcc.gnu.org>
844         PR fortran/58085
845         PR fortran/60717
846         * trans.h: Add 'use_offset' bitfield to gfc_se.
847         * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
848         as a trigger to unconditionally recalculate the offset for
849         array slices and constant arrays.
850         trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
851         trans-stmt.c (trans_associate_var): Ditto.
852         (gfc_conv_procedure_call): Ditto.
854 2014-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
856         * intrinsic.texi (RANDOM_SEED): Improve example.
858 2014-04-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
860         * class.c (gfc_build_class_symbol): Append "_t" to target class
861         names to make the generated type names unique.
863 2014-04-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
865         PR fortran/60191
866         * trans-types.c (gfc_get_function_type): In case of recursion
867         build a variadic function type with empty argument list instead of a
868         stdarg-like function type with incomplete argument list.
870 2014-04-04  Tobias Burnus  <burnus@net-b.de>
872         * check.c (gfc_check_cmplx): Fix typo.
874 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
875             Tobias Burnus  <burnus@net-b.de>
877         PR fortran/60576
878         * trans-expr.c (gfc_conv_derived_to_class): Avoid
879         generation of out-of-bounds range expr.
881 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
883         PR fortran/60677
884         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
885         list buffer.
887 2014-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
889         PR fortran/60522
890         * frontend-passes.c (cfe_code):  Do not walk subtrees
891         for WHERE.
893 2014-03-27  Tobias Burnus  <burnus@net-b.de>
895         PR fortran/58880
896         * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
897         of nonpointers.
899 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
901         PR fortran/34928
902         * fortran.texi: Document Volatile COMMON as not supported.
904 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
906         PR debug/60603
907         * cpp.c (gfc_cpp_init): Restore cb_change_file call to
908         <built-in>.
910 2014-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
912         PR fortran/60148
913         * gfortran.texi: Add description of namelist DELIM= behavior.
915 2014-03-19  Tobias Burnus  <burnus@net-b.>
917         PR fortran/60543
918         * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
919         * resolve.c (resolve_ordinary_assign): Ditto.
921 2014-03-19  Tobias Burnus  <burnus@net-b.de>
923         PR fortran/60543
924         PR fortran/60283
925         * gfortran.h (gfc_unset_implicit_pure): New prototype.
926         * resolve.c (gfc_unset_implicit_pure): New.
927         (resolve_structure_cons, resolve_function,
928         pure_subroutine): Use it.
929         * decl.c (match_old_style_init, gfc_match_data,
930         match_pointer_init, variable_decl): Ditto.
931         * expr.c (gfc_check_pointer_assign): Ditto.
932         * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
933         * io.c (match_vtag, gfc_match_open, gfc_match_close,
934         match_filepos, gfc_match_inquire, gfc_match_print,
935         gfc_match_wait): Ditto.
936         * match.c (gfc_match_critical, gfc_match_stopcode,
937         lock_unlock_statement, sync_statement, gfc_match_allocate,
938         gfc_match_deallocate): Ditto.
939         * parse.c (decode_omp_directive): Ditto.
940         * symbol.c (gfc_add_save): Ditto.
942 2014-03-18  Janus Weil  <janus@gcc.gnu.org>
944         PR fortran/55207
945         PR fortran/60549
946         * decl.c (match_attr_spec): Revert r208590.
948 2014-03-18  Jakub Jelinek  <jakub@redhat.com>
950         PR ipa/58721
951         * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
952         if !optimize.
954 2014-03-18  Tobias Burnus  <burnus@net-b.de>
956         PR ipa/58721
957         * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
958         (gfc_trans_io_runtime_check): Remove.
959         * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
960         as argument, add predictor to block.
961         (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
962         gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
963         * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
964         (gfc_trans_runtime_check, gfc_allocate_using_malloc,
965         gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
966         branch predictor.
967         * trans-expr.c (gfc_conv_procedure_call): Ditto.
968         * trans-stmt.c (gfc_trans_allocate): Ditto.
969         * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
971 2014-03-15  Janus Weil  <janus@gcc.gnu.org>
973         PR fortran/55207
974         * decl.c (match_attr_spec): Variables in the main program implicitly
975         get the SAVE attribute in Fortran 2008.
977 2014-03-14  Mikael Morin  <mikael@gcc.gnu.org>
979         PR fortran/60392
980         * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
981         if it has transposed dimensions.
983 2014-03-08  Tobias Burnus  <burnus@net-b.de>
985         PR fortran/60447
986         * f95-lang.c (gfc_init): Return false when only
987         preprocessing.
988         * options.c (gfc_post_options): Ditto.
990 2014-03-08  Tobias Burnus  <burnus@net-b.de>
992         * gfortran.texi (Fortran 2003 Status): Mention finalization,
993         deferred-length character support and input rounding.
994         (Fortran 2008 Status): Mention that at termination
995         signalling exceptions are shown.
997 2014-03-06  Paul Thomas  <pault@gcc.gnu.org>
998             Janus Weil  <janus@gcc.gnu.org>
1000         PR fortran/51976
1001         * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
1002         * primary.c (build_actual_constructor): It is not an error if
1003         a missing component has the deferred_parameter attribute;
1004         equally, if one is given a value, it is an error.
1005         * resolve.c (resolve_fl_derived0): Remove error for deferred
1006         character length components.  Add the hidden string length
1007         field to the structure. Give it the deferred_parameter
1008         attribute.
1009         * trans-array.c (duplicate_allocatable): Add a strlen field
1010         which is used as the element size if it is non-null.
1011         (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
1012         NULL to the new argument in duplicate_allocatable.
1013         (structure_alloc_comps): Set the hidden string length as
1014         appropriate. Use it in calls to duplicate_allocatable.
1015         (gfc_alloc_allocatable_for_assignment): When a deferred length
1016         backend declaration is variable, use that; otherwise use the
1017         string length from the expression evaluation.
1018         * trans-expr.c (gfc_conv_component_ref): If this is a deferred
1019         character length component, the string length should have the
1020         value of the hidden string length field.
1021         (gfc_trans_subcomponent_assign): Set the hidden string length
1022         field for deferred character length components.  Allocate the
1023         necessary memory for the string.
1024         (alloc_scalar_allocatable_for_assignment): Same change as in
1025         gfc_alloc_allocatable_for_assignment above.
1026         * trans-stmt.c (gfc_trans_allocate): Likewise.
1027         * trans-intrinsic (size_of_string_in_bytes): Make non-static.
1028         * trans-types.c (gfc_get_derived_type): Set the tree type for
1029         a deferred character length component.
1030         * trans.c (gfc_deferred_strlen): New function.
1031         * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
1033 2014-03-01  Mikael Morin  <mikael@gcc.gnu.org>
1035         PR fortran/60341
1036         * frontend-passes.c (optimize_comparison): Guard two union accesses
1037         with the corresponding tag checks.
1039 2014-02-28  Janus Weil  <janus@gcc.gnu.org>
1041         PR fortran/60359
1042         * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
1043         procedure for characters.
1045 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
1047         PR fortran/60302
1048         * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
1049         is successful.
1051 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
1053         PR fortran/60234
1054         * gfortran.h (gfc_build_class_symbol): Removed argument.
1055         * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
1056         (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
1057         delayed now, except for unlimited polymorphics.
1058         (comp_is_finalizable): Procedure pointer components are not finalizable.
1059         * decl. (build_sym, build_struct, attr_decl1): Removed argument of
1060         'gfc_build_class_symbol'.
1061         * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
1062         Ditto.
1063         * symbol.c (gfc_set_default_type): Ditto.
1065 2014-02-19  Janus Weil  <janus@gcc.gnu.org>
1067         PR fortran/60232
1068         * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
1069         functions, which are used as procedure pointer target.
1071 2014-02-18  Tobias Burnus  <burnus@net-b.de>
1073         PR fortran/49397
1074         * expr.c (gfc_check_pointer_assign): Add check for
1075         F2008Cor2, C729.
1076         * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
1077         decl in a corner case.
1079 2014-02-18  Janus Weil  <janus@gcc.gnu.org>
1081         PR fortran/60231
1082         * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
1083         arguments to prevent ICE.
1085 2014-02-17  Janus Weil  <janus@gcc.gnu.org>
1087         PR fortran/55907
1088         * resolve.c (build_default_init_expr): Don't initialize character
1089         variable if -fno-automatic is given.
1091 2014-02-15  Mikael Morin  <mikael@gcc.gnu.org>
1093         PR fortran/59599
1094         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
1095         number of arguments.
1097 2014-02-11  Jakub Jelinek  <jakub@redhat.com>
1099         PR fortran/52370
1100         * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
1101         on decl if sym->attr.optional.
1103 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
1105         PR fortran/57522
1106         * resolve.c (resolve_assoc_var): Set the subref_array_pointer
1107         attribute for the 'associate-name' if necessary.
1108         * trans-stmt.c (trans_associate_var): If the 'associate-name'
1109         is a subref_array_pointer, assign the element size of the
1110         associate variable to 'span'.
1112 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
1114         PR fortran/59026
1115         * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
1116         actual argument to a formal argument with the value attribute
1117         in an elemental procedure.
1119 2014-02-08  Janus Weil  <janus@gcc.gnu.org>
1120             Mikael Morin <mikael.morin@gcc.gnu.org>
1122         PR fortran/58470
1123         * class.c (generate_finalization_wrapper): Assert that proc_tree has
1124         been set in gfc_resolve_finalizers.
1125         * resolve.c (resolve_fl_derived0): Remove unnecessary call to
1126         gfc_is_finalizable.
1128 2014-02-07  Benno Schulenberg  <bensberg@justemail.net>
1130         PR translation/52289
1131         * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
1132         in an error message.
1134 2014-02-02  Mikael Morin  <mikael@gcc.gnu.org>
1136         PR fortran/57033
1137         * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
1138         dereference.
1140 2014-02-01  Paul Thomas  <pault@gcc.gnu.org>
1142         PR fortran/59906
1143         * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
1144         SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
1145         pointer to the string is stored.
1146         * trans-expr.c (gfc_conv_expr_reference): Likewise, use
1147         gfc_conv_string_parameter to ensure that a pointer to is passed
1148         to the elemental function.
1150 2014-01-28  Paul Thomas  <pault@gcc.gnu.org>
1152         PR fortran/59414
1153         * trans-stmt.c (gfc_trans_allocate): Before the pointer
1154         assignment to transfer the source _vptr to a class allocate
1155         expression, the final class reference should be exposed. The
1156         tail that includes the _data and array references is stored.
1157         This reduced expression is transferred to 'lhs' and the _vptr
1158         added. Then the tail is restored to the allocate expression.
1160 2014-01-26  Mikael Morin  <mikael@gcc.gnu.org>
1162         PR fortran/58007
1163         * module.c (read_module): Assert for component name correctness.
1165 2014-01-18  Mikael Morin  <mikael@gcc.gnu.org>
1167         PR fortran/58007
1168         * module.c (MOD_VERSION): Bump.
1169         (fp2, find_pointer2): Remove.
1170         (mio_component_ref): Don't forcedfully set the containing derived type
1171         symbol for loading.  Remove unused argument.
1172         (mio_ref): Update caller
1173         (mio_symbol): Dump component list earlier.
1174         (skip_list): New argument nest_level.  Initialize level with the new
1175         argument.
1176         (read_module): Add forced pointer components association for derived
1177         type symbols.
1179 2014-01-12  Janus Weil  <janus@gcc.gnu.org>
1181         PR fortran/58026
1182         * decl.c (gfc_match_data_decl): Improve error recovery.
1184 2014-01-09  Tobias Burnus  <burnus@net-b.de>
1186         * cpp.c (gfc_cpp_handle_option): Add missing break.
1187         * trans-io.c (transfer_expr): Silence unused value warning.
1189 2014-01-08  Janus Weil  <janus@gcc.gnu.org>
1191         PR fortran/58182
1192         * resolve.c (gfc_verify_binding_labels): Modify order of checks.
1194 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
1196         PR fortran/59589
1197         * class.c (comp_is_finalizable): New function to dermine if a given
1198         component is finalizable.
1199         (finalize_component, generate_finalization_wrapper): Use it.
1201 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
1203         PR fortran/59023
1204         PR fortran/59662
1205         * resolve.c (resolve_global_procedure): Don't apply to c-binding
1206         procedures.
1207         (gfc_verify_binding_labels): Remove duplicate line.
1209 2014-01-04  Janus Weil  <janus@gcc.gnu.org>
1211         PR fortran/59547
1212         * class.c (add_proc_comp): Copy pure attribute.
1214 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1216         Update copyright years
1218 2014-01-02  Tobias Burnus  <burnus@net-b.de>
1220         * gfortranspec.c (lang_specific_driver): Update copyright notice
1221         dates.
1222         * gfc-internals.texi: Bump @copying's copyright year.
1223         * gfortran.texi: Ditto.
1224         * intrinsic.texi: Ditto.
1225         * invoke.texi: Ditto.
1227 2014-01-02  Janus Weil  <janus@gcc.gnu.org>
1229         PR fortran/59654
1230         * resolve.c (resolve_typebound_procedures): No need to create the vtab
1231         here.
1233 Copyright (C) 2014 Free Software Foundation, Inc.
1235 Copying and distribution of this file, with or without modification,
1236 are permitted in any medium without royalty provided the copyright
1237 notice and this notice are preserved.