1 2021-11-05 Harald Anlauf <anlauf@gmx.de>
4 * expr.c (simplify_parameter_variable): Copy shape of referenced
5 subobject when simplifying.
7 2021-11-05 Harald Anlauf <anlauf@gmx.de>
10 * match.c (gfc_match_common): Check array spec of a symbol in a
11 COMMON object list and reject it if it is a coarray.
13 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
16 * decl.c (gfc_match_implicit_none): Fix typo in warning.
17 * resolve.c (resolve_unknown_f): Reject external procedures
18 without explicit EXTERNAL attribute whe IMPLICIT none (external)
21 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
23 * decl.c (gfc_insert_kind_parameter_exprs): Make static.
24 * expr.c (gfc_build_init_expr): Make static
25 (gfc_build_default_init_expr): Move below its static helper.
26 * gfortran.h (gfc_insert_kind_parameter_exprs, gfc_add_saved_common,
27 gfc_add_common, gfc_use_derived_tree, gfc_free_charlen,
28 gfc_get_ultimate_derived_super_type,
29 gfc_resolve_oacc_parallel_loop_blocks, gfc_build_init_expr,
30 gfc_iso_c_sub_interface): Delete.
31 * symbol.c (gfc_new_charlen, gfc_get_derived_super_type): Make
34 2021-11-05 Sandra Loosemore <sandra@codesourcery.com>
37 * gfortran.texi (Mixed-Language Programming): Talk about C++,
40 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
42 * gfortran.texi (Projects): Add bullet for helping with
43 incomplete standards compliance.
44 (Proposed Extensions): Delete section.
46 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
48 * intrinsic.texi (Introduction to Intrinsics): Genericize
49 references to standard versions.
50 * invoke.texi (-fall-intrinsics): Likewise.
51 (-fmax-identifier-length=): Likewise.
53 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
55 * gfortran.texi (Interoperability with C): Copy-editing. Add
57 (Intrinsic Types): Likewise.
58 (Derived Types and struct): Likewise.
59 (Interoperable Global Variables): Likewise.
60 (Interoperable Subroutines and Functions): Likewise.
61 (Working with C Pointers): Likewise.
62 (Further Interoperability of Fortran with C): Likewise. Rewrite
63 to reflect that this is now fully supported by gfortran.
65 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
67 * gfortran.texi (About GNU Fortran): Consolidate material
68 formerly in other sections. Copy-editing.
69 (Preprocessing and conditional compilation): Delete, moving
70 most material to invoke.texi.
71 (GNU Fortran and G77): Delete.
72 (Project Status): Delete.
74 (Fortran 95 status): Mention conditional compilation here.
75 (Fortran 2003 status): Rewrite to mention the 1 missing feature
76 instead of all the ones implemented.
77 (Fortran 2008 status): Similarly for the 2 missing features.
78 (Fortran 2018 status): Rewrite to reflect completion of TS29113
80 * invoke.texi (Preprocessing Options): Move material formerly
81 in introductory chapter here.
83 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
85 * gfortran.texi (Standards): Move discussion of specific
86 standard versions here....
87 (Fortran standards status): ...from here, and delete this node.
89 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
91 * symbol.c (gfc_get_typebound_proc): Revert memcpy.
93 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
95 * resolve.c (resolve_fl_procedure): Initialize
96 allocatable_or_pointer.
98 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
100 * intrinsic.texi: Remove entries for SHORT and LONG intrinsics.
102 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
104 * check.c (gfc_check_intconv): Change error message.
106 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
108 * intrinsic.texi (REAL): Fix entries in Specific names table.
110 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
112 * intrinsic.texi: Adjust @columnfractions commands to improve
113 appearance for narrow 80 character terminals.
115 2021-10-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
117 * parse.c (clean_up_modules): Free gsym.
119 2021-10-30 Harald Anlauf <anlauf@gmx.de>
121 * gfortran.texi (bug reports): credit Gerhard Steinmetz for
122 numerous bug reports.
124 2021-10-30 Steve Kargl <kargl@gcc.gnu.org>
127 * resolve.c (resolve_select): Generate regular gfc_error on
128 invalid conversions instead of an gfc_internal_error.
130 2021-10-29 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
132 * symbol.c (free_tb_tree): Free type-bound procedure struct.
133 (gfc_get_typebound_proc): Use explicit memcpy for clarity.
135 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
137 * intrinsic.h (gfc_check_sum, gfc_resolve_atan2d, gfc_resolve_kill,
138 gfc_resolve_kill_sub): Delete declaration.
140 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
142 * trans-types.h (gfc_convert_function_code): Delete.
144 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
146 * trans-stmt.h (gfc_trans_deallocate_array): Delete.
148 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
150 * trans-array.c (gfc_trans_scalarized_loop_end): Make static.
151 * trans-array.h (gfc_trans_scalarized_loop_end,
152 gfc_conv_tmp_ref, gfc_conv_array_transpose): Delete declaration.
154 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
156 * constructor.c (gfc_constructor_get_base): Make static.
157 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
158 * constructor.h (gfc_constructor_get_base): Remove declaration.
159 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
161 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
163 * decl.c (gfc_match_old_kind_spec, set_com_block_bind_c,
164 set_verify_bind_c_sym, set_verify_bind_c_com_block,
165 get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec,
166 check_extended_derived_type): Make static.
167 (gfc_match_gcc_unroll): Add comment.
168 * match.c (gfc_match_small_int_expr): Delete definition.
169 * match.h (gfc_match_small_int_expr): Delete declaration.
170 (gfc_match_name_C, gfc_match_old_kind_spec, set_com_block_bind_c,
171 set_verify_bind_c_sym, set_verify_bind_c_com_block,
172 get_bind_c_idents, gfc_match_suffix,
173 gfc_get_type_attr_spec): Delete declaration.
175 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
177 * expr.c (is_non_empty_structure_constructor): Make static.
178 * gfortran.h (gfc_check_any_c_kind): Delete.
179 * match.c (gfc_match_label): Make static.
180 * match.h (gfc_match_label): Delete declaration.
181 * scanner.c (file_changes_cur, file_changes_count,
182 file_changes_allocated): Make static.
183 * trans-expr.c (gfc_get_character_len): Make static.
184 (gfc_class_len_or_zero_get): Make static.
185 (VTAB_GET_FIELD_GEN): Undefine.
186 (gfc_get_class_array_ref): Make static.
187 (gfc_finish_interface_mapping): Make static.
188 * trans-types.c (gfc_check_any_c_kind): Delete.
189 (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static.
190 * trans-types.h (gfc_get_ppc_type): Delete declaration.
191 * trans.c (gfc_msg_wrong_return): Delete.
192 * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get,
193 gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len,
194 gfc_finish_interface_mapping, gfc_msg_wrong_return,
195 gfc_get_function_decl): Delete declaration.
197 2021-10-27 Tobias Burnus <tobias@codesourcery.com>
199 * trans-stmt.c (gfc_trans_select_rank_cases): Fix condition
200 for allocatables/pointers.
202 2021-10-26 Harald Anlauf <anlauf@gmx.de>
205 * symbol.c (gfc_check_conflict): Add conflict check for PDT KIND
206 and LEN type parameters.
208 2021-10-26 Harald Anlauf <anlauf@gmx.de>
211 * decl.c (match_attr_spec): Remove invalid integer kind checks on
212 KIND and LEN attributes of PDTs.
214 2021-10-26 Harald Anlauf <anlauf@gmx.de>
217 * resolve.c (resolve_structure_cons): Reject invalid array spec of
218 a DT component referenced in a structure constructor.
220 2021-10-26 Tobias Burnus <tobias@codesourcery.com>
223 * trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant
226 2021-10-25 Andrew MacLeod <amacleod@redhat.com>
228 * trans-decl.c (gfc_conv_cfi_to_gfc): Initialize rank to NULL_TREE.
230 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
233 * Make-lang.in: Allow dvi-formatted documentation
236 2021-10-22 Tobias Burnus <tobias@codesourcery.com>
239 * trans-expr.c (gfc_trans_assignment_1): Add STRIP_NOPS.
241 2021-10-21 Chung-Lin Tang <cltang@codesourcery.com>
243 * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case
244 together with COMP_BLOCK.
245 * parse.c (parse_omp_structured_block): Change return type to
246 'gfc_statement', add handling for strictly-structured block case, adjust
247 recursive calls to parse_omp_structured_block.
248 (parse_executable): Adjust calls to parse_omp_structured_block.
249 * parse.h (enum gfc_compile_state): Add
250 COMP_OMP_STRICTLY_STRUCTURED_BLOCK.
251 * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case
254 2021-10-21 Sandra Loosemore <sandra@codesourcery.com>
257 * expr.c (gfc_simplify_expr): Handle GFC_ISYM_SHAPE along with
258 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
259 * trans-array.c (gfc_conv_ss_startstride): Likewise.
260 (set_loop_bounds): Likewise.
261 * trans-intrinsic.c (gfc_trans_intrinsic_bound): Extend to
262 handle SHAPE. Correct logic for zero-size special cases and
263 detecting assumed-rank arrays associated with an assumed-size
265 (gfc_conv_intrinsic_shape): Deleted.
266 (gfc_conv_intrinsic_function): Handle GFC_ISYM_SHAPE like
267 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
268 (gfc_add_intrinsic_ss_code): Likewise.
269 (gfc_walk_intrinsic_bound): Likewise.
271 2021-10-20 Chung-Lin Tang <cltang@codesourcery.com>
273 * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default
274 false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case.
275 (gfc_match_omp_clauses): Add 'openmp_target' default false parameter,
276 adjust call to gfc_match_omp_clause_reduction.
277 (match_omp): Adjust call to gfc_match_omp_clauses
278 * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to
279 gfc_match_omp_clause, create and return block.
281 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
283 * trans-types.c (create_fn_spec): For allocatable/pointer
284 character(len=:), use 'w' not 'R' as fn spec for the length dummy
287 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
290 * trans-expr.c (gfc_conv_procedure_call): Use TREE_OPERAND not
291 build_fold_indirect_ref_loc to undo an ADDR_EXPR.
293 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
302 * decl.c (gfc_verify_c_interop_param): Remove 'sorry' for
303 scalar allocatable/pointer and len=*.
304 * expr.c (is_CFI_desc): Return true for for those.
305 * gfortran.h (CFI_type_kind_shift, CFI_type_mask,
306 CFI_type_from_type_kind, CFI_VERSION, CFI_MAX_RANK,
307 CFI_attribute_pointer, CFI_attribute_allocatable,
308 CFI_attribute_other, CFI_type_Integer, CFI_type_Logical,
309 CFI_type_Real, CFI_type_Complex, CFI_type_Character,
310 CFI_type_ucs4_char, CFI_type_struct, CFI_type_cptr,
311 CFI_type_cfunptr, CFI_type_other): New #define.
312 * trans-array.c (CFI_FIELD_BASE_ADDR, CFI_FIELD_ELEM_LEN,
313 CFI_FIELD_VERSION, CFI_FIELD_RANK, CFI_FIELD_ATTRIBUTE,
314 CFI_FIELD_TYPE, CFI_FIELD_DIM, CFI_DIM_FIELD_LOWER_BOUND,
315 CFI_DIM_FIELD_EXTENT, CFI_DIM_FIELD_SM,
316 gfc_get_cfi_descriptor_field, gfc_get_cfi_desc_base_addr,
317 gfc_get_cfi_desc_elem_len, gfc_get_cfi_desc_version,
318 gfc_get_cfi_desc_rank, gfc_get_cfi_desc_type,
319 gfc_get_cfi_desc_attribute, gfc_get_cfi_dim_item,
320 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
321 New define/functions to access the CFI array descriptor.
322 (gfc_conv_descriptor_type): New function for the GFC descriptor.
323 (gfc_get_array_span): Handle expr of CFI descriptors and
324 assumed-type descriptors.
325 (gfc_trans_array_bounds): Remove 'static'.
326 (gfc_conv_expr_descriptor): For assumed type, use the dtype of
328 (structure_alloc_comps): Remove ' ' inside tabs.
329 * trans-array.h (gfc_trans_array_bounds, gfc_conv_descriptor_type,
330 gfc_get_cfi_desc_base_addr, gfc_get_cfi_desc_elem_len,
331 gfc_get_cfi_desc_version, gfc_get_cfi_desc_rank,
332 gfc_get_cfi_desc_type, gfc_get_cfi_desc_attribute,
333 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
335 * trans-decl.c (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi):
337 (gfc_build_builtin_function_decls): Remove their initialization.
338 (gfc_get_symbol_decl, create_function_arglist,
339 gfc_trans_deferred_vars): Update for CFI.
340 (convert_CFI_desc): Remove and replace by ...
341 (gfc_conv_cfi_to_gfc): ... this function
342 (gfc_generate_function_code): Call it; create local GFC var for CFI.
343 * trans-expr.c (gfc_maybe_dereference_var): Handle CFI.
344 (gfc_conv_subref_array_arg): Handle the if-noncontigous-only copy in
345 when the result should be a descriptor.
346 (gfc_conv_gfc_desc_to_cfi_desc): Completely rewritten.
347 (gfc_conv_procedure_call): CFI fixes.
348 * trans-openmp.c (gfc_omp_is_optional_argument,
349 gfc_omp_check_optional_argument): Handle optional
351 * trans-stmt.c (gfc_trans_select_rank_cases): Cleanup, avoid invalid
352 code for allocatable/pointer dummies, which cannot be assumed size.
353 * trans-types.c (gfc_cfi_descriptor_base): New global var.
354 (gfc_get_dtype_rank_type): Skip rank init for rank < 0.
355 (gfc_sym_type): Handle CFI dummies.
356 (gfc_get_function_type): Update call.
357 (gfc_get_cfi_dim_type, gfc_get_cfi_type): New.
358 * trans-types.h (gfc_sym_type): Update prototype.
359 (gfc_get_cfi_type): New prototype.
360 * trans.c (gfc_trans_runtime_check): Make conditions more consistent
361 to avoid '<logical> AND_THEN <long int>' in conditions.
362 * trans.h (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi): Remove
363 global-var declaration.
365 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
368 * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
369 and do typcheck in correct order for type extension.
370 * misc.c (gfc_typename): Print proper not internal CLASS type name.
372 2021-10-15 Harald Anlauf <anlauf@gmx.de>
373 Tobias Burnus <tobias@codesourcery.com>
376 * decl.c (match_clist_expr): Set rank/shape of clist initializer
378 * resolve.c (resolve_structure_cons): In a structure constructor,
379 compare shapes of array components against declared shape.
381 2021-10-14 Harald Anlauf <anlauf@gmx.de>
384 * simplify.c (gfc_simplify_reshape): Replace assert by error
385 message for negative elements in SHAPE array.
387 2021-10-14 Harald Anlauf <anlauf@gmx.de>
390 * check.c (gfc_check_shape): Reorder checks so that invalid KIND
391 arguments can be detected.
393 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
395 * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
396 (enum gfc_omp_trait_property_kind): New.
397 (struct gfc_omp_trait_property): New.
398 (gfc_get_omp_trait_property): New macro.
399 (struct gfc_omp_selector): New.
400 (gfc_get_omp_selector): New macro.
401 (struct gfc_omp_set_selector): New.
402 (gfc_get_omp_set_selector): New macro.
403 (struct gfc_omp_declare_variant): New.
404 (gfc_get_omp_declare_variant): New macro.
405 (struct gfc_namespace): Add omp_declare_variant field.
406 (gfc_free_omp_declare_variant_list): New prototype.
407 * match.h (gfc_match_omp_declare_variant): New prototype.
408 * openmp.c (gfc_free_omp_trait_property_list): New.
409 (gfc_free_omp_selector_list): New.
410 (gfc_free_omp_set_selector_list): New.
411 (gfc_free_omp_declare_variant_list): New.
412 (gfc_match_omp_clauses): Add extra optional argument. Handle end of
413 clauses for context selectors.
414 (omp_construct_selectors, omp_device_selectors,
415 omp_implementation_selectors, omp_user_selectors): New.
416 (gfc_match_omp_context_selector): New.
417 (gfc_match_omp_context_selector_specification): New.
418 (gfc_match_omp_declare_variant): New.
419 * parse.c: Include tree-core.h and omp-general.h.
420 (decode_omp_directive): Handle 'declare variant'.
421 (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
422 (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
423 (gfc_parse_file): Initialize omp_requires_mask.
424 * symbol.c (gfc_free_namespace): Call
425 gfc_free_omp_declare_variant_list.
426 * trans-decl.c (gfc_get_extern_function_decl): Call
427 gfc_trans_omp_declare_variant.
428 (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
429 * trans-openmp.c (gfc_trans_omp_declare_variant): New.
430 * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
432 2021-10-13 Tobias Burnus <tobias@codesourcery.com>
434 * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
435 avoid ICE for GFC_OMP_ATOMIC_SWAP.
436 * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
438 2021-10-12 Tobias Burnus <tobias@codesourcery.com>
441 * check.c (gfc_check_present): Handle optional CLASS.
442 * interface.c (gfc_compare_actual_formal): Likewise.
443 * trans-array.c (gfc_trans_g77_array): Likewise.
444 * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
445 * trans-types.c (gfc_sym_type): Likewise.
446 * primary.c (gfc_variable_attr): Fixes for dummy and
447 pointer when 'class%_data' is passed.
448 * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
449 For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
450 and setting ubound to -1 for assumed-size actuals.
452 2021-10-10 Harald Anlauf <anlauf@gmx.de>
456 * decl.c (add_init_expr_to_sym): Extend initialization of
457 parameter arrays from scalars to handle derived types.
459 2021-10-09 Harald Anlauf <anlauf@gmx.de>
462 * module.c (read_module): Handle old and new-style relational
463 operators when used in USE module, ONLY: OPERATOR(op).
465 2021-10-08 Sandra Loosemore <sandra@codesourcery.com>
468 * interface.c (gfc_compare_actual_formal): Add diagnostic
469 for F2018:C839. Refactor shared code and fix bugs with class
470 array info lookup, and extend similar diagnostic from PR94110
471 to also cover class types.
473 2021-10-08 Martin Liska <mliska@suse.cz>
475 * options.c (gfc_post_options): Use new macro
478 2021-10-06 Tobias Burnus <tobias@codesourcery.com>
480 * resolve.c (resolve_values): Only show
481 deprecated warning if attr.referenced.
483 2021-10-04 Tobias Burnus <tobias@codesourcery.com>
486 * resolve.c (can_generate_init, resolve_fl_variable_derived,
487 resolve_symbol): Only do initialization with intent(out) if not
488 inside of an interface block.
490 2021-10-01 Martin Sebor <msebor@redhat.com>
493 * array.c: Remove an unnecessary test.
494 * trans-array.c: Same.
496 2021-10-01 Jakub Jelinek <jakub@redhat.com>
498 * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
499 * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
500 * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
501 explicit reproducible: modifier.
502 * trans-openmp.c (gfc_trans_omp_clauses): Set
503 OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
504 (gfc_split_omp_clauses): Also copy order_reproducible.
506 2021-09-30 Harald Anlauf <anlauf@gmx.de>
509 * simplify.c (simplify_size): Resolve expressions used in array
510 specifications so that SIZE can be simplified.
512 2021-09-30 Harald Anlauf <anlauf@gmx.de>
514 * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
516 2021-09-30 Tobias Burnus <tobias@codesourcery.com>
520 * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
522 * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
523 (gfc_vptr_hash_get): ... this to match function name.
525 2021-09-29 Harald Anlauf <anlauf@gmx.de>
528 * array.c (expand_constructor): Do not dereference NULL pointer.
530 2021-09-27 Tobias Burnus <tobias@codesourcery.com>
533 * trans-array.c (gfc_tree_array_size): New function to
534 find size inline (whole array or one dimension).
535 (array_parameter_size): Use it, take stmt_block as arg.
536 (gfc_conv_array_parameter): Update call.
537 * trans-array.h (gfc_tree_array_size): Add prototype.
538 * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
540 (gfc_build_intrinsic_function_decls): Remove their initialization.
541 * trans-expr.c (gfc_conv_procedure_call): Update
542 bounds of pointer/allocatable actual args to nonallocatable/nonpointer
543 dummies to be one based.
544 * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
545 assumed rank with allocatable/pointer dummy.
546 (gfc_conv_intrinsic_size): Update to use inline function.
547 * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
549 2021-09-26 Tobias Burnus <tobias@codesourcery.com>
552 * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
553 'pointer' with scalar/array 'target' argument.
555 2021-09-24 Harald Anlauf <anlauf@gmx.de>
558 * expr.c (is_non_constant_intrinsic): Check for intrinsics
559 excluded in constant expressions (F2018:10.1.2).
560 (gfc_is_constant_expr): Use that check.
562 2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
565 * interface.c (compare_parameter): Enforce F2018 C711.
567 2021-09-24 Tobias Burnus <tobias@codesourcery.com>
570 * scanner.c (load_file): Return void, call (gfc_)fatal_error for
572 (include_line, include_stmt, gfc_new_file): Remove exit call
573 for failed load_file run.
575 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
578 * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
581 2021-09-23 Harald Anlauf <anlauf@gmx.de>
582 Tobias Burnus <tobias@codesourcery.com>
585 * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
586 coindexed scalar coarrays.
588 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
591 * interface.c (gfc_compare_actual_formal): Extend existing
592 assumed-type diagnostic to also check for argument with type
595 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
598 * check.c (gfc_check_associated): Allow an assumed-rank
599 array for the pointer argument.
600 * interface.c (compare_parameter): Also give rank mismatch
601 error on assumed-rank array.
603 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
605 * trans-stmt.c (trans_associate_var): Check that result of
606 GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
608 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
611 * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
612 Add new bool verbose_missing_dir_warn argument.
613 * cpp.h (gfc_cpp_post_options): Update prototype.
614 * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
615 * gfortran.h (gfc_check_include_dirs): Takes bool
616 verbose_missing_dir_warn arg.
617 (gfc_new_file): Returns now void.
618 * options.c (gfc_post_options): Update to warn for -I and -J,
619 only, by default but for all when user requested.
620 * scanner.c (gfc_do_check_include_dir):
621 (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
622 verbose warn arg and update to avoid printing the same message
624 (load_file): Fix indent.
625 (gfc_new_file): Return void and exit when load_file failed
626 as all other load_file users do.
628 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
630 * trans-expr.c (gfc_simple_for_loop): New.
631 * trans.h (gfc_simple_for_loop): New prototype.
633 2021-09-21 Tobias Burnus <tobias@codesourcery.com>
636 * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
637 cpp_reason_option_codes available.
638 (gfc_cpp_register_include_paths): Make static, set pfile's
639 warn_missing_include_dirs and move before caller.
640 (gfc_cpp_init_cb): New, cb code moved from ...
641 (gfc_cpp_init_0): ... here.
642 (gfc_cpp_post_options): Call gfc_cpp_init_cb.
643 (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
644 to match CppReason flags to -W... names.
645 (cb_cpp_diagnostic): Use it to replace single special case.
646 * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
647 * gfortran.h (gfc_check_include_dirs): New prototype.
648 (gfc_add_include_path): Add new bool arg.
649 * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
650 (gfc_post_options): Set it here after commandline processing. Call
651 gfc_add_include_path with defer_warn=false.
652 (gfc_handle_option): Call it with defer_warn=true.
653 * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
654 gfc_check_include_dirs): New. Diagnostic moved from ...
655 (add_path_to_list): ... here, which came before cmdline processing.
656 Take additional bool defer_warn argument.
657 (gfc_add_include_path): Take additional defer_warn arg.
658 * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
661 2021-09-20 Tobias Burnus <tobias@codesourcery.com>
663 * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
664 * dump-parse-tree.c (show_omp_clauses): Dump it.
665 * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
666 modifiers to ordered(concurrent).
667 (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
668 (resolve_omp_clauses): Reject ordered + order on same directive.
669 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
670 on unconstrained modifier of ordered(concurrent).
672 2021-09-17 Harald Anlauf <anlauf@gmx.de>
675 * trans-decl.c (gfc_finish_var_decl): Disable the warning message
676 for variables moved from stack to static storange if they are
677 declared in the main, but allow the move to happen.
679 2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
681 * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
682 to _Float128 rather than __float128.
683 * iso-c-binding.def (c_float128): Update comments.
684 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
685 (build_round_expr): Likewise.
686 (gfc_build_intrinsic_lib_fndcecls): Likewise.
687 * trans-types.h (gfc_real16_is_float128): Likewise.
689 2021-09-16 Harald Anlauf <anlauf@gmx.de>
692 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
693 allocatable components of optional allocatable derived type
694 procedure arguments with INTENT(OUT) into a presence check.
696 2021-09-14 Harald Anlauf <anlauf@gmx.de>
699 * resolve.c (resolve_entries): Attempt to recover cleanly after
700 rejecting mismatched function entries.
702 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
705 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
707 2021-09-13 Harald Anlauf <anlauf@gmx.de>
710 * decl.c (add_init_expr_to_sym): For proper initialization of
711 array-valued named constants the array bounds need to be
712 simplified before adding the initializer.
714 2021-09-13 Harald Anlauf <anlauf@gmx.de>
717 * expr.c (find_substring_ref): Handle given substring start and
718 end indices as signed integers, not unsigned.
720 2021-09-09 Harald Anlauf <anlauf@gmx.de>
723 * trans-expr.c (gfc_conv_substring): Do not generate substring
724 bounds check for implied do loop index variable before it actually
727 2021-09-08 liuhongt <hongtao.liu@intel.com>
729 * options.c (gfc_post_options): Issue an error for
730 -fexcess-precision=16.
732 2021-09-07 Harald Anlauf <anlauf@gmx.de>
735 * expr.c (find_array_element): When bounds cannot be determined as
736 constant, return error instead of aborting.
738 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
740 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
742 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
744 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
746 * decl.c (gfc_verify_c_interop_param): Reject pointer with
747 CONTIGUOUS attributes as dummy arg. Reject character len > 1
748 when passed as byte stream.
750 2021-09-01 Harald Anlauf <anlauf@gmx.de>
753 * resolve.c (resolve_common_vars): Fix grammar and improve wording
754 of error message rejecting an unlimited polymorphic in COMMON.
756 2021-08-31 Harald Anlauf <anlauf@gmx.de>
759 * simplify.c (substring_has_constant_len): Minimize checks for
760 substring expressions being allowed.
762 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
764 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
765 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
766 and 'ancestor' in 'target device' clauses.
767 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
769 2021-08-30 Harald Anlauf <anlauf@gmx.de>
772 * match.c (gfc_match_goto): Allow for whitespace in parsing list
775 2021-08-30 Harald Anlauf <anlauf@gmx.de>
778 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
779 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
782 2021-08-28 Harald Anlauf <anlauf@gmx.de>
785 * resolve.c (resolve_entries): For functions of type CHARACTER
786 tighten the checks for matching characteristics.
788 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
791 * cpp.c (gfc_cpp_post_options): Call new function
792 diagnostic_initialize_input_context().
794 2021-08-24 Harald Anlauf <anlauf@gmx.de>
797 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
798 implicit SAVE as well as variables in the main program. Improve
799 warning message text.
801 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
803 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
804 gfc_match_dupl_atomic): New.
805 (gfc_match_omp_clauses): Use them; remove duplicate
806 'release'/'relaxed' clause matching; improve error dignostic
809 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
811 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
812 on grainsize/num_tasks
813 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
814 and num_tasks_strict.
815 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
816 Handle 'strict' modifier on grainsize/num_tasks.
817 * openmp.c (gfc_match_omp_clauses): Likewise.
819 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
822 (error_uinteger): Take 'long long unsigned' instead
823 of 'long unsigned' as argumpent.
824 (error_integer): Take 'long long' instead of 'long'.
825 (error_hwuint, error_hwint): New.
826 (error_print): Update to handle 'll' and 'w'
828 * simplify.c (substring_has_constant_len): Use '%wd'
831 2021-08-20 Harald Anlauf <anlauf@gmx.de>
834 * simplify.c (substring_has_constant_len): Fix format string of
835 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
837 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
839 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
840 and 'message' clauses.
841 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
842 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
843 (gfc_omp_severity_type, gfc_omp_at_type): New.
844 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
845 use more bitfields + ENUM_BITFIELD.
846 (gfc_exec_op): Add EXEC_OMP_ERROR.
847 * match.h (gfc_match_omp_error): New.
848 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
849 (gfc_match_omp_clauses): Handle new clauses.
850 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
851 (resolve_omp_clauses): Resolve new clauses.
852 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
854 * parse.c (decode_omp_directive, next_statement,
855 gfc_ascii_statement): Handle 'omp error'.
856 * resolve.c (gfc_resolve_blocks): Likewise.
857 * st.c (gfc_free_statement): Likewise.
858 * trans-openmp.c (gfc_trans_omp_error): Likewise.
859 (gfc_trans_omp_directive): Likewise.
860 * trans.c (trans_code): Likewise.
862 2021-08-20 Jakub Jelinek <jakub@redhat.com>
864 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
865 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
867 2021-08-19 Harald Anlauf <anlauf@gmx.de>
870 * simplify.c (substring_has_constant_len): New.
871 (gfc_simplify_len): Handle case of substrings with constant
874 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
876 * match.h (gfc_match_omp_nothing): New.
877 * openmp.c (gfc_match_omp_nothing): New.
878 * parse.c (decode_omp_directive): Match 'nothing' directive.
880 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
882 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
884 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
885 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
886 * match.h (gfc_match_omp_scope): New.
887 * openmp.c (OMP_SCOPE_CLAUSES): Define
888 (gfc_match_omp_scope): New.
889 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
890 Improve error diagnostic.
891 (omp_code_to_statement): Handle ST_OMP_SCOPE.
892 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
893 * parse.c (decode_omp_directive, next_statement,
894 gfc_ascii_statement, parse_omp_structured_block,
895 parse_executable): Handle OpenMP's scope construct.
896 * resolve.c (gfc_resolve_blocks): Likewise
897 * st.c (gfc_free_statement): Likewise
898 * trans-openmp.c (gfc_trans_omp_scope): New.
899 (gfc_trans_omp_directive): Call it.
900 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
902 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
904 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
905 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
906 * frontend-passes.c (gfc_code_walker): Likewise.
907 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
908 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
909 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
910 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
911 gfc_match_omp_parallel_masked_taskloop,
912 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
913 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
914 (gfc_match_omp_clauses): Match it.
915 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
916 gfc_match_omp_parallel_masked_taskloop,
917 gfc_match_omp_parallel_masked_taskloop_simd,
918 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
919 gfc_match_omp_masked_taskloop_simd): New.
920 (resolve_omp_clauses): Resolve filter clause.
921 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
922 omp_code_to_statement, gfc_resolve_omp_directive): Handle
923 omp masked constructs.
924 * parse.c (decode_omp_directive, case_exec_markers,
925 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
926 parse_executable): Likewise.
927 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
928 * st.c (gfc_free_statement): Likewise.
929 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
930 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
931 (gfc_trans_omp_masked): New.
932 (gfc_split_omp_clauses): Handle combined masked directives.
933 (gfc_trans_omp_master_taskloop): Rename to ...
934 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
935 combined masked directives.
936 (gfc_trans_omp_parallel_master): Rename to ...
937 (gfc_trans_omp_parallel_master_masked): ... this; handle
938 combined masked directives.
939 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
940 * trans.c (trans_code): Likewise.
942 2021-08-15 Harald Anlauf <anlauf@gmx.de>
945 * match.c (sync_statement): Replace %v code by %e in gfc_match to
946 allow for function references as STAT and ERRMSG arguments.
947 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
948 being definable arguments. Function references with a data
949 pointer result are accepted.
950 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
952 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
954 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
955 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
956 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
957 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
958 omp_proc_bind_primary.
959 * openmp.c (gfc_match_omp_clauses): Accept
960 'primary' as alias for 'master'.
961 * trans-openmp.c (gfc_trans_omp_clauses): Handle
962 OMP_PROC_BIND_PRIMARY.
964 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
966 * iso-c-binding.def (c_float128, c_float128_complex): Check
967 float128_type_node instead of gfc_float128_type_node.
968 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
969 Update comments re supported 128-bit floating-point types.
971 2021-08-11 Richard Biener <rguenther@suse.de>
973 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
974 COMPONENT_REF if the field is volatile.
976 2021-08-07 Harald Anlauf <anlauf@gmx.de>
979 * primary.c (gfc_expr_attr): Variable attribute can only be
980 inquired when symtree is non-NULL.
982 2021-07-28 Harald Anlauf <anlauf@gmx.de>
985 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
987 * match.c (gfc_match): Fix comment for %v code.
988 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
989 by %e in gfc_match to allow for function references as STAT and
991 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
992 dereferences and shortcut for bad STAT and ERRMSG argument to
993 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
995 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
996 Tobias Burnus <tobias@codesourcery.com>
1003 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
1005 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
1006 handling which reflect a previous intermediate version of the
1007 standard. Only copy out the descriptor if necessary.
1009 2021-07-23 Harald Anlauf <anlauf@gmx.de>
1012 * check.c (array_check): Adjust check for the case of CLASS
1015 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1016 Joseph Myers <joseph@codesourcery.com>
1017 Cesar Philippidis <cesar@codesourcery.com>
1019 * dump-parse-tree.c (show_attr): Update.
1020 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
1021 (gfc_omp_clauses): Add 'nohost' member.
1022 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
1023 (attr_bits, mio_symbol_attribute): Update.
1024 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
1025 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1026 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
1027 (gfc_match_oacc_routine): Update.
1028 * trans-decl.c (add_attributes_to_decl): Update.
1029 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1031 2021-07-21 Harald Anlauf <anlauf@gmx.de>
1034 * target-memory.c (gfc_interpret_derived): Size of array component
1035 of derived type can only be computed here for explicit shape.
1036 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
1039 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
1041 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
1042 changes; reject unsupported bits with 'Error: Sorry,'.
1043 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
1044 For using CFI descriptor with characters.
1046 2021-07-18 Harald Anlauf <anlauf@gmx.de>
1049 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
1051 2021-07-14 Harald Anlauf <anlauf@gmx.de>
1054 * trans-expr.c (gfc_trans_class_init_assign): Call
1055 gfc_conv_expr_present only for dummy variables.
1057 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1060 * frontend-passes.c (traverse_io_block): Adjust test for
1061 when a variable is eligible for the transformation to
1064 2021-06-28 Martin Sebor <msebor@redhat.com>
1066 * trans-array.c (trans_array_constructor): Replace direct uses
1067 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
1068 * trans-decl.c (gfc_build_qualified_array): Same.
1069 (gfc_build_dummy_array_decl): Same.
1070 (generate_local_decl): Same.
1071 (gfc_generate_function_code): Same.
1072 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1073 (gfc_omp_clause_copy_ctor): Same.
1074 * trans-types.c (get_dtype_type_node): Same.
1075 (gfc_get_desc_dim_type): Same.
1076 (gfc_get_array_descriptor_base): Same.
1077 (gfc_get_caf_vector_type): Same.
1078 (gfc_get_caf_reference_type): Same.
1079 * trans.c (gfc_create_var_np): Same.
1081 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
1083 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
1084 for dumping gfc_omp_defaultmap_category.
1086 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
1089 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
1090 before dereferrencing.
1092 2021-06-18 Harald Anlauf <anlauf@gmx.de>
1096 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
1097 convert result of min/max to result type.
1099 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1103 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1105 * match.c (gfc_match_pointer_assignment): Likewise.
1106 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1109 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1112 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1116 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1118 * match.c (gfc_match_pointer_assignment): Likewise.
1119 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1122 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1126 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1128 * match.c (gfc_match_pointer_assignment): Likewise.
1129 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1132 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
1135 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
1136 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
1137 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
1138 * gfortran.h (enum gfc_omp_defaultmap,
1139 enum gfc_omp_defaultmap_category): New.
1140 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
1141 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
1142 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1143 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
1144 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
1146 * trans.h (gfc_omp_scalar_p): Update prototype.
1147 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1148 (struct lang_decl): Add scalar_target.
1149 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
1151 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1153 * resolve.c (resolve_variable): Remove *XCNEW used to
1154 nullify nullified memory.
1156 2021-06-09 Martin Liska <mliska@suse.cz>
1158 * intrinsic.texi: Add missing @headitem to tables with a header.
1160 2021-06-09 Jakub Jelinek <jakub@redhat.com>
1163 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
1165 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
1168 * trans-openmp.c (gfc_add_clause_implicitly): New.
1169 (gfc_split_omp_clauses): Use it.
1170 (gfc_free_split_omp_clauses): New.
1171 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
1172 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
1173 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
1174 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
1176 2021-06-08 Martin Liska <mliska@suse.cz>
1178 * intrinsic.texi: Fix typo.
1179 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
1181 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1188 * trans-array.c (gfc_get_array_span): rework the way character
1189 array "span" was calculated.
1190 (gfc_conv_expr_descriptor): improve handling of character sections
1191 and unlimited polymorphic objects.
1192 * trans-expr.c (gfc_get_character_len): new function to calculate
1193 character string length.
1194 (gfc_get_character_len_in_bytes): new function to calculate
1195 character string length in bytes.
1196 (gfc_conv_scalar_to_descriptor): add call to set the "span".
1197 (gfc_trans_pointer_assignment): set "_len" and antecipate the
1198 initialization of the deferred character length hidden argument.
1199 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
1200 avoid the creation of a temporary.
1201 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
1202 so that unlimited polymorphic objects get proper type infomation,
1203 also important for bind(c).
1204 (gfc_get_dtype): add argument to pass the rank if necessary.
1205 (gfc_get_array_type_bounds): cosmetic change to have character
1206 arrays called character instead of unknown.
1207 * trans-types.h (gfc_get_dtype): modify prototype.
1208 * trans.c (get_array_span): rework the way character array "span"
1210 * trans.h (gfc_get_character_len): new prototype.
1211 (gfc_get_character_len_in_bytes): new prototype.
1212 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
1213 expression carries an unlimited polymorphic object.
1215 2021-06-04 Harald Anlauf <anlauf@gmx.de>
1218 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
1219 if the assignment to the resulting array if it is not of canonical
1220 type (real/integer/complex/logical).
1222 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1224 * dump-parse-tree.c (show_code_node): Handle
1225 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
1227 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1229 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
1230 this is not an (OpenMP) continuation line.
1231 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
1232 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
1233 continuation once per location and return '\n'.
1235 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1238 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
1240 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1243 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
1244 (show_omp_node): Handle loop directive.
1245 * frontend-passes.c (gfc_code_walker): Likewise.
1246 * gfortran.h (enum gfc_statement): Add
1247 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1248 (enum gfc_omp_bind_type): New.
1249 (gfc_omp_clauses): Use it.
1250 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1251 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
1252 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
1253 gfc_match_omp_teams_loop): New.
1254 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
1255 (gfc_match_omp_clauses): Handle it.
1256 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
1257 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
1258 gfc_match_omp_target_parallel_loop): New.
1259 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
1260 gfc_resolve_omp_directive): Handle omp loop.
1261 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
1262 parse_omp_do, parse_executable): Likewise.
1263 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
1264 * resolve.c (gfc_resolve_blocks): Add omp loop.
1265 * st.c (gfc_free_statement): Likewise.
1266 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
1267 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
1268 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
1269 Handle loop directive.
1270 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
1271 and (in_)reduction for taskloop.
1272 * trans.c (trans_code): Handle omp loop directive.
1274 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
1277 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1278 (parallel) master taskloop (simd).
1279 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
1280 to false for parallel master taskloop (simd).
1281 * gfortran.h (enum gfc_statement):
1282 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1283 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1284 * match.h (gfc_match_omp_master_taskloop,
1285 gfc_match_omp_master_taskloop_simd,
1286 gfc_match_omp_parallel_master_taskloop,
1287 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
1288 * openmp.c (gfc_match_omp_parallel_master_taskloop,
1289 gfc_match_omp_parallel_master_taskloop_simd,
1290 gfc_match_omp_master_taskloop,
1291 gfc_match_omp_master_taskloop_simd): New.
1292 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
1293 (resolve_omp_clauses): Handle new combined directives; remove
1294 inscan-reduction check to reduce multiple errors; add
1295 task-reduction error for 'taskloop simd'.
1296 (gfc_resolve_omp_parallel_blocks,
1297 resolve_omp_do, omp_code_to_statement,
1298 gfc_resolve_omp_directive): Handle new combined constructs.
1299 * parse.c (decode_omp_directive, next_statement,
1300 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1301 parse_executable): Likewise.
1302 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1303 * st.c (gfc_free_statement): Likewise.
1304 * trans.c (trans_code): Likewise.
1305 * trans-openmp.c (gfc_split_omp_clauses,
1306 gfc_trans_omp_directive): Likewise.
1307 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
1308 handle parallel master taskloop (simd) as well.
1309 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
1310 (gfc_trans_omp_master_taskloop): New.
1312 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
1314 * gfortran.texi (BOZ literal constants): Fix typo.
1316 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1318 * dump-parse-tree.c (show_iterator): New.
1319 (show_omp_namelist): Handle iterators.
1320 (show_omp_clauses): Handle affinity.
1321 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
1322 * match.c (gfc_free_omp_namelist): Add are to choose union element.
1323 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
1324 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
1325 call to gfc_free_omp_namelist.
1326 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
1327 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
1328 (gfc_match_iterator): New.
1329 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
1330 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
1331 (gfc_match_omp_taskwait): Match depend clause.
1332 (resolve_omp_clauses): Handle affinity; update for udr/union change.
1333 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
1334 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
1335 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
1336 (handle_iterator): New.
1337 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
1338 (gfc_trans_omp_taskwait): Handle depend clause.
1339 (gfc_trans_omp_directive): Update call.
1341 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1344 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
1345 attributes for CLASS arrays for generation of runtime error.
1347 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1350 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
1351 presence of a dummy argument when a symbol actually refers to a
1354 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
1355 Johannes Nendwich <a08727063@unet.univie.ac.at>
1357 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
1358 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
1360 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
1363 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
1364 * trans-openmp.c (gfc_is_polymorphic_nonptr,
1365 gfc_is_unlimited_polymorphic_nonptr): New.
1366 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
1367 polymorphic scalars.
1369 2021-05-23 Harald Anlauf <anlauf@gmx.de>
1372 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1373 implicit conversion of actual argument to an unlimited polymorphic
1376 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
1378 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1379 proper variable name in the description.
1381 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
1382 Steve Kargl <kargl@gcc.gnu.org>
1385 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1386 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1387 lib-call of caf_random_init instead of logical (4-byte).
1388 * trans.h: Add tree var for random_init.
1390 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
1392 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1394 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
1397 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1399 2021-05-17 Harald Anlauf <anlauf@gmx.de>
1402 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1405 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
1408 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1411 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1413 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1414 EXEC_OMP_PARALLEL_MASTER.
1415 * frontend-passes.c (gfc_code_walker): Likewise.
1416 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1417 ST_OMP_END_PARALLEL_MASTER.
1418 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1419 * match.h (gfc_match_omp_parallel_master): Handle it.
1420 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1421 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1422 * parse.c (decode_omp_directive, case_exec_markers,
1423 gfc_ascii_statement, parse_omp_structured_block,
1424 parse_executable): Likewise.
1425 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1426 * st.c (gfc_free_statement): Likewise.
1427 * trans-openmp.c (gfc_trans_omp_parallel_master,
1428 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1429 * trans.c (trans_code): Likewise.
1431 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1433 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1434 for vars in 'omp threadprivate' and 'omp declare target'.
1436 2021-05-10 Martin Liska <mliska@suse.cz>
1438 * decl.c (variable_decl): Use startswith
1439 function instead of strncmp.
1440 (gfc_match_end): Likewise.
1441 * gfortran.h (gfc_str_startswith): Likewise.
1442 * module.c (load_omp_udrs): Likewise.
1443 (read_module): Likewise.
1444 * options.c (gfc_handle_runtime_check_option): Likewise.
1445 * primary.c (match_arg_list_function): Likewise.
1446 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1447 * trans-expr.c (gfc_conv_procedure_call): Likewise.
1448 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1450 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
1454 * class.c (gfc_build_class_symbol): Remove the error that
1455 disables assumed size class arrays. Class array types that are
1456 not deferred shape or assumed rank are given a unique name and
1457 placed in the procedure namespace.
1458 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1460 (gfc_trans_dummy_array_bias): Suppress the runtime error for
1461 extent violations in explicit shape class arrays because it
1463 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1464 class actual arguments passed to non-descriptor formal args by
1465 using the data pointer, stored as the symbol's backend decl.
1467 2021-05-05 Harald Anlauf <anlauf@gmx.de>
1470 * interface.c (gfc_compare_actual_formal): Continue checks after
1471 emitting warning for argument length mismatch.
1472 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1475 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1478 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1480 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
1482 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1483 checking whether a '%' or parenthesis-open follows as next character.
1485 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1488 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1489 and then pass a pointer.
1491 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1492 Nathan Sidwell <nathan@codesourcery.com>
1493 Tom de Vries <vries@codesourcery.com>
1494 Julian Brown <julian@codesourcery.com>
1495 Kwok Cheung Yeung <kcy@codesourcery.com>
1497 * lang.opt (Wopenacc-parallelism): New.
1499 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1502 * check.c (variable_check): Allow function reference having a data
1504 (arg_strlen_is_zero): New function.
1505 (gfc_check_fgetputc_sub): Add static check of character and status
1507 (gfc_check_fgetput_sub): Likewise.
1508 * intrinsic.c (add_subroutines): Fix argument name for the
1509 character argument to intrinsic subroutines fget[c], fput[c].
1511 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1514 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1515 from a function reference.
1517 2021-04-22 Martin Liska <mliska@suse.cz>
1521 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1523 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
1526 * trans-intrinsic.c (build_round_expr): If int type is larger than
1527 long long, do the round and convert to the integer type. Do not
1528 try to find a floating point type the exact size of the integer
1531 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
1533 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1534 in the depend clause.
1535 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1536 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1537 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1538 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1539 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1540 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1541 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1542 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1544 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1545 Handle 'omp depobj'.
1546 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1548 * resolve.c (gfc_resolve_code): Likewise.
1549 * st.c (gfc_free_statement): Likewise.
1550 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1551 in the depend clause.
1552 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1553 * trans.c (trans_code): Likewise.
1555 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
1558 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1559 association with a check that the current and symbol namespaces
1562 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1564 * lang.opt (fopenacc-kernels=): Remove.
1566 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1569 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1570 pointers and allocatables with correct TKR parameters.
1572 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1575 * resolve.c: Add association check before de-referencing pointer.
1577 2021-04-16 Harald Anlauf <anlauf@gmx.de>
1578 Paul Thomas <pault@gcc.gnu.org>
1581 * module.c (write_symtree): Do not write interface of intrinsic
1582 procedure to module file for F2003 and newer.
1584 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
1587 * symbol.c: Remove trailing white space.
1588 * trans-array.c (gfc_trans_create_temp_array): Create a class
1589 temporary for class expressions and assign the new descriptor
1591 (build_class_array_ref): If the class expr can be extracted,
1592 then use that for 'decl'. Class function results are reliably
1593 handled this way. Call gfc_find_and_cut_at_last_class_ref to
1594 eliminate largely redundant code. Remove dead code and recast
1595 the rest of the code to extract 'decl' for remaining cases.
1596 Call gfc_build_spanned_array_ref.
1597 (gfc_alloc_allocatable_for_assignment): Use class descriptor
1598 element length for 'elemsize1'. Eliminate repeat set of dtype
1599 for class expressions.
1600 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1601 additional code from build_class_array_ref, and use optional
1602 gfc_typespec pointer argument.
1603 (gfc_trans_scalar_assign): Make use of pre and post blocks for
1604 all class expressions.
1605 * trans.c (get_array_span): For unlimited polymorphic exprs
1606 multiply the span by the value of the _len field.
1607 (gfc_build_spanned_array_ref): New function.
1608 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1609 eliminate repeated code.
1610 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1611 add prototype for gfc_build_spanned_array_ref.
1613 2021-04-14 Martin Liska <mliska@suse.cz>
1615 * intrinsic.texi: The table has first column empty and it makes
1616 trouble when processing makeinfo --xml output.
1618 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
1621 * trans-types.c (gfc_get_function_type): Also generate hidden
1622 coarray argument for character arguments.
1624 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
1627 * interface.c (compare_parameter): The codimension attribute is
1628 applied to the _data field of class formal arguments.
1630 2021-04-01 Harald Anlauf <anlauf@gmx.de>
1633 * simplify.c (gfc_simplify_transpose): Properly initialize
1636 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
1639 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1640 for class expressions and detect proc pointer evaluations by
1641 the non-null actual argument list.
1643 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
1645 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1647 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
1650 * intrinsic.c (gfc_intrinsic_func_interface): Set
1651 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1653 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
1656 * resolve.c (resolve_operator): Make 'msg' buffer larger
1659 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
1662 * trans-decl.c (build_function_decl): Add comment;
1663 increment hidden_typelist for caf_token/caf_offset.
1664 * trans-types.c (gfc_get_function_type): Add comment;
1665 add missing caf_token/caf_offset args.
1667 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
1670 * match.c (select_type_set_tmp, gfc_match_select_type,
1671 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1672 * resolve.c (resolve_select_type): Likewise.
1674 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1676 * frontend-passes.c (inline_limit_check): Add rank_a
1677 argument. If a is rank 1, set the second dimension to 1.
1678 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1679 (call_external_blas): Likewise.
1681 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1684 * frontend-passes.c (doloop_contained_procedure_code):
1685 Properly handle EXEC_IOLENGTH.
1687 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
1690 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1691 assignment by setting init_flag.
1693 2021-03-14 Harald Anlauf <anlauf@gmx.de>
1694 Paul Thomas <pault@gcc.gnu.org>
1696 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1698 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1700 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
1703 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1704 length components use the ss_info string length instead of
1705 gfc_get_expr_charlen. Make sure that the deferred string length
1706 is a variable before assigning to it. Otherwise use the expr.
1707 * trans-expr.c (gfc_conv_string_length): Make sure that the
1708 deferred string length is a variable before assigning to it.
1710 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
1713 * resolve.c (resolve_symbol): Accept vars which are in DATA
1714 and hence (either) implicit SAVE (or in common).
1716 2021-03-10 Harald Anlauf <anlauf@gmx.de>
1719 * data.c (gfc_assign_data_value): Reject non-constant character
1721 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1722 elements which are defined to avoid NULL pointer dereference.
1724 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
1726 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1728 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
1731 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1732 that __float128 is the 128-bit floating-point type.
1734 2021-03-08 Harald Anlauf <anlauf@gmx.de>
1737 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1738 attribute in DATA statement.
1740 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1744 * invoke.texi (-freal{4,8}-real-*): Extend description.
1745 * primary.c (match_real_constant): Also promote real literals
1746 with '_kind' number.
1748 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
1751 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1752 redoing kind conversions.
1753 * primary.c (match_real_constant): Likewise.
1755 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1758 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1760 (resolve_omp_clauses): Likewise.
1762 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1765 * frontend-passes.c (doloop_code): Replace double space in diagnostics
1766 with a single space.
1768 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
1771 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1772 'derived_array' to hold the fixed, parmse expr in the case of
1773 assumed rank formal arguments. Deal with optional arguments.
1774 (gfc_conv_procedure_call): Null 'derived' array for each actual
1775 argument. Add its address to the call to gfc_conv_derived_to_
1776 class. Access the 'data' field of scalar descriptors before
1777 deallocating allocatable components. Also strip NOPs before the
1778 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1779 input to gfc_deallocate_alloc_comp if it is available.
1780 * trans.h : Include the optional argument 'derived_array' to
1781 the prototype of gfc_conv_derived_to_class. The default value
1784 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
1787 * resolve.c (resolve_fl_procedure): Include class results in
1788 the test for F2018, C15100.
1789 * trans-array.c (get_class_info_from_ss): Do not use the saved
1790 descriptor to obtain the class expression for variables. Use
1791 gfc_get_class_from_expr instead.
1793 2021-02-23 Harald Anlauf <anlauf@gmx.de>
1796 * simplify.c (gfc_simplify_reshape): Set string length for
1797 character arguments.
1799 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
1802 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1803 dummy procs as nonoptional as no special treatment is needed.
1805 2021-02-21 Harald Anlauf <anlauf@gmx.de>
1807 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1808 allocatable intent(out) argument.
1810 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1813 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1814 IMPLICIT NONE and and issue an error, otherwise set the type
1815 to its IMPLICIT type so that any subsequent use of objects will
1816 will confirm their types.
1818 2021-02-19 Harald Anlauf <anlauf@gmx.de>
1820 * symbol.c (gfc_add_flavor): Reverse order of conditions.
1822 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1825 * dependency.c (gfc_dep_resolver): Fix coarray handling.
1827 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1832 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1835 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1838 2021-02-17 Julian Brown <julian@codesourcery.com>
1840 * openmp.c (resolve_omp_clauses): Disallow selecting components
1841 of arrays of derived type.
1843 2021-02-17 Julian Brown <julian@codesourcery.com>
1845 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1846 for arrays of derived types.
1848 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1850 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1851 %im and %re which are EXPR_VARIABLE.
1852 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1854 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1857 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1858 as (array-valued) FORMAT tag.
1860 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
1863 * trans-expr.c (gfc_conv_procedure_call): Don't reset
1864 rank of assumed-rank array.
1866 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1869 * match.c (gfc_match_call): Include associate names as possible
1870 entities with typebound subroutines. The target needs to be
1871 resolved for the type.
1873 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1876 * primary.c (gfc_match_varspec): Test for non-null 'previous'
1877 before using its name in the error message.
1879 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
1881 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1882 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1883 array' as scalars are also permitted.
1885 2021-02-10 Julian Brown <julian@codesourcery.com>
1888 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1889 contiguity check and stride-specified error.
1891 2021-02-04 Julian Brown <julian@codesourcery.com>
1893 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1894 contiguity check and stride-specified error.
1896 2021-02-04 Julian Brown <julian@codesourcery.com>
1898 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1901 2021-02-04 Julian Brown <julian@codesourcery.com>
1903 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1906 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
1908 * openmp.c (resolve_omp_clauses): Explicitly diagnose
1909 substrings as not permitted.
1911 2021-02-03 Jeff Law <law@redhat.com>
1913 * intrinsic.texi (ANINT): Fix typo.
1915 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
1918 * dependency.c (gfc_dep_resolver): Treat local access
1919 to coarrays like any array access in dependency analysis.
1921 2021-01-28 Harald Anlauf <anlauf@gmx.de>
1924 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1925 size is NULL (as documented).
1927 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1931 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1932 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1934 (gfc_trans_assignment_1): Similarly suppress class assignment
1935 for class valued procedure pointers.
1937 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1940 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1941 procedure pointers in the assert under the comment 'elemental
1942 function' and eliminate the second, spurious assert.
1944 2021-01-25 Harald Anlauf <anlauf@gmx.de>
1947 * data.c (create_character_initializer): Check substring indices
1949 (gfc_assign_data_value): Catch error returned from
1950 create_character_initializer.
1952 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
1954 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1956 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
1959 * resolve.c (resolve_charlen): Check that length expression is
1960 present before testing for scalar/integer..
1962 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
1965 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1966 component for scalar class function targets. Instead, fix the
1967 function result and access the _data from that.
1969 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
1971 * intrinsic.texi (CO_MAX): Fix typo.
1973 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
1976 * decl.c (gfc_match_modproc): It is not an error to find a
1977 module procedure declaration within a contains block.
1978 * expr.c (gfc_check_vardef_context): Pure procedure result is
1979 assignable. Change 'own_scope' accordingly.
1980 * resolve.c (resolve_typebound_procedure): A procedure that
1981 has the module procedure attribute is almost certainly a
1982 module procedure, whatever its interface.
1984 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
1987 * openmp.c (resolve_omp_clauses): Change use_device_ptr
1988 to use_device_addr for unless type(c_ptr); check all
1989 list item for is_device_ptr.
1991 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1993 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
1994 * frontend-passes.c (gfc_code_walker): Walk detach expression.
1995 * gfortran.h (struct gfc_omp_clauses): Add detach field.
1996 (gfc_c_intptr_kind): New.
1997 * openmp.c (gfc_free_omp_clauses): Free detach clause.
1998 (gfc_match_omp_detach): New.
1999 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
2000 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
2001 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
2002 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
2003 (resolve_omp_clauses): Prevent use of detach with mergeable and
2004 overriding the data sharing mode of the event handle.
2005 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
2006 * trans-types.c (gfc_c_intptr_kind): New.
2007 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
2009 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
2011 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
2012 ...this. Add extra argument.
2014 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2016 * gfortran.h (gfc_resolve_substring): Add prototype.
2017 * primary.c (match_string_constant): Simplify substrings with
2018 constant starting and ending points.
2019 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
2020 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
2022 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2025 * resolve.c (resolve_component): Derived type components with
2026 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2028 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2031 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2034 * resolve.c (resolve_component): Derived type components with
2035 ALLOCATABLE or POINTER attribute shall have a deferred shape.
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-08 Paul Thomas <pault@gcc.gnu.org>
2046 * trans-expr.c (gfc_conv_component_ref): Remove the condition
2047 that deferred character length components only be allocatable.
2049 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
2052 * simplify.c (is_constant_array_expr): If an array constructor
2053 expression has elements other than constants or structures, try
2054 fixing the expression with gfc_reduce_init_expr. Also, if shape
2055 is NULL, obtain the array size and set it.
2057 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
2060 * resolve.c (find_array_spec): Put static prototype for
2061 resolve_assoc_var before this function and call for associate
2064 2021-01-06 Harald Anlauf <anlauf@gmx.de>
2066 * resolve.c (resolve_component): Add check for valid CLASS
2067 reference before trying to access CLASS data.
2069 2021-01-04 Martin Liska <mliska@suse.cz>
2071 * ChangeLog-2018: Remove duplicate ChangeLog entries.
2073 2021-01-01 Harald Anlauf <anlauf@gmx.de>
2075 * class.c (gfc_find_vtab): Add check on attribute is_class.
2077 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2079 * gfortranspec.c (lang_specific_driver): Update copyright notice
2081 * gfc-internals.texi: Bump @copying's copyright year.
2082 * gfortran.texi: Ditto.
2083 * intrinsic.texi: Ditto.
2084 * invoke.texi: Ditto.
2086 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2088 * ChangeLog-2020: Rotate ChangeLog. New file.
2091 Copyright (C) 2021 Free Software Foundation, Inc.
2093 Copying and distribution of this file, with or without modification,
2094 are permitted in any medium without royalty provided the copyright
2095 notice and this notice are preserved.