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