1 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
3 * trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab.
5 2014-10-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8 * simplify.c (gfc_simplify_atan): Use mpfr_zero_p to check for zeros.
9 (gfc_simplify_log): Likewise.
10 (gfc_simplify_scale): Likewise.
11 (gfc_simplify_exponent): Handle infinities and NaNs.
12 (gfc_simplify_fraction): Handle infinities.
13 (gfc_simplify_rrspacing): Handle signed zeros and NaNs.
14 (gfc_simplify_set_exponent): Handle infinities and NaNs.
15 (gfc_simplify_spacing): Handle zeros, infinities and NaNs.
17 2014-10-10 Jakub Jelinek <jakub@redhat.com>
20 * trans-openmp.c (gfc_omp_predetermined_sharing): Return
21 OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
23 2014-10-10 Tobias Burnus <burnus@net-b.de>
25 * gfortran.h (gfc_set_implicit_none): Update prototype.
26 * symbol.c (gfc_set_implicit_none): Take and
27 use error location. Move diagnostic from here to ...
28 * decl.c (gfc_match_implicit_none): ... here. And
29 update call. Handle empty implicit-none-spec.
30 (gfc_match_implicit): Handle statement-separator ";".
32 2014-10-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
34 * f95-lang.c (gfc_init_builtin_functions): Add more floating-point
36 * mathbuiltins.def (OTHER_BUILTIN): Define built-ins for logb,
37 remainder, rint and signbit.
38 * trans-decl.c (save_fp_state, restore_fp_state): Move to
40 (gfc_generate_function_code): Use new names for these two functions.
41 * trans-expr.c (gfc_conv_function_expr): Catch IEEE functions to
42 emit code from the front-end.
43 * trans-intrinsic.c (gfc_save_fp_state, gfc_restore_fp_state,
44 conv_ieee_function_args, conv_intrinsic_ieee_builtin,
45 conv_intrinsic_ieee_is_normal, conv_intrinsic_ieee_is_negative,
46 conv_intrinsic_ieee_logb_rint, conv_intrinsic_ieee_rem,
47 conv_intrinsic_ieee_next_after, conv_intrinsic_ieee_scalb,
48 conv_intrinsic_ieee_copy_sign, gfc_conv_ieee_arithmetic_function):
50 * trans.h (gfc_conv_ieee_arithmetic_function,
51 gfc_save_fp_state, gfc_restore_fp_state): New prototypes.
53 2014-10-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
57 * gfortran.h (gfc_warning_cmdline): Add overload that takes an
59 (gfc_error_cmdline): Declare.
60 * error.c (gfc_warning_cmdline): New overload that takes an option.
61 (gfc_error_cmdline): New.
62 * lang.opt (Wmissing-include-dirs): New.
63 * scanner.c (add_path_to_list): Use the new functions.
64 (load_file): Likewise.
65 * options.c (gfc_init_options): Wmissing-include-dirs is enabled
66 by default in Fortran.
67 (gfc_handle_option): Accept automatically handled options.
69 2014-10-06 Tobias Burnus <burnus@net-b.de>
71 * libgfortran.h (GFC_STD_F2015): Add.
72 * decl.c (gfc_match_implicit_none): Handle spec list.
73 (gfc_match_implicit): Move double intrinsic warning here.
74 * gfortran.h (gfc_namespace): Add has_implicit_none_export:1.
75 (gfc_set_implicit_none): Update interface.
76 * interface.c (gfc_procedure_use): Add implicit-none external
78 * parse.c (accept_statement): Remove call.
79 (verify_st_order): Permit that external-implict-none follows
81 * symbol.c (gfc_set_implicit_none): Handle external/type
84 2014-10-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
87 * resolve.c (resolve_fl_procedure): Clean up obsolescence warning.
89 2014-09-25 Tobias Burnus <burnus@net-b.de>
91 * check.c (check_co_collective): Renamed from check_co_minmaxsum,
93 (gfc_check_co_minmax, gfc_check_co_sum): Update call.
94 (gfc_check_co_broadcast, gfc_check_co_reduce): New.
95 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_BROADCAST and
97 * intrinsic.c (add_subroutines): Add co_reduce and co_broadcast.
98 * intrinsic.h (gfc_check_co_broadcast, gfc_check_co_reduce): Add
100 * intrinsic.texi (CO_BROADCAST): Add.
101 * trans.h (gfor_fndecl_co_broadcast): New.
102 * trans-decl.c (gfor_fndecl_co_broadcast): Ditto.
103 (gfc_build_builtin_function_decls): Add decl for it,
104 * trans-intrinsic.c (conv_co_collective): Renamed from
105 conv_co_minmaxsum. Handle co_reduce.
106 (gfc_conv_intrinsic_subroutine): Handle co_reduce.
108 2014-09-23 Jakub Jelinek <jakub@redhat.com>
111 * trans-types.c (gfc_get_array_descr_info): Build DEBUG_EXPR_DECL
112 instead of VAR_DECL for base_decl.
114 2014-09-21 Jan Hubicka <hubicka@ucw.cz>
116 * openmp.c (omp_context): Rename to ...
117 (fortran_omp_context): ... this one.
119 2014-09-21 Dominique d'Humieres <dominiq@lps.ens.fr>
121 * resolve.c (resolve_fl_procedure): Remove duplicated lines.
123 2014-09-20 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
124 Tobias Burnus <burnus@net-b.de>
126 * trans-intrinsic.c (conv_intrinsic_atomic_op): Fix issue with
127 generating temporary for value argument.
129 2014-09-20 Joost VandeVondele <vondele@gcc.gnu.org>
131 * trans-expr.c (gfc_reset_vptr): Fix comment whitespace.
132 (gfc_conv_class_to_class): Likewise.
133 (gfc_conv_procedure_call): Likewise.
134 (arrayfunc_assign_needs_temporary): Likewise.
135 (realloc_lhs_loop_for_fcn_call): Likewise.
136 (gfc_trans_assignment_1): Likewise.
137 * trans-array.c (gfc_conv_array_ref): Likewise.
138 (gfc_array_allocate): Likewise.
139 (gfc_alloc_allocatable_for_assignment): Likewise.
140 * symbol.c (generate_isocbinding_symbol): Likewise.
141 * class.c (finalization_scalarizer): Likewise.
142 (finalizer_insert_packed_call): Likewise.
143 (generate_finalization_wrapper): Likewise.
144 (find_intrinsic_vtab): Likewise.
145 * decl.c (gfc_match_import): Likewise.
146 (match_procedure_decl): Likewise.
147 (gfc_match_subroutine): Likewise.
148 (gfc_match_bind_c): Likewise.
149 (gfc_match_volatile): Likewise.
150 * trans-common.c (create_common): Likewise.
151 * error.c (gfc_diagnostic_starter): Likewise.
152 * trans-stmt.c (gfc_trans_sync): Likewise.
153 (gfc_trans_critical): Likewise.
154 (gfc_trans_simple_do): Likewise.
155 (gfc_trans_do): Likewise.
156 (gfc_trans_where_assign): Likewise.
157 * expr.c (gfc_is_simply_contiguous): Likewise.
158 * module.c (unquote_string): Likewise.
159 * trans.c (gfc_add_finalizer_call): Likewise.
160 * trans-types.c (gfc_init_kinds): Likewise.
161 * scanner.c (preprocessor_line): Likewise.
162 * gfortranspec.c (lang_specific_driver): Likewise.
163 * frontend-passes.c (create_var): Likewise.
164 (cfe_expr_0): Likewise.
165 * resolve.c (check_host_association): Likewise.
166 (gfc_resolve_code): Likewise.
167 (resolve_fl_derived0): Likewise.
168 (resolve_symbol): Likewise.
169 * f95-lang.c (poplevel): Likewise.
170 * trans-decl.c (create_main_function): Likewise.
171 * trans-io.c (transfer_expr): Likewise.
172 * arith.c (gfc_arith_divide): Likewise.
173 * parse.c (resolve_all_program_units): Likewise.
174 * check.c (gfc_check_rank): Likewise.
175 (gfc_check_sizeof): Likewise.
176 (is_c_interoperable): Likewise.
177 * dependency.c (gfc_dep_difference): Likewise.
178 * primary.c (gfc_match_rvalue): Likewise.
179 * trans-intrinsic.c (conv_intrinsic_system_clock): Likewise.
180 (conv_isocbinding_subroutine): Likewise.
181 * options.c (gfc_post_options): Likewise.
182 (gfc_handle_fpe_option): Likewise.
183 (gfc_get_option_string): Likewise.
184 * simplify.c (simplify_transformation_to_scalar): Likewise.
185 (gfc_simplify_spread): Likewise.
187 2014-09-19 Joost VandeVondele <vondele@gcc.gnu.org>
190 * trans-array.c (gfc_trans_deferred_array): Only nullify allocatables.
192 2014-09-15 Jakub Jelinek <jakub@redhat.com>
194 * Make-lang.in (check_gfortran_parallelize): Change to just an upper
197 2014-09-13 Tobias Burnus <burnus@net-b.de>
200 * trans-decl.c (gfc_build_builtin_function_decls): Fix
201 caf_unlock declaration.
203 2014-09-12 Joseph Myers <joseph@codesourcery.com>
205 * trans-types.c (gfc_init_kinds): Check
206 targetm.libgcc_floating_mode_supported_p for floating-point
207 modes. Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE.
209 2014-09-05 Joost VandeVondele <vondele@gcc.gnu.org>
212 * intrinsic.texi (INT): clarify result.
214 2014-09-03 Fritz Reese <Reese-Fritz@zai.com>
217 * decl.c (variable_decl): Don't overwrite typespecs of Cray pointees
218 when matching a component declaration.
220 2014-09-02 Marek Polacek <polacek@redhat.com>
223 * interface.c (compare_parameter): Fix condition.
224 * trans-expr.c (gfc_conv_procedure_call): Likewise.
226 2014-08-31 Fritz Reese <Reese-Fritz@zai.com>
229 * resolve.c (apply_default_init_local): Don't treat variables
230 in RECURSIVE procedures as saved.
232 2014-08-31 Tobias Burnus <burnus@net-b.de>
234 * trans-decl.c (gfc_build_builtin_function_decls): Add
235 may_require_tmp dummy argument.
236 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get,
237 conv_caf_send): Handle may_require_tmp argument.
238 (gfc_conv_intrinsic_function): Update call.
239 * gfortran.texi (_gfortran_caf_send, _gfortran_caf_get,
240 _gfortran_caf_sendget): Update interface description.
242 2014-08-30 Tobias Burnus <burnus@net-b.de>
244 * trans.h (gfc_caf_get_image_index,
245 gfc_get_caf_token_offset): New prototypes.
246 * trans-expr.c (gfc_caf_get_image_index): Moved from
247 trans-intrinsic.c and renamed.
248 (gfc_get_caf_token_offset) Ditto; support offset = NULL
250 * trans-intrinsic.c (get_caf_token_offset, caf_get_image_index):
252 (gfc_conv_intrinsic_caf_get, conv_caf_send,
253 conv_intrinsic_atomic_op, conv_intrinsic_atomic_ref,
254 conv_intrinsic_atomic_cas): Update callers.
256 2014-08-30 Tobias Burnus <burnus@net-b.de>
261 * dependency.c (gfc_check_dependency): Allow for optimizations
262 in the pointer-alias check.
264 2014-08-30 Janne Blomqvist <jb@gcc.gnu.org>
266 * module.c (gfc_dump_module): Use ISO C remove() instead of POSIX
269 2014-08-29 Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com>
272 * module.c (gfc_dump_module): Unlink old module file before
275 2014-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
277 * frontend_passes (expr_array): Replace by vec template.
279 (expr_count): Remove.
280 (doloop_list): Replace by vec template.
281 (doloop_size): Remove.
282 (gfc_run_passes): Adjust to use of vec template.
283 (cfe_register_funcs): Likewise.
284 (cfe_expr_0): Likewise.
285 (doloop_code): Likewise.
287 2014-08-22 Steven Bosscher <steven@gcc.gnu.org>
290 * resolve.c (resolve_select): Fix list traversal in case the
291 last element of the CASE list was dropped as unreachable code.
293 2014-08-22 Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
296 * lang.opt (Wuse-without-only): New flag.
297 * gfortran.h (gfc_option_t): Add it.
298 * invoke.texi: Document it.
299 * module.c (gfc_use_module): Warn if needed.
300 * options.c (gfc_init_options,gfc_handle_option): Init accordingly.
302 2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
305 * frontend-passes.c (optimize_binop_array_assignment):
306 Do not try to optimize the array assignment for string
309 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
312 * error.c (gfc_diagnostic_build_locus_prefix): New function.
313 (gfc_diagnostic_starter): Follow Fortran FE diagnostics.
314 (gfc_diagnostic_finalizer): Do not call default finalizer.
316 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
319 * error.c (gfc_diagnostic_finalizer): Call default finalizer.
321 2014-08-20 Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
323 * options.c (gfc_init_options_struct): assert that the frontend sets
324 flag_errno_math and flag_associative_math.
326 2014-08-17 Tobias Burnus <burnus@net-b.de>
328 * resolve.c (gfc_resolve_finalizers): Ensure that parents are
331 2014-08-17 Tobias Burnus <burnus@net-b.de>
333 * trans-io.c (gfc_build_io_library_fndecls): Fix decl of
335 (transfer_namelist_element): Use proper int type as argument.
337 2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
340 * trans-expr.c (is_runtime_conformable): Add NULL pointer checks.
342 2014-08-15 Tobias Burnus <burnus@net-b.de>
344 * resolve.c (resolve_critical): Fix name mangling.
345 * trans-stmt.c (gfc_trans_critical): Fix lock call.
347 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
350 * gfortran.h: Define GCC_DIAG_STYLE.
351 (gfc_diagnostics_init,gfc_warning_cmdline): Declare.
352 * trans-array.c: Include gfortran.h before diagnostic-core.h.
353 * trans-expr.c: Likewise.
354 * trans-openmp.c: Likewise.
355 * trans-const.c: Likewise.
357 * trans-types.c: Likewise.
358 * f95-lang.c: Likewise.
359 * trans-decl.c: Likewise.
360 * trans-io.c: Likewise.
361 * trans-intrinsic.c: Likewise.
362 * error.c: Include diagnostic.h and diagnostic-color.h.
363 (gfc_diagnostic_build_prefix): New.
364 (gfc_diagnostic_starter): New.
365 (gfc_diagnostic_finalizer): New.
366 (gfc_warning_cmdline): New.
367 (gfc_diagnostics_init): New.
368 * gfc-diagnostic.def: New.
369 * options.c (gfc_init_options): Call gfc_diagnostics_init.
370 (gfc_post_options): Use gfc_warning_cmdline.
372 2014-08-15 Jakub Jelinek <jakub@redhat.com>
373 Tobias Burnus <burnus@net-b.de>
376 * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr
377 is allocatable, rather than whenever var->attr.allocatable.
379 2014-08-15 Jakub Jelinek <jakub@redhat.com>
382 * trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
383 or allocatable passed by reference.
384 (gfc_trans_omp_clauses) <case OMP_LIST_MAP>: Likewise.
386 2014-08-14 Thomas Koenig <tkoenig@gcc.gnu.org>
389 * gfortran.h (symbol_attribute): Add fe_temp flag.
390 * frontend-passes.c (is_fe_temp): New function.
391 (create_var): Don't add a temporary for an already
392 created variable or for a constant.
393 (combine_ARRAY_constructor): Remove special handling
396 2014-08-14 Tobias Burnus <burnus@net-b.de>
398 * gfortran.texi (caf_register_t): Add CAF_REGTYPE_CRITICAL.
399 (_gfortran_caf_register): Update for locking/critical.
400 (_gfortran_caf_lock, _gfortran_caf_unlock): Add.
401 * resolve.c (resolve_critical): New.
402 (gfc_resolve_code): Call it.
403 * trans-decl.c (gfor_fndecl_caf_critical,
404 gfor_fndecl_caf_end_critical): Remove.
405 (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
406 (gfc_build_builtin_function_decls): Remove critical,
407 assign locking declarations.
408 (generate_coarray_sym_init): Handle locking and
410 * trans-stmt.c (gfc_trans_critical): Add calls to
411 lock/unlock libcaf functions.
412 * trans.h (gfc_coarray_type): Update locking, add
413 critical enum values.
414 (gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical): Remove.
415 (gfor_fndecl_caf_lock, gfor_fndecl_caf_unlock): Add.
417 2014-08-14 Tobias Burnus <burnus@net-b.de>
419 * gfortran.texi (Coarray Programming): Add first ABI
422 2014-08-14 Jakub Jelinek <jakub@redhat.com>
425 * openmp.c (gfc_match_omp_clauses): When failed to match
426 operator name, defined op name or name, set buffer to
427 empty string. Don't call gfc_find_omp_udr if buffer is empty
429 (gfc_match_omp_declare_reduction): Call gfc_undo_symbols ()
430 before calling gfc_free_omp_udr.
432 2014-08-11 Richard Biener <rguenther@suse.de>
435 * trans-expr.c (gfc_conv_structure): Initialize _size with
436 a value of proper type.
438 2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
441 * simplify.c (gfc_simplify_dot_product): Convert types of
442 vectors before calculating the result.
444 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
446 * openmp.c, trans-decl.c: Use hash_set instead of pointer_set.
448 2014-07-26 Tobias Burnus <burnus@net-b.de>
453 * intrinsic.texi (SIZEOF): Document changed behavior
454 for polymorphic arrays.
456 2014-07-26 Tobias Burnus <burnus@net-b.de>
461 * check.c (gfc_check_sizeof): Permit for assumed type if and
462 only if it has an array descriptor.
463 * intrinsic.c (do_ts29113_check): Permit SIZEOF.
464 (add_functions): SIZEOF is an Inquiry function.
465 * intrinsic.texi (SIZEOF): Add note that only contiguous
466 arrays are permitted.
467 * trans-expr.c (gfc_conv_intrinsic_to_class): Handle assumed
469 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle
470 assumed type + array descriptor, CLASS and assumed rank.
471 (gfc_conv_intrinsic_storage_size): Handle class arrays.
473 2014-07-25 Tobias Burnus <burnus@net-b.de>
475 * simplify.c (gfc_simplify_storage_size): Use proper
476 integer kind for the returned value.
478 2014-07-24 Uros Bizjak <ubizjak@gmail.com>
480 * intrinsic.texi (Intrinsic Procedures) <ATOMIC_DEFINE>: Move to
481 correct menu position to match sectioning.
483 2014-06-15 Tobias Burnus <burnus@net-b.de>
485 * symbol.c (check_conflict): Add codimension conflict with
486 pointer; fix cray-pointee check.
488 2014-06-14 Tobias Burnus <burnus@net-b.de>
490 * trans-intrinsic.c (conv_intrinsic_atomic_ref): Fix handling
491 for kind mismatch with -fcoarray=lib.
493 2014-07-12 Paul Thomas <pault@gcc.gnu.org>
496 * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
497 that elements are skipped. This then correctly aligns 'reverse'
498 with the scalarizer loops.
500 2014-07-12 Tobias Burnus <burnus@net-b.de>
503 * trans-types.c (gfc_init_types): Fix data-type bug
504 with gfc_max_array_element_size.
506 2014-07-12 Tobias Burnus <burnus@net-b.de>
508 * libgfortran.h (libcaf_atomic_codes): Add.
509 * trans-decl.c (gfor_fndecl_caf_atomic_def,
510 gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
511 gfor_fndecl_caf_atomic_op): New variables.
512 (gfc_build_builtin_function_decls): Initialize them.
513 * trans.h (gfor_fndecl_caf_atomic_def,
514 gfor_fndecl_caf_atomic_ref, gfor_fndecl_caf_atomic_cas,
515 gfor_fndecl_caf_atomic_op): New variables.
516 * trans-intrinsic.c (conv_intrinsic_atomic_op,
517 conv_intrinsic_atomic_ref, conv_intrinsic_atomic_cas):
518 Add library calls with -fcoarray=lib.
520 2014-07-12 Tobias Burnus <burnus@net-b.de>
522 * check.c (gfc_check_atomic): Update for STAT=.
523 (gfc_check_atomic_def, gfc_check_atomic_ref): Update call.
524 (gfc_check_atomic_op, gfc_check_atomic_cas,
525 gfc_check_atomic_fetch_op): New.
526 * gfortran.h (gfc_isym_id): GFC_ISYM_ATOMIC_CAS, GFC_ISYM_ATOMIC_ADD,
527 GFC_ISYM_ATOMIC_AND, GFC_ISYM_ATOMIC_OR, GFC_ISYM_ATOMIC_XOR,
528 GFC_ISYM_ATOMIC_FETCH_ADD, GFC_ISYM_ATOMIC_FETCH_AND,
529 GFC_ISYM_ATOMIC_FETCH_OR and GFC_ISYM_ATOMIC_FETCH_XOR.
530 * intrinsic.c (add_subroutines): Handle them.
531 * intrinsic.texi: Add documentation for them.
532 (ATOMIC_REF, ATOMIC_DEFINE): Add STAT=.
533 (ISO_FORTRAN_ENV): Add STAT_FAILED_IMAGE.
534 * intrinsic.h (gfc_check_atomic_op, gfc_check_atomic_cas,
535 gfc_check_atomic_fetch_op): New
537 * libgfortran.h (libgfortran_stat_codes): Add GFC_STAT_FAILED_IMAGE.
538 * iso-fortran-env.def: Add it.
539 * trans-intrinsic.c (conv_intrinsic_atomic_op): Renamed from
540 conv_intrinsic_atomic_ref; handle more atomics.
541 (conv_intrinsic_atomic_def): Handle STAT=.
542 (conv_intrinsic_atomic_cas): New.
543 (gfc_conv_intrinsic_subroutine): Handle new atomics.
545 2014-07-09 Bernd Schmidt <bernds@codesourcery.com>
547 * trans-array.c (gfc_build_constant_array_constructor): Build a
548 static decl manually.
549 * trans-decl.c (create_main_function): Likewise.
551 2014-07-07 Paul Thomas <pault@gcc.gnu.org>
555 * trans-expr.c (fcncall_realloc_result): Use the natural type
556 for the address expression of 'res_desc'.
558 2014-07-07 Gerald Pfeifer <gerald@pfeifer.com>
560 * gfortran.texi (Fortran 2003 status): Fix grammar.
562 2014-07-04 Tobias Burnus <burnus@net-b.de>
564 * resolve.c (resolve_assoc_var): Fix corank setting.
565 * trans-array.c (gfc_conv_descriptor_token): Change assert.
566 for select-type temporaries.
567 * trans-decl.c (generate_coarray_sym_init): Skip for
568 attr.select_type_temporary.
569 * trans-expr.c (gfc_conv_procedure_call): Fix for
570 select-type temporaries.
571 * trans-intrinsic.c (get_caf_token_offset): Ditto.
572 (gfc_conv_intrinsic_caf_get, gfc_conv_intrinsic_caf_send): Set
574 * trans-types.h (gfc_get_dtype_rank_type): New.
575 * trans-types.c (gfc_get_dtype_rank_type): Ditto.
577 2014-07-03 Tobias Burnus <burnus@net-b.de>
579 * scanner.c (skip_free_comments): Fix indentation.
581 2014-07-02 Jakub Jelinek <jakub@redhat.com>
582 Fritz Reese <Reese-Fritz@zai.com>
584 * decl.c (variable_decl): Reject old style initialization
585 for derived type components.
587 2014-06-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
591 * decl.c (check_bind_name_identifier): New function.
592 (gfc_match_bind_c): Match any constant expression as binding
594 * match.c (gfc_match_name_C): Remove.
596 2014-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
599 * gfortran.h (gfc_simplify_ieee_selected_real_kind): New prototype.
600 * libgfortran.h (GFC_FPE_*): Use simple integer values, valid in
602 * expr.c (gfc_check_init_expr): Simplify IEEE_SELECTED_REAL_KIND.
603 * simplify.c (gfc_simplify_ieee_selected_real_kind): New function.
604 * module.c (mio_symbol): Keep track of symbols which came from
606 (gfc_use_module): Keep track of the IEEE modules.
607 * trans-decl.c (gfc_get_symbol_decl): Adjust code since
608 we have new intrinsic modules.
609 (gfc_build_builtin_function_decls): Build decls for
610 ieee_procedure_entry and ieee_procedure_exit.
611 (is_from_ieee_module, is_ieee_module_used, save_fp_state,
612 restore_fp_state): New functions.
613 (gfc_generate_function_code): Save and restore floating-point
614 state on procedure entry/exit, when IEEE modules are used.
615 * intrinsic.texi: Document the IEEE modules.
617 2014-06-25 Tobias Burnus <burnus@net-b.de>
619 * interface.c (check_intents): Fix diagnostic with
622 2014-06-25 Tobias Burnus <burnus@net-b.de>
624 * resolve.c (resolve_ordinary_assign): Don't invoke caf_send
625 when assigning a coindexed RHS scalar to a noncoindexed LHS
627 * trans-intrinsic.c (conv_caf_send): Do numeric type conversion
628 for a noncoindexed scalar RHS.
630 2014-06-25 Tobias Burnus <burnus@net-b.de>
632 * check.c (check_co_minmaxsum): Add definable check.
633 * expr.c (gfc_check_vardef_context): Fix context == NULL case.
634 * trans-expr.c (get_scalar_to_descriptor_type): Handle pointer
636 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fix generation of
639 2014-06-25 Jakub Jelinek <jakub@redhat.com>
641 * trans.h (gfc_omp_clause_linear_ctor): New prototype.
642 * trans-openmp.c (gfc_omp_linear_clause_add_loop,
643 gfc_omp_clause_linear_ctor): New functions.
644 (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
645 correct type. Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
646 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
648 2014-06-24 Jakub Jelinek <jakub@redhat.com>
650 * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead
652 * f95-lang.c (gfc_init_builtin_functions): Initialize
653 BUILT_IN_ASSUME_ALIGNED.
654 * gfortran.h (gfc_omp_namelist): Change udr field type to
655 struct gfc_omp_namelist_udr.
656 (gfc_omp_namelist_udr): New type.
657 (gfc_get_omp_namelist_udr): Define.
658 (gfc_resolve_code): New prototype.
659 * match.c (gfc_free_omp_namelist): Free name->udr.
660 * module.c (intrinsics): Add INTRINSIC_USER.
661 (fix_mio_expr): Likewise.
662 (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION.
663 * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr.
664 (gfc_match_omp_declare_reduction): Treat len=: the same as len=*.
665 Set attr.flavor on omp_{out,in,priv,orig} artificial variables.
666 (struct resolve_omp_udr_callback_data): New type.
667 (resolve_omp_udr_callback, resolve_omp_udr_callback2,
668 resolve_omp_udr_clause): New functions.
669 (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses
671 (omp_udr_callback): Don't check for implicitly declared functions
673 (gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for
674 implicitly declared subroutines here.
675 * resolve.c (resolve_function): If value.function.isym is non-NULL,
676 consider it already resolved.
677 (resolve_code): Renamed to ...
678 (gfc_resolve_code): ... this. No longer static.
679 (gfc_resolve_blocks, generate_component_assignments, resolve_codes):
681 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
682 by reference type (C_PTR) variables.
683 (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL.
684 (gfc_trans_omp_udr_expr): Remove.
685 (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes.
686 Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension
687 expand it as assignment or subroutine call. Don't initialize
690 2014-06-23 Tobias Burnus <burnus@net-b.de>
692 * trans-decl.c (gfc_trans_deferred_vars): Fix handling of
693 explicit-size arrays with -fcoarray=lib.
695 2014-06-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
698 * invoke.texi: Don't mention nonexisting -fcase-lower option.
700 2014-06-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
703 * expr.c (scalarize_intrinsic_call): Take care of optional
706 2014-06-19 Tobias Burnus <burnus@net-b.de>
708 * trans-intrinsic.c (conv_co_minmaxsum): Fix argument
711 2014-06-18 Tobias Burnus <burnus@net-b.de>
713 * gfortran.texi (OpenMP): Update refs to OpenMP 4.0.
714 * intrinsic.texi (OpenMP Modules): Ditto.
716 2014-06-18 Jakub Jelinek <jakub@redhat.com>
718 * cpp.c (cpp_define_builtins): Change _OPENMP macro to
720 * dump-parse-tree.c (show_omp_namelist): Add list_type
721 argument. Adjust for rop being u.reduction_op now,
722 handle depend_op or map_op.
723 (show_omp_node): Adjust callers. Print some new
724 OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
725 becoming a single OMP_LIST_DEPEND.
726 * f95-lang.c (gfc_handle_omp_declare_target_attribute): New
728 (gfc_attribute_table): New variable.
729 (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
730 * frontend-passes.c (gfc_code_walker): Handle new OpenMP target
731 EXEC_OMP_* codes and new clauses.
732 * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
733 ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
734 ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
735 ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
736 ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
737 ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
738 ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
739 ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
740 ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
741 ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
742 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
743 ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
744 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
745 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
746 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
747 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
748 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
749 ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
750 ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
751 ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
752 ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
753 (symbol_attribute): Add omp_declare_target field.
754 (gfc_omp_depend_op, gfc_omp_map_op): New enums.
755 (gfc_omp_namelist): Replace rop field with union
756 containing reduction_op, depend_op and map_op.
757 (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
758 (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
759 (gfc_omp_clauses): Add num_teams, device, thread_limit,
760 dist_sched_kind, dist_chunk_size fields.
761 (gfc_common_head): Add omp_declare_target field.
762 (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
763 EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
764 EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
765 EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
766 EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
767 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
768 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
769 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
770 EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
771 EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
772 EXEC_OMP_TARGET_UPDATE.
773 (gfc_add_omp_declare_target): New prototype.
774 * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
775 gfc_match_omp_distribute_parallel_do,
776 gfc_match_omp_distribute_parallel_do_simd,
777 gfc_match_omp_distribute_simd, gfc_match_omp_target,
778 gfc_match_omp_target_data, gfc_match_omp_target_teams,
779 gfc_match_omp_target_teams_distribute,
780 gfc_match_omp_target_teams_distribute_parallel_do,
781 gfc_match_omp_target_teams_distribute_parallel_do_simd,
782 gfc_match_omp_target_teams_distribute_simd,
783 gfc_match_omp_target_update, gfc_match_omp_teams,
784 gfc_match_omp_teams_distribute,
785 gfc_match_omp_teams_distribute_parallel_do,
786 gfc_match_omp_teams_distribute_parallel_do_simd,
787 gfc_match_omp_teams_distribute_simd): New prototypes.
788 * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
789 (attr_bits): Likewise.
790 (mio_symbol_attribute): Handle omp_declare_target attribute.
791 (gfc_free_omp_clauses): Free num_teams, device, thread_limit
792 and dist_chunk_size expressions.
793 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
794 OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN,
795 OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
796 OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED,
797 OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL,
798 OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND,
799 OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH,
800 OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN,
801 OMP_CLAUSE_UNIFORM): Use 1U instead of 1.
802 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
803 OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
804 OMP_CLAUSE_DIST_SCHEDULE): Define.
805 (gfc_match_omp_clauses): Change mask parameter to unsigned int.
806 Adjust for rop becoming u.reduction_op. Disallow inbranch with
807 notinbranch. For depend clause, always create OMP_LIST_DEPEND
808 and fill in u.depend_op. Handle num_teams, device, map,
809 to, from, thread_limit and dist_schedule clauses.
810 (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
811 OMP_CLAUSE_NOTINBRANCH.
812 (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
813 OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
814 OMP_DISTRIBUTE_CLAUSES): Define.
815 (match_omp): New function.
816 (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
817 gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
818 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
819 gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
820 gfc_match_omp_task): Rewritten using match_omp.
821 (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
822 Diagnose if the directives are followed by unexpected junk.
823 (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
824 gfc_match_omp_distribute_parallel_do_simd,
825 gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
826 gfc_match_omp_target, gfc_match_omp_target_data,
827 gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
828 gfc_match_omp_target_teams_distribute_parallel_do,
829 gfc_match_omp_target_teams_distribute_parallel_do_simd,
830 gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
831 gfc_match_omp_teams, gfc_match_omp_teams_distribute,
832 gfc_match_omp_teams_distribute_parallel_do,
833 gfc_match_omp_teams_distribute_parallel_do_simd,
834 gfc_match_omp_teams_distrbute_simd): New functions.
835 * openmp.c (resolve_omp_clauses): Adjust for
836 OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND. Handle
837 OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
838 dist_chunk_size and thread_limit.
839 (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
840 ctx.sharing_clauses. Call gfc_resolve_omp_do_blocks for various
841 new EXEC_OMP_* codes.
842 (resolve_omp_do): Handle various new EXEC_OMP_* codes.
843 (gfc_resolve_omp_directive): Likewise.
844 (gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
845 * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
846 offloading related directives.
847 (case_executable): Add ST_OMP_TARGET_UPDATE.
848 (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
850 (case_decl): Add ST_OMP_DECLARE_TARGET.
851 (gfc_ascii_statement): Handle new ST_OMP_* codes.
852 (parse_omp_do): Handle various new ST_OMP_* codes.
853 (parse_executable): Likewise.
854 * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
856 (resolve_code): Likewise.
857 (resolve_symbol): Change that !$OMP DECLARE TARGET variables
859 * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
860 * symbol.c (check_conflict): Check omp_declare_target conflicts.
861 (gfc_add_omp_declare_target): New function.
862 (gfc_copy_attr): Copy omp_declare_target.
863 * trans.c (trans_code): Handle various new EXEC_OMP_* codes.
864 * trans-common.c (build_common_decl): Add "omp declare target"
866 * trans-decl.c (add_attributes_to_decl): Likewise.
867 * trans.h (gfc_omp_finish_clause): New prototype.
868 * trans-openmp.c (gfc_omp_finish_clause): New function.
869 (gfc_trans_omp_reduction_list): Adjust for rop being renamed
871 (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
872 change to OMP_LIST_DEPEND and fix up depend handling.
873 Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
874 thread_limit, device, dist_chunk_size and dist_sched_kind.
875 (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
876 (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
877 GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
878 GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
879 (gfc_split_omp_clauses): Handle splitting of clauses for new
881 (gfc_trans_omp_do_simd): Add pblock argument, adjust for being
882 callable for combined constructs.
883 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
884 (gfc_trans_omp_distribute, gfc_trans_omp_teams,
885 gfc_trans_omp_target, gfc_trans_omp_target_data,
886 gfc_trans_omp_target_update): New functions.
887 (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
888 new EXEC_OMP_* codes.
890 2014-06-18 Tobias Burnus <burnus@net-b.de>
893 * invoke.texi (-Wunused-parameter): Make clearer when
894 -Wextra implies this option.
896 2014-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
899 * options.c (gfc_handle_option): Remove call to
900 handle_generated_option.
902 2014-06-17 Tobias Burnus <burnus@net-b.de>
904 * check.c (gfc_check_atomic, gfc_check_atomic_def):
905 Use argument for GFC_ISYM_CAF_GET.
906 * resolve.c (resolve_variable): Enable CAF_GET insertion.
907 (resolve_lock_unlock): Remove GFC_ISYM_CAF_GET.
908 (resolve_ordinary_assign): Enable CAF_SEND insertion.
909 * trans-const.c (gfc_build_string_const,
910 gfc_build_wide_string_const): Set TYPE_STRING_FLAG.
911 * trans-decl.c (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
912 gfor_fndecl_caf_sendget): New global variables.
913 (gfc_build_builtin_function_decls): Initialize them;
914 update co_min/max/sum initialization.
915 * trans-expr.c (gfc_get_tree_for_caf_expr): Renamed from
916 get_tree_for_caf_expr and removed static.
917 (gfc_conv_procedure_call): Update call.
918 * trans-intrinsic.c (caf_get_image_index,
919 conv_caf_vector_subscript_elem, conv_caf_vector_subscript,
920 get_caf_token_offset, gfc_conv_intrinsic_caf_get,
922 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine,
923 gfc_walk_intrinsic_function): Handle CAF_GET and CAF_SEND.
924 (conv_co_minmaxsum): Update call for remove unused vector
926 (conv_intrinsic_atomic_def, conv_intrinsic_atomic_ref):
927 Skip a CAF_GET of the argument.
928 * trans-types.c (gfc_get_caf_vector_type): New.
929 * trans-types.h (gfc_get_caf_vector_type): New.
930 * trans.h (gfor_fndecl_caf_get, gfor_fndecl_caf_send,
931 gfor_fndecl_caf_sendget): New global variables.
932 (gfc_get_tree_for_caf_expr): New prototypes.
934 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
936 * trans-common.c (build_common_decl): Use
938 * trans-decl.c (gfc_finish_var_decl): Likewise.
939 (get_proc_pointer_decl): Likewise.
941 2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
945 * check.c (gfc_check_system_clock): Improve checking of arguments.
946 * intrinsic.texi: Update doc of SYSTEM_CLOCK.
947 * iresolve.c (gfc_resolve_system_clock): Choose library function
948 used depending on argument kinds.
949 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
950 decls for system_clock_4 and system_clock_8.
951 * trans-intrinsic.c (conv_intrinsic_system_clock): New function.
952 (gfc_conv_intrinsic_subroutine): Call conv_intrinsic_system_clock.
953 * trans.h (gfor_fndecl_system_clock4, gfor_fndecl_system_clock8):
956 2014-06-12 Tobias Burnus <burnus@net-b.de>
958 * gfortran.h (gfc_copy_formal_args_intr): Update prototype.
959 * symbol.c (gfc_copy_formal_args_intr): Handle the case
960 that absent optional arguments should be ignored.
961 * trans-intrinsic.c (gfc_get_symbol_for_expr): Ditto.
962 (gfc_conv_intrinsic_funcall,
963 conv_generic_with_optional_char_arg): Update call.
964 * resolve.c (gfc_resolve_intrinsic): Ditto.
966 2014-06-10 Dominique d'Humieres <dominiq@lps.ens.fr>
967 Mikael Morin <mikael@gcc.gnu.org>
970 * trans-expr.c (gfc_conv_expr_reference): Deallocate array
973 2014-06-10 Jakub Jelinek <jakub@redhat.com>
976 * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
978 * openmp.c (resolve_omp_clauses): Remove allocatable components
979 diagnostics. Add associate-name and intent(in) pointer
980 diagnostics for various clauses, diagnose procedure pointers in
982 * parse.c (match_word_omp_simd): New function.
983 (matchs, matcho): New macros.
984 (decode_omp_directive): Change match macros to either matchs
985 or matcho. Handle -fopenmp-simd.
986 (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
987 * scanner.c (skip_free_comments, skip_fixed_comments, include_line):
989 * trans-array.c (get_full_array_size): Rename to...
990 (gfc_full_array_size): ... this. No longer static.
991 (duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument
993 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
994 duplicate_allocatable callers.
995 (gfc_duplicate_allocatable_nocopy): New function.
996 (structure_alloc_comps): Adjust g*_full_array_size and
997 duplicate_allocatable caller.
998 * trans-array.h (gfc_full_array_size,
999 gfc_duplicate_allocatable_nocopy): New prototypes.
1000 * trans-common.c (create_common): Call gfc_finish_decl_attrs.
1001 * trans-decl.c (gfc_finish_decl_attrs): New function.
1002 (gfc_finish_var_decl, create_function_arglist,
1003 gfc_get_fake_result_decl): Call it.
1004 (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
1005 don't allocate it again.
1006 (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
1008 * trans.h (gfc_finish_decl_attrs): New prototype.
1009 (struct lang_decl): Add scalar_allocatable and scalar_pointer
1011 (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
1012 GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
1013 GFC_DECL_ASSOCIATE_VAR_P): Define.
1014 (GFC_POINTER_TYPE_P): Remove.
1015 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
1016 GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
1017 GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
1018 (gfc_omp_predetermined_sharing): Associate-names are predetermined.
1019 (enum walk_alloc_comps): New.
1020 (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
1021 gfc_walk_alloc_comps): New functions.
1022 (gfc_omp_private_outer_ref): Return true for scalar allocatables or
1023 decls with allocatable components.
1024 (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
1025 gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
1026 allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
1027 allocatables and decls with allocatable components.
1028 (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
1030 (gfc_trans_omp_reduction_list): Call
1031 gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
1032 (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
1033 (gfc_trans_omp_parallel_do_simd): Likewise.
1034 * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
1035 (gfc_get_derived_type): Call gfc_finish_decl_attrs.
1037 2014-06-09 Paul Thomas <pault@gcc.gnu.org>
1040 * trans-stmt.c (trans_associate_var): Check that array
1041 constructors are constant for direct reference.
1043 2014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1046 * intrinsic.texi: Fix documentation of BESSEL_J0, BESSEL_J1,
1047 BESSEL_Y0, and BESSEL_Y1.
1049 2014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1052 * trans-decl.c (gfc_create_module_variable): Don't create
1053 Cray-pointee decls twice.
1055 2014-06-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1057 * io.c (resolve_tag): Warn on non-default kind for NUMBER,
1058 NEXTREC, RECL, NAMED, OPENED and PENDING I/O specifiers.
1060 2014-06-06 Jakub Jelinek <jakub@redhat.com>
1062 * dump-parse-tree.c (show_omp_namelist): Dump reduction
1063 id in each list item.
1064 (show_omp_node): Only handle OMP_LIST_REDUCTION, not
1065 OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST. Don't
1066 dump reduction id here.
1067 * frontend-passes.c (dummy_code_callback): Renamed to...
1068 (gfc_dummy_code_callback): ... this. No longer static.
1069 (optimize_reduction): Use gfc_dummy_code_callback instead of
1070 dummy_code_callback.
1071 * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION.
1072 (symbol_attribute): Add omp_udr_artificial_var bitfield.
1073 (gfc_omp_reduction_op): New enum.
1074 (gfc_omp_namelist): Add rop and udr fields.
1075 (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
1076 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
1077 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
1078 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed.
1079 (OMP_LIST_REDUCTION): New.
1080 (gfc_omp_udr): New type.
1081 (gfc_get_omp_udr): Define.
1082 (gfc_symtree): Add n.omp_udr field.
1083 (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield.
1084 (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs,
1085 gfc_dummy_code_callback): New prototypes.
1086 * match.h (gfc_match_omp_declare_reduction): New prototype.
1087 * module.c (MOD_VERSION): Increase to 13.
1088 (omp_declare_reduction_stmt): New array.
1089 (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs):
1091 (read_module): Read OpenMP user defined reductions.
1092 (write_module): Write OpenMP user defined reductions.
1093 * openmp.c: Include arith.h.
1094 (gfc_free_omp_udr, gfc_find_omp_udr): New functions.
1095 (gfc_match_omp_clauses): Handle user defined reductions.
1096 Store reduction kind into gfc_omp_namelist instead of using
1097 several OMP_LIST_* entries.
1098 (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find,
1099 gfc_match_omp_declare_reduction): New functions.
1100 (resolve_omp_clauses): Adjust for reduction clauses being only
1101 in OMP_LIST_REDUCTION list. Diagnose missing UDRs.
1102 (struct omp_udr_callback_data): New type.
1103 (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New
1105 * parse.c (decode_omp_directive): Handle !$omp declare reduction.
1106 (case_decl): Add ST_OMP_DECLARE_REDUCTION.
1107 (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION.
1108 * resolve.c (resolve_fl_variable): Allow len=: or len=* on
1109 sym->attr.omp_udr_artificial_var symbols.
1110 (resolve_types): Call gfc_resolve_omp_udrs.
1111 * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns,
1112 use parent ns instead of gfc_current_ns.
1113 (gfc_get_sym_tree): Don't insert symbols into
1114 namespaces with omp_udr_ns set.
1115 (free_omp_udr_tree): New function.
1116 (gfc_free_namespace): Call it.
1117 * trans-openmp.c (struct omp_udr_find_orig_data): New type.
1118 (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions.
1119 (gfc_trans_omp_array_reduction): Renamed to...
1120 (gfc_trans_omp_array_reduction_or_udr): ... this. Remove SYM
1121 argument, instead pass gfc_omp_namelist pointer N. Handle
1122 user defined reductions.
1123 (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument.
1124 Handle user defined reductions and reduction ops in gfc_omp_namelist.
1125 (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION
1127 (gfc_split_omp_clauses): Likewise.
1129 2014-06-05 Richard Biener <rguenther@suse.de>
1132 * gfortranspec.c (spec_file): Remove.
1133 (find_spec_file): Likewise.
1134 (lang_specific_driver): Do not look for specs file in -L
1135 or append -specs command line argument.
1136 (lang_specific_pre_link): Always %:include libgfortran.spec.
1138 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1140 * fortran/trans.c (trans_runtime_error_vararg): Call
1141 fold_build_call_array_loc instead of fold_builtin_call_array.
1143 2014-06-02 Bernd Schmidt <bernds@codesourcery.com>
1145 * trans-decl.c (gfc_build_builtin_function_decls): Correct number of
1146 arguments to caf_init.
1148 2014-05-26 Tobias Burnus <burnus@net-b.de>
1150 * gfortran.texi (Project Status): Fix broken link.
1152 2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
1155 * intrinsics.texi (CTIME): Remove mention of locale-dependent
1158 2014-05-26 Tobias Burnus <burnus@net-b.de>
1161 * trans-io.c (nml_full_name, transfer_namelist_element): Insert
1162 a '+' rather then '%' to differentiate namelist variable names
1163 that are based on extended derived types.
1165 2014-05-25 Tobias Burnus <burnus@net-b.de>
1167 * check.c (gfc_check_num_images): New.
1168 (gfc_check_this_image): Handle distance argument.
1169 * intrinsic.c (add_functions): Update this_image and num_images
1170 for new distance and failed arguments.
1171 * intrinsic.texi (THIS_IMAGE, NUM_IMAGES): Document the new
1173 * intrinsic.h (gfc_check_num_images): New.
1174 (gfc_check_this_image, gfc_simplify_num_images,
1175 gfc_simplify_this_image, gfc_resolve_this_image): Update prototype.
1176 * iresolve.c (gfc_resolve_this_image): Handle distance argument.
1177 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
1178 Handle new arguments.
1179 * trans-intrinsic.c (trans_this_image, trans_num_images): Ditto.
1180 (gfc_conv_intrinsic_function): Update trans_num_images call.
1182 2014-05-23 Tobias Burnus <burnus@net-b.de>
1184 * gfc-internals.texi: Change URLs to HTTPS; fix broken links.
1185 * gfortran.texi: Ditto.
1187 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1189 * f95-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1190 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1191 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1192 * types.def: Simplify examples for DEF_FUNCTION_TYPE_*.
1194 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1196 * f95-lang.c (pushlevel): Adjust.
1197 * trans-decl.c (gfc_allocate_lang_decl): Adjust.
1198 (gfc_find_module): Likewise.
1199 * trans-types.c (gfc_get_nodesc_array_type): Likewise.
1200 (gfc_get_array_type_bounds): Likewise.
1201 (gfc_nonrestricted_type): Likewise.
1202 * trans.h: Don't use variable_size gty attribute.
1204 2014-05-17 Dominique d'Humieres <dominiq@lps.ens.fr>
1206 * check.c (gfc_check_fn_rc2008): move "argument" to the right
1209 2014-05-12 Tobias Burnus <burnus@net-b.de>
1212 * openmp.c (resolve_omp_do): Reject do concurrent loops.
1214 2014-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1217 * frontend-passes.c (in_assoc_list): New variable.
1218 (optimize_namespace): Initialize in_assoc_list
1219 (combine_array_constructor): Don't try to combine
1221 (gfc_code_walker): Keep track of in_assoc_list.
1223 2014-05-11 Jakub Jelinek <jakub@redhat.com>
1225 * gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
1226 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
1227 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
1228 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
1229 ST_OMP_DECLARE_SIMD.
1230 (gfc_omp_namelist): New typedef.
1231 (gfc_get_omp_namelist): Define.
1232 (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
1233 OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
1234 (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
1235 (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
1236 Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
1237 simdlen_expr fields.
1238 (gfc_omp_declare_simd): New typedef.
1239 (gfc_get_omp_declare_simd): Define.
1240 (gfc_namespace): Add omp_declare_simd field.
1241 (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
1242 EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
1243 EXEC_OMP_PARALLEL_DO_SIMD.
1244 (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
1245 and GFC_OMP_ATOMIC_SWAP.
1246 (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
1247 (gfc_free_omp_namelist, gfc_free_omp_declare_simd,
1248 gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
1250 * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
1251 * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
1252 * openmp.c (gfc_free_omp_clauses): Free safelen_expr and
1253 simdlen_expr. Use gfc_free_omp_namelist instead of
1255 (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
1257 (gfc_match_omp_variable_list): Add end_colon, headp and
1258 allow_sections arguments. Handle parsing of array sections.
1259 Use *omp_namelist* instead of *namelist* data structure and
1260 functions/macros. Allow termination at : character.
1261 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
1262 OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
1263 OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
1264 (gfc_match_omp_clauses): Change first and needs_space variables
1265 into arguments with default values. Parse inbranch, notinbranch,
1266 proc_bind, safelen, simdlen, uniform, linear, aligned and
1268 (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
1269 (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
1270 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
1271 (gfc_match_omp_do_simd): New function.
1272 (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
1273 data structure and functions/macros.
1274 (gfc_match_omp_simd, gfc_match_omp_declare_simd,
1275 gfc_match_omp_parallel_do_simd): New functions.
1276 (gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap.
1277 (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
1278 gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
1280 (resolve_omp_clauses): Add where, omp_clauses and ns arguments.
1281 Use *omp_namelist* instead of *namelist* data structure and
1282 functions/macros. Resolve uniform, aligned, linear, depend,
1283 safelen and simdlen clauses.
1284 (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
1285 addition, recognize atomic swap.
1286 (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
1287 of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
1288 EXEC_OMP_PARALLEL_DO.
1289 (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
1290 data structure and functions/macros.
1291 (resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
1292 EXEC_OMP_PARALLEL_DO_SIMD.
1293 (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
1294 EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust
1295 resolve_omp_clauses caller.
1296 (gfc_resolve_omp_declare_simd): New function.
1297 * parse.c (decode_omp_directive): Parse cancellation point, cancel,
1298 declare simd, end do simd, end simd, end parallel do simd,
1299 end taskgroup, parallel do simd, simd and taskgroup directives.
1300 (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
1301 (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
1302 ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
1303 (case_decl): Add ST_OMP_DECLARE_SIMD.
1304 (gfc_ascii_statement): Handle ST_OMP_CANCEL,
1305 ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
1306 ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
1307 ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
1308 ST_OMP_DECLARE_SIMD.
1309 (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
1310 ST_OMP_PARALLEL_DO_SIMD.
1311 (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
1312 (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
1313 ST_OMP_PARALLEL_DO_SIMD.
1314 (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
1315 ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
1316 * trans-decl.c (gfc_get_extern_function_decl,
1317 gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
1319 * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
1320 EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk
1321 safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist
1322 of depend, aligned and linear clauses.
1323 * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
1324 and EXEC_OMP_PARALLEL_DO_SIMD.
1325 (gfc_free_omp_namelist): New function.
1326 * dump-parse-tree.c (show_namelist): Removed.
1327 (show_omp_namelist): New function.
1328 (show_omp_node): Handle OpenMP 4.0 additions.
1329 (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
1330 EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
1332 * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
1333 gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
1334 gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
1335 gfc_match_omp_taskgroup): New prototypes.
1336 * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
1337 argument, handle it. Allow current_function_decl to be NULL.
1338 (gfc_trans_omp_variable_list): Add declare_simd argument, pass
1339 it through to gfc_trans_omp_variable and disregard whether
1340 sym is referenced if declare_simd is true. Work on gfc_omp_namelist
1341 instead of gfc_namelist.
1342 (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
1343 gfc_namelist. Adjust gfc_trans_omp_variable caller.
1344 (gfc_trans_omp_clauses): Add declare_simd argument, pass it through
1345 to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist
1346 instead of gfc_namelist. Handle inbranch, notinbranch, safelen,
1347 simdlen, depend, uniform, linear, proc_bind and aligned clauses.
1349 (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
1350 adjust for GFC_OMP_ATOMIC_* changes.
1351 (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
1353 (gfc_trans_omp_do): Add op argument, handle simd translation into
1355 (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
1356 GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
1357 GFC_OMP_MASK_PARALLEL): New.
1358 (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
1359 (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
1360 (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
1362 (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
1363 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1364 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1365 Adjust gfc_trans_omp_do caller.
1366 (gfc_trans_omp_declare_simd): New function.
1367 * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
1368 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1369 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1370 For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
1372 * module.c (omp_declare_simd_clauses): New variable.
1373 (mio_omp_declare_simd): New function.
1374 (mio_symbol): Call it.
1375 * trans.c (trans_code): Handle EXEC_OMP_CANCEL,
1376 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1377 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1378 * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,
1379 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1380 (resolve_code): Handle EXEC_OMP_CANCEL,
1381 EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
1382 EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
1383 (resolve_types): Call gfc_resolve_omp_declare_simd.
1385 2014-05-11 Tobias Burnus <burnus@net-b.de>
1387 * trans-intrinsic.c (gfc_build_builtin_function_decls):
1388 Change type of second argument to int.
1390 2014-05-09 Mike Stump <mikestump@comcast.net>
1393 * trans-array.c (gfc_conv_array_initializer): Fix wide-int
1396 2014-05-08 Tobias Burnus <burnus@net-b.de>
1398 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET
1399 and GFC_ISYM_CAF_SEND.
1400 * intrinsic.c (add_functions): Add only internally
1401 accessible caf_get and caf_send functions.
1402 * resolve.c (add_caf_get_intrinsic,
1403 remove_caf_get_intrinsic): New functions.
1404 (resolve_variable): Resolve expression rank and
1405 prepare for add_caf_get_intrinsic call.
1406 (gfc_resolve_expr): For variables, remove rank
1408 (resolve_ordinary_assign): Prepare call to
1410 (resolve_code): Avoid call to GFC_ISYM_CAF_GET for
1411 the LHS of an assignment.
1413 2014-05-08 Tobias Burnus <burnus@net-b.de>
1415 * trans-intrinsic.c (conv_co_minmaxsum): Change condition style.
1417 2014-05-08 Tobias Burnus <burnus@net-b.de>
1419 * check.c (check_co_minmaxsum, gfc_check_co_minmax,
1420 gfc_check_co_sum): New.
1421 * error.c (gfc_notify_std): Update -std=f2008ts.
1422 * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_MAX,
1423 GFC_ISYM_CO_MIN, GFC_ISYM_CO_SUM.
1424 * intrinsic.h (gfc_check_co_minmax,
1425 gfc_check_co_sum): Declare.
1426 * intrinsic.c (add_subroutines): Add co_min, co_max
1428 (gfc_check_intrinsic_standard): Update text for
1430 * intrinsic.texi (CO_MIN, CO_MAX, CO_SUM): Document
1432 * invoke.texi (-std=f2008ts): Update wording.
1433 * trans.h (gfor_fndecl_co_max,
1434 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1435 * trans-decl.c (gfor_fndecl_co_max,
1436 gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
1437 (gfc_build_builtin_function_decls): Assign to it.
1438 * trans-intrinsic.c (conv_co_minmaxsum): New.
1439 (gfc_conv_intrinsic_subroutine): Call it.
1441 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1442 Mike Stump <mikestump@comcast.net>
1443 Richard Sandiford <rdsandiford@googlemail.com>
1445 * target-memory.c: Include wide-int.h.
1446 (gfc_interpret_logical): Use wide-int interfaces.
1447 * trans-array.c: Include wide-int.h.
1448 (gfc_conv_array_initializer): Use wide-int interfaces.
1449 * trans-const.c: Include wide-int.h.
1450 (gfc_conv_string_init): Use wide-int interfaces.
1451 (gfc_conv_mpz_to_tree): Likewise.
1452 (gfc_conv_tree_to_mpz): Likewise.
1453 * trans-decl.c (gfc_can_put_var_on_stack): Use tree_fits_uhwi_p.
1454 * trans-expr.c: Include wide-int.h.
1455 (gfc_conv_cst_int_power): Use wide-int interfaces.
1456 (gfc_string_to_single_character): Likewise.
1457 (gfc_optimize_len_trim): Likewise.
1458 * trans-intrinsic.c: Include wide-int.h.
1459 (trans_this_image): Use wide-int interfaces.
1460 (gfc_conv_intrinsic_bound): Likewise.
1461 (conv_intrinsic_cobound): Likewise.
1462 * trans-types.c (gfc_init_types): Likewise.
1463 (gfc_get_array_type_bounds): Pass an integer of the correct type
1464 instead of using integer_one_node.
1466 2014-04-30 Tobias Burnus <burnus@net-b.de>
1468 * trans-decl.c (create_function_arglist): Add hidden coarray arguments
1469 also for polymorphic coarrays.
1470 * trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray arguments
1471 also for polymorphic coarrays.
1473 2014-04-30 Tobias Burnus <burnus@net-b.de>
1475 * resolve.c (resolve_function): Don't do
1476 assumed-size check for lcobound/ucobound.
1477 * trans-types.c (gfc_build_array_type): Only build an array
1478 descriptor with codimensions for allocatable coarrays.
1480 2014-04-30 Tobias Burnus <burnus@net-b.de>
1482 * gfortran.h (gfc_init_coarray_decl): Remove.
1483 * parse.c (translate_all_program_units): Remove call to it.
1484 (gfc_parse_file): Update call.
1485 * trans.h (gfor_fndecl_caf_this_image,
1486 gfor_fndecl_caf_num_images): Add.
1487 (gfort_gvar_caf_num_images,
1488 gfort_gvar_caf_this_image): Remove.
1489 * trans-decl.c (gfor_fndecl_caf_this_image,
1490 gfor_fndecl_caf_num_images): Add.
1491 (gfort_gvar_caf_num_images,
1492 gfort_gvar_caf_this_image): Remove.
1493 (gfc_build_builtin_function_decls): Init new decl.
1494 (gfc_init_coarray_dec): Remove.
1495 (create_main_function): Change calls.
1496 * trans-intrinsic.c (trans_this_image, trans_image_index,
1497 conv_intrinsic_cobound): Generate call to new library function
1498 instead of to a static variable.
1499 * trans-stmt.c (gfc_trans_sync): Ditto.
1501 2014-04-30 Tobias Burnus <burnus@net-b.de>
1503 * trans-expr.c (get_tree_for_caf_expr): Fix handling of polymorphic
1504 and derived-type coarrays.
1506 2014-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1510 * gfortran.h (gfc_convert_mpz_to_signed): Add prototype.
1511 * arith.c (gfc_int2int): Convert number to signed if
1512 arithmetic overflow is not checked.
1513 * simplify.c (convert_mpz_to_unsigned): Only trigger assert for
1514 size if range checking is in force.
1515 (convert_mpz_to_signed): Make non-static, rename to
1516 (gfc_convert_mpz_to_signed).
1517 (simplify_dshift): Use gfc_convert_mpz_to_signed.
1518 (gfc_simplify_ibclr): Likewise.
1519 (gfc_simplify_ibits): Likewise.
1520 (gfc_simplify_ibset): Likewise.
1521 (simplify_shift): Likewise.
1522 (gfc_simplify_ishiftc): Likewise.
1523 (gfc_simplify_maskr): Likewise.
1524 (gfc_simplify_maskl): Likewise.
1526 2014-04-22 Tobias Burnus <burnus@net-b.de>
1529 * trans-expr.c (gfc_trans_subcomponent_assign): Fix handling
1532 2014-04-17 Jakub Jelinek <jakub@redhat.com>
1534 * trans-types.c (gfc_init_kinds): Make sure GET_MODE_BITSIZE
1535 argument is enum machine_mode.
1537 2014-04-13 Paul Thomas <pault@gcc.gnu.org>
1541 * trans.h: Add 'use_offset' bitfield to gfc_se.
1542 * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
1543 as a trigger to unconditionally recalculate the offset for
1544 array slices and constant arrays.
1545 trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
1546 trans-stmt.c (trans_associate_var): Ditto.
1547 (gfc_conv_procedure_call): Ditto.
1549 2014-04-11 Tobias Burnus <burnus@net-b.de>
1553 * resolve.c (gfc_resolve_finalizers): Ensure that vtables
1554 and finalization wrappers are generated.
1556 2014-04-11 Janne Blomqvist <jb@gcc.gnu.org>
1558 * intrinsic.texi (RANDOM_SEED): Improve example.
1560 2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1562 * class.c (gfc_build_class_symbol): Append "_t" to target class
1563 names to make the generated type names unique.
1565 2014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1568 * trans-types.c (gfc_get_function_type): In case of recursion
1569 build a variadic function type with empty argument list instead of a
1570 stdarg-like function type with incomplete argument list.
1572 2014-04-04 Tobias Burnus <burnus@net-b.de>
1574 * check.c (gfc_check_cmplx): Fix typo.
1576 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
1577 Tobias Burnus <burnus@net-b.de>
1580 * trans-expr.c (gfc_conv_derived_to_class): Avoid
1581 generation of out-of-bounds range expr.
1583 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
1586 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
1589 2014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1592 * frontend-passes.c (cfe_code): Do not walk subtrees
1595 2014-03-27 Tobias Burnus <burnus@net-b.de>
1598 * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
1601 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
1604 * fortran.texi: Document Volatile COMMON as not supported.
1606 2014-03-22 Jakub Jelinek <jakub@redhat.com>
1609 * cpp.c (gfc_cpp_init): Restore cb_change_file call to
1612 2014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1615 * gfortran.texi: Add description of namelist DELIM= behavior.
1617 2014-03-19 Tobias Burnus <burnus@net-b.>
1620 * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
1621 * resolve.c (resolve_ordinary_assign): Ditto.
1623 2014-03-19 Tobias Burnus <burnus@net-b.de>
1627 * gfortran.h (gfc_unset_implicit_pure): New prototype.
1628 * resolve.c (gfc_unset_implicit_pure): New.
1629 (resolve_structure_cons, resolve_function,
1630 pure_subroutine): Use it.
1631 * decl.c (match_old_style_init, gfc_match_data,
1632 match_pointer_init, variable_decl): Ditto.
1633 * expr.c (gfc_check_pointer_assign): Ditto.
1634 * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
1635 * io.c (match_vtag, gfc_match_open, gfc_match_close,
1636 match_filepos, gfc_match_inquire, gfc_match_print,
1637 gfc_match_wait): Ditto.
1638 * match.c (gfc_match_critical, gfc_match_stopcode,
1639 lock_unlock_statement, sync_statement, gfc_match_allocate,
1640 gfc_match_deallocate): Ditto.
1641 * parse.c (decode_omp_directive): Ditto.
1642 * symbol.c (gfc_add_save): Ditto.
1644 2014-03-18 Janus Weil <janus@gcc.gnu.org>
1648 * decl.c (match_attr_spec): Revert r208590.
1650 2014-03-18 Jakub Jelinek <jakub@redhat.com>
1653 * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
1656 2014-03-18 Tobias Burnus <burnus@net-b.de>
1659 * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
1660 (gfc_trans_io_runtime_check): Remove.
1661 * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
1662 as argument, add predictor to block.
1663 (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
1664 gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
1665 * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
1666 (gfc_trans_runtime_check, gfc_allocate_using_malloc,
1667 gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
1669 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1670 * trans-stmt.c (gfc_trans_allocate): Ditto.
1671 * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
1673 2014-03-15 Janus Weil <janus@gcc.gnu.org>
1676 * decl.c (match_attr_spec): Variables in the main program implicitly
1677 get the SAVE attribute in Fortran 2008.
1679 2014-03-14 Mikael Morin <mikael@gcc.gnu.org>
1682 * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
1683 if it has transposed dimensions.
1685 2014-03-08 Tobias Burnus <burnus@net-b.de>
1688 * f95-lang.c (gfc_init): Return false when only
1690 * options.c (gfc_post_options): Ditto.
1692 2014-03-08 Tobias Burnus <burnus@net-b.de>
1694 * gfortran.texi (Fortran 2003 Status): Mention finalization,
1695 deferred-length character support and input rounding.
1696 (Fortran 2008 Status): Mention that at termination
1697 signalling exceptions are shown.
1699 2014-03-06 Paul Thomas <pault@gcc.gnu.org>
1700 Janus Weil <janus@gcc.gnu.org>
1703 * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
1704 * primary.c (build_actual_constructor): It is not an error if
1705 a missing component has the deferred_parameter attribute;
1706 equally, if one is given a value, it is an error.
1707 * resolve.c (resolve_fl_derived0): Remove error for deferred
1708 character length components. Add the hidden string length
1709 field to the structure. Give it the deferred_parameter
1711 * trans-array.c (duplicate_allocatable): Add a strlen field
1712 which is used as the element size if it is non-null.
1713 (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
1714 NULL to the new argument in duplicate_allocatable.
1715 (structure_alloc_comps): Set the hidden string length as
1716 appropriate. Use it in calls to duplicate_allocatable.
1717 (gfc_alloc_allocatable_for_assignment): When a deferred length
1718 backend declaration is variable, use that; otherwise use the
1719 string length from the expression evaluation.
1720 * trans-expr.c (gfc_conv_component_ref): If this is a deferred
1721 character length component, the string length should have the
1722 value of the hidden string length field.
1723 (gfc_trans_subcomponent_assign): Set the hidden string length
1724 field for deferred character length components. Allocate the
1725 necessary memory for the string.
1726 (alloc_scalar_allocatable_for_assignment): Same change as in
1727 gfc_alloc_allocatable_for_assignment above.
1728 * trans-stmt.c (gfc_trans_allocate): Likewise.
1729 * trans-intrinsic (size_of_string_in_bytes): Make non-static.
1730 * trans-types.c (gfc_get_derived_type): Set the tree type for
1731 a deferred character length component.
1732 * trans.c (gfc_deferred_strlen): New function.
1733 * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
1735 2014-03-01 Mikael Morin <mikael@gcc.gnu.org>
1738 * frontend-passes.c (optimize_comparison): Guard two union accesses
1739 with the corresponding tag checks.
1741 2014-02-28 Janus Weil <janus@gcc.gnu.org>
1744 * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
1745 procedure for characters.
1747 2014-02-21 Janus Weil <janus@gcc.gnu.org>
1750 * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
1753 2014-02-21 Janus Weil <janus@gcc.gnu.org>
1756 * gfortran.h (gfc_build_class_symbol): Removed argument.
1757 * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
1758 (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
1759 delayed now, except for unlimited polymorphics.
1760 (comp_is_finalizable): Procedure pointer components are not finalizable.
1761 * decl. (build_sym, build_struct, attr_decl1): Removed argument of
1762 'gfc_build_class_symbol'.
1763 * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
1765 * symbol.c (gfc_set_default_type): Ditto.
1767 2014-02-19 Janus Weil <janus@gcc.gnu.org>
1770 * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
1771 functions, which are used as procedure pointer target.
1773 2014-02-18 Tobias Burnus <burnus@net-b.de>
1776 * expr.c (gfc_check_pointer_assign): Add check for
1778 * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
1779 decl in a corner case.
1781 2014-02-18 Janus Weil <janus@gcc.gnu.org>
1784 * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
1785 arguments to prevent ICE.
1787 2014-02-17 Janus Weil <janus@gcc.gnu.org>
1790 * resolve.c (build_default_init_expr): Don't initialize character
1791 variable if -fno-automatic is given.
1793 2014-02-15 Mikael Morin <mikael@gcc.gnu.org>
1796 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
1797 number of arguments.
1799 2014-02-11 Jakub Jelinek <jakub@redhat.com>
1802 * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
1803 on decl if sym->attr.optional.
1805 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
1808 * resolve.c (resolve_assoc_var): Set the subref_array_pointer
1809 attribute for the 'associate-name' if necessary.
1810 * trans-stmt.c (trans_associate_var): If the 'associate-name'
1811 is a subref_array_pointer, assign the element size of the
1812 associate variable to 'span'.
1814 2014-02-09 Paul Thomas <pault@gcc.gnu.org>
1817 * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
1818 actual argument to a formal argument with the value attribute
1819 in an elemental procedure.
1821 2014-02-08 Janus Weil <janus@gcc.gnu.org>
1822 Mikael Morin <mikael.morin@gcc.gnu.org>
1825 * class.c (generate_finalization_wrapper): Assert that proc_tree has
1826 been set in gfc_resolve_finalizers.
1827 * resolve.c (resolve_fl_derived0): Remove unnecessary call to
1830 2014-02-07 Benno Schulenberg <bensberg@justemail.net>
1832 PR translation/52289
1833 * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
1834 in an error message.
1836 2014-02-02 Mikael Morin <mikael@gcc.gnu.org>
1839 * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
1842 2014-02-01 Paul Thomas <pault@gcc.gnu.org>
1845 * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
1846 SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
1847 pointer to the string is stored.
1848 * trans-expr.c (gfc_conv_expr_reference): Likewise, use
1849 gfc_conv_string_parameter to ensure that a pointer to is passed
1850 to the elemental function.
1852 2014-01-28 Paul Thomas <pault@gcc.gnu.org>
1855 * trans-stmt.c (gfc_trans_allocate): Before the pointer
1856 assignment to transfer the source _vptr to a class allocate
1857 expression, the final class reference should be exposed. The
1858 tail that includes the _data and array references is stored.
1859 This reduced expression is transferred to 'lhs' and the _vptr
1860 added. Then the tail is restored to the allocate expression.
1862 2014-01-26 Mikael Morin <mikael@gcc.gnu.org>
1865 * module.c (read_module): Assert for component name correctness.
1867 2014-01-18 Mikael Morin <mikael@gcc.gnu.org>
1870 * module.c (MOD_VERSION): Bump.
1871 (fp2, find_pointer2): Remove.
1872 (mio_component_ref): Don't forcedfully set the containing derived type
1873 symbol for loading. Remove unused argument.
1874 (mio_ref): Update caller
1875 (mio_symbol): Dump component list earlier.
1876 (skip_list): New argument nest_level. Initialize level with the new
1878 (read_module): Add forced pointer components association for derived
1881 2014-01-12 Janus Weil <janus@gcc.gnu.org>
1884 * decl.c (gfc_match_data_decl): Improve error recovery.
1886 2014-01-09 Tobias Burnus <burnus@net-b.de>
1888 * cpp.c (gfc_cpp_handle_option): Add missing break.
1889 * trans-io.c (transfer_expr): Silence unused value warning.
1891 2014-01-08 Janus Weil <janus@gcc.gnu.org>
1894 * resolve.c (gfc_verify_binding_labels): Modify order of checks.
1896 2014-01-06 Janus Weil <janus@gcc.gnu.org>
1899 * class.c (comp_is_finalizable): New function to dermine if a given
1900 component is finalizable.
1901 (finalize_component, generate_finalization_wrapper): Use it.
1903 2014-01-06 Janus Weil <janus@gcc.gnu.org>
1907 * resolve.c (resolve_global_procedure): Don't apply to c-binding
1909 (gfc_verify_binding_labels): Remove duplicate line.
1911 2014-01-04 Janus Weil <janus@gcc.gnu.org>
1914 * class.c (add_proc_comp): Copy pure attribute.
1916 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1918 Update copyright years
1920 2014-01-02 Tobias Burnus <burnus@net-b.de>
1922 * gfortranspec.c (lang_specific_driver): Update copyright notice
1924 * gfc-internals.texi: Bump @copying's copyright year.
1925 * gfortran.texi: Ditto.
1926 * intrinsic.texi: Ditto.
1927 * invoke.texi: Ditto.
1929 2014-01-02 Janus Weil <janus@gcc.gnu.org>
1932 * resolve.c (resolve_typebound_procedures): No need to create the vtab
1935 Copyright (C) 2014 Free Software Foundation, Inc.
1937 Copying and distribution of this file, with or without modification,
1938 are permitted in any medium without royalty provided the copyright
1939 notice and this notice are preserved.