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