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