1 2021-11-06 Harald Anlauf <anlauf@gmx.de>
4 * decl.c (add_init_expr_to_sym): Reject rank mismatch between
5 array and its initializer.
7 2021-11-05 Harald Anlauf <anlauf@gmx.de>
10 * expr.c (simplify_parameter_variable): Copy shape of referenced
11 subobject when simplifying.
13 2021-11-05 Harald Anlauf <anlauf@gmx.de>
16 * match.c (gfc_match_common): Check array spec of a symbol in a
17 COMMON object list and reject it if it is a coarray.
19 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
22 * decl.c (gfc_match_implicit_none): Fix typo in warning.
23 * resolve.c (resolve_unknown_f): Reject external procedures
24 without explicit EXTERNAL attribute whe IMPLICIT none (external)
27 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
29 * decl.c (gfc_insert_kind_parameter_exprs): Make static.
30 * expr.c (gfc_build_init_expr): Make static
31 (gfc_build_default_init_expr): Move below its static helper.
32 * gfortran.h (gfc_insert_kind_parameter_exprs, gfc_add_saved_common,
33 gfc_add_common, gfc_use_derived_tree, gfc_free_charlen,
34 gfc_get_ultimate_derived_super_type,
35 gfc_resolve_oacc_parallel_loop_blocks, gfc_build_init_expr,
36 gfc_iso_c_sub_interface): Delete.
37 * symbol.c (gfc_new_charlen, gfc_get_derived_super_type): Make
40 2021-11-05 Sandra Loosemore <sandra@codesourcery.com>
43 * gfortran.texi (Mixed-Language Programming): Talk about C++,
46 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
48 * gfortran.texi (Projects): Add bullet for helping with
49 incomplete standards compliance.
50 (Proposed Extensions): Delete section.
52 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
54 * intrinsic.texi (Introduction to Intrinsics): Genericize
55 references to standard versions.
56 * invoke.texi (-fall-intrinsics): Likewise.
57 (-fmax-identifier-length=): Likewise.
59 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
61 * gfortran.texi (Interoperability with C): Copy-editing. Add
63 (Intrinsic Types): Likewise.
64 (Derived Types and struct): Likewise.
65 (Interoperable Global Variables): Likewise.
66 (Interoperable Subroutines and Functions): Likewise.
67 (Working with C Pointers): Likewise.
68 (Further Interoperability of Fortran with C): Likewise. Rewrite
69 to reflect that this is now fully supported by gfortran.
71 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
73 * gfortran.texi (About GNU Fortran): Consolidate material
74 formerly in other sections. Copy-editing.
75 (Preprocessing and conditional compilation): Delete, moving
76 most material to invoke.texi.
77 (GNU Fortran and G77): Delete.
78 (Project Status): Delete.
80 (Fortran 95 status): Mention conditional compilation here.
81 (Fortran 2003 status): Rewrite to mention the 1 missing feature
82 instead of all the ones implemented.
83 (Fortran 2008 status): Similarly for the 2 missing features.
84 (Fortran 2018 status): Rewrite to reflect completion of TS29113
86 * invoke.texi (Preprocessing Options): Move material formerly
87 in introductory chapter here.
89 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
91 * gfortran.texi (Standards): Move discussion of specific
92 standard versions here....
93 (Fortran standards status): ...from here, and delete this node.
95 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
97 * symbol.c (gfc_get_typebound_proc): Revert memcpy.
99 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
101 * resolve.c (resolve_fl_procedure): Initialize
102 allocatable_or_pointer.
104 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
106 * intrinsic.texi: Remove entries for SHORT and LONG intrinsics.
108 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
110 * check.c (gfc_check_intconv): Change error message.
112 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
114 * intrinsic.texi (REAL): Fix entries in Specific names table.
116 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
118 * intrinsic.texi: Adjust @columnfractions commands to improve
119 appearance for narrow 80 character terminals.
121 2021-10-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
123 * parse.c (clean_up_modules): Free gsym.
125 2021-10-30 Harald Anlauf <anlauf@gmx.de>
127 * gfortran.texi (bug reports): credit Gerhard Steinmetz for
128 numerous bug reports.
130 2021-10-30 Steve Kargl <kargl@gcc.gnu.org>
133 * resolve.c (resolve_select): Generate regular gfc_error on
134 invalid conversions instead of an gfc_internal_error.
136 2021-10-29 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
138 * symbol.c (free_tb_tree): Free type-bound procedure struct.
139 (gfc_get_typebound_proc): Use explicit memcpy for clarity.
141 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
143 * intrinsic.h (gfc_check_sum, gfc_resolve_atan2d, gfc_resolve_kill,
144 gfc_resolve_kill_sub): Delete declaration.
146 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
148 * trans-types.h (gfc_convert_function_code): Delete.
150 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
152 * trans-stmt.h (gfc_trans_deallocate_array): Delete.
154 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
156 * trans-array.c (gfc_trans_scalarized_loop_end): Make static.
157 * trans-array.h (gfc_trans_scalarized_loop_end,
158 gfc_conv_tmp_ref, gfc_conv_array_transpose): Delete declaration.
160 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
162 * constructor.c (gfc_constructor_get_base): Make static.
163 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
164 * constructor.h (gfc_constructor_get_base): Remove declaration.
165 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
167 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
169 * decl.c (gfc_match_old_kind_spec, set_com_block_bind_c,
170 set_verify_bind_c_sym, set_verify_bind_c_com_block,
171 get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec,
172 check_extended_derived_type): Make static.
173 (gfc_match_gcc_unroll): Add comment.
174 * match.c (gfc_match_small_int_expr): Delete definition.
175 * match.h (gfc_match_small_int_expr): Delete declaration.
176 (gfc_match_name_C, gfc_match_old_kind_spec, set_com_block_bind_c,
177 set_verify_bind_c_sym, set_verify_bind_c_com_block,
178 get_bind_c_idents, gfc_match_suffix,
179 gfc_get_type_attr_spec): Delete declaration.
181 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
183 * expr.c (is_non_empty_structure_constructor): Make static.
184 * gfortran.h (gfc_check_any_c_kind): Delete.
185 * match.c (gfc_match_label): Make static.
186 * match.h (gfc_match_label): Delete declaration.
187 * scanner.c (file_changes_cur, file_changes_count,
188 file_changes_allocated): Make static.
189 * trans-expr.c (gfc_get_character_len): Make static.
190 (gfc_class_len_or_zero_get): Make static.
191 (VTAB_GET_FIELD_GEN): Undefine.
192 (gfc_get_class_array_ref): Make static.
193 (gfc_finish_interface_mapping): Make static.
194 * trans-types.c (gfc_check_any_c_kind): Delete.
195 (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static.
196 * trans-types.h (gfc_get_ppc_type): Delete declaration.
197 * trans.c (gfc_msg_wrong_return): Delete.
198 * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get,
199 gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len,
200 gfc_finish_interface_mapping, gfc_msg_wrong_return,
201 gfc_get_function_decl): Delete declaration.
203 2021-10-27 Tobias Burnus <tobias@codesourcery.com>
205 * trans-stmt.c (gfc_trans_select_rank_cases): Fix condition
206 for allocatables/pointers.
208 2021-10-26 Harald Anlauf <anlauf@gmx.de>
211 * symbol.c (gfc_check_conflict): Add conflict check for PDT KIND
212 and LEN type parameters.
214 2021-10-26 Harald Anlauf <anlauf@gmx.de>
217 * decl.c (match_attr_spec): Remove invalid integer kind checks on
218 KIND and LEN attributes of PDTs.
220 2021-10-26 Harald Anlauf <anlauf@gmx.de>
223 * resolve.c (resolve_structure_cons): Reject invalid array spec of
224 a DT component referenced in a structure constructor.
226 2021-10-26 Tobias Burnus <tobias@codesourcery.com>
229 * trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant
232 2021-10-25 Andrew MacLeod <amacleod@redhat.com>
234 * trans-decl.c (gfc_conv_cfi_to_gfc): Initialize rank to NULL_TREE.
236 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
239 * Make-lang.in: Allow dvi-formatted documentation
242 2021-10-22 Tobias Burnus <tobias@codesourcery.com>
245 * trans-expr.c (gfc_trans_assignment_1): Add STRIP_NOPS.
247 2021-10-21 Chung-Lin Tang <cltang@codesourcery.com>
249 * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case
250 together with COMP_BLOCK.
251 * parse.c (parse_omp_structured_block): Change return type to
252 'gfc_statement', add handling for strictly-structured block case, adjust
253 recursive calls to parse_omp_structured_block.
254 (parse_executable): Adjust calls to parse_omp_structured_block.
255 * parse.h (enum gfc_compile_state): Add
256 COMP_OMP_STRICTLY_STRUCTURED_BLOCK.
257 * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case
260 2021-10-21 Sandra Loosemore <sandra@codesourcery.com>
263 * expr.c (gfc_simplify_expr): Handle GFC_ISYM_SHAPE along with
264 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
265 * trans-array.c (gfc_conv_ss_startstride): Likewise.
266 (set_loop_bounds): Likewise.
267 * trans-intrinsic.c (gfc_trans_intrinsic_bound): Extend to
268 handle SHAPE. Correct logic for zero-size special cases and
269 detecting assumed-rank arrays associated with an assumed-size
271 (gfc_conv_intrinsic_shape): Deleted.
272 (gfc_conv_intrinsic_function): Handle GFC_ISYM_SHAPE like
273 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
274 (gfc_add_intrinsic_ss_code): Likewise.
275 (gfc_walk_intrinsic_bound): Likewise.
277 2021-10-20 Chung-Lin Tang <cltang@codesourcery.com>
279 * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default
280 false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case.
281 (gfc_match_omp_clauses): Add 'openmp_target' default false parameter,
282 adjust call to gfc_match_omp_clause_reduction.
283 (match_omp): Adjust call to gfc_match_omp_clauses
284 * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to
285 gfc_match_omp_clause, create and return block.
287 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
289 * trans-types.c (create_fn_spec): For allocatable/pointer
290 character(len=:), use 'w' not 'R' as fn spec for the length dummy
293 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
296 * trans-expr.c (gfc_conv_procedure_call): Use TREE_OPERAND not
297 build_fold_indirect_ref_loc to undo an ADDR_EXPR.
299 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
308 * decl.c (gfc_verify_c_interop_param): Remove 'sorry' for
309 scalar allocatable/pointer and len=*.
310 * expr.c (is_CFI_desc): Return true for for those.
311 * gfortran.h (CFI_type_kind_shift, CFI_type_mask,
312 CFI_type_from_type_kind, CFI_VERSION, CFI_MAX_RANK,
313 CFI_attribute_pointer, CFI_attribute_allocatable,
314 CFI_attribute_other, CFI_type_Integer, CFI_type_Logical,
315 CFI_type_Real, CFI_type_Complex, CFI_type_Character,
316 CFI_type_ucs4_char, CFI_type_struct, CFI_type_cptr,
317 CFI_type_cfunptr, CFI_type_other): New #define.
318 * trans-array.c (CFI_FIELD_BASE_ADDR, CFI_FIELD_ELEM_LEN,
319 CFI_FIELD_VERSION, CFI_FIELD_RANK, CFI_FIELD_ATTRIBUTE,
320 CFI_FIELD_TYPE, CFI_FIELD_DIM, CFI_DIM_FIELD_LOWER_BOUND,
321 CFI_DIM_FIELD_EXTENT, CFI_DIM_FIELD_SM,
322 gfc_get_cfi_descriptor_field, gfc_get_cfi_desc_base_addr,
323 gfc_get_cfi_desc_elem_len, gfc_get_cfi_desc_version,
324 gfc_get_cfi_desc_rank, gfc_get_cfi_desc_type,
325 gfc_get_cfi_desc_attribute, gfc_get_cfi_dim_item,
326 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
327 New define/functions to access the CFI array descriptor.
328 (gfc_conv_descriptor_type): New function for the GFC descriptor.
329 (gfc_get_array_span): Handle expr of CFI descriptors and
330 assumed-type descriptors.
331 (gfc_trans_array_bounds): Remove 'static'.
332 (gfc_conv_expr_descriptor): For assumed type, use the dtype of
334 (structure_alloc_comps): Remove ' ' inside tabs.
335 * trans-array.h (gfc_trans_array_bounds, gfc_conv_descriptor_type,
336 gfc_get_cfi_desc_base_addr, gfc_get_cfi_desc_elem_len,
337 gfc_get_cfi_desc_version, gfc_get_cfi_desc_rank,
338 gfc_get_cfi_desc_type, gfc_get_cfi_desc_attribute,
339 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
341 * trans-decl.c (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi):
343 (gfc_build_builtin_function_decls): Remove their initialization.
344 (gfc_get_symbol_decl, create_function_arglist,
345 gfc_trans_deferred_vars): Update for CFI.
346 (convert_CFI_desc): Remove and replace by ...
347 (gfc_conv_cfi_to_gfc): ... this function
348 (gfc_generate_function_code): Call it; create local GFC var for CFI.
349 * trans-expr.c (gfc_maybe_dereference_var): Handle CFI.
350 (gfc_conv_subref_array_arg): Handle the if-noncontigous-only copy in
351 when the result should be a descriptor.
352 (gfc_conv_gfc_desc_to_cfi_desc): Completely rewritten.
353 (gfc_conv_procedure_call): CFI fixes.
354 * trans-openmp.c (gfc_omp_is_optional_argument,
355 gfc_omp_check_optional_argument): Handle optional
357 * trans-stmt.c (gfc_trans_select_rank_cases): Cleanup, avoid invalid
358 code for allocatable/pointer dummies, which cannot be assumed size.
359 * trans-types.c (gfc_cfi_descriptor_base): New global var.
360 (gfc_get_dtype_rank_type): Skip rank init for rank < 0.
361 (gfc_sym_type): Handle CFI dummies.
362 (gfc_get_function_type): Update call.
363 (gfc_get_cfi_dim_type, gfc_get_cfi_type): New.
364 * trans-types.h (gfc_sym_type): Update prototype.
365 (gfc_get_cfi_type): New prototype.
366 * trans.c (gfc_trans_runtime_check): Make conditions more consistent
367 to avoid '<logical> AND_THEN <long int>' in conditions.
368 * trans.h (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi): Remove
369 global-var declaration.
371 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
374 * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
375 and do typcheck in correct order for type extension.
376 * misc.c (gfc_typename): Print proper not internal CLASS type name.
378 2021-10-15 Harald Anlauf <anlauf@gmx.de>
379 Tobias Burnus <tobias@codesourcery.com>
382 * decl.c (match_clist_expr): Set rank/shape of clist initializer
384 * resolve.c (resolve_structure_cons): In a structure constructor,
385 compare shapes of array components against declared shape.
387 2021-10-14 Harald Anlauf <anlauf@gmx.de>
390 * simplify.c (gfc_simplify_reshape): Replace assert by error
391 message for negative elements in SHAPE array.
393 2021-10-14 Harald Anlauf <anlauf@gmx.de>
396 * check.c (gfc_check_shape): Reorder checks so that invalid KIND
397 arguments can be detected.
399 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
401 * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
402 (enum gfc_omp_trait_property_kind): New.
403 (struct gfc_omp_trait_property): New.
404 (gfc_get_omp_trait_property): New macro.
405 (struct gfc_omp_selector): New.
406 (gfc_get_omp_selector): New macro.
407 (struct gfc_omp_set_selector): New.
408 (gfc_get_omp_set_selector): New macro.
409 (struct gfc_omp_declare_variant): New.
410 (gfc_get_omp_declare_variant): New macro.
411 (struct gfc_namespace): Add omp_declare_variant field.
412 (gfc_free_omp_declare_variant_list): New prototype.
413 * match.h (gfc_match_omp_declare_variant): New prototype.
414 * openmp.c (gfc_free_omp_trait_property_list): New.
415 (gfc_free_omp_selector_list): New.
416 (gfc_free_omp_set_selector_list): New.
417 (gfc_free_omp_declare_variant_list): New.
418 (gfc_match_omp_clauses): Add extra optional argument. Handle end of
419 clauses for context selectors.
420 (omp_construct_selectors, omp_device_selectors,
421 omp_implementation_selectors, omp_user_selectors): New.
422 (gfc_match_omp_context_selector): New.
423 (gfc_match_omp_context_selector_specification): New.
424 (gfc_match_omp_declare_variant): New.
425 * parse.c: Include tree-core.h and omp-general.h.
426 (decode_omp_directive): Handle 'declare variant'.
427 (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
428 (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
429 (gfc_parse_file): Initialize omp_requires_mask.
430 * symbol.c (gfc_free_namespace): Call
431 gfc_free_omp_declare_variant_list.
432 * trans-decl.c (gfc_get_extern_function_decl): Call
433 gfc_trans_omp_declare_variant.
434 (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
435 * trans-openmp.c (gfc_trans_omp_declare_variant): New.
436 * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
438 2021-10-13 Tobias Burnus <tobias@codesourcery.com>
440 * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
441 avoid ICE for GFC_OMP_ATOMIC_SWAP.
442 * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
444 2021-10-12 Tobias Burnus <tobias@codesourcery.com>
447 * check.c (gfc_check_present): Handle optional CLASS.
448 * interface.c (gfc_compare_actual_formal): Likewise.
449 * trans-array.c (gfc_trans_g77_array): Likewise.
450 * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
451 * trans-types.c (gfc_sym_type): Likewise.
452 * primary.c (gfc_variable_attr): Fixes for dummy and
453 pointer when 'class%_data' is passed.
454 * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
455 For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
456 and setting ubound to -1 for assumed-size actuals.
458 2021-10-10 Harald Anlauf <anlauf@gmx.de>
462 * decl.c (add_init_expr_to_sym): Extend initialization of
463 parameter arrays from scalars to handle derived types.
465 2021-10-09 Harald Anlauf <anlauf@gmx.de>
468 * module.c (read_module): Handle old and new-style relational
469 operators when used in USE module, ONLY: OPERATOR(op).
471 2021-10-08 Sandra Loosemore <sandra@codesourcery.com>
474 * interface.c (gfc_compare_actual_formal): Add diagnostic
475 for F2018:C839. Refactor shared code and fix bugs with class
476 array info lookup, and extend similar diagnostic from PR94110
477 to also cover class types.
479 2021-10-08 Martin Liska <mliska@suse.cz>
481 * options.c (gfc_post_options): Use new macro
484 2021-10-06 Tobias Burnus <tobias@codesourcery.com>
486 * resolve.c (resolve_values): Only show
487 deprecated warning if attr.referenced.
489 2021-10-04 Tobias Burnus <tobias@codesourcery.com>
492 * resolve.c (can_generate_init, resolve_fl_variable_derived,
493 resolve_symbol): Only do initialization with intent(out) if not
494 inside of an interface block.
496 2021-10-01 Martin Sebor <msebor@redhat.com>
499 * array.c: Remove an unnecessary test.
500 * trans-array.c: Same.
502 2021-10-01 Jakub Jelinek <jakub@redhat.com>
504 * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
505 * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
506 * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
507 explicit reproducible: modifier.
508 * trans-openmp.c (gfc_trans_omp_clauses): Set
509 OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
510 (gfc_split_omp_clauses): Also copy order_reproducible.
512 2021-09-30 Harald Anlauf <anlauf@gmx.de>
515 * simplify.c (simplify_size): Resolve expressions used in array
516 specifications so that SIZE can be simplified.
518 2021-09-30 Harald Anlauf <anlauf@gmx.de>
520 * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
522 2021-09-30 Tobias Burnus <tobias@codesourcery.com>
526 * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
528 * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
529 (gfc_vptr_hash_get): ... this to match function name.
531 2021-09-29 Harald Anlauf <anlauf@gmx.de>
534 * array.c (expand_constructor): Do not dereference NULL pointer.
536 2021-09-27 Tobias Burnus <tobias@codesourcery.com>
539 * trans-array.c (gfc_tree_array_size): New function to
540 find size inline (whole array or one dimension).
541 (array_parameter_size): Use it, take stmt_block as arg.
542 (gfc_conv_array_parameter): Update call.
543 * trans-array.h (gfc_tree_array_size): Add prototype.
544 * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
546 (gfc_build_intrinsic_function_decls): Remove their initialization.
547 * trans-expr.c (gfc_conv_procedure_call): Update
548 bounds of pointer/allocatable actual args to nonallocatable/nonpointer
549 dummies to be one based.
550 * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
551 assumed rank with allocatable/pointer dummy.
552 (gfc_conv_intrinsic_size): Update to use inline function.
553 * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
555 2021-09-26 Tobias Burnus <tobias@codesourcery.com>
558 * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
559 'pointer' with scalar/array 'target' argument.
561 2021-09-24 Harald Anlauf <anlauf@gmx.de>
564 * expr.c (is_non_constant_intrinsic): Check for intrinsics
565 excluded in constant expressions (F2018:10.1.2).
566 (gfc_is_constant_expr): Use that check.
568 2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
571 * interface.c (compare_parameter): Enforce F2018 C711.
573 2021-09-24 Tobias Burnus <tobias@codesourcery.com>
576 * scanner.c (load_file): Return void, call (gfc_)fatal_error for
578 (include_line, include_stmt, gfc_new_file): Remove exit call
579 for failed load_file run.
581 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
584 * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
587 2021-09-23 Harald Anlauf <anlauf@gmx.de>
588 Tobias Burnus <tobias@codesourcery.com>
591 * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
592 coindexed scalar coarrays.
594 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
597 * interface.c (gfc_compare_actual_formal): Extend existing
598 assumed-type diagnostic to also check for argument with type
601 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
604 * check.c (gfc_check_associated): Allow an assumed-rank
605 array for the pointer argument.
606 * interface.c (compare_parameter): Also give rank mismatch
607 error on assumed-rank array.
609 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
611 * trans-stmt.c (trans_associate_var): Check that result of
612 GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
614 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
617 * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
618 Add new bool verbose_missing_dir_warn argument.
619 * cpp.h (gfc_cpp_post_options): Update prototype.
620 * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
621 * gfortran.h (gfc_check_include_dirs): Takes bool
622 verbose_missing_dir_warn arg.
623 (gfc_new_file): Returns now void.
624 * options.c (gfc_post_options): Update to warn for -I and -J,
625 only, by default but for all when user requested.
626 * scanner.c (gfc_do_check_include_dir):
627 (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
628 verbose warn arg and update to avoid printing the same message
630 (load_file): Fix indent.
631 (gfc_new_file): Return void and exit when load_file failed
632 as all other load_file users do.
634 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
636 * trans-expr.c (gfc_simple_for_loop): New.
637 * trans.h (gfc_simple_for_loop): New prototype.
639 2021-09-21 Tobias Burnus <tobias@codesourcery.com>
642 * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
643 cpp_reason_option_codes available.
644 (gfc_cpp_register_include_paths): Make static, set pfile's
645 warn_missing_include_dirs and move before caller.
646 (gfc_cpp_init_cb): New, cb code moved from ...
647 (gfc_cpp_init_0): ... here.
648 (gfc_cpp_post_options): Call gfc_cpp_init_cb.
649 (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
650 to match CppReason flags to -W... names.
651 (cb_cpp_diagnostic): Use it to replace single special case.
652 * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
653 * gfortran.h (gfc_check_include_dirs): New prototype.
654 (gfc_add_include_path): Add new bool arg.
655 * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
656 (gfc_post_options): Set it here after commandline processing. Call
657 gfc_add_include_path with defer_warn=false.
658 (gfc_handle_option): Call it with defer_warn=true.
659 * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
660 gfc_check_include_dirs): New. Diagnostic moved from ...
661 (add_path_to_list): ... here, which came before cmdline processing.
662 Take additional bool defer_warn argument.
663 (gfc_add_include_path): Take additional defer_warn arg.
664 * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
667 2021-09-20 Tobias Burnus <tobias@codesourcery.com>
669 * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
670 * dump-parse-tree.c (show_omp_clauses): Dump it.
671 * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
672 modifiers to ordered(concurrent).
673 (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
674 (resolve_omp_clauses): Reject ordered + order on same directive.
675 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
676 on unconstrained modifier of ordered(concurrent).
678 2021-09-17 Harald Anlauf <anlauf@gmx.de>
681 * trans-decl.c (gfc_finish_var_decl): Disable the warning message
682 for variables moved from stack to static storange if they are
683 declared in the main, but allow the move to happen.
685 2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
687 * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
688 to _Float128 rather than __float128.
689 * iso-c-binding.def (c_float128): Update comments.
690 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
691 (build_round_expr): Likewise.
692 (gfc_build_intrinsic_lib_fndcecls): Likewise.
693 * trans-types.h (gfc_real16_is_float128): Likewise.
695 2021-09-16 Harald Anlauf <anlauf@gmx.de>
698 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
699 allocatable components of optional allocatable derived type
700 procedure arguments with INTENT(OUT) into a presence check.
702 2021-09-14 Harald Anlauf <anlauf@gmx.de>
705 * resolve.c (resolve_entries): Attempt to recover cleanly after
706 rejecting mismatched function entries.
708 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
711 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
713 2021-09-13 Harald Anlauf <anlauf@gmx.de>
716 * decl.c (add_init_expr_to_sym): For proper initialization of
717 array-valued named constants the array bounds need to be
718 simplified before adding the initializer.
720 2021-09-13 Harald Anlauf <anlauf@gmx.de>
723 * expr.c (find_substring_ref): Handle given substring start and
724 end indices as signed integers, not unsigned.
726 2021-09-09 Harald Anlauf <anlauf@gmx.de>
729 * trans-expr.c (gfc_conv_substring): Do not generate substring
730 bounds check for implied do loop index variable before it actually
733 2021-09-08 liuhongt <hongtao.liu@intel.com>
735 * options.c (gfc_post_options): Issue an error for
736 -fexcess-precision=16.
738 2021-09-07 Harald Anlauf <anlauf@gmx.de>
741 * expr.c (find_array_element): When bounds cannot be determined as
742 constant, return error instead of aborting.
744 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
746 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
748 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
750 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
752 * decl.c (gfc_verify_c_interop_param): Reject pointer with
753 CONTIGUOUS attributes as dummy arg. Reject character len > 1
754 when passed as byte stream.
756 2021-09-01 Harald Anlauf <anlauf@gmx.de>
759 * resolve.c (resolve_common_vars): Fix grammar and improve wording
760 of error message rejecting an unlimited polymorphic in COMMON.
762 2021-08-31 Harald Anlauf <anlauf@gmx.de>
765 * simplify.c (substring_has_constant_len): Minimize checks for
766 substring expressions being allowed.
768 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
770 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
771 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
772 and 'ancestor' in 'target device' clauses.
773 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
775 2021-08-30 Harald Anlauf <anlauf@gmx.de>
778 * match.c (gfc_match_goto): Allow for whitespace in parsing list
781 2021-08-30 Harald Anlauf <anlauf@gmx.de>
784 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
785 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
788 2021-08-28 Harald Anlauf <anlauf@gmx.de>
791 * resolve.c (resolve_entries): For functions of type CHARACTER
792 tighten the checks for matching characteristics.
794 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
797 * cpp.c (gfc_cpp_post_options): Call new function
798 diagnostic_initialize_input_context().
800 2021-08-24 Harald Anlauf <anlauf@gmx.de>
803 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
804 implicit SAVE as well as variables in the main program. Improve
805 warning message text.
807 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
809 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
810 gfc_match_dupl_atomic): New.
811 (gfc_match_omp_clauses): Use them; remove duplicate
812 'release'/'relaxed' clause matching; improve error dignostic
815 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
817 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
818 on grainsize/num_tasks
819 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
820 and num_tasks_strict.
821 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
822 Handle 'strict' modifier on grainsize/num_tasks.
823 * openmp.c (gfc_match_omp_clauses): Likewise.
825 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
828 (error_uinteger): Take 'long long unsigned' instead
829 of 'long unsigned' as argumpent.
830 (error_integer): Take 'long long' instead of 'long'.
831 (error_hwuint, error_hwint): New.
832 (error_print): Update to handle 'll' and 'w'
834 * simplify.c (substring_has_constant_len): Use '%wd'
837 2021-08-20 Harald Anlauf <anlauf@gmx.de>
840 * simplify.c (substring_has_constant_len): Fix format string of
841 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
843 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
845 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
846 and 'message' clauses.
847 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
848 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
849 (gfc_omp_severity_type, gfc_omp_at_type): New.
850 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
851 use more bitfields + ENUM_BITFIELD.
852 (gfc_exec_op): Add EXEC_OMP_ERROR.
853 * match.h (gfc_match_omp_error): New.
854 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
855 (gfc_match_omp_clauses): Handle new clauses.
856 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
857 (resolve_omp_clauses): Resolve new clauses.
858 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
860 * parse.c (decode_omp_directive, next_statement,
861 gfc_ascii_statement): Handle 'omp error'.
862 * resolve.c (gfc_resolve_blocks): Likewise.
863 * st.c (gfc_free_statement): Likewise.
864 * trans-openmp.c (gfc_trans_omp_error): Likewise.
865 (gfc_trans_omp_directive): Likewise.
866 * trans.c (trans_code): Likewise.
868 2021-08-20 Jakub Jelinek <jakub@redhat.com>
870 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
871 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
873 2021-08-19 Harald Anlauf <anlauf@gmx.de>
876 * simplify.c (substring_has_constant_len): New.
877 (gfc_simplify_len): Handle case of substrings with constant
880 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
882 * match.h (gfc_match_omp_nothing): New.
883 * openmp.c (gfc_match_omp_nothing): New.
884 * parse.c (decode_omp_directive): Match 'nothing' directive.
886 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
888 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
890 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
891 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
892 * match.h (gfc_match_omp_scope): New.
893 * openmp.c (OMP_SCOPE_CLAUSES): Define
894 (gfc_match_omp_scope): New.
895 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
896 Improve error diagnostic.
897 (omp_code_to_statement): Handle ST_OMP_SCOPE.
898 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
899 * parse.c (decode_omp_directive, next_statement,
900 gfc_ascii_statement, parse_omp_structured_block,
901 parse_executable): Handle OpenMP's scope construct.
902 * resolve.c (gfc_resolve_blocks): Likewise
903 * st.c (gfc_free_statement): Likewise
904 * trans-openmp.c (gfc_trans_omp_scope): New.
905 (gfc_trans_omp_directive): Call it.
906 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
908 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
910 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
911 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
912 * frontend-passes.c (gfc_code_walker): Likewise.
913 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
914 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
915 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
916 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
917 gfc_match_omp_parallel_masked_taskloop,
918 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
919 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
920 (gfc_match_omp_clauses): Match it.
921 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
922 gfc_match_omp_parallel_masked_taskloop,
923 gfc_match_omp_parallel_masked_taskloop_simd,
924 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
925 gfc_match_omp_masked_taskloop_simd): New.
926 (resolve_omp_clauses): Resolve filter clause.
927 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
928 omp_code_to_statement, gfc_resolve_omp_directive): Handle
929 omp masked constructs.
930 * parse.c (decode_omp_directive, case_exec_markers,
931 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
932 parse_executable): Likewise.
933 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
934 * st.c (gfc_free_statement): Likewise.
935 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
936 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
937 (gfc_trans_omp_masked): New.
938 (gfc_split_omp_clauses): Handle combined masked directives.
939 (gfc_trans_omp_master_taskloop): Rename to ...
940 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
941 combined masked directives.
942 (gfc_trans_omp_parallel_master): Rename to ...
943 (gfc_trans_omp_parallel_master_masked): ... this; handle
944 combined masked directives.
945 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
946 * trans.c (trans_code): Likewise.
948 2021-08-15 Harald Anlauf <anlauf@gmx.de>
951 * match.c (sync_statement): Replace %v code by %e in gfc_match to
952 allow for function references as STAT and ERRMSG arguments.
953 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
954 being definable arguments. Function references with a data
955 pointer result are accepted.
956 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
958 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
960 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
961 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
962 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
963 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
964 omp_proc_bind_primary.
965 * openmp.c (gfc_match_omp_clauses): Accept
966 'primary' as alias for 'master'.
967 * trans-openmp.c (gfc_trans_omp_clauses): Handle
968 OMP_PROC_BIND_PRIMARY.
970 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
972 * iso-c-binding.def (c_float128, c_float128_complex): Check
973 float128_type_node instead of gfc_float128_type_node.
974 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
975 Update comments re supported 128-bit floating-point types.
977 2021-08-11 Richard Biener <rguenther@suse.de>
979 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
980 COMPONENT_REF if the field is volatile.
982 2021-08-07 Harald Anlauf <anlauf@gmx.de>
985 * primary.c (gfc_expr_attr): Variable attribute can only be
986 inquired when symtree is non-NULL.
988 2021-07-28 Harald Anlauf <anlauf@gmx.de>
991 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
993 * match.c (gfc_match): Fix comment for %v code.
994 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
995 by %e in gfc_match to allow for function references as STAT and
997 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
998 dereferences and shortcut for bad STAT and ERRMSG argument to
999 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
1001 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1002 Tobias Burnus <tobias@codesourcery.com>
1009 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
1011 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
1012 handling which reflect a previous intermediate version of the
1013 standard. Only copy out the descriptor if necessary.
1015 2021-07-23 Harald Anlauf <anlauf@gmx.de>
1018 * check.c (array_check): Adjust check for the case of CLASS
1021 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1022 Joseph Myers <joseph@codesourcery.com>
1023 Cesar Philippidis <cesar@codesourcery.com>
1025 * dump-parse-tree.c (show_attr): Update.
1026 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
1027 (gfc_omp_clauses): Add 'nohost' member.
1028 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
1029 (attr_bits, mio_symbol_attribute): Update.
1030 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
1031 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1032 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
1033 (gfc_match_oacc_routine): Update.
1034 * trans-decl.c (add_attributes_to_decl): Update.
1035 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1037 2021-07-21 Harald Anlauf <anlauf@gmx.de>
1040 * target-memory.c (gfc_interpret_derived): Size of array component
1041 of derived type can only be computed here for explicit shape.
1042 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
1045 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
1047 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
1048 changes; reject unsupported bits with 'Error: Sorry,'.
1049 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
1050 For using CFI descriptor with characters.
1052 2021-07-18 Harald Anlauf <anlauf@gmx.de>
1055 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
1057 2021-07-14 Harald Anlauf <anlauf@gmx.de>
1060 * trans-expr.c (gfc_trans_class_init_assign): Call
1061 gfc_conv_expr_present only for dummy variables.
1063 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1066 * frontend-passes.c (traverse_io_block): Adjust test for
1067 when a variable is eligible for the transformation to
1070 2021-06-28 Martin Sebor <msebor@redhat.com>
1072 * trans-array.c (trans_array_constructor): Replace direct uses
1073 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
1074 * trans-decl.c (gfc_build_qualified_array): Same.
1075 (gfc_build_dummy_array_decl): Same.
1076 (generate_local_decl): Same.
1077 (gfc_generate_function_code): Same.
1078 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1079 (gfc_omp_clause_copy_ctor): Same.
1080 * trans-types.c (get_dtype_type_node): Same.
1081 (gfc_get_desc_dim_type): Same.
1082 (gfc_get_array_descriptor_base): Same.
1083 (gfc_get_caf_vector_type): Same.
1084 (gfc_get_caf_reference_type): Same.
1085 * trans.c (gfc_create_var_np): Same.
1087 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
1089 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
1090 for dumping gfc_omp_defaultmap_category.
1092 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
1095 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
1096 before dereferrencing.
1098 2021-06-18 Harald Anlauf <anlauf@gmx.de>
1102 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
1103 convert result of min/max to result type.
1105 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1109 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1111 * match.c (gfc_match_pointer_assignment): Likewise.
1112 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1115 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1118 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1122 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1124 * match.c (gfc_match_pointer_assignment): Likewise.
1125 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1128 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1132 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1134 * match.c (gfc_match_pointer_assignment): Likewise.
1135 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1138 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
1141 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
1142 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
1143 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
1144 * gfortran.h (enum gfc_omp_defaultmap,
1145 enum gfc_omp_defaultmap_category): New.
1146 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
1147 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
1148 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1149 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
1150 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
1152 * trans.h (gfc_omp_scalar_p): Update prototype.
1153 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1154 (struct lang_decl): Add scalar_target.
1155 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
1157 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1159 * resolve.c (resolve_variable): Remove *XCNEW used to
1160 nullify nullified memory.
1162 2021-06-09 Martin Liska <mliska@suse.cz>
1164 * intrinsic.texi: Add missing @headitem to tables with a header.
1166 2021-06-09 Jakub Jelinek <jakub@redhat.com>
1169 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
1171 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
1174 * trans-openmp.c (gfc_add_clause_implicitly): New.
1175 (gfc_split_omp_clauses): Use it.
1176 (gfc_free_split_omp_clauses): New.
1177 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
1178 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
1179 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
1180 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
1182 2021-06-08 Martin Liska <mliska@suse.cz>
1184 * intrinsic.texi: Fix typo.
1185 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
1187 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1194 * trans-array.c (gfc_get_array_span): rework the way character
1195 array "span" was calculated.
1196 (gfc_conv_expr_descriptor): improve handling of character sections
1197 and unlimited polymorphic objects.
1198 * trans-expr.c (gfc_get_character_len): new function to calculate
1199 character string length.
1200 (gfc_get_character_len_in_bytes): new function to calculate
1201 character string length in bytes.
1202 (gfc_conv_scalar_to_descriptor): add call to set the "span".
1203 (gfc_trans_pointer_assignment): set "_len" and antecipate the
1204 initialization of the deferred character length hidden argument.
1205 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
1206 avoid the creation of a temporary.
1207 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
1208 so that unlimited polymorphic objects get proper type infomation,
1209 also important for bind(c).
1210 (gfc_get_dtype): add argument to pass the rank if necessary.
1211 (gfc_get_array_type_bounds): cosmetic change to have character
1212 arrays called character instead of unknown.
1213 * trans-types.h (gfc_get_dtype): modify prototype.
1214 * trans.c (get_array_span): rework the way character array "span"
1216 * trans.h (gfc_get_character_len): new prototype.
1217 (gfc_get_character_len_in_bytes): new prototype.
1218 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
1219 expression carries an unlimited polymorphic object.
1221 2021-06-04 Harald Anlauf <anlauf@gmx.de>
1224 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
1225 if the assignment to the resulting array if it is not of canonical
1226 type (real/integer/complex/logical).
1228 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1230 * dump-parse-tree.c (show_code_node): Handle
1231 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
1233 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1235 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
1236 this is not an (OpenMP) continuation line.
1237 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
1238 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
1239 continuation once per location and return '\n'.
1241 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1244 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
1246 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1249 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
1250 (show_omp_node): Handle loop directive.
1251 * frontend-passes.c (gfc_code_walker): Likewise.
1252 * gfortran.h (enum gfc_statement): Add
1253 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1254 (enum gfc_omp_bind_type): New.
1255 (gfc_omp_clauses): Use it.
1256 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1257 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
1258 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
1259 gfc_match_omp_teams_loop): New.
1260 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
1261 (gfc_match_omp_clauses): Handle it.
1262 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
1263 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
1264 gfc_match_omp_target_parallel_loop): New.
1265 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
1266 gfc_resolve_omp_directive): Handle omp loop.
1267 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
1268 parse_omp_do, parse_executable): Likewise.
1269 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
1270 * resolve.c (gfc_resolve_blocks): Add omp loop.
1271 * st.c (gfc_free_statement): Likewise.
1272 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
1273 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
1274 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
1275 Handle loop directive.
1276 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
1277 and (in_)reduction for taskloop.
1278 * trans.c (trans_code): Handle omp loop directive.
1280 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
1283 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1284 (parallel) master taskloop (simd).
1285 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
1286 to false for parallel master taskloop (simd).
1287 * gfortran.h (enum gfc_statement):
1288 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1289 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1290 * match.h (gfc_match_omp_master_taskloop,
1291 gfc_match_omp_master_taskloop_simd,
1292 gfc_match_omp_parallel_master_taskloop,
1293 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
1294 * openmp.c (gfc_match_omp_parallel_master_taskloop,
1295 gfc_match_omp_parallel_master_taskloop_simd,
1296 gfc_match_omp_master_taskloop,
1297 gfc_match_omp_master_taskloop_simd): New.
1298 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
1299 (resolve_omp_clauses): Handle new combined directives; remove
1300 inscan-reduction check to reduce multiple errors; add
1301 task-reduction error for 'taskloop simd'.
1302 (gfc_resolve_omp_parallel_blocks,
1303 resolve_omp_do, omp_code_to_statement,
1304 gfc_resolve_omp_directive): Handle new combined constructs.
1305 * parse.c (decode_omp_directive, next_statement,
1306 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1307 parse_executable): Likewise.
1308 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1309 * st.c (gfc_free_statement): Likewise.
1310 * trans.c (trans_code): Likewise.
1311 * trans-openmp.c (gfc_split_omp_clauses,
1312 gfc_trans_omp_directive): Likewise.
1313 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
1314 handle parallel master taskloop (simd) as well.
1315 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
1316 (gfc_trans_omp_master_taskloop): New.
1318 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
1320 * gfortran.texi (BOZ literal constants): Fix typo.
1322 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1324 * dump-parse-tree.c (show_iterator): New.
1325 (show_omp_namelist): Handle iterators.
1326 (show_omp_clauses): Handle affinity.
1327 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
1328 * match.c (gfc_free_omp_namelist): Add are to choose union element.
1329 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
1330 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
1331 call to gfc_free_omp_namelist.
1332 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
1333 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
1334 (gfc_match_iterator): New.
1335 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
1336 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
1337 (gfc_match_omp_taskwait): Match depend clause.
1338 (resolve_omp_clauses): Handle affinity; update for udr/union change.
1339 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
1340 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
1341 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
1342 (handle_iterator): New.
1343 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
1344 (gfc_trans_omp_taskwait): Handle depend clause.
1345 (gfc_trans_omp_directive): Update call.
1347 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1350 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
1351 attributes for CLASS arrays for generation of runtime error.
1353 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1356 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
1357 presence of a dummy argument when a symbol actually refers to a
1360 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
1361 Johannes Nendwich <a08727063@unet.univie.ac.at>
1363 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
1364 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
1366 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
1369 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
1370 * trans-openmp.c (gfc_is_polymorphic_nonptr,
1371 gfc_is_unlimited_polymorphic_nonptr): New.
1372 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
1373 polymorphic scalars.
1375 2021-05-23 Harald Anlauf <anlauf@gmx.de>
1378 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1379 implicit conversion of actual argument to an unlimited polymorphic
1382 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
1384 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1385 proper variable name in the description.
1387 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
1388 Steve Kargl <kargl@gcc.gnu.org>
1391 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1392 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1393 lib-call of caf_random_init instead of logical (4-byte).
1394 * trans.h: Add tree var for random_init.
1396 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
1398 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1400 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
1403 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1405 2021-05-17 Harald Anlauf <anlauf@gmx.de>
1408 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1411 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
1414 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1417 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1419 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1420 EXEC_OMP_PARALLEL_MASTER.
1421 * frontend-passes.c (gfc_code_walker): Likewise.
1422 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1423 ST_OMP_END_PARALLEL_MASTER.
1424 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1425 * match.h (gfc_match_omp_parallel_master): Handle it.
1426 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1427 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1428 * parse.c (decode_omp_directive, case_exec_markers,
1429 gfc_ascii_statement, parse_omp_structured_block,
1430 parse_executable): Likewise.
1431 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1432 * st.c (gfc_free_statement): Likewise.
1433 * trans-openmp.c (gfc_trans_omp_parallel_master,
1434 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1435 * trans.c (trans_code): Likewise.
1437 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1439 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1440 for vars in 'omp threadprivate' and 'omp declare target'.
1442 2021-05-10 Martin Liska <mliska@suse.cz>
1444 * decl.c (variable_decl): Use startswith
1445 function instead of strncmp.
1446 (gfc_match_end): Likewise.
1447 * gfortran.h (gfc_str_startswith): Likewise.
1448 * module.c (load_omp_udrs): Likewise.
1449 (read_module): Likewise.
1450 * options.c (gfc_handle_runtime_check_option): Likewise.
1451 * primary.c (match_arg_list_function): Likewise.
1452 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1453 * trans-expr.c (gfc_conv_procedure_call): Likewise.
1454 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1456 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
1460 * class.c (gfc_build_class_symbol): Remove the error that
1461 disables assumed size class arrays. Class array types that are
1462 not deferred shape or assumed rank are given a unique name and
1463 placed in the procedure namespace.
1464 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1466 (gfc_trans_dummy_array_bias): Suppress the runtime error for
1467 extent violations in explicit shape class arrays because it
1469 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1470 class actual arguments passed to non-descriptor formal args by
1471 using the data pointer, stored as the symbol's backend decl.
1473 2021-05-05 Harald Anlauf <anlauf@gmx.de>
1476 * interface.c (gfc_compare_actual_formal): Continue checks after
1477 emitting warning for argument length mismatch.
1478 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1481 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1484 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1486 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
1488 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1489 checking whether a '%' or parenthesis-open follows as next character.
1491 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1494 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1495 and then pass a pointer.
1497 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1498 Nathan Sidwell <nathan@codesourcery.com>
1499 Tom de Vries <vries@codesourcery.com>
1500 Julian Brown <julian@codesourcery.com>
1501 Kwok Cheung Yeung <kcy@codesourcery.com>
1503 * lang.opt (Wopenacc-parallelism): New.
1505 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1508 * check.c (variable_check): Allow function reference having a data
1510 (arg_strlen_is_zero): New function.
1511 (gfc_check_fgetputc_sub): Add static check of character and status
1513 (gfc_check_fgetput_sub): Likewise.
1514 * intrinsic.c (add_subroutines): Fix argument name for the
1515 character argument to intrinsic subroutines fget[c], fput[c].
1517 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1520 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1521 from a function reference.
1523 2021-04-22 Martin Liska <mliska@suse.cz>
1527 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1529 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
1532 * trans-intrinsic.c (build_round_expr): If int type is larger than
1533 long long, do the round and convert to the integer type. Do not
1534 try to find a floating point type the exact size of the integer
1537 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
1539 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1540 in the depend clause.
1541 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1542 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1543 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1544 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1545 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1546 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1547 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1548 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1550 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1551 Handle 'omp depobj'.
1552 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1554 * resolve.c (gfc_resolve_code): Likewise.
1555 * st.c (gfc_free_statement): Likewise.
1556 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1557 in the depend clause.
1558 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1559 * trans.c (trans_code): Likewise.
1561 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
1564 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1565 association with a check that the current and symbol namespaces
1568 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1570 * lang.opt (fopenacc-kernels=): Remove.
1572 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1575 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1576 pointers and allocatables with correct TKR parameters.
1578 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1581 * resolve.c: Add association check before de-referencing pointer.
1583 2021-04-16 Harald Anlauf <anlauf@gmx.de>
1584 Paul Thomas <pault@gcc.gnu.org>
1587 * module.c (write_symtree): Do not write interface of intrinsic
1588 procedure to module file for F2003 and newer.
1590 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
1593 * symbol.c: Remove trailing white space.
1594 * trans-array.c (gfc_trans_create_temp_array): Create a class
1595 temporary for class expressions and assign the new descriptor
1597 (build_class_array_ref): If the class expr can be extracted,
1598 then use that for 'decl'. Class function results are reliably
1599 handled this way. Call gfc_find_and_cut_at_last_class_ref to
1600 eliminate largely redundant code. Remove dead code and recast
1601 the rest of the code to extract 'decl' for remaining cases.
1602 Call gfc_build_spanned_array_ref.
1603 (gfc_alloc_allocatable_for_assignment): Use class descriptor
1604 element length for 'elemsize1'. Eliminate repeat set of dtype
1605 for class expressions.
1606 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1607 additional code from build_class_array_ref, and use optional
1608 gfc_typespec pointer argument.
1609 (gfc_trans_scalar_assign): Make use of pre and post blocks for
1610 all class expressions.
1611 * trans.c (get_array_span): For unlimited polymorphic exprs
1612 multiply the span by the value of the _len field.
1613 (gfc_build_spanned_array_ref): New function.
1614 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1615 eliminate repeated code.
1616 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1617 add prototype for gfc_build_spanned_array_ref.
1619 2021-04-14 Martin Liska <mliska@suse.cz>
1621 * intrinsic.texi: The table has first column empty and it makes
1622 trouble when processing makeinfo --xml output.
1624 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
1627 * trans-types.c (gfc_get_function_type): Also generate hidden
1628 coarray argument for character arguments.
1630 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
1633 * interface.c (compare_parameter): The codimension attribute is
1634 applied to the _data field of class formal arguments.
1636 2021-04-01 Harald Anlauf <anlauf@gmx.de>
1639 * simplify.c (gfc_simplify_transpose): Properly initialize
1642 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
1645 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1646 for class expressions and detect proc pointer evaluations by
1647 the non-null actual argument list.
1649 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
1651 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1653 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
1656 * intrinsic.c (gfc_intrinsic_func_interface): Set
1657 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1659 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
1662 * resolve.c (resolve_operator): Make 'msg' buffer larger
1665 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
1668 * trans-decl.c (build_function_decl): Add comment;
1669 increment hidden_typelist for caf_token/caf_offset.
1670 * trans-types.c (gfc_get_function_type): Add comment;
1671 add missing caf_token/caf_offset args.
1673 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
1676 * match.c (select_type_set_tmp, gfc_match_select_type,
1677 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1678 * resolve.c (resolve_select_type): Likewise.
1680 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1682 * frontend-passes.c (inline_limit_check): Add rank_a
1683 argument. If a is rank 1, set the second dimension to 1.
1684 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1685 (call_external_blas): Likewise.
1687 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1690 * frontend-passes.c (doloop_contained_procedure_code):
1691 Properly handle EXEC_IOLENGTH.
1693 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
1696 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1697 assignment by setting init_flag.
1699 2021-03-14 Harald Anlauf <anlauf@gmx.de>
1700 Paul Thomas <pault@gcc.gnu.org>
1702 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1704 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1706 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
1709 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1710 length components use the ss_info string length instead of
1711 gfc_get_expr_charlen. Make sure that the deferred string length
1712 is a variable before assigning to it. Otherwise use the expr.
1713 * trans-expr.c (gfc_conv_string_length): Make sure that the
1714 deferred string length is a variable before assigning to it.
1716 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
1719 * resolve.c (resolve_symbol): Accept vars which are in DATA
1720 and hence (either) implicit SAVE (or in common).
1722 2021-03-10 Harald Anlauf <anlauf@gmx.de>
1725 * data.c (gfc_assign_data_value): Reject non-constant character
1727 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1728 elements which are defined to avoid NULL pointer dereference.
1730 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
1732 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1734 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
1737 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1738 that __float128 is the 128-bit floating-point type.
1740 2021-03-08 Harald Anlauf <anlauf@gmx.de>
1743 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1744 attribute in DATA statement.
1746 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1750 * invoke.texi (-freal{4,8}-real-*): Extend description.
1751 * primary.c (match_real_constant): Also promote real literals
1752 with '_kind' number.
1754 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
1757 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1758 redoing kind conversions.
1759 * primary.c (match_real_constant): Likewise.
1761 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1764 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1766 (resolve_omp_clauses): Likewise.
1768 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1771 * frontend-passes.c (doloop_code): Replace double space in diagnostics
1772 with a single space.
1774 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
1777 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1778 'derived_array' to hold the fixed, parmse expr in the case of
1779 assumed rank formal arguments. Deal with optional arguments.
1780 (gfc_conv_procedure_call): Null 'derived' array for each actual
1781 argument. Add its address to the call to gfc_conv_derived_to_
1782 class. Access the 'data' field of scalar descriptors before
1783 deallocating allocatable components. Also strip NOPs before the
1784 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1785 input to gfc_deallocate_alloc_comp if it is available.
1786 * trans.h : Include the optional argument 'derived_array' to
1787 the prototype of gfc_conv_derived_to_class. The default value
1790 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
1793 * resolve.c (resolve_fl_procedure): Include class results in
1794 the test for F2018, C15100.
1795 * trans-array.c (get_class_info_from_ss): Do not use the saved
1796 descriptor to obtain the class expression for variables. Use
1797 gfc_get_class_from_expr instead.
1799 2021-02-23 Harald Anlauf <anlauf@gmx.de>
1802 * simplify.c (gfc_simplify_reshape): Set string length for
1803 character arguments.
1805 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
1808 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1809 dummy procs as nonoptional as no special treatment is needed.
1811 2021-02-21 Harald Anlauf <anlauf@gmx.de>
1813 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1814 allocatable intent(out) argument.
1816 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1819 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1820 IMPLICIT NONE and and issue an error, otherwise set the type
1821 to its IMPLICIT type so that any subsequent use of objects will
1822 will confirm their types.
1824 2021-02-19 Harald Anlauf <anlauf@gmx.de>
1826 * symbol.c (gfc_add_flavor): Reverse order of conditions.
1828 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1831 * dependency.c (gfc_dep_resolver): Fix coarray handling.
1833 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1838 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1841 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1844 2021-02-17 Julian Brown <julian@codesourcery.com>
1846 * openmp.c (resolve_omp_clauses): Disallow selecting components
1847 of arrays of derived type.
1849 2021-02-17 Julian Brown <julian@codesourcery.com>
1851 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1852 for arrays of derived types.
1854 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1856 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1857 %im and %re which are EXPR_VARIABLE.
1858 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1860 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1863 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1864 as (array-valued) FORMAT tag.
1866 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
1869 * trans-expr.c (gfc_conv_procedure_call): Don't reset
1870 rank of assumed-rank array.
1872 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1875 * match.c (gfc_match_call): Include associate names as possible
1876 entities with typebound subroutines. The target needs to be
1877 resolved for the type.
1879 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1882 * primary.c (gfc_match_varspec): Test for non-null 'previous'
1883 before using its name in the error message.
1885 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
1887 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1888 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1889 array' as scalars are also permitted.
1891 2021-02-10 Julian Brown <julian@codesourcery.com>
1894 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1895 contiguity check and stride-specified error.
1897 2021-02-04 Julian Brown <julian@codesourcery.com>
1899 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1900 contiguity check and stride-specified error.
1902 2021-02-04 Julian Brown <julian@codesourcery.com>
1904 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1907 2021-02-04 Julian Brown <julian@codesourcery.com>
1909 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1912 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
1914 * openmp.c (resolve_omp_clauses): Explicitly diagnose
1915 substrings as not permitted.
1917 2021-02-03 Jeff Law <law@redhat.com>
1919 * intrinsic.texi (ANINT): Fix typo.
1921 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
1924 * dependency.c (gfc_dep_resolver): Treat local access
1925 to coarrays like any array access in dependency analysis.
1927 2021-01-28 Harald Anlauf <anlauf@gmx.de>
1930 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1931 size is NULL (as documented).
1933 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1937 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1938 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1940 (gfc_trans_assignment_1): Similarly suppress class assignment
1941 for class valued procedure pointers.
1943 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1946 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1947 procedure pointers in the assert under the comment 'elemental
1948 function' and eliminate the second, spurious assert.
1950 2021-01-25 Harald Anlauf <anlauf@gmx.de>
1953 * data.c (create_character_initializer): Check substring indices
1955 (gfc_assign_data_value): Catch error returned from
1956 create_character_initializer.
1958 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
1960 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1962 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
1965 * resolve.c (resolve_charlen): Check that length expression is
1966 present before testing for scalar/integer..
1968 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
1971 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1972 component for scalar class function targets. Instead, fix the
1973 function result and access the _data from that.
1975 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
1977 * intrinsic.texi (CO_MAX): Fix typo.
1979 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
1982 * decl.c (gfc_match_modproc): It is not an error to find a
1983 module procedure declaration within a contains block.
1984 * expr.c (gfc_check_vardef_context): Pure procedure result is
1985 assignable. Change 'own_scope' accordingly.
1986 * resolve.c (resolve_typebound_procedure): A procedure that
1987 has the module procedure attribute is almost certainly a
1988 module procedure, whatever its interface.
1990 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
1993 * openmp.c (resolve_omp_clauses): Change use_device_ptr
1994 to use_device_addr for unless type(c_ptr); check all
1995 list item for is_device_ptr.
1997 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1999 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
2000 * frontend-passes.c (gfc_code_walker): Walk detach expression.
2001 * gfortran.h (struct gfc_omp_clauses): Add detach field.
2002 (gfc_c_intptr_kind): New.
2003 * openmp.c (gfc_free_omp_clauses): Free detach clause.
2004 (gfc_match_omp_detach): New.
2005 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
2006 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
2007 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
2008 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
2009 (resolve_omp_clauses): Prevent use of detach with mergeable and
2010 overriding the data sharing mode of the event handle.
2011 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
2012 * trans-types.c (gfc_c_intptr_kind): New.
2013 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
2015 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
2017 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
2018 ...this. Add extra argument.
2020 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2022 * gfortran.h (gfc_resolve_substring): Add prototype.
2023 * primary.c (match_string_constant): Simplify substrings with
2024 constant starting and ending points.
2025 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
2026 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
2028 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2031 * resolve.c (resolve_component): Derived type components with
2032 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2034 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2037 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2040 * resolve.c (resolve_component): Derived type components with
2041 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2043 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2046 * resolve.c (resolve_component): Derived type components with
2047 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2049 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
2052 * trans-expr.c (gfc_conv_component_ref): Remove the condition
2053 that deferred character length components only be allocatable.
2055 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
2058 * simplify.c (is_constant_array_expr): If an array constructor
2059 expression has elements other than constants or structures, try
2060 fixing the expression with gfc_reduce_init_expr. Also, if shape
2061 is NULL, obtain the array size and set it.
2063 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
2066 * resolve.c (find_array_spec): Put static prototype for
2067 resolve_assoc_var before this function and call for associate
2070 2021-01-06 Harald Anlauf <anlauf@gmx.de>
2072 * resolve.c (resolve_component): Add check for valid CLASS
2073 reference before trying to access CLASS data.
2075 2021-01-04 Martin Liska <mliska@suse.cz>
2077 * ChangeLog-2018: Remove duplicate ChangeLog entries.
2079 2021-01-01 Harald Anlauf <anlauf@gmx.de>
2081 * class.c (gfc_find_vtab): Add check on attribute is_class.
2083 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2085 * gfortranspec.c (lang_specific_driver): Update copyright notice
2087 * gfc-internals.texi: Bump @copying's copyright year.
2088 * gfortran.texi: Ditto.
2089 * intrinsic.texi: Ditto.
2090 * invoke.texi: Ditto.
2092 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2094 * ChangeLog-2020: Rotate ChangeLog. New file.
2097 Copyright (C) 2021 Free Software Foundation, Inc.
2099 Copying and distribution of this file, with or without modification,
2100 are permitted in any medium without royalty provided the copyright
2101 notice and this notice are preserved.