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