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