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