2014-11-23 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / fortran / ChangeLog
blob41169a856af55e6bdaf1ff57bc309c3efbd6851f
1 2014-11-23  Tobias Burnus  <burnus@net-b.de>
3         * invoke.texi (-Wtabs): Swap -Wtabs/-Wno-tabs now that
4         -Wtabs enables the warning.
6 2014-11-23  Tobias Burnus  <burnus@net-b.de>
8         * error.c (gfc_diagnostic_build_prefix): Correct coloring
9         of the colon of the prefix.
11 2014-11-23  Tobias Burnus  <burnus@net-b.de>
12             Manuel López-Ibáñez  <manu@gcc.gnu.org>
14         * gfortran.h (gfc_option_t): Remove warn_tabs.
15         * lang.opt (Wpedantic): Add.
16         (Wtabs): Use Var and LangEnabledBy.
17         * options.c (gfc_init_options, gfc_post_options,
18         set_Wall): Remove -Wtabs handling.
19         (gfc_handle_option): Update -std=, remove OPT_Wtabs.
20         * scanner.c (gfc_gobble_whitespace): Update for
21         flag-variable renaming.
22         (load_line): Ditto. Pass warn flag to diagnostic.
24 2014-11-22  Tobias Burnus  <burnus@net-b.de>
26         * trans-expr.c (gfc_caf_get_image_index): Fix image calculation.
28 2014-11-15  Tobias Burnus  <burnus@net-b.de>
30         * error.c (gfc_fatal_error_1): Renamed from gfc_fatal_error.
31         (gfc_fatal_error): Add; uses common diagnostics.
32         * array.c (gfc_match_array_ref, gfc_match_array_spec): Use
33         %< %>.
34         * check.c (check_co_collective, gfc_check_lcobound,
35         gfc_check_image_index, gfc_check_num_images,
36         gfc_check_this_image, gfc_check_ucobound): Ditto.
37         * cpp.c (gfc_cpp_post_options): Ditto.
38         (gfc_cpp_init_0, gfc_cpp_done): Change %s to %qs.
39         * gfc-diagnostic.def (DK_FATAL): Capitalize first letter.
40         * gfortran.h (gfc_fatal_error_1): Add.
41         * match.c (gfc_match_name, gfc_match_critical,
42         lock_unlock_statement, sync_statement): Add %< %>.
43         * module.c (bad_module, gfc_dump_module, gfc_use_module): Change
44         %s to %qs.
45         * options.c (gfc_handle_module_path_options, gfc_handle_fpe_option,
46         gfc_handle_coarray_option, gfc_handle_runtime_check_option,
47         gfc_handle_option): Add %< %>.
48         * simplify.c (gfc_simplify_num_images): Ditto.
49         * trans-stmt.c (gfc_trans_sync): Use gfc_fatal_error_1.
50         * trans-array.c (gfc_conv_array_initializer): Ditto.
51         * trans-types.c (gfc_init_kinds): Use gfc_fatal_error instead
52         of fatal_error; add %< %> quotations.
54 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
55             Thomas Schwinge  <thomas@codesourcery.com>
56             Ilya Verbin  <ilya.verbin@intel.com>
57             Andrey Turetskiy  <andrey.turetskiy@intel.com>
59         * Make-lang.in (fortran.install-common): Do not install for the offload
60         compiler.
62 2014-11-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
64         PR fortran/44054
65         * gfortran.h (warn_use_without_only): Remove.
66         (gfc_diagnostics_finish): Declare.
67         * error.c: Include tree-diagnostics.h
68         (gfc_format_decoder): New.
69         (gfc_diagnostics_init): Use gfc_format_decoder. Set default caret
70         char.
71         (gfc_diagnostics_finish): Restore tree diagnostics defaults, but
72         keep gfc_diagnostics_starter and finalizer. Restore default caret.
73         * options.c: Remove all uses of warn_use_without_only.
74         * lang.opt (Wuse-without-only): Add Var.
75         * f95-lang.c (gfc_be_parse_file): Call gfc_diagnostics_finish.
76         * module.c (gfc_use_module): Use gfc_warning_now_2.
77         * parse.c (decode_statement): Likewise.
78         (decode_gcc_attribute): Likewise.
79         (next_free): Likewise.
80         (next_fixed): Likewise.
82 2014-11-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
84         PR fortran/63701
85         * trans-expr.c (gfc_get_tree_for_caf_expr): Initialise found to false.
87 2014-11-10  Janne Blomqvist  <jb@gcc.gnu.org>
89         PR libfortran/47007
90         PR libfortran/61847
91         * gfortran.texi: Add note about locale issues to thread-safety
92         section.
94 2014-11-04  Bernd Schmidt  <bernds@codesourcery.com>
96         * f95-lang.c (gfc_init_builtin_functions): Use type index 2 for
97         scalbn, scalbnl and scalbnf.
98         * mathbuiltins.def (JN, YN): Use type index 5.
100 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
102         * trans-types.c, trans-types.h: Remove redundant enum from
103         machine_mode.
105 2014-10-28  Manuel López-Ibáñez  <manu@gcc.gnu.org>
107         PR fortran/44054
108         * gfortran.h (gfc_warning_cmdline): Rename as gfc_warning_now_2.
109         (gfc_error_cmdline): Rename as gfc_error_now_2.
110         * error.c (gfc_diagnostic_build_locus_prefix): Remove trailing space.
111         (gfc_diagnostic_starter): Add space between locus and prefix.
112         (gfc_warning_now_2): Renamed from gfc_warning_cmdline.
113         (gfc_error_now_2): Renamed from gfc_error_cmdline.
114         * scanner.c (add_path_to_list): Use gfc_warning_now_2.
115         (load_line): Likewise.
116         (load_file): Likewise.
117         * options.c (gfc_post_options): Update all renamed functions.
119 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
121         * f95-lang.c: Adjust include files.
122         * trans-decl.c: Ditto.
124 2014-10-24  Tobias Burnus  <burnus@net-b.de>
126         * check.c (check_co_collective): Reject coindexed A args.
127         (gfc_check_co_reduce): Add OPERATOR checks.
128         * gfortran.texi (_gfortran_caf_co_broadcast, _gfortran_caf_co_max,
129         _gfortran_caf_co_min, _gfortran_caf_co_sum,
130         _gfortran_caf_co_reduce): Add ABI documentation.
131         * intrinsic.texi (CO_REDUCE): Document intrinsic.
132         (DPROD): Returns double not single precision.
133         * trans-decl.c (gfor_fndecl_co_reduce): New global var.
134         (gfc_build_builtin_function_decls): Init it.
135         * trans.h (gfor_fndecl_co_reduce): Declare it.
136         * trans-intrinsic.c (conv_co_collective,
137         gfc_conv_intrinsic_subroutine): Handle CO_REDUCE.
139 2014-10-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
141         PR fortran/48979
142         * trans-const.c (gfc_build_nan): New function.
143         * trans-const.h (gfc_build_nan): New prototype.
144         * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Handle special
145         values.
146         (gfc_conv_intrinsic_minmaxval): Use gfc_build_nan.
147         (gfc_conv_intrinsic_fraction): Handle special values.
148         (gfc_conv_intrinsic_spacing): Likewise.
149         (gfc_conv_intrinsic_rrspacing): Likewise.
150         (gfc_conv_intrinsic_set_exponent): Likewise.
152 2014-10-18  Paul Thomas  <pault@gcc.gnu.org>
154         PR fortran/63553
155         * resolve.c (resolve_ordinary_assign): Add data component to
156         rvalue expression for class to type assignment.
158 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
160         * f95-lang.c: Adjust include files.
161         * trans-decl.c: Likewise.
163 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
165         * trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab.
167 2014-10-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
169         PR fortran/48979
170         * simplify.c (gfc_simplify_atan): Use mpfr_zero_p to check for zeros.
171         (gfc_simplify_log): Likewise.
172         (gfc_simplify_scale): Likewise.
173         (gfc_simplify_exponent): Handle infinities and NaNs.
174         (gfc_simplify_fraction): Handle infinities.
175         (gfc_simplify_rrspacing): Handle signed zeros and NaNs.
176         (gfc_simplify_set_exponent): Handle infinities and NaNs.
177         (gfc_simplify_spacing): Handle zeros, infinities and NaNs.
179 2014-10-10  Jakub Jelinek  <jakub@redhat.com>
181         PR fortran/59488
182         * trans-openmp.c (gfc_omp_predetermined_sharing): Return
183         OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
185 2014-10-10  Tobias Burnus  <burnus@net-b.de>
187         * gfortran.h (gfc_set_implicit_none): Update prototype.
188         * symbol.c (gfc_set_implicit_none): Take and
189         use error location. Move diagnostic from here to ...
190         * decl.c (gfc_match_implicit_none): ... here. And
191         update call. Handle empty implicit-none-spec.
192         (gfc_match_implicit): Handle statement-separator ";".
194 2014-10-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
196         * f95-lang.c (gfc_init_builtin_functions): Add more floating-point
197         built-ins.
198         * mathbuiltins.def (OTHER_BUILTIN): Define built-ins for logb,
199         remainder, rint and signbit.
200         * trans-decl.c (save_fp_state, restore_fp_state): Move to
201         trans-intrinsic.c
202         (gfc_generate_function_code): Use new names for these two functions.
203         * trans-expr.c (gfc_conv_function_expr): Catch IEEE functions to
204         emit code from the front-end.
205         * trans-intrinsic.c (gfc_save_fp_state, gfc_restore_fp_state,
206         conv_ieee_function_args, conv_intrinsic_ieee_builtin,
207         conv_intrinsic_ieee_is_normal, conv_intrinsic_ieee_is_negative,
208         conv_intrinsic_ieee_logb_rint, conv_intrinsic_ieee_rem,
209         conv_intrinsic_ieee_next_after, conv_intrinsic_ieee_scalb,
210         conv_intrinsic_ieee_copy_sign, gfc_conv_ieee_arithmetic_function):
211         New functions.
212         * trans.h (gfc_conv_ieee_arithmetic_function,
213         gfc_save_fp_state, gfc_restore_fp_state): New prototypes.
215 2014-10-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
217         PR fortran/44054
218         PR fortran/54687
219         * gfortran.h (gfc_warning_cmdline): Add overload that takes an
220         option.
221         (gfc_error_cmdline): Declare.
222         * error.c (gfc_warning_cmdline): New overload that takes an option.
223         (gfc_error_cmdline): New.
224         * lang.opt (Wmissing-include-dirs): New.
225         * scanner.c (add_path_to_list): Use the new functions.
226         (load_file): Likewise.
227         * options.c (gfc_init_options): Wmissing-include-dirs is enabled
228         by default in Fortran.
229         (gfc_handle_option): Accept automatically handled options.
231 2014-10-06  Tobias Burnus  <burnus@net-b.de>
233         * libgfortran.h (GFC_STD_F2015): Add.
234         * decl.c (gfc_match_implicit_none): Handle spec list.
235         (gfc_match_implicit): Move double intrinsic warning here.
236         * gfortran.h (gfc_namespace): Add has_implicit_none_export:1.
237         (gfc_set_implicit_none): Update interface.
238         * interface.c (gfc_procedure_use): Add implicit-none external
239         error check.
240         * parse.c (accept_statement): Remove call.
241         (verify_st_order): Permit that external-implict-none follows
242         implicit statement.
243         * symbol.c (gfc_set_implicit_none): Handle external/type
244         implicit none.
246 2014-10-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
248         PR fortran/36534
249         * resolve.c (resolve_fl_procedure): Clean up obsolescence warning.
251 2014-09-25  Tobias Burnus  <burnus@net-b.de>
253         * check.c (check_co_collective): Renamed from check_co_minmaxsum,
254         handle co_reduce.
255         (gfc_check_co_minmax, gfc_check_co_sum): Update call.
256         (gfc_check_co_broadcast, gfc_check_co_reduce): New.
257         * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_BROADCAST and
258         GFC_ISYM_CO_REDUCE.
259         * intrinsic.c (add_subroutines): Add co_reduce and co_broadcast.
260         * intrinsic.h (gfc_check_co_broadcast, gfc_check_co_reduce): Add
261         proto types.
262         * intrinsic.texi (CO_BROADCAST): Add.
263         * trans.h (gfor_fndecl_co_broadcast): New.
264         * trans-decl.c (gfor_fndecl_co_broadcast): Ditto.
265         (gfc_build_builtin_function_decls): Add decl for it,
266         * trans-intrinsic.c (conv_co_collective): Renamed from
267         conv_co_minmaxsum. Handle co_reduce.
268         (gfc_conv_intrinsic_subroutine): Handle co_reduce.
270 2014-09-23  Jakub Jelinek  <jakub@redhat.com>
272         PR fortran/63331
273         * trans-types.c (gfc_get_array_descr_info): Build DEBUG_EXPR_DECL
274         instead of VAR_DECL for base_decl.
276 2014-09-21  Jan Hubicka  <hubicka@ucw.cz>
278         * openmp.c (omp_context): Rename to ...
279         (fortran_omp_context): ... this one.
281 2014-09-21  Dominique d'Humieres <dominiq@lps.ens.fr>
283         * resolve.c (resolve_fl_procedure): Remove duplicated lines.
285 2014-09-20  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
286             Tobias Burnus  <burnus@net-b.de>
288         * trans-intrinsic.c (conv_intrinsic_atomic_op): Fix issue with
289         generating temporary for value argument.
291 2014-09-20  Joost VandeVondele  <vondele@gcc.gnu.org>
293         * trans-expr.c (gfc_reset_vptr): Fix comment whitespace.
294         (gfc_conv_class_to_class): Likewise.
295         (gfc_conv_procedure_call): Likewise.
296         (arrayfunc_assign_needs_temporary): Likewise.
297         (realloc_lhs_loop_for_fcn_call): Likewise.
298         (gfc_trans_assignment_1): Likewise.
299         * trans-array.c (gfc_conv_array_ref): Likewise.
300         (gfc_array_allocate): Likewise.
301         (gfc_alloc_allocatable_for_assignment): Likewise.
302         * symbol.c (generate_isocbinding_symbol): Likewise.
303         * class.c (finalization_scalarizer): Likewise.
304         (finalizer_insert_packed_call): Likewise.
305         (generate_finalization_wrapper): Likewise.
306         (find_intrinsic_vtab): Likewise.
307         * decl.c (gfc_match_import): Likewise.
308         (match_procedure_decl): Likewise.
309         (gfc_match_subroutine): Likewise.
310         (gfc_match_bind_c): Likewise.
311         (gfc_match_volatile): Likewise.
312         * trans-common.c (create_common): Likewise.
313         * error.c (gfc_diagnostic_starter): Likewise.
314         * trans-stmt.c (gfc_trans_sync): Likewise.
315         (gfc_trans_critical): Likewise.
316         (gfc_trans_simple_do): Likewise.
317         (gfc_trans_do): Likewise.
318         (gfc_trans_where_assign): Likewise.
319         * expr.c (gfc_is_simply_contiguous): Likewise.
320         * module.c (unquote_string): Likewise.
321         * trans.c (gfc_add_finalizer_call): Likewise.
322         * trans-types.c (gfc_init_kinds): Likewise.
323         * scanner.c (preprocessor_line): Likewise.
324         * gfortranspec.c (lang_specific_driver): Likewise.
325         * frontend-passes.c (create_var): Likewise.
326         (cfe_expr_0): Likewise.
327         * resolve.c (check_host_association): Likewise.
328         (gfc_resolve_code): Likewise.
329         (resolve_fl_derived0): Likewise.
330         (resolve_symbol): Likewise.
331         * f95-lang.c (poplevel): Likewise.
332         * trans-decl.c (create_main_function): Likewise.
333         * trans-io.c (transfer_expr): Likewise.
334         * arith.c (gfc_arith_divide): Likewise.
335         * parse.c (resolve_all_program_units): Likewise.
336         * check.c (gfc_check_rank): Likewise.
337         (gfc_check_sizeof): Likewise.
338         (is_c_interoperable): Likewise.
339         * dependency.c (gfc_dep_difference): Likewise.
340         * primary.c (gfc_match_rvalue): Likewise.
341         * trans-intrinsic.c (conv_intrinsic_system_clock): Likewise.
342         (conv_isocbinding_subroutine): Likewise.
343         * options.c (gfc_post_options): Likewise.
344         (gfc_handle_fpe_option): Likewise.
345         (gfc_get_option_string): Likewise.
346         * simplify.c (simplify_transformation_to_scalar): Likewise.
347         (gfc_simplify_spread): Likewise.
349 2014-09-19  Joost VandeVondele  <vondele@gcc.gnu.org>
351         PR fortran/63152
352         * trans-array.c (gfc_trans_deferred_array): Only nullify allocatables.
354 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
356         * Make-lang.in (check_gfortran_parallelize): Change to just an upper
357         bound number.
359 2014-09-13  Tobias Burnus  <burnus@net-b.de>
361         PR fortran/63252
362         * trans-decl.c (gfc_build_builtin_function_decls): Fix
363         caf_unlock declaration.
365 2014-09-12  Joseph Myers  <joseph@codesourcery.com>
367         * trans-types.c (gfc_init_kinds): Check
368         targetm.libgcc_floating_mode_supported_p for floating-point
369         modes.  Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE.
371 2014-09-05  Joost VandeVondele  <vondele@gcc.gnu.org>
373         PR fortran/62245
374         * intrinsic.texi (INT): clarify result.
376 2014-09-03  Fritz Reese  <Reese-Fritz@zai.com>
378         PR fortran/62174
379         * decl.c (variable_decl): Don't overwrite typespecs of Cray pointees
380         when matching a component declaration.
382 2014-09-02  Marek Polacek  <polacek@redhat.com>
384         PR fortran/62270
385         * interface.c (compare_parameter): Fix condition.
386         * trans-expr.c (gfc_conv_procedure_call): Likewise.
388 2014-08-31  Fritz Reese  <Reese-Fritz@zai.com>
390         PR fortran/62309
391         * resolve.c (apply_default_init_local): Don't treat variables
392         in RECURSIVE procedures as saved.
394 2014-08-31  Tobias Burnus  <burnus@net-b.de>
396         * trans-decl.c (gfc_build_builtin_function_decls): Add
397         may_require_tmp dummy argument.
398         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get,
399         conv_caf_send): Handle may_require_tmp argument.
400         (gfc_conv_intrinsic_function): Update call.
401         * gfortran.texi (_gfortran_caf_send, _gfortran_caf_get,
402         _gfortran_caf_sendget): Update interface description.
404 2014-08-30  Tobias Burnus  <burnus@net-b.de>
406         * trans.h (gfc_caf_get_image_index,
407         gfc_get_caf_token_offset): New prototypes.
408         * trans-expr.c (gfc_caf_get_image_index): Moved from
409         trans-intrinsic.c and renamed.
410         (gfc_get_caf_token_offset) Ditto; support offset = NULL
411         with early return.
412         * trans-intrinsic.c (get_caf_token_offset, caf_get_image_index):
413         Moved to trans-expr.
414         (gfc_conv_intrinsic_caf_get, conv_caf_send,
415         conv_intrinsic_atomic_op, conv_intrinsic_atomic_ref,
416         conv_intrinsic_atomic_cas): Update callers.
418 2014-08-30  Tobias Burnus  <burnus@net-b.de>
420         PR fortran/62278
421         PR fortran/44735
422         PR fortran/60593
423         * dependency.c (gfc_check_dependency): Allow for optimizations
424         in the pointer-alias check.
426 2014-08-30  Janne Blomqvist  <jb@gcc.gnu.org>
428         * module.c (gfc_dump_module): Use ISO C remove() instead of POSIX
429         unlink().
431 2014-08-29  Jeffrey Armstrong  <jeffrey.armstrong@approximatrix.com>
433         PR fortran/62215
434         * module.c (gfc_dump_module): Unlink old module file before
435         renaming new one.
437 2014-08-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
439         * frontend_passes (expr_array):  Replace by vec template.
440         (expr_size):  Remove.
441         (expr_count):  Remove.
442         (doloop_list):  Replace by vec template.
443         (doloop_size):  Remove.
444         (gfc_run_passes):  Adjust to use of vec template.
445         (cfe_register_funcs):  Likewise.
446         (cfe_expr_0):  Likewise.
447         (doloop_code):  Likewise.
449 2014-08-22  Steven Bosscher  <steven@gcc.gnu.org>
451         PR fortran/62135
452         * resolve.c (resolve_select): Fix list traversal in case the
453         last element of the CASE list was dropped as unreachable code.
455 2014-08-22  Joost VandeVondele  <Joost.VandeVondele@mat.ethz.ch>
457         PR fortran/61234
458         * lang.opt (Wuse-without-only): New flag.
459         * gfortran.h (gfc_option_t): Add it.
460         * invoke.texi: Document it.
461         * module.c (gfc_use_module): Warn if needed.
462         * options.c (gfc_init_options,gfc_handle_option): Init accordingly.
464 2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
466         PR fortran/62214
467         * frontend-passes.c (optimize_binop_array_assignment):
468         Do not try to optimize the array assignment for string
469         concatenation.
471 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
473         PR fortran/44054
474         * error.c (gfc_diagnostic_build_locus_prefix): New function.
475         (gfc_diagnostic_starter): Follow Fortran FE diagnostics.
476         (gfc_diagnostic_finalizer): Do not call default finalizer.
478 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
480         PR fortran/44054
481         * error.c (gfc_diagnostic_finalizer): Call default finalizer.
483 2014-08-20  Joost VandeVondele  <Joost.VandeVondele@mat.ethz.ch>
485         * options.c (gfc_init_options_struct): assert that the frontend sets
486         flag_errno_math and flag_associative_math.
488 2014-08-17  Tobias Burnus  <burnus@net-b.de>
490         * resolve.c (gfc_resolve_finalizers): Ensure that parents are
491         resolved first.
493 2014-08-17  Tobias Burnus  <burnus@net-b.de>
495         * trans-io.c (gfc_build_io_library_fndecls): Fix decl of
496         IOCALL_SET_NML_VAL.
497         (transfer_namelist_element): Use proper int type as argument.
499 2014-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
501         PR fortran/62142
502         * trans-expr.c (is_runtime_conformable):  Add NULL pointer checks.
504 2014-08-15  Tobias Burnus  <burnus@net-b.de>
506         * resolve.c (resolve_critical): Fix name mangling.
507         * trans-stmt.c (gfc_trans_critical): Fix lock call.
509 2014-08-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
511         PR fortran/44054
512         * gfortran.h: Define GCC_DIAG_STYLE.
513         (gfc_diagnostics_init,gfc_warning_cmdline): Declare.
514         * trans-array.c: Include gfortran.h before diagnostic-core.h.
515         * trans-expr.c: Likewise.
516         * trans-openmp.c: Likewise.
517         * trans-const.c: Likewise.
518         * trans.c: Likewise.
519         * trans-types.c: Likewise.
520         * f95-lang.c: Likewise.
521         * trans-decl.c: Likewise.
522         * trans-io.c: Likewise.
523         * trans-intrinsic.c: Likewise.
524         * error.c: Include diagnostic.h and diagnostic-color.h.
525         (gfc_diagnostic_build_prefix): New.
526         (gfc_diagnostic_starter): New.
527         (gfc_diagnostic_finalizer): New.
528         (gfc_warning_cmdline): New.
529         (gfc_diagnostics_init): New.
530         * gfc-diagnostic.def: New.
531         * options.c (gfc_init_options): Call gfc_diagnostics_init.
532         (gfc_post_options): Use gfc_warning_cmdline.
534 2014-08-15  Jakub Jelinek  <jakub@redhat.com>
535             Tobias Burnus  <burnus@net-b.de>
537         PR fortran/62131
538         * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr
539         is allocatable, rather than whenever var->attr.allocatable.
541 2014-08-15  Jakub Jelinek  <jakub@redhat.com>
543         PR fortran/62107
544         * trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
545         or allocatable passed by reference.
546         (gfc_trans_omp_clauses) <case OMP_LIST_MAP>: Likewise.
548 2014-08-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
550         PR fortran/62106
551         * gfortran.h (symbol_attribute):  Add fe_temp flag.
552         * frontend-passes.c (is_fe_temp):  New function.
553         (create_var):  Don't add a temporary for an already
554         created variable or for a constant.
555         (combine_ARRAY_constructor):  Remove special handling
556         for constants.
558 2014-08-14  Tobias Burnus  <burnus@net-b.de>
560         * gfortran.texi (caf_register_t): Add CAF_REGTYPE_CRITICAL.
561         (_gfortran_caf_register): Update for locking/critical.
562         (_gfortran_caf_lock, _gfortran_caf_unlock): Add.
563         * resolve.c (resolve_critical): New.
564         (gfc_resolve_code): Call it.
565         * trans-decl.c (gfor_fndecl_caf_critical,
566         gfor_fndecl_caf_end_critical): Remove.
567         (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
568         (gfc_build_builtin_function_decls): Remove critical,
569         assign locking declarations.
570         (generate_coarray_sym_init): Handle locking and
571         critical variables.
572         * trans-stmt.c (gfc_trans_critical): Add calls to
573         lock/unlock libcaf functions.
574         * trans.h (gfc_coarray_type): Update locking, add
575         critical enum values.
576         (gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical): Remove.
577         (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
579 2014-08-14  Tobias Burnus  <burnus@net-b.de>
581         * gfortran.texi (Coarray Programming): Add first ABI
582         documentation.
584 2014-08-14  Jakub Jelinek  <jakub@redhat.com>
586         PR fortran/62076
587         * openmp.c (gfc_match_omp_clauses): When failed to match
588         operator name, defined op name or name, set buffer to
589         empty string.  Don't call gfc_find_omp_udr if buffer is empty
590         string.
591         (gfc_match_omp_declare_reduction): Call gfc_undo_symbols ()
592         before calling gfc_free_omp_udr.
594 2014-08-11  Richard Biener  <rguenther@suse.de>
596         PR fortran/61950
597         * trans-expr.c (gfc_conv_structure): Initialize _size with
598         a value of proper type.
600 2014-08-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
602         PR fortran/61999
603         * simplify.c (gfc_simplify_dot_product): Convert types of
604         vectors before calculating the result.
606 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
608         * openmp.c, trans-decl.c: Use hash_set instead of pointer_set.
610 2014-07-26  Tobias Burnus  <burnus@net-b.de>
612         PR fortran/61881
613         PR fortran/61888
614         PR fortran/57305
615         * intrinsic.texi (SIZEOF): Document changed behavior
616         for polymorphic arrays.
618 2014-07-26  Tobias Burnus  <burnus@net-b.de>
620         PR fortran/61881
621         PR fortran/61888
622         PR fortran/57305
623         * check.c (gfc_check_sizeof): Permit for assumed type if and
624         only if it has an array descriptor.
625         * intrinsic.c (do_ts29113_check): Permit SIZEOF.
626         (add_functions): SIZEOF is an Inquiry function.
627         * intrinsic.texi (SIZEOF): Add note that only contiguous
628         arrays are permitted.
629         * trans-expr.c (gfc_conv_intrinsic_to_class): Handle assumed
630         rank.
631         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle
632         assumed type + array descriptor, CLASS and assumed rank.
633         (gfc_conv_intrinsic_storage_size): Handle class arrays.
635 2014-07-25  Tobias Burnus  <burnus@net-b.de>
637         * simplify.c (gfc_simplify_storage_size): Use proper
638         integer kind for the returned value.
640 2014-07-24  Uros Bizjak  <ubizjak@gmail.com>
642         * intrinsic.texi (Intrinsic Procedures) <ATOMIC_DEFINE>: Move to
643         correct menu position to match sectioning.
645 2014-06-15  Tobias Burnus  <burnus@net-b.de>
647         * symbol.c (check_conflict): Add codimension conflict with
648         pointer; fix cray-pointee check.
650 2014-06-14  Tobias Burnus  <burnus@net-b.de>
652         * trans-intrinsic.c (conv_intrinsic_atomic_ref): Fix handling
653         for kind mismatch with -fcoarray=lib.
655 2014-07-12  Paul Thomas  <pault@gcc.gnu.org>
657         PR fortran/61780
658         * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
659         that elements are skipped. This then correctly aligns 'reverse'
660         with the scalarizer loops.
662 2014-07-12  Tobias Burnus  <burnus@net-b.de>
664         PR fortran/61628
665         * trans-types.c (gfc_init_types): Fix data-type bug
666         with gfc_max_array_element_size.
668 2014-07-12  Tobias Burnus  <burnus@net-b.de>
670         * libgfortran.h (libcaf_atomic_codes): Add.
671         * trans-decl.c (gfor_fndecl_caf_atomic_def,
672         gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
673         gfor_fndecl_caf_atomic_op): New variables.
674         (gfc_build_builtin_function_decls): Initialize them.
675         * trans.h (gfor_fndecl_caf_atomic_def,
676         gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
677         gfor_fndecl_caf_atomic_op): New variables.
678         * trans-intrinsic.c (conv_intrinsic_atomic_op,
679         conv_intrinsic_atomic_ref, conv_intrinsic_atomic_cas):
680         Add library calls with -fcoarray=lib.
682 2014-07-12  Tobias Burnus  <burnus@net-b.de>
684         * check.c (gfc_check_atomic): Update for STAT=.
685         (gfc_check_atomic_def, gfc_check_atomic_ref): Update call.
686         (gfc_check_atomic_op, gfc_check_atomic_cas,
687         gfc_check_atomic_fetch_op): New.
688         * gfortran.h (gfc_isym_id): GFC_ISYM_ATOMIC_CAS, GFC_ISYM_ATOMIC_ADD,
689         GFC_ISYM_ATOMIC_AND, GFC_ISYM_ATOMIC_OR, GFC_ISYM_ATOMIC_XOR,
690         GFC_ISYM_ATOMIC_FETCH_ADD, GFC_ISYM_ATOMIC_FETCH_AND,
691         GFC_ISYM_ATOMIC_FETCH_OR and GFC_ISYM_ATOMIC_FETCH_XOR.
692         * intrinsic.c (add_subroutines): Handle them.
693         * intrinsic.texi: Add documentation for them.
694         (ATOMIC_REF, ATOMIC_DEFINE): Add STAT=.
695         (ISO_FORTRAN_ENV): Add STAT_FAILED_IMAGE.
696         * intrinsic.h (gfc_check_atomic_op, gfc_check_atomic_cas,
697         gfc_check_atomic_fetch_op): New
698         prototypes.
699         * libgfortran.h (libgfortran_stat_codes): Add GFC_STAT_FAILED_IMAGE.
700         * iso-fortran-env.def: Add it.
701         * trans-intrinsic.c (conv_intrinsic_atomic_op): Renamed from
702         conv_intrinsic_atomic_ref; handle more atomics.
703         (conv_intrinsic_atomic_def): Handle STAT=.
704         (conv_intrinsic_atomic_cas): New.
705         (gfc_conv_intrinsic_subroutine): Handle new atomics.
707 2014-07-09  Bernd Schmidt  <bernds@codesourcery.com>
709         * trans-array.c (gfc_build_constant_array_constructor): Build a
710         static decl manually.
711         * trans-decl.c (create_main_function): Likewise.
713 2014-07-07  Paul Thomas  <pault@gcc.gnu.org>
715         PR fortran/61459
716         PR fortran/58883
717         * trans-expr.c (fcncall_realloc_result): Use the natural type
718         for the address expression of 'res_desc'.
720 2014-07-07  Gerald Pfeifer  <gerald@pfeifer.com>
722         * gfortran.texi (Fortran 2003 status): Fix grammar.
724 2014-07-04  Tobias Burnus  <burnus@net-b.de>
726         * resolve.c (resolve_assoc_var): Fix corank setting.
727         * trans-array.c (gfc_conv_descriptor_token): Change assert.
728         for select-type temporaries.
729         * trans-decl.c (generate_coarray_sym_init): Skip for
730         attr.select_type_temporary.
731         * trans-expr.c (gfc_conv_procedure_call): Fix for
732         select-type temporaries.
733         * trans-intrinsic.c (get_caf_token_offset): Ditto.
734         (gfc_conv_intrinsic_caf_get, gfc_conv_intrinsic_caf_send): Set
735         the correct dtype.
736         * trans-types.h (gfc_get_dtype_rank_type): New.
737         * trans-types.c (gfc_get_dtype_rank_type): Ditto.
739 2014-07-03  Tobias Burnus  <burnus@net-b.de>
741         * scanner.c (skip_free_comments): Fix indentation.
743 2014-07-02  Jakub Jelinek  <jakub@redhat.com>
744             Fritz Reese  <Reese-Fritz@zai.com>
746         * decl.c (variable_decl): Reject old style initialization
747         for derived type components.
749 2014-06-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
751         PR fortran/36275
752         PR fortran/38839
753         * decl.c (check_bind_name_identifier): New function.
754         (gfc_match_bind_c): Match any constant expression as binding
755         label.
756         * match.c (gfc_match_name_C): Remove.
758 2014-06-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
760         PR fortran/29383
761         * gfortran.h (gfc_simplify_ieee_selected_real_kind): New prototype.
762         * libgfortran.h (GFC_FPE_*): Use simple integer values, valid in
763         both C and Fortran.
764         * expr.c (gfc_check_init_expr): Simplify IEEE_SELECTED_REAL_KIND.
765         * simplify.c (gfc_simplify_ieee_selected_real_kind): New function.
766         * module.c (mio_symbol): Keep track of symbols which came from
767         intrinsic modules.
768         (gfc_use_module): Keep track of the IEEE modules.
769         * trans-decl.c (gfc_get_symbol_decl): Adjust code since
770         we have new intrinsic modules.
771         (gfc_build_builtin_function_decls): Build decls for
772         ieee_procedure_entry and ieee_procedure_exit.
773         (is_from_ieee_module, is_ieee_module_used, save_fp_state,
774         restore_fp_state): New functions.
775         (gfc_generate_function_code): Save and restore floating-point
776         state on procedure entry/exit, when IEEE modules are used.
777         * intrinsic.texi: Document the IEEE modules.
779 2014-06-25  Tobias Burnus  <burnus@net-b.de>
781         * interface.c (check_intents): Fix diagnostic with
782         coindexed coarrays.
784 2014-06-25  Tobias Burnus  <burnus@net-b.de>
786         * resolve.c (resolve_ordinary_assign): Don't invoke caf_send
787         when assigning a coindexed RHS scalar to a noncoindexed LHS
788         array.
789         * trans-intrinsic.c (conv_caf_send): Do numeric type conversion
790         for a noncoindexed scalar RHS.
792 2014-06-25  Tobias Burnus  <burnus@net-b.de>
794         * check.c (check_co_minmaxsum): Add definable check.
795         * expr.c (gfc_check_vardef_context): Fix context == NULL case.
796         * trans-expr.c (get_scalar_to_descriptor_type): Handle pointer
797         arguments.
798         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fix generation of
799         temporary strings.
801 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
803         * trans.h (gfc_omp_clause_linear_ctor): New prototype.
804         * trans-openmp.c (gfc_omp_linear_clause_add_loop,
805         gfc_omp_clause_linear_ctor): New functions.
806         (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
807         correct type.  Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
808         * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
810 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
812         * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
813         of n->udr.
814         * f95-lang.c (gfc_init_builtin_functions): Initialize
815         BUILT_IN_ASSUME_ALIGNED.
816         * gfortran.h (gfc_omp_namelist): Change udr field type to
817         struct gfc_omp_namelist_udr.
818         (gfc_omp_namelist_udr): New type.
819         (gfc_get_omp_namelist_udr): Define.
820         (gfc_resolve_code): New prototype.
821         * match.c (gfc_free_omp_namelist): Free name->udr.
822         * module.c (intrinsics): Add INTRINSIC_USER.
823         (fix_mio_expr): Likewise.
824         (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
825         * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
826         (gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
827         Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
828         (struct resolve_omp_udr_callback_data): New type.
829         (resolve_omp_udr_callback, resolve_omp_udr_callback2,
830         resolve_omp_udr_clause): New functions.
831         (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
832         here.
833         (omp_udr_callback): Don't check for implicitly declared functions
834         here.
835         (gfc_resolve_omp_udr): Don't call gfc_resolve.  Don't check for
836         implicitly declared subroutines here.
837         * resolve.c (resolve_function): If value.function.isym is non-NULL,
838         consider it already resolved.
839         (resolve_code): Renamed to ...
840         (gfc_resolve_code): ... this.  No longer static.
841         (gfc_resolve_blocks, generate_component_assignments, resolve_codes):
842         Adjust callers.
843         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
844         by reference type (C_PTR) variables.
845         (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
846         (gfc_trans_omp_udr_expr): Remove.
847         (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
848         Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
849         expand it as assignment or subroutine call.  Don't initialize
850         value.function.isym.
852 2014-06-23  Tobias Burnus  <burnus@net-b.de>
854         * trans-decl.c (gfc_trans_deferred_vars): Fix handling of
855         explicit-size arrays with -fcoarray=lib.
857 2014-06-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
859         PR fortran/33363
860         * invoke.texi: Don't mention nonexisting -fcase-lower option.
862 2014-06-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
864         PR fortran/61454
865         * expr.c (scalarize_intrinsic_call): Take care of optional
866         arguments.
868 2014-06-19  Tobias Burnus  <burnus@net-b.de>
870         * trans-intrinsic.c (conv_co_minmaxsum): Fix argument
871         passing.
873 2014-06-18  Tobias Burnus  <burnus@net-b.de>
875         * gfortran.texi (OpenMP): Update refs to OpenMP 4.0.
876         * intrinsic.texi (OpenMP Modules): Ditto.
878 2014-06-18  Jakub Jelinek  <jakub@redhat.com>
880         * cpp.c (cpp_define_builtins): Change _OPENMP macro to
881         201307.
882         * dump-parse-tree.c (show_omp_namelist): Add list_type
883         argument.  Adjust for rop being u.reduction_op now,
884         handle depend_op or map_op.
885         (show_omp_node): Adjust callers.  Print some new
886         OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
887         becoming a single OMP_LIST_DEPEND.
888         * f95-lang.c (gfc_handle_omp_declare_target_attribute): New
889         function.
890         (gfc_attribute_table): New variable.
891         (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
892         * frontend-passes.c (gfc_code_walker): Handle new OpenMP target
893         EXEC_OMP_* codes and new clauses.
894         * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
895         ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
896         ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
897         ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
898         ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
899         ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
900         ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
901         ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
902         ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
903         ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
904         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
905         ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
906         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
907         ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
908         ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
909         ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
910         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
911         ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
912         ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
913         ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
914         ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
915         (symbol_attribute): Add omp_declare_target field.
916         (gfc_omp_depend_op, gfc_omp_map_op): New enums.
917         (gfc_omp_namelist): Replace rop field with union
918         containing reduction_op, depend_op and map_op.
919         (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
920         (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
921         (gfc_omp_clauses): Add num_teams, device, thread_limit,
922         dist_sched_kind, dist_chunk_size fields.
923         (gfc_common_head): Add omp_declare_target field.
924         (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
925         EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
926         EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
927         EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
928         EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
929         EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
930         EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
931         EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
932         EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
933         EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
934         EXEC_OMP_TARGET_UPDATE.
935         (gfc_add_omp_declare_target): New prototype.
936         * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
937         gfc_match_omp_distribute_parallel_do,
938         gfc_match_omp_distribute_parallel_do_simd,
939         gfc_match_omp_distribute_simd, gfc_match_omp_target,
940         gfc_match_omp_target_data, gfc_match_omp_target_teams,
941         gfc_match_omp_target_teams_distribute,
942         gfc_match_omp_target_teams_distribute_parallel_do,
943         gfc_match_omp_target_teams_distribute_parallel_do_simd,
944         gfc_match_omp_target_teams_distribute_simd,
945         gfc_match_omp_target_update, gfc_match_omp_teams,
946         gfc_match_omp_teams_distribute,
947         gfc_match_omp_teams_distribute_parallel_do,
948         gfc_match_omp_teams_distribute_parallel_do_simd,
949         gfc_match_omp_teams_distribute_simd): New prototypes.
950         * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
951         (attr_bits): Likewise.
952         (mio_symbol_attribute): Handle omp_declare_target attribute.
953         (gfc_free_omp_clauses): Free num_teams, device, thread_limit
954         and dist_chunk_size expressions.
955         (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
956         OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN,
957         OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
958         OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED,
959         OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL,
960         OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND,
961         OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH,
962         OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN,
963         OMP_CLAUSE_UNIFORM): Use 1U instead of 1.
964         (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
965         OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
966         OMP_CLAUSE_DIST_SCHEDULE): Define.
967         (gfc_match_omp_clauses): Change mask parameter to unsigned int.
968         Adjust for rop becoming u.reduction_op.  Disallow inbranch with
969         notinbranch.  For depend clause, always create OMP_LIST_DEPEND
970         and fill in u.depend_op.  Handle num_teams, device, map,
971         to, from, thread_limit and dist_schedule clauses.
972         (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
973         OMP_CLAUSE_NOTINBRANCH.
974         (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
975         OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
976         OMP_DISTRIBUTE_CLAUSES): Define.
977         (match_omp): New function.
978         (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
979         gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
980         gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
981         gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
982         gfc_match_omp_task): Rewritten using match_omp.
983         (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
984         Diagnose if the directives are followed by unexpected junk.
985         (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
986         gfc_match_omp_distribute_parallel_do_simd,
987         gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
988         gfc_match_omp_target, gfc_match_omp_target_data,
989         gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
990         gfc_match_omp_target_teams_distribute_parallel_do,
991         gfc_match_omp_target_teams_distribute_parallel_do_simd,
992         gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
993         gfc_match_omp_teams, gfc_match_omp_teams_distribute,
994         gfc_match_omp_teams_distribute_parallel_do,
995         gfc_match_omp_teams_distribute_parallel_do_simd,
996         gfc_match_omp_teams_distrbute_simd): New functions.
997         * openmp.c (resolve_omp_clauses): Adjust for
998         OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND.  Handle
999         OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
1000         dist_chunk_size and thread_limit.
1001         (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
1002         ctx.sharing_clauses.  Call gfc_resolve_omp_do_blocks for various
1003         new EXEC_OMP_* codes.
1004         (resolve_omp_do): Handle various new EXEC_OMP_* codes.
1005         (gfc_resolve_omp_directive): Likewise.
1006         (gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
1007         * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
1008         offloading related directives.
1009         (case_executable): Add ST_OMP_TARGET_UPDATE.
1010         (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
1011         ST_OMP_DISTRIBUTE*.
1012         (case_decl): Add ST_OMP_DECLARE_TARGET.
1013         (gfc_ascii_statement): Handle new ST_OMP_* codes.
1014         (parse_omp_do): Handle various new ST_OMP_* codes.
1015         (parse_executable): Likewise.
1016         * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
1017         codes.
1018         (resolve_code): Likewise.
1019         (resolve_symbol): Change that !$OMP DECLARE TARGET variables
1020         are saved.
1021         * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
1022         * symbol.c (check_conflict): Check omp_declare_target conflicts.
1023         (gfc_add_omp_declare_target): New function.
1024         (gfc_copy_attr): Copy omp_declare_target.
1025         * trans.c (trans_code): Handle various new EXEC_OMP_* codes.
1026         * trans-common.c (build_common_decl): Add "omp declare target"
1027         attribute if needed.
1028         * trans-decl.c (add_attributes_to_decl): Likewise.
1029         * trans.h (gfc_omp_finish_clause): New prototype.
1030         * trans-openmp.c (gfc_omp_finish_clause): New function.
1031         (gfc_trans_omp_reduction_list): Adjust for rop being renamed
1032         to u.reduction_op.
1033         (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
1034         change to OMP_LIST_DEPEND and fix up depend handling.
1035         Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
1036         thread_limit, device, dist_chunk_size and dist_sched_kind.
1037         (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
1038         (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
1039         GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
1040         GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
1041         (gfc_split_omp_clauses): Handle splitting of clauses for new
1042         EXEC_OMP_* codes.
1043         (gfc_trans_omp_do_simd): Add pblock argument, adjust for being
1044         callable for combined constructs.
1045         (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
1046         (gfc_trans_omp_distribute, gfc_trans_omp_teams,
1047         gfc_trans_omp_target, gfc_trans_omp_target_data,
1048         gfc_trans_omp_target_update): New functions.
1049         (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
1050         new EXEC_OMP_* codes.
1052 2014-06-18  Tobias Burnus  <burnus@net-b.de>
1054         PR fortran/61126
1055         * invoke.texi (-Wunused-parameter): Make clearer when
1056         -Wextra implies this option.
1058 2014-06-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1060         PR fortran/61126
1061         * options.c (gfc_handle_option): Remove call to
1062         handle_generated_option.
1064 2014-06-17  Tobias Burnus  <burnus@net-b.de>
1066         * check.c (gfc_check_atomic, gfc_check_atomic_def):
1067         Use argument for GFC_ISYM_CAF_GET.
1068         * resolve.c (resolve_variable): Enable CAF_GET insertion.
1069         (resolve_lock_unlock): Remove GFC_ISYM_CAF_GET.
1070         (resolve_ordinary_assign): Enable CAF_SEND insertion.
1071         * trans-const.c (gfc_build_string_const,
1072         gfc_build_wide_string_const): Set TYPE_STRING_FLAG.
1073         * trans-decl.c (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
1074         gfor_fndecl_caf_sendget): New global variables.
1075         (gfc_build_builtin_function_decls): Initialize them;
1076         update co_min/max/sum initialization.
1077         * trans-expr.c (gfc_get_tree_for_caf_expr): Renamed from
1078         get_tree_for_caf_expr and removed static.
1079         (gfc_conv_procedure_call): Update call.
1080         * trans-intrinsic.c (caf_get_image_index,
1081         conv_caf_vector_subscript_elem, conv_caf_vector_subscript,
1082         get_caf_token_offset, gfc_conv_intrinsic_caf_get,
1083         conv_caf_send): New.
1084         (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine,
1085         gfc_walk_intrinsic_function): Handle CAF_GET and CAF_SEND.
1086         (conv_co_minmaxsum): Update call for remove unused vector
1087         subscript.
1088         (conv_intrinsic_atomic_def, conv_intrinsic_atomic_ref):
1089         Skip a CAF_GET of the argument.
1090         * trans-types.c (gfc_get_caf_vector_type): New.
1091         * trans-types.h (gfc_get_caf_vector_type): New.
1092         * trans.h (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
1093         gfor_fndecl_caf_sendget): New global variables.
1094         (gfc_get_tree_for_caf_expr): New prototypes.
1096 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1098         * trans-common.c (build_common_decl): Use
1099         set_decl_tls_model.
1100         * trans-decl.c (gfc_finish_var_decl): Likewise.
1101         (get_proc_pointer_decl): Likewise.
1103 2014-06-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1105         PR fortran/28484
1106         PR fortran/61429
1107         * check.c (gfc_check_system_clock): Improve checking of arguments.
1108         * intrinsic.texi: Update doc of SYSTEM_CLOCK.
1109         * iresolve.c (gfc_resolve_system_clock): Choose library function
1110         used depending on argument kinds.
1111         * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1112         decls for system_clock_4 and system_clock_8.
1113         * trans-intrinsic.c (conv_intrinsic_system_clock): New function.
1114         (gfc_conv_intrinsic_subroutine): Call conv_intrinsic_system_clock.
1115         * trans.h (gfor_fndecl_system_clock4, gfor_fndecl_system_clock8):
1116         New variables.
1118 2014-06-12  Tobias Burnus  <burnus@net-b.de>
1120         * gfortran.h (gfc_copy_formal_args_intr): Update prototype.
1121         * symbol.c (gfc_copy_formal_args_intr): Handle the case
1122         that absent optional arguments should be ignored.
1123         * trans-intrinsic.c (gfc_get_symbol_for_expr): Ditto.
1124         (gfc_conv_intrinsic_funcall,
1125         conv_generic_with_optional_char_arg): Update call.
1126         * resolve.c (gfc_resolve_intrinsic): Ditto.
1128 2014-06-10  Dominique d'Humieres <dominiq@lps.ens.fr>
1129             Mikael Morin <mikael@gcc.gnu.org>
1131         PR fortran/41936
1132         * trans-expr.c (gfc_conv_expr_reference): Deallocate array
1133         components.
1135 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
1137         PR fortran/60928
1138         * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
1139         like -fopenmp.
1140         * openmp.c (resolve_omp_clauses): Remove allocatable components
1141         diagnostics.  Add associate-name and intent(in) pointer
1142         diagnostics for various clauses, diagnose procedure pointers in
1143         reduction clause.
1144         * parse.c (match_word_omp_simd): New function.
1145         (matchs, matcho): New macros.
1146         (decode_omp_directive): Change match macros to either matchs
1147         or matcho.  Handle -fopenmp-simd.
1148         (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
1149         * scanner.c (skip_free_comments, skip_fixed_comments, include_line):
1150         Likewise.
1151         * trans-array.c (get_full_array_size): Rename to...
1152         (gfc_full_array_size): ... this.  No longer static.
1153         (duplicate_allocatable): Adjust caller.  Add NO_MEMCPY argument
1154         and handle it.
1155         (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
1156         duplicate_allocatable callers.
1157         (gfc_duplicate_allocatable_nocopy): New function.
1158         (structure_alloc_comps): Adjust g*_full_array_size and
1159         duplicate_allocatable caller.
1160         * trans-array.h (gfc_full_array_size,
1161         gfc_duplicate_allocatable_nocopy): New prototypes.
1162         * trans-common.c (create_common): Call gfc_finish_decl_attrs.
1163         * trans-decl.c (gfc_finish_decl_attrs): New function.
1164         (gfc_finish_var_decl, create_function_arglist,
1165         gfc_get_fake_result_decl): Call it.
1166         (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
1167         don't allocate it again.
1168         (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
1169         associate-names.
1170         * trans.h (gfc_finish_decl_attrs): New prototype.
1171         (struct lang_decl): Add scalar_allocatable and scalar_pointer
1172         bitfields.
1173         (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
1174         GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
1175         GFC_DECL_ASSOCIATE_VAR_P): Define.
1176         (GFC_POINTER_TYPE_P): Remove.
1177         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
1178         GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
1179         GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
1180         (gfc_omp_predetermined_sharing): Associate-names are predetermined.
1181         (enum walk_alloc_comps): New.
1182         (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
1183         gfc_walk_alloc_comps): New functions.
1184         (gfc_omp_private_outer_ref): Return true for scalar allocatables or
1185         decls with allocatable components.
1186         (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
1187         gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
1188         allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
1189         allocatables and decls with allocatable components.
1190         (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
1191         arrays here.
1192         (gfc_trans_omp_reduction_list): Call
1193         gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
1194         (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
1195         (gfc_trans_omp_parallel_do_simd): Likewise.
1196         * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
1197         (gfc_get_derived_type): Call gfc_finish_decl_attrs.
1199 2014-06-09  Paul Thomas  <pault@gcc.gnu.org>
1201         PR fortran/61406
1202         * trans-stmt.c (trans_associate_var): Check that array
1203         constructors are constant for direct reference.
1205 2014-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1207         PR fortran/36096
1208         * intrinsic.texi: Fix documentation of BESSEL_J0, BESSEL_J1,
1209         BESSEL_Y0, and BESSEL_Y1.
1211 2014-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1213         PR fortran/45187
1214         * trans-decl.c (gfc_create_module_variable): Don't create
1215         Cray-pointee decls twice.
1217 2014-06-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1219         * io.c (resolve_tag): Warn on non-default kind for NUMBER,
1220         NEXTREC, RECL, NAMED, OPENED and PENDING I/O specifiers.
1222 2014-06-06  Jakub Jelinek  <jakub@redhat.com>
1224         * dump-parse-tree.c (show_omp_namelist): Dump reduction
1225         id in each list item.
1226         (show_omp_node): Only handle OMP_LIST_REDUCTION, not
1227         OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST.  Don't
1228         dump reduction id here.
1229         * frontend-passes.c (dummy_code_callback): Renamed to...
1230         (gfc_dummy_code_callback): ... this.  No longer static.
1231         (optimize_reduction): Use gfc_dummy_code_callback instead of
1232         dummy_code_callback.
1233         * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
1234         (symbol_attribute): Add omp_udr_artificial_var bitfield.
1235         (gfc_omp_reduction_op): New enum.
1236         (gfc_omp_namelist): Add rop and udr fields.
1237         (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
1238         OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
1239         OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
1240         OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
1241         (OMP_LIST_REDUCTION): New.
1242         (gfc_omp_udr): New type.
1243         (gfc_get_omp_udr): Define.
1244         (gfc_symtree): Add n.omp_udr field.
1245         (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
1246         (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
1247         gfc_dummy_code_callback): New prototypes.
1248         * match.h (gfc_match_omp_declare_reduction): New prototype.
1249         * module.c (MOD_VERSION): Increase to 13.
1250         (omp_declare_reduction_stmt): New array.
1251         (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
1252         New functions.
1253         (read_module): Read OpenMP user defined reductions.
1254         (write_module): Write OpenMP user defined reductions.
1255         * openmp.c: Include arith.h.
1256         (gfc_free_omp_udr, gfc_find_omp_udr): New functions.
1257         (gfc_match_omp_clauses): Handle user defined reductions.
1258         Store reduction kind into gfc_omp_namelist instead of using
1259         several OMP_LIST_* entries.
1260         (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
1261         gfc_match_omp_declare_reduction): New functions.
1262         (resolve_omp_clauses): Adjust for reduction clauses being only
1263         in OMP_LIST_REDUCTION list.  Diagnose missing UDRs.
1264         (struct omp_udr_callback_data): New type.
1265         (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
1266         functions.
1267         * parse.c (decode_omp_directive): Handle !$omp declare reduction.
1268         (case_decl): Add ST_OMP_DECLARE_REDUCTION.
1269         (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
1270         * resolve.c (resolve_fl_variable): Allow len=: or len=* on
1271         sym->attr.omp_udr_artificial_var symbols.
1272         (resolve_types): Call gfc_resolve_omp_udrs.
1273         * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
1274         use parent ns instead of gfc_current_ns.
1275         (gfc_get_sym_tree): Don't insert symbols into
1276         namespaces with omp_udr_ns set.
1277         (free_omp_udr_tree): New function.
1278         (gfc_free_namespace): Call it.
1279         * trans-openmp.c (struct omp_udr_find_orig_data): New type.
1280         (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
1281         (gfc_trans_omp_array_reduction): Renamed to...
1282         (gfc_trans_omp_array_reduction_or_udr): ... this.  Remove SYM
1283         argument, instead pass gfc_omp_namelist pointer N.  Handle
1284         user defined reductions.
1285         (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
1286         Handle user defined reductions and reduction ops in gfc_omp_namelist.
1287         (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
1288         list.
1289         (gfc_split_omp_clauses): Likewise.
1291 2014-06-05  Richard Biener  <rguenther@suse.de>
1293         PR fortran/61418
1294         * gfortranspec.c (spec_file): Remove.
1295         (find_spec_file): Likewise.
1296         (lang_specific_driver): Do not look for specs file in -L
1297         or append -specs command line argument.
1298         (lang_specific_pre_link): Always %:include libgfortran.spec.
1300 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1302         * fortran/trans.c (trans_runtime_error_vararg): Call
1303         fold_build_call_array_loc instead of fold_builtin_call_array.
1305 2014-06-02  Bernd Schmidt  <bernds@codesourcery.com>
1307         * trans-decl.c (gfc_build_builtin_function_decls): Correct number of
1308         arguments to caf_init.
1310 2014-05-26  Tobias Burnus  <burnus@net-b.de>
1312         * gfortran.texi (Project Status): Fix broken link.
1314 2014-05-26  Janne Blomqvist  <jb@gcc.gnu.org>
1316         PR libfortran/61310
1317         * intrinsics.texi (CTIME): Remove mention of locale-dependent
1318         behavior.
1320 2014-05-26  Tobias Burnus  <burnus@net-b.de>
1322         PR fortran/55117
1323         * trans-io.c (nml_full_name, transfer_namelist_element): Insert
1324         a '+' rather then '%' to differentiate namelist variable names
1325         that are based on extended derived types.
1327 2014-05-25  Tobias Burnus  <burnus@net-b.de>
1329         * check.c (gfc_check_num_images): New.
1330         (gfc_check_this_image): Handle distance argument.
1331         * intrinsic.c (add_functions): Update this_image and num_images
1332         for new distance and failed arguments.
1333         * intrinsic.texi (THIS_IMAGE, NUM_IMAGES): Document the new
1334         arguments.
1335         * intrinsic.h (gfc_check_num_images): New.
1336         (gfc_check_this_image, gfc_simplify_num_images,
1337         gfc_simplify_this_image, gfc_resolve_this_image): Update prototype.
1338         * iresolve.c (gfc_resolve_this_image): Handle distance argument.
1339         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
1340         Handle new arguments.
1341         * trans-intrinsic.c (trans_this_image, trans_num_images): Ditto.
1342         (gfc_conv_intrinsic_function): Update trans_num_images call.
1344 2014-05-23  Tobias Burnus  <burnus@net-b.de>
1346         * gfc-internals.texi: Change URLs to HTTPS; fix broken links.
1347         * gfortran.texi: Ditto.
1349 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
1351         * f95-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1352         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1353         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1354         * types.def: Simplify examples for DEF_FUNCTION_TYPE_*.
1356 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
1358         * f95-lang.c (pushlevel): Adjust.
1359         * trans-decl.c (gfc_allocate_lang_decl): Adjust.
1360         (gfc_find_module): Likewise.
1361         * trans-types.c (gfc_get_nodesc_array_type): Likewise.
1362         (gfc_get_array_type_bounds): Likewise.
1363         (gfc_nonrestricted_type): Likewise.
1364         * trans.h: Don't use variable_size gty attribute.
1366 2014-05-17  Dominique d'Humieres <dominiq@lps.ens.fr>
1368         * check.c (gfc_check_fn_rc2008): move "argument" to the right
1369         place.
1371 2014-05-12  Tobias Burnus  <burnus@net-b.de>
1373         PR fortran/60127
1374         * openmp.c (resolve_omp_do): Reject do concurrent loops.
1376 2014-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1378         PR fortran/60834
1379         * frontend-passes.c (in_assoc_list):  New variable.
1380         (optimize_namespace):  Initialize in_assoc_list
1381         (combine_array_constructor): Don't try to combine
1382         assoc lists.
1383         (gfc_code_walker):  Keep track of in_assoc_list.
1385 2014-05-11  Jakub Jelinek  <jakub@redhat.com>
1387         * gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
1388         ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
1389         ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
1390         ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
1391         ST_OMP_DECLARE_SIMD.
1392         (gfc_omp_namelist): New typedef.
1393         (gfc_get_omp_namelist): Define.
1394         (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
1395         OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
1396         (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
1397         (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
1398         Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
1399         simdlen_expr fields.
1400         (gfc_omp_declare_simd): New typedef.
1401         (gfc_get_omp_declare_simd): Define.
1402         (gfc_namespace): Add omp_declare_simd field.
1403         (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
1404         EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
1405         EXEC_OMP_PARALLEL_DO_SIMD.
1406         (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
1407         and GFC_OMP_ATOMIC_SWAP.
1408         (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
1409         (gfc_free_omp_namelist, gfc_free_omp_declare_simd,
1410         gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
1411         prototypes.
1412         * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
1413         * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
1414         * openmp.c (gfc_free_omp_clauses): Free safelen_expr and
1415         simdlen_expr.  Use gfc_free_omp_namelist instead of
1416         gfc_free_namelist.
1417         (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
1418         functions.
1419         (gfc_match_omp_variable_list): Add end_colon, headp and
1420         allow_sections arguments.  Handle parsing of array sections.
1421         Use *omp_namelist* instead of *namelist* data structure and
1422         functions/macros.  Allow termination at : character.
1423         (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
1424         OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
1425         OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
1426         (gfc_match_omp_clauses): Change first and needs_space variables
1427         into arguments with default values.  Parse inbranch, notinbranch,
1428         proc_bind, safelen, simdlen, uniform, linear, aligned and
1429         depend clauses.
1430         (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
1431         (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
1432         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
1433         (gfc_match_omp_do_simd): New function.
1434         (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
1435         data structure and functions/macros.
1436         (gfc_match_omp_simd, gfc_match_omp_declare_simd,
1437         gfc_match_omp_parallel_do_simd): New functions.
1438         (gfc_match_omp_atomic): Handle seq_cst clause.  Handle atomic swap.
1439         (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
1440         gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
1441         functions.
1442         (resolve_omp_clauses): Add where, omp_clauses and ns arguments.
1443         Use *omp_namelist* instead of *namelist* data structure and
1444         functions/macros.  Resolve uniform, aligned, linear, depend,
1445         safelen and simdlen clauses.
1446         (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
1447         addition, recognize atomic swap.
1448         (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
1449         of gfc_namelist.  Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
1450         EXEC_OMP_PARALLEL_DO.
1451         (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
1452         data structure and functions/macros.
1453         (resolve_omp_do): Likewise.  Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
1454         EXEC_OMP_PARALLEL_DO_SIMD.
1455         (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
1456         EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL.  Adjust
1457         resolve_omp_clauses caller.
1458         (gfc_resolve_omp_declare_simd): New function.
1459         * parse.c (decode_omp_directive): Parse cancellation point, cancel,
1460         declare simd, end do simd, end simd, end parallel do simd,
1461         end taskgroup, parallel do simd, simd and taskgroup directives.
1462         (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
1463         (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
1464         ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
1465         (case_decl): Add ST_OMP_DECLARE_SIMD.
1466         (gfc_ascii_statement): Handle ST_OMP_CANCEL,
1467         ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
1468         ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
1469         ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
1470         ST_OMP_DECLARE_SIMD.
1471         (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
1472         ST_OMP_PARALLEL_DO_SIMD.
1473         (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
1474         (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
1475         ST_OMP_PARALLEL_DO_SIMD.
1476         (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
1477         ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
1478         * trans-decl.c (gfc_get_extern_function_decl,
1479         gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
1480         needed.
1481         * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
1482         EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD.  Walk
1483         safelen_expr and simdlen_expr.  Walk expressions in gfc_omp_namelist
1484         of depend, aligned and linear clauses.
1485         * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
1486         and EXEC_OMP_PARALLEL_DO_SIMD.
1487         (gfc_free_omp_namelist): New function.
1488         * dump-parse-tree.c (show_namelist): Removed.
1489         (show_omp_namelist): New function.
1490         (show_omp_node): Handle OpenMP 4.0 additions.
1491         (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
1492         EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
1493         EXEC_OMP_TASKGROUP.
1494         * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
1495         gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
1496         gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
1497         gfc_match_omp_taskgroup): New prototypes.
1498         * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
1499         argument, handle it.  Allow current_function_decl to be NULL.
1500         (gfc_trans_omp_variable_list): Add declare_simd argument, pass
1501         it through to gfc_trans_omp_variable and disregard whether
1502         sym is referenced if declare_simd is true.  Work on gfc_omp_namelist
1503         instead of gfc_namelist.
1504         (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
1505         gfc_namelist.  Adjust gfc_trans_omp_variable caller.
1506         (gfc_trans_omp_clauses): Add declare_simd argument, pass it through
1507         to gfc_trans_omp_variable{,_list} callers.  Work on gfc_omp_namelist
1508         instead of gfc_namelist.  Handle inbranch, notinbranch, safelen,
1509         simdlen, depend, uniform, linear, proc_bind and aligned clauses.
1510         Handle cancel kind.
1511         (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
1512         adjust for GFC_OMP_ATOMIC_* changes.
1513         (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
1514         functions.
1515         (gfc_trans_omp_do): Add op argument, handle simd translation into
1516         generic.
1517         (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
1518         GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
1519         GFC_OMP_MASK_PARALLEL): New.
1520         (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
1521         (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
1522         (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
1523         functions.
1524         (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
1525         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1526         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1527         Adjust gfc_trans_omp_do caller.
1528         (gfc_trans_omp_declare_simd): New function.
1529         * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
1530         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1531         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1532         For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
1533         gfc_free_namelist.
1534         * module.c (omp_declare_simd_clauses): New variable.
1535         (mio_omp_declare_simd): New function.
1536         (mio_symbol): Call it.
1537         * trans.c (trans_code): Handle EXEC_OMP_CANCEL,
1538         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1539         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1540         * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
1541         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1542         (resolve_code): Handle EXEC_OMP_CANCEL,
1543         EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1544         EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1545         (resolve_types): Call gfc_resolve_omp_declare_simd.
1547 2014-05-11  Tobias Burnus  <burnus@net-b.de>
1549         * trans-intrinsic.c (gfc_build_builtin_function_decls):
1550         Change type of second argument to int.
1552 2014-05-09  Mike Stump  <mikestump@comcast.net>
1554         PR fortran/61109
1555         * trans-array.c (gfc_conv_array_initializer): Fix wide-int
1556         conversion bug.
1558 2014-05-08  Tobias Burnus  <burnus@net-b.de>
1560         * gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET
1561         and GFC_ISYM_CAF_SEND.
1562         * intrinsic.c (add_functions): Add only internally
1563         accessible caf_get and caf_send functions.
1564         * resolve.c (add_caf_get_intrinsic,
1565         remove_caf_get_intrinsic): New functions.
1566         (resolve_variable): Resolve expression rank and
1567         prepare for add_caf_get_intrinsic call.
1568         (gfc_resolve_expr): For variables, remove rank
1569         resolution.
1570         (resolve_ordinary_assign): Prepare call to
1571         GFC_ISYM_CAF_SEND.
1572         (resolve_code): Avoid call to GFC_ISYM_CAF_GET for
1573         the LHS of an assignment.
1575 2014-05-08  Tobias Burnus  <burnus@net-b.de>
1577         * trans-intrinsic.c (conv_co_minmaxsum): Change condition style.
1579 2014-05-08  Tobias Burnus  <burnus@net-b.de>
1581         * check.c (check_co_minmaxsum, gfc_check_co_minmax,
1582         gfc_check_co_sum): New.
1583         * error.c (gfc_notify_std): Update -std=f2008ts.
1584         * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_MAX,
1585         GFC_ISYM_CO_MIN, GFC_ISYM_CO_SUM.
1586         * intrinsic.h (gfc_check_co_minmax,
1587         gfc_check_co_sum): Declare.
1588         * intrinsic.c (add_subroutines): Add co_min, co_max
1589         and co_sum.
1590         (gfc_check_intrinsic_standard): Update text for
1591         -std=f2008ts.
1592         * intrinsic.texi (CO_MIN, CO_MAX, CO_SUM): Document
1593         them.
1594         * invoke.texi (-std=f2008ts): Update wording.
1595         * trans.h (gfor_fndecl_co_max,
1596         gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1597         * trans-decl.c (gfor_fndecl_co_max,
1598         gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1599         (gfc_build_builtin_function_decls): Assign to it.
1600         * trans-intrinsic.c (conv_co_minmaxsum): New.
1601         (gfc_conv_intrinsic_subroutine): Call it.
1603 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
1604             Mike Stump  <mikestump@comcast.net>
1605             Richard Sandiford  <rdsandiford@googlemail.com>
1607         * target-memory.c: Include wide-int.h.
1608         (gfc_interpret_logical): Use wide-int interfaces.
1609         * trans-array.c: Include wide-int.h.
1610         (gfc_conv_array_initializer): Use wide-int interfaces.
1611         * trans-const.c: Include wide-int.h.
1612         (gfc_conv_string_init): Use wide-int interfaces.
1613         (gfc_conv_mpz_to_tree): Likewise.
1614         (gfc_conv_tree_to_mpz): Likewise.
1615         * trans-decl.c (gfc_can_put_var_on_stack): Use tree_fits_uhwi_p.
1616         * trans-expr.c: Include wide-int.h.
1617         (gfc_conv_cst_int_power): Use wide-int interfaces.
1618         (gfc_string_to_single_character): Likewise.
1619         (gfc_optimize_len_trim): Likewise.
1620         * trans-intrinsic.c: Include wide-int.h.
1621         (trans_this_image): Use wide-int interfaces.
1622         (gfc_conv_intrinsic_bound): Likewise.
1623         (conv_intrinsic_cobound): Likewise.
1624         * trans-types.c (gfc_init_types): Likewise.
1625         (gfc_get_array_type_bounds): Pass an integer of the correct type
1626         instead of using integer_one_node.
1628 2014-04-30  Tobias Burnus  <burnus@net-b.de>
1630         * trans-decl.c (create_function_arglist): Add hidden coarray arguments
1631         also for polymorphic coarrays.
1632         * trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray arguments
1633         also for polymorphic coarrays.
1635 2014-04-30  Tobias Burnus  <burnus@net-b.de>
1637         * resolve.c (resolve_function): Don't do
1638         assumed-size check for lcobound/ucobound.
1639         * trans-types.c (gfc_build_array_type): Only build an array
1640         descriptor with codimensions for allocatable coarrays.
1642 2014-04-30  Tobias Burnus  <burnus@net-b.de>
1644         * gfortran.h (gfc_init_coarray_decl): Remove.
1645         * parse.c (translate_all_program_units): Remove call to it.
1646         (gfc_parse_file): Update call.
1647         * trans.h (gfor_fndecl_caf_this_image,
1648         gfor_fndecl_caf_num_images): Add.
1649         (gfort_gvar_caf_num_images,
1650         gfort_gvar_caf_this_image): Remove.
1651         * trans-decl.c (gfor_fndecl_caf_this_image,
1652         gfor_fndecl_caf_num_images): Add.
1653         (gfort_gvar_caf_num_images,
1654         gfort_gvar_caf_this_image): Remove.
1655         (gfc_build_builtin_function_decls): Init new decl.
1656         (gfc_init_coarray_dec): Remove.
1657         (create_main_function): Change calls.
1658         * trans-intrinsic.c (trans_this_image, trans_image_index,
1659         conv_intrinsic_cobound): Generate call to new library function
1660         instead of to a static variable.
1661         * trans-stmt.c (gfc_trans_sync): Ditto.
1663 2014-04-30  Tobias Burnus  <burnus@net-b.de>
1665         * trans-expr.c (get_tree_for_caf_expr): Fix handling of polymorphic
1666         and derived-type coarrays.
1668 2014-04-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1670         PR fortran/59604
1671         PR fortran/58003
1672         * gfortran.h (gfc_convert_mpz_to_signed):  Add prototype.
1673         * arith.c (gfc_int2int):  Convert number to signed if
1674         arithmetic overflow is not checked.
1675         * simplify.c (convert_mpz_to_unsigned): Only trigger assert for
1676         size if range checking is in force.
1677         (convert_mpz_to_signed):  Make non-static, rename to
1678         (gfc_convert_mpz_to_signed).
1679         (simplify_dshift): Use gfc_convert_mpz_to_signed.
1680         (gfc_simplify_ibclr):  Likewise.
1681         (gfc_simplify_ibits):  Likewise.
1682         (gfc_simplify_ibset):  Likewise.
1683         (simplify_shift):  Likewise.
1684         (gfc_simplify_ishiftc):  Likewise.
1685         (gfc_simplify_maskr):  Likewise.
1686         (gfc_simplify_maskl):  Likewise.
1688 2014-04-22  Tobias Burnus  <burnus@net-b.de>
1690         PR fortran/60881
1691         * trans-expr.c (gfc_trans_subcomponent_assign): Fix handling
1692         of scalar coarrays.
1694 2014-04-17  Jakub Jelinek  <jakub@redhat.com>
1696         * trans-types.c (gfc_init_kinds): Make sure GET_MODE_BITSIZE
1697         argument is enum machine_mode.
1699 2014-04-13  Paul Thomas  <pault@gcc.gnu.org>
1701         PR fortran/58085
1702         PR fortran/60717
1703         * trans.h: Add 'use_offset' bitfield to gfc_se.
1704         * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
1705         as a trigger to unconditionally recalculate the offset for
1706         array slices and constant arrays.
1707         trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
1708         trans-stmt.c (trans_associate_var): Ditto.
1709         (gfc_conv_procedure_call): Ditto.
1711 2014-04-11  Tobias Burnus  <burnus@net-b.de>
1713         PR fortran/58880
1714         PR fortran/60495
1715         * resolve.c (gfc_resolve_finalizers): Ensure that vtables
1716         and finalization wrappers are generated.
1718 2014-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
1720         * intrinsic.texi (RANDOM_SEED): Improve example.
1722 2014-04-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1724         * class.c (gfc_build_class_symbol): Append "_t" to target class
1725         names to make the generated type names unique.
1727 2014-04-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1729         PR fortran/60191
1730         * trans-types.c (gfc_get_function_type): In case of recursion
1731         build a variadic function type with empty argument list instead of a
1732         stdarg-like function type with incomplete argument list.
1734 2014-04-04  Tobias Burnus  <burnus@net-b.de>
1736         * check.c (gfc_check_cmplx): Fix typo.
1738 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
1739             Tobias Burnus  <burnus@net-b.de>
1741         PR fortran/60576
1742         * trans-expr.c (gfc_conv_derived_to_class): Avoid
1743         generation of out-of-bounds range expr.
1745 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
1747         PR fortran/60677
1748         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
1749         list buffer.
1751 2014-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1753         PR fortran/60522
1754         * frontend-passes.c (cfe_code):  Do not walk subtrees
1755         for WHERE.
1757 2014-03-27  Tobias Burnus  <burnus@net-b.de>
1759         PR fortran/58880
1760         * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
1761         of nonpointers.
1763 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
1765         PR fortran/34928
1766         * fortran.texi: Document Volatile COMMON as not supported.
1768 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
1770         PR debug/60603
1771         * cpp.c (gfc_cpp_init): Restore cb_change_file call to
1772         <built-in>.
1774 2014-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1776         PR fortran/60148
1777         * gfortran.texi: Add description of namelist DELIM= behavior.
1779 2014-03-19  Tobias Burnus  <burnus@net-b.>
1781         PR fortran/60543
1782         * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
1783         * resolve.c (resolve_ordinary_assign): Ditto.
1785 2014-03-19  Tobias Burnus  <burnus@net-b.de>
1787         PR fortran/60543
1788         PR fortran/60283
1789         * gfortran.h (gfc_unset_implicit_pure): New prototype.
1790         * resolve.c (gfc_unset_implicit_pure): New.
1791         (resolve_structure_cons, resolve_function,
1792         pure_subroutine): Use it.
1793         * decl.c (match_old_style_init, gfc_match_data,
1794         match_pointer_init, variable_decl): Ditto.
1795         * expr.c (gfc_check_pointer_assign): Ditto.
1796         * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
1797         * io.c (match_vtag, gfc_match_open, gfc_match_close,
1798         match_filepos, gfc_match_inquire, gfc_match_print,
1799         gfc_match_wait): Ditto.
1800         * match.c (gfc_match_critical, gfc_match_stopcode,
1801         lock_unlock_statement, sync_statement, gfc_match_allocate,
1802         gfc_match_deallocate): Ditto.
1803         * parse.c (decode_omp_directive): Ditto.
1804         * symbol.c (gfc_add_save): Ditto.
1806 2014-03-18  Janus Weil  <janus@gcc.gnu.org>
1808         PR fortran/55207
1809         PR fortran/60549
1810         * decl.c (match_attr_spec): Revert r208590.
1812 2014-03-18  Jakub Jelinek  <jakub@redhat.com>
1814         PR ipa/58721
1815         * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
1816         if !optimize.
1818 2014-03-18  Tobias Burnus  <burnus@net-b.de>
1820         PR ipa/58721
1821         * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
1822         (gfc_trans_io_runtime_check): Remove.
1823         * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
1824         as argument, add predictor to block.
1825         (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
1826         gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
1827         * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
1828         (gfc_trans_runtime_check, gfc_allocate_using_malloc,
1829         gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
1830         branch predictor.
1831         * trans-expr.c (gfc_conv_procedure_call): Ditto.
1832         * trans-stmt.c (gfc_trans_allocate): Ditto.
1833         * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
1835 2014-03-15  Janus Weil  <janus@gcc.gnu.org>
1837         PR fortran/55207
1838         * decl.c (match_attr_spec): Variables in the main program implicitly
1839         get the SAVE attribute in Fortran 2008.
1841 2014-03-14  Mikael Morin  <mikael@gcc.gnu.org>
1843         PR fortran/60392
1844         * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
1845         if it has transposed dimensions.
1847 2014-03-08  Tobias Burnus  <burnus@net-b.de>
1849         PR fortran/60447
1850         * f95-lang.c (gfc_init): Return false when only
1851         preprocessing.
1852         * options.c (gfc_post_options): Ditto.
1854 2014-03-08  Tobias Burnus  <burnus@net-b.de>
1856         * gfortran.texi (Fortran 2003 Status): Mention finalization,
1857         deferred-length character support and input rounding.
1858         (Fortran 2008 Status): Mention that at termination
1859         signalling exceptions are shown.
1861 2014-03-06  Paul Thomas  <pault@gcc.gnu.org>
1862             Janus Weil  <janus@gcc.gnu.org>
1864         PR fortran/51976
1865         * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
1866         * primary.c (build_actual_constructor): It is not an error if
1867         a missing component has the deferred_parameter attribute;
1868         equally, if one is given a value, it is an error.
1869         * resolve.c (resolve_fl_derived0): Remove error for deferred
1870         character length components.  Add the hidden string length
1871         field to the structure. Give it the deferred_parameter
1872         attribute.
1873         * trans-array.c (duplicate_allocatable): Add a strlen field
1874         which is used as the element size if it is non-null.
1875         (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
1876         NULL to the new argument in duplicate_allocatable.
1877         (structure_alloc_comps): Set the hidden string length as
1878         appropriate. Use it in calls to duplicate_allocatable.
1879         (gfc_alloc_allocatable_for_assignment): When a deferred length
1880         backend declaration is variable, use that; otherwise use the
1881         string length from the expression evaluation.
1882         * trans-expr.c (gfc_conv_component_ref): If this is a deferred
1883         character length component, the string length should have the
1884         value of the hidden string length field.
1885         (gfc_trans_subcomponent_assign): Set the hidden string length
1886         field for deferred character length components.  Allocate the
1887         necessary memory for the string.
1888         (alloc_scalar_allocatable_for_assignment): Same change as in
1889         gfc_alloc_allocatable_for_assignment above.
1890         * trans-stmt.c (gfc_trans_allocate): Likewise.
1891         * trans-intrinsic (size_of_string_in_bytes): Make non-static.
1892         * trans-types.c (gfc_get_derived_type): Set the tree type for
1893         a deferred character length component.
1894         * trans.c (gfc_deferred_strlen): New function.
1895         * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
1897 2014-03-01  Mikael Morin  <mikael@gcc.gnu.org>
1899         PR fortran/60341
1900         * frontend-passes.c (optimize_comparison): Guard two union accesses
1901         with the corresponding tag checks.
1903 2014-02-28  Janus Weil  <janus@gcc.gnu.org>
1905         PR fortran/60359
1906         * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
1907         procedure for characters.
1909 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
1911         PR fortran/60302
1912         * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
1913         is successful.
1915 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
1917         PR fortran/60234
1918         * gfortran.h (gfc_build_class_symbol): Removed argument.
1919         * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
1920         (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
1921         delayed now, except for unlimited polymorphics.
1922         (comp_is_finalizable): Procedure pointer components are not finalizable.
1923         * decl. (build_sym, build_struct, attr_decl1): Removed argument of
1924         'gfc_build_class_symbol'.
1925         * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
1926         Ditto.
1927         * symbol.c (gfc_set_default_type): Ditto.
1929 2014-02-19  Janus Weil  <janus@gcc.gnu.org>
1931         PR fortran/60232
1932         * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
1933         functions, which are used as procedure pointer target.
1935 2014-02-18  Tobias Burnus  <burnus@net-b.de>
1937         PR fortran/49397
1938         * expr.c (gfc_check_pointer_assign): Add check for
1939         F2008Cor2, C729.
1940         * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
1941         decl in a corner case.
1943 2014-02-18  Janus Weil  <janus@gcc.gnu.org>
1945         PR fortran/60231
1946         * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
1947         arguments to prevent ICE.
1949 2014-02-17  Janus Weil  <janus@gcc.gnu.org>
1951         PR fortran/55907
1952         * resolve.c (build_default_init_expr): Don't initialize character
1953         variable if -fno-automatic is given.
1955 2014-02-15  Mikael Morin  <mikael@gcc.gnu.org>
1957         PR fortran/59599
1958         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
1959         number of arguments.
1961 2014-02-11  Jakub Jelinek  <jakub@redhat.com>
1963         PR fortran/52370
1964         * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
1965         on decl if sym->attr.optional.
1967 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
1969         PR fortran/57522
1970         * resolve.c (resolve_assoc_var): Set the subref_array_pointer
1971         attribute for the 'associate-name' if necessary.
1972         * trans-stmt.c (trans_associate_var): If the 'associate-name'
1973         is a subref_array_pointer, assign the element size of the
1974         associate variable to 'span'.
1976 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
1978         PR fortran/59026
1979         * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
1980         actual argument to a formal argument with the value attribute
1981         in an elemental procedure.
1983 2014-02-08  Janus Weil  <janus@gcc.gnu.org>
1984             Mikael Morin <mikael.morin@gcc.gnu.org>
1986         PR fortran/58470
1987         * class.c (generate_finalization_wrapper): Assert that proc_tree has
1988         been set in gfc_resolve_finalizers.
1989         * resolve.c (resolve_fl_derived0): Remove unnecessary call to
1990         gfc_is_finalizable.
1992 2014-02-07  Benno Schulenberg  <bensberg@justemail.net>
1994         PR translation/52289
1995         * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
1996         in an error message.
1998 2014-02-02  Mikael Morin  <mikael@gcc.gnu.org>
2000         PR fortran/57033
2001         * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
2002         dereference.
2004 2014-02-01  Paul Thomas  <pault@gcc.gnu.org>
2006         PR fortran/59906
2007         * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
2008         SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
2009         pointer to the string is stored.
2010         * trans-expr.c (gfc_conv_expr_reference): Likewise, use
2011         gfc_conv_string_parameter to ensure that a pointer to is passed
2012         to the elemental function.
2014 2014-01-28  Paul Thomas  <pault@gcc.gnu.org>
2016         PR fortran/59414
2017         * trans-stmt.c (gfc_trans_allocate): Before the pointer
2018         assignment to transfer the source _vptr to a class allocate
2019         expression, the final class reference should be exposed. The
2020         tail that includes the _data and array references is stored.
2021         This reduced expression is transferred to 'lhs' and the _vptr
2022         added. Then the tail is restored to the allocate expression.
2024 2014-01-26  Mikael Morin  <mikael@gcc.gnu.org>
2026         PR fortran/58007
2027         * module.c (read_module): Assert for component name correctness.
2029 2014-01-18  Mikael Morin  <mikael@gcc.gnu.org>
2031         PR fortran/58007
2032         * module.c (MOD_VERSION): Bump.
2033         (fp2, find_pointer2): Remove.
2034         (mio_component_ref): Don't forcedfully set the containing derived type
2035         symbol for loading.  Remove unused argument.
2036         (mio_ref): Update caller
2037         (mio_symbol): Dump component list earlier.
2038         (skip_list): New argument nest_level.  Initialize level with the new
2039         argument.
2040         (read_module): Add forced pointer components association for derived
2041         type symbols.
2043 2014-01-12  Janus Weil  <janus@gcc.gnu.org>
2045         PR fortran/58026
2046         * decl.c (gfc_match_data_decl): Improve error recovery.
2048 2014-01-09  Tobias Burnus  <burnus@net-b.de>
2050         * cpp.c (gfc_cpp_handle_option): Add missing break.
2051         * trans-io.c (transfer_expr): Silence unused value warning.
2053 2014-01-08  Janus Weil  <janus@gcc.gnu.org>
2055         PR fortran/58182
2056         * resolve.c (gfc_verify_binding_labels): Modify order of checks.
2058 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
2060         PR fortran/59589
2061         * class.c (comp_is_finalizable): New function to dermine if a given
2062         component is finalizable.
2063         (finalize_component, generate_finalization_wrapper): Use it.
2065 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
2067         PR fortran/59023
2068         PR fortran/59662
2069         * resolve.c (resolve_global_procedure): Don't apply to c-binding
2070         procedures.
2071         (gfc_verify_binding_labels): Remove duplicate line.
2073 2014-01-04  Janus Weil  <janus@gcc.gnu.org>
2075         PR fortran/59547
2076         * class.c (add_proc_comp): Copy pure attribute.
2078 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2080         Update copyright years
2082 2014-01-02  Tobias Burnus  <burnus@net-b.de>
2084         * gfortranspec.c (lang_specific_driver): Update copyright notice
2085         dates.
2086         * gfc-internals.texi: Bump @copying's copyright year.
2087         * gfortran.texi: Ditto.
2088         * intrinsic.texi: Ditto.
2089         * invoke.texi: Ditto.
2091 2014-01-02  Janus Weil  <janus@gcc.gnu.org>
2093         PR fortran/59654
2094         * resolve.c (resolve_typebound_procedures): No need to create the vtab
2095         here.
2097 Copyright (C) 2014 Free Software Foundation, Inc.
2099 Copying and distribution of this file, with or without modification,
2100 are permitted in any medium without royalty provided the copyright
2101 notice and this notice are preserved.