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