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